texts:
We had a drawing as a PDF , with Geolocation and layer information available. We tried to export that as an Xml ( current tree) option in Adode reader and tried to import it in a new File geodatabase.

The error we encountered was there is no workspace associated with the Xml.

What would be the ideal procedure to convert a Pdf to a Geodatabase ?


texts: How to add vertices to existing linestrings?

texts:
If I have

Linestring(1 2, 1 5, 1 9)

and a

Point(1 3)

Is there any function that can merge linestring and point preserving the order
so output would be:

Linestring(1 2, 1 3, 1 5, 1 9)


texts: In OpenLayers 3, there is is ol.source.TileWMS and ol.source.ImageWMS. I don't know if this is specific to OpenLayers, but what are the trade-offs between tileWMS and imageWMS? Is there a performance difference? Other trade-offs?


texts:
In a script on PyQGIS, after a for cycle, I obtain a list like:

LIST:, [[[0], 0.035, [0], [0], [0], [0], 0.036, 0.031]])

I need to put that values in the column of Shapefile Attribute Table, but I'm not able to do this, and the result is only a series of 0,000.

Can anyone help me find the error?

Final part of the script:

    for p in int_points:
        valore = prov_raster.identify(
            p,QgsRaster.IdentifyFormatValue).results()[1]
        ang_OBSTd = [0]
        difelev = (valore - valore_iniz)
        if (difelev) >= 200:
            values.append(valore)
            distanza = values.index(valore)*xsize
            tana = (valore / distanza)
            tan_a.append(tana)

            ang_OBSTd = np.degrees(np.arctan(np.max(tan_a)))
        else:
            values.append(0)

LIST.append(ang_OBSTd)
angle = [LIST]
feat.setAttributes([i, angle, value[idx_lines[i]],direction[k]])
feat.setGeometry(geom)


texts:
I'm trying to join over a hundred tables (arranged in columns) in ArcGIS using Python (ArcPy). They all have the same number of rows and columns (same data, but different values). I had them as dBase tables but converted them to geodatabase tables to use the "Make Query Table" function.
Here's my script:
import arcpy
arcpy.env.workspace = " d:/INDICES5/Pixelnum/output.gdb "
tables = arcpy.ListTables()
#print (tables)
for table in tables:
    if table.endswith("NDVI_TBL"):
    #print(table)
        arcpy.MakeQueryTable_management (table, "summarystats","USE_KEY_FIELDS", "", "Pixel_num", "") ---

The problem appears to be in the last line. How can I debug this? I'm not sure what I'm missing out.
Also, if anyone has any suggestion on how I could join the tables using a different method, I would like to know.


texts: Adding distance when buffering point geometry in a geodataframe?

texts:
I have 2 geodataframes that I want to combine. They the same fields/columns but different geometries (one is points, one is polygons).To do this I want to buffer the points slightly (like 10m or something) so that points_gdf['geometry'] is changed to a "POLYGON". I tried changing to an projected crs that should be in meters first:

points_df = points_df.to_crs({'init': 'epsg:3174'})
points_df['geometry'] = points_df.geometry.buffer(10)

Once the buffer has completed, I concatenate it with my polygon geodataframe and change the crs back to the original.Then I write it to a shapefile to view it.

df_list = [poly_df, points_df]
final_combine = gpd.GeoDataFrame(pd.concat(df_list,sort=True))
final_combine.crs = {'init': 'epsg:4326'}
final_combine.to_file(final_out_feat)

When I view it, I am getting these giant polygon points that completely overshadow the other polygons. What could I be doing wrong here?


texts: Printing large size with OpenLayers plugin basemaps?

texts:
trying to print A0, with one of the maplayers from the openlayers plugin, the resulting print misses tiles and is corrupted. any scale i choose there's no way except (i need >= 1.50.000)

I tried to edit the network settings (timeout and number of tiles) but still the same result.

Anybody know how to fix this?


texts: Identifying suitable head (H) for hydro power estimation from 30m SRTM DEM data using focal statistic analysis

texts: I am doing my project on identifying suitable sites for locating small-scale hydro power. I have all other necessary variables but I am confused about extracting Head (H) values in meters from SRTM 30m DEM using focal statistic analysis. Please someone help me. I have both 30m and 90m DEM and drainage network for my study area.


texts: I can't load layer into qthread object in QGIS

texts:
Below, I show you an extract of the code to load a layer using threads, following the instructions shown here: Snorfalorpagus
But the layer does not load, or it loads but it is not shown, and the truth is that I have no idea why this happens

class Worker(QtCore.QObject):

def __init__(self):
    QtCore.QObject.__init__(self)

def run(self):
    path = "C:\Users\user\Documents"
    layer = QgsVectorLayer(path, "Layer.shp", "ogr")
    QgsMapLayerRegistry.instance().addMapLayer(layer)
    ...

Edit copied in by mod from answer response:

Yes, a cut/paste error was here, but don't in PY file,sorry.
yes, I tested that layer is valid with method 'layer.isValid()' and return True, for this, I supposse that layer is loaded, but I don't know, why it Don't show in Layer Panel.
and the MainClass with call and run the worked class is..

class MainClass:
"""QGIS Plugin Implementation."""

def __init__(self, iface):
...
def run(self):
    """Run method that performs all the real work"""

    # show the dialog
    self.dlg.show()
    # Run the dialog event loop
    result = self.dlg.exec_()
    # See if OK was pressed
    if result:
        # Do something useful here - delete the line containing pass and
        # substitute with your code.

        # start the Worker in a new thread
        thread = QtCore.QThread(self.iface)
        worker = Worker(arg)
        worker.moveToThread(thread)
        worker.finished.connect(self.workerFinished)
        worker.error.connect(self.workerError)
        worker.progress.connect(progressBar.setValue)
        thread.started.connect(worker.run)
        thread.start()
        self.thread = thread
        self.worker = worker

And Sorry for my english.


texts: Popup acting as a splash screen for Leaflet map

texts:
I have a custom popup that is acting as a disclaimer/splash screen when is first loaded. At the moment, the popup is removed when the user hits the close button or clicks outside of the popup. However, is the mouse wheel is scrolled, or the user uses the zoom tools, the map zooms in, however the pop up remains. How do I disable all map functions until the popup is removed.

var popup = L.popup({
    closeButton: true,
    autoClose: true
    })
    .setLatLng(map.getBounds().getCenter())
    .setContent('
Some Disclaimer Text.
')
    .openOn(map);


texts: Creating floating-only (non-dockable) window in ArcMap using ArcObjects?

texts:
I'm looking for a way to create a floating window in ArcMap. To give an example just look at the window of the Identify tool.

Floating means that it stays in front of the map document at all times and that the user can continue to work with ArcMap. I know that the interface IDockableWindowDef can be used to create dockable windows which can also float, but I don't want them to dock. To my knowledge it's not possible to prevent forms created by IDockableWindowManager from docking if e.g. the user pushes them to the border of the ArcMap window.

Any ideas?

The solution was to search for keywords like child window and MDI. HTH

The problem's solution seems to be as easy as @llcf's answer:

MyForm form = new MyForm();
form.Show(NativeWindow.FromHandle(new IntPtr(m_application.hWnd)));


texts: Help serializing a postGIS query to geojson

texts:
I have a query which I would like to serialize to geoJSON:

select article_title, pub_date, city, geom
from article, location
where article.id = location.id;

I can serialize the geom field easily enough with:

select st_asgeojson(geom) from location;

and the fields from article with:

select row_to_json(t) from(select article_title, pub_date from article) t;

The problem is I can't find a way to serialize properly to geojson from both the article and location fields. Can anyone help me with this? Let me know if you need any more details.

UPDATE!

I've got some of the way with this:

select row_to_json(featcoll)
from
(select 'FeatureCollection' As type, array_to_json(array_agg(feat)) as features
from (select 'Feature' as type,
st_asgeojson(l.geom)::json as geometry,
row_to_json((select l from (select city) as l))
as properties
from location as l)
as feat)
as featcoll;

which is returning this:

{
    "type":"FeatureCollection",
    "features":[
        {
            "geometry":{
                "type":"Point",
                "coordinates":[
                    -1.54907226540932,
                    54.7547462165902
                ]
            },

I now need to add time property from the article table so it looks something like:

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "pub_date": "2013-01-22 08:42:26+01"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    7.582512743,
                    51.933292258,
                ]
            }
        },


texts: QGIS saves Eastings and Northings as 0, despite displaying correct coordinates

texts:
A point layer in a geopackage contains easting format_number($x,0) and northing format_number($y,0) fields to record co-ordinates.

The CRS for the project and the layer are set to BNG. When creating a feature, co-ordinates are accurately recorded, however both easting and northing change to 0 when updates to the layer are saved.

QGIS version 3.4.6


texts: I have imported a DXF file into QGIS 3 and it displays fine but I want to change the extents to a different location. The Layer Properties/Update Extents does nothing if I pick it:


texts: SelectLayerByLocation_management gives ERROR 000368: Invalid input data?

texts:
I'm trying to use SelectLayerByLocation_managment in a script and keep getting the following error:
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000368: Invalid input data.
ERROR 000732: Selecting Features: Dataset pnrsLyr does not exist or is not supported
Failed to execute (SelectLayerByLocation).

I made both feature classes into layers. When I run the same syntax in the Python command window in ArcMap it seems to work fine.
Here's the script:
import arcpy

cities = r"C:\RS_Data\Python\Geog485\Lesson3\Lesson3PracticeExercises\Lesson3PracticeExerciseA\Washington.gdb\CityBoundaries"
pnrs = r"C:\RS_Data\Python\Geog485\Lesson3\Lesson3PracticeExercises\Lesson3PracticeExerciseA\Washington.gdb\ParkAndRide"

citiesLyr = arcpy.MakeFeatureLayer_management(cities)
pnrsLyr = arcpy.MakeFeatureLayer_management(pnrs)
print "made feature layers"

nameField = "HasParkAndRide"

selection = arcpy.SelectLayerByLocation_management("citiesLyr","INTERSECT","pnrsLyr")


texts:
I'm new to GIS. Trying to use Finnish population data on 1km tiles available here: http://www.stat.fi/org/avoindata/paikkatietoaineistot_en.html

The WFS service is here: http://geo.stat.fi/geoserver/vaestoruutu/wfs

I'm using owslib to access the service:

from owslib.wfs import WebFeatureService
url = 'http://geo.stat.fi/geoserver/tilastointialueet/wfs'
wfs20 = WebFeatureService(url=url, version='2.0.0')
response = wfs20.getfeature(typename='tilastointialueet:hila1km')

First of all this response is huge, but I don't know how to ask for a smaller response. I don't understand how to get this response to a geopandas dataframe. I've tried:

out = open('data.gml', 'wb')
out.write(bytes(response.read(), 'UTF-8'))
out.close()
import geopandas
tiles = geopandas.read_file('data.gml')

but get the error CPLE_OpenFailedError: b'Unable to open EPSG support file gcs.csv.  Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.' I think that the correct EPSG should be 3067, but I don't know how to specify this when reading the file.

How to get this data to a geopandas dataframe?


texts: Calling Python through BAT for Scheduled Task

texts:
I'm using ArcGIS 10.1 and setting up some scheduled tasks to run on our server.
I am calling a python script in a .bat file.

When  it runs, the connection to our SDE database is "invalid" or do not exist/supported.

However, if I open ArcCatalog and connect to our SDE it runs without a hitch.

In the script I have a few feature classes referenced as this:

Database Connections\\Connection to gisserver.sde\\master.DBO.Blah\\master.DBO.Towns

And the SDE as :

masterSDE = "Database Connections\\Connection to gisserver.sde"

I want this script to be automated overnight, so opening up ArcCatalog is not an option.

Is there  a way to establish a connection to databases (SDE's) like you would in ArcCatalog programmatically?


texts:
QGIS 3.16
How do I import a GeoGraphix landgrid CDF file into QGIS? As I do not have access to the GeoGraphix program anymore.


texts:
I'm considering implementing a WFS client that, each time the map's view area is moved, fetches the features within that bounding box, and combines them with features previously fetched. Much of the time there will be features downloaded that already exist in the "previously fetched" dataset, so these need to be not duplicated.

Is there a Turf operation to merge two FeatureCollections in this way?  I can't see such a thing. union combines two different polygons into a new one. combine combines Point/LineString/Polygon features into MultiPoint/MultiLineString/MultiPolygon.


texts: Postgis - Splitting polygon with line returns different size polygons that creates holes/overlaps

texts:
It feels like I've been struggling with this 'simple' problem for years, hopefully it is just a noob mistake..
We are using Postgis to facilitate an interface we wrote to do spatial editing, like splitting. When I split a polygon with a linestring, in this example below, the two returned polygons are smaller and creates holes between them and the touching features. As I gathered from other posts, it is due to 'rounding' within st_split - if anyone can confirm?

In this example, it creates a very small hole shown with the black line.

This shouldn't be a problem, because I figured I can just snap the splitted feature to the touching feature or exterior ring of original or, or.. But it doesn't seem like snapping does anything, the original wrong polygons is returned - I tried different snapping tolerances as well.
What I've tried:
Straight forward split: Holes created with touching features
Iterate through splitted polygons, snapping using different approaches.
-snap to exterior ring.
-snap to the union of exterior ring and the other splitted polygon.
-snap to the union of touching features and the other splitted polygon.
All resulted in the same holes, doesn't seem like snapping made any changes.
I even tried not using the splitted polygon, but to make a polygon using the difference of the original polygon and the other splitted polygon - but this obviously created unwanted slivers added to the result.
Even upgraded from postgis 2.4.4 to 2.5.3, hoping it was a postgis bug.
My end goal is simple, I need to split a polygon with a linestring, and the resulted polygons shouldn't create holes/overlaps with its neighbouring features. But with st_split and/or st_snap, I'm just not getting it right.. Either I'm doing it wrong, or somebody had the same issue and resolution.
EDIT:
Example:
Main Polygon that needs to split:
'POLYGON((808369 1000106,808344 999973,807912 999980,807753 1000472,807882 1000643,808409 1000419,808469 1000393,808369 1000106))'

Splitting linestring:
'LINESTRING(807765.0170035374 1000047.1389691661,808173.4773734363 1000627.5826527067)'

Touching features to main polygon:
'POLYGON((808273.979982937 999453.309405212,806977.263634936 999559.01997706,807034 999718,807120 999959,807532 1000288,807742 1000457,807753 1000472,807912 999980,808344 999973,808279 999628,808273.98 999453.31,808273.979982937 999453.309405212))'

'POLYGON((808267 999210,808273.979982937 999453.309405212,808273.98 999453.31,808279 999628,808344 999973,808369 1000106,808469 1000393,808475 1000391,808615 1000065,808618 999395,808620 998905,808640.709074031 998823.783631442,808408.592759303 998769.168027977,808321.474272447 998748.671005211,808267 999210))'


texts:
I'm new with GIS systems and I need to determine if a point is into a polygon, I'm using a shapefile with SRID 32717 and I have a list of points (long, lat). With QGIS I export the shapefile to a PostGIS database, and I'm using the st_contains function, this is my query:

select * from geo_data
where st_contains(geom, ST_GeomFromText('POINT(-78.480439 -0.179156)',32717))

I validate that the point is into a polygon, but the query does not return records.

You can download the shapefile from here:

http://www.inec.gob.ec/estadisticas/index.php?option=com_remository&Itemid=&func=startdown&id=1361&lang=es&TB_iframe=true&height=250&width=800


texts: DB Manager (sqlite database) Preview tab not active

texts: I am trying to import a .shp file into DB Manager (sqlite database) and Preview tab is not active. An error also appears = VirtualElementary (QGIS 2.14.10 Essen on MACOSX)


texts: Calculating width of polygon relative to polyline using ArcGIS Desktop?

texts:
I need to estimate the different widths of the polygons that surround some polylines. The polygons correspond to wetlands (buffer zones) and the lines represent the rivers. The catchment that I´m working with is very large, so I need an "automatic" way to solve this.

Any ideas?


texts: What is exactly Geotrigger service by ESRI?

texts:
I am going through the FAQ's of ESRI latest Geo-trigger service & according to FAQ it provides location-based alerts for mobile platform.

What is exactly Geotrigger service by ESRI ?


texts: Registering local folders on ArcGIS 10.2.2

texts:
We have all our geodatabases stored on a dedicated ArcGIS server in a folder D:\GeoData. This folder is shared as \\GISSERVER\GeoData. Any users working from their work stations have to reference this UNC path, however the server can reference this as local path D:\GeoData

My question is, should the UNC path always be used, and local path NEVER used, even if publishing from the server? I am proposing that the data be moved to a different server so that there is never any ambiguity, i.e. everyone uses the same path, period.

Presently, we have 2x registered folders for the same data source (folder). One is Local and one is UNC. It doesn't make sense to me. We never copy data to the server when publishing, always keeping a single source.


texts:
I'm trying to edit my local database using JOSM. I'm already running the "Rails Port API" and pointing to it.
I imported a pbf file to my local database using the osm2pgsql without errors.
The connection is validated in the JOSM's Connection settings, and I already tried to use the basic authentication and OAuth authentication and the two are working without problems.
But, when I tried to download the data on the JOSM (using the Ctrl + Shift  + Down option) appears the error "No data found in this area".
In my development.log of the API shows the JOSM's call:
Parameters:    {"bbox"=>"-48.9653778,-26.4644263,-48.8960266,-26.4481357"}

SELECT  "current_nodes".* FROM "current_nodes" WHERE (( tile BETWEEN 870717944 AND 870717951 OR tile BETWEEN 870718288 AND 870718303 OR tile BETWEEN 870718320 AND 870718335 OR tile BETWEEN 870718416 AND 870718425 OR tile BETWEEN 870718428 AND 870718429 OR tile BETWEEN 870718632 AND 870718636 OR tile BETWEEN 870718976 AND 870718980 OR tile BETWEEN 870718984 AND 870718988 OR tile BETWEEN 870719008 AND 870719012 OR tile BETWEEN 870719016 AND 870719020 OR tile BETWEEN 870719104 AND 870719108 OR tile BETWEEN 870719112 AND 870719113 OR tile IN (870718638,870718982,870718990,870719014,870719022,870719110,870719116) ) AND latitude BETWEEN -264644263.0 AND -264481357.00000003 AND longitude BETWEEN -489653778.0 AND -488960266.0) AND "current_nodes"."visible" = $1 LIMIT 50001  [["visible", "t"]]
Relation Load (22.2ms)  SELECT "current_relations".* FROM "current_relations" INNER JOIN "current_relation_members" ON "current_relation_members"."relation_id" = "current_relations"."id" WHERE "current_relation_members"."member_type" = 'Node' AND 1=0 AND "current_relations"."visible" = $1  [["visible", "t"]]
Relation Load (0.2ms)  SELECT "current_relations".* FROM "current_relations" INNER JOIN "current_relation_members" ON "current_relation_members"."relation_id" = "current_relations"."id" WHERE "current_relation_members"."member_type" = 'Way' AND 1=0 AND "current_relations"."visible" = $1  [["visible", "t"]]
Relation Load (0.2ms)  SELECT "current_relations".* FROM "current_relations" INNER JOIN "current_relation_members" ON "current_relation_members"."relation_id" = "current_relations"."id" WHERE "current_relation_members"."member_type" = 'Relation' AND 1=0 AND "current_relations"."visible" = $1  [["visible", "t"]]

But my current_nodes table is empty. Does anybody know how I can populate this table to edit in an editor?
I think that my question is related to this issue: http://github.com/openstreetmap/openstreetmap-website/issues/282


texts: develop own mobile app connecting with external gps receiver

texts:
I want to develop a mobile app that can use external GPS as source for collecting high accurate point.

And I just found how to connect Trimble R1 or Trimble R2 to android device using bluetooth based on 'GNSS status' App and allowing 'Mock Location' on developer options in the android device...

So, I just wonder how to apply the same issue with other Trimble devices such as R3 and R4?

Any ideas or suggestions?


texts: Correcting for local topography in calculating TRI from DEM in ArcGIS

texts:
I'm currently investigating the use of different equipment in calculating TRI from elevation data using ArcGIS. From the methods available (http://gis4geomorphology.com/roughness-topographic-position/) the ruggedness calculated is influenced by overall elevation, i.e. a slope can be smooth but have a higher TRI than a bumpy flat surface.

Is there a way to correct for this influence of local topography? I'd ideally like to create a relative ruggedness index where the raster layer is purely based on ruggedness rather than elevation?

Additional information

I would like to calculate the ruggedness of a terrain, specifically a volcano with a solidified lava flow. In theory (photographs of the site) the lava flow is considered rougher than the volcano. However using the methods of calculating ruggedness the volcano is considered rough and the lava flow considered smooth. I would like to remove this local topography to calculate the roughness based on, essentially, the geology alone.


texts:
I am trying to join multiple records that occupy the same location (polygon centroid) and have tried using the join by location plug-in but have found this does not work for me in this case as I have more than one (up to 10) records that share the same location.

I am trying to reduce the geometry by appending all records to the one point. Is there a solution in QGIS that can help me achieve this?


texts: How can i set a projectproperty with a python plugin? I like to activate the legendfilter for Nodes with existing feature.


texts: DesignJet 800 36" by 42" arcmap Print acrossed the whole paper

texts: I'm trying to print a map using the whole size of paper... possible?


texts: QGIS depends on gdal-abi-2.1.1 not installable

texts: I tried to install QGIS on debian sid but it depends on gdal-abi-2-1-1 that should be contained in libgdal20. But libgdal20 is already on gdal-abi-2-1-2. Is there a solution for this? Installing gdal-abi-2-1-1 or using qgis with gdal-abi-2-1-2?


texts: Exporting OpenStreetMap data to shapefile

texts:
I want to have river paths and Parks/natural/Landscape shapefiles in our region:
https://www.openstreetmap.org/note/1070052#map=11/45.1259/38.4660&layers=CN

How should I export this layer to a shapefile?

Before this I googled it a lot but I couldn't find anyway.


texts: Comparing pixel values at a given point in two rasters

texts: I have two raster images, one for land use and one for NDVI, i would like to calculate LAI based on land use. So i need to compare the pixel value in the NDVI raster and Land use raster then select which formula to use. How do i approach this in python? I am a beginner.


texts: Display feature reduction Clustering points count ArcGIS js feature layer?

texts:
I am able to cluster the points in the map using the following code:

 var serviceUrl = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Places_of_Worship_India/FeatureServer/0";
    var layer = new FeatureLayer(serviceUrl, {
      outFields: [ "name", "religion", "denomination" ],
      featureReduction: {
        type: "cluster"
      },
      infoTemplate: new PopupTemplate({
        title: "{name}",
        description: "Religion: {religion}"
          + "<br>Denomination: {denomination}"
      })
    });
    map.addLayer(layer);

But I need to display cluster points count on top of the cluster image.


texts: GeoServer Transformation Function (Categorize) Problem

texts:
I'm trying run three filter functions(Recode,Categorize,Interpolate) described at the bottom of this page
http://docs.geoserver.org/stable/en/user/filter/function_reference.html

Recode and Interpolate works fine but Categorize throws me the following exception message. 'java.lang.RuntimeException: Unable to find function Categorize'

What could cause this problem ? Am I supposed to install a plugin on geoserver or what?

The official examples are on
http://docs.geoserver.org/stable/en/user/styling/sld-tipstricks/transformation-func.html


texts:
having never used ArcIMS I am not able to answer the following question. "Why don´t we use ArcIMS anymore?"  I have recently taken over a position which used to administer ArcIMS clients but now use ArcGIS Server architecture. Colleagues who have been here a while still ask why ArcIMS needs to be replaced and the only answer I can give is that the software is not supported or developed by ESRI anymore. But regarding stability, functionality,supported formats etc I can´t say much.

Could anyone give me a concise little list of reasons why ArcIMS is "old" and should be replaced by ArcGIS Server? It would also help me to understand how Server GIS in ESRI has developed.

Thanks for any comments,

Robert


texts: Passing a parameter to GRASS_BATCH_JOB shell script?

texts:
This sort of builds off of my previous question about GRASS but it is a different issue.

I have a Python script which should kick off a GRASS batch job in a docker container like so:

grass_batch_job = f"""
        docker run -v {GRASS_DIR}:/data mundialis/grass-gis-stable /bin/bash -c '
        rm -r /data/{uuid}_mapset;
        grass76 -c epsg:3036 -e /data/{uuid}_mapset;
        export GRASS_BATCH_JOB="/data/script/vectorize_output.sh {uuid}";
        grass76 /data/{uuid}_mapset/PERMANENT;
        unset GRASS_BATCH_JOB'
    """

You can see that I have some {uuid} references floating about, this is to keep data separated that may be due to multiple processes running in parallel. This seems to be where the problem comes in:

I need to be able to pass this uuid variable to the shell script which i have exported as GRASS_BATCH_JOB, so that it knows which image to select to operate on, as per the shell script itself:

r.external -o input=/data/$1_paths.tif output=dummy_img
g.region -ap raster=dummy_img
r.reclass input=dummy_img output=dummy_img_nulled rules=/data/script/reclass_rules.txt
r.thin input=dummy_img_nulled output=thinned
r.to.vect thinned output=vectorized type=line
v.out.ogr input=vectorized output=/data/out/out_lines2.shp format=ESRI_Shapefile --overwrite

But when I try to do this, I get an error complaining that it can't find the shell script:

ERROR: Job file </data/script/vectorize_output.sh fake_UUID> has been defined in the 'GRASS_BATCH_JOB' variable but not found. Exiting.

(fake_UUID is just a debug UUID value)

Is there a way to get GRASS to recognize that I want to pass a variable to this batch job before running it?


texts: Clipping LAS data using shapefile polygons and open source software?

texts:
I am trying to clip or filter lidar files (.las, .xyz) using a shapefile that contains multiple polygons.

Is there open source software that can do this spatial operation?

My .las files are enormous, and I should say that I am very new to DEM data and analysis so any help would be very welcome.


texts:
I have a dataset of some measurements along a bus route (image below). The purpose of my study is to be able to detect the values at any location along the route using Kriging interpolation. I have very weak background in geostatistics, I attended a few online tutorials on using geostat in R and how to calculate and plot the variogram of spatial data.
My concern is can I calculate the variogram of data that is spatially distributed linearly along routes instead of covering a wide plane?


texts: Extracting OSRM PBF file using Docker osrm/osrm-backend image?

texts:
I have installed Docker Desktop for Windows and I'm trying to extract the California PBF file. My Docker instance has 16 GB of RAM.

Is more RAM needed to extract California?

PS D:\Datasets\TigerLine Shapefiles\06> docker run -t -v "$(pwd):/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/california-latest.osm.pbf
[info] Parsed 0 location-dependent features with 0 GeoJSON polygons
[info] Using script /opt/car.lua
[info] Input file: california-latest.osm.pbf
[info] Profile: car.lua
[info] Threads: 4
[info] Parsing in progress..
[info] input file generated by osmium/1.8.0
[info] timestamp: 2019-01-21T21:15:02Z
[info] Using profile api version 4
[info] Found 3 turn restriction tags:
[info]   motorcar
[info]   motor_vehicle
[info]   vehicle
[info] Parse relations ...
[info] Parse ways and nodes ...
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
[info] Parsing finished after 78.5229 seconds
[info] Raw input contains 95656519 nodes, 8693941 ways, and 4099 relations, 33549 restrictions
[info] RAM: peak bytes used: 3181412352
[error] Problem opening file: /data/california-latest.osrm :  (possible cause: "Permission denied") (at include/storage/tar.hpp:37)


texts: Is SDO_GEOM.RELATE returning erroneous results?

texts:
I believe I am getting some erroneous results when performing SDO_GEOM.RELATE with my spatial query.

Given the following query:

select SDO_GEOM.RELATE(
         MDSYS.SDO_GEOMETRY(2003, 4326, NULL,
                            MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1),
                            MDSYS.SDO_ORDINATE_ARRAY(-90, 40.04443758460857,
                                                     -82.6171875, 40.04443758460857,
                                                     -82.6171875, 43.45291889355465,
                                                     -90, 43.45291889355465,
                                                     -90, 40.04443758460857)),
         'determine',
         MDSYS.SDO_GEOMETRY(2003, 4326, NULL,
                            MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1),
                            MDSYS.SDO_ORDINATE_ARRAY(-114, -62,
                                                     61.5, -62,
                                                     61.5, 33.5,
                                                     -114, 33.5,
                                                     -114, -62)),
         0.00001) as relationship
from dual;

I get the following relationship value:

INSIDE

The first polygon covers part of Illinois to Michigan area.
The second polygon goes from the South East Pacific Ocean (SW Corner) to Southwest United States (NW Corner) to South West Indian Ocean (SE Corner) to middle of Iran (NE Corner), so these geometries should be DISJOINT as shown on the picture.

I hope that I am just missing something completely obvious. Does anyone have any ideas as to what I'm missing here?


texts: How to make corners of openlayers with OSM map rounded?

texts:
I'm trying to apply style with border-radius:XXpx to my openlayers map:

map = new OpenLayers.Map(name)
map.addLayer(new OpenLayers.Layer.OSM())

But rounded corners are hidden by tiles of the map:
screenshot

Is there any way to resolve this?

UPD:

There are following styles applied to my div:

styles:

#map {
    border: solid 1px red;
    border-radius: 10px;
    overflow: hidden;
}

And overflow:hidden does not help

UPD 2

I can't make this code to work in Chrome (several versions)


texts: Line pattern fill only along edge of polygon

texts:
I have a polygon layer in QGIS, and would like to represent the polygons like in the below image:

I have tried two different approaches, none of which are satisfactory.

Using a line pattern fill, the entire polygon is filled with the line pattern. I need a blank area in the middle which is not filled in.

Using a marker line fill, I am able to keep a blank area in the middle, but the markers are rotated to align with the edges of the polygon. I need the markers to preserve the same rotation along all edges, like in the example above.

Any ideas?


texts: Using os.walk to update broken links and save mxd

texts:
I've got code to walk through an entire directory and sub-directories repair broken links in each mxd and save the mxd.  It works for the mxd's in the top directory but fails when trying to enter any sub.

My code is as follows:

import arcpy, os
from arcpy import env
arcpy.env.overwriteOutput = True
ws = "C:\Users\mittcla\Desktop\New folder"
oldpath = r"C:\NewProjects"
oldbase = r"C:\Base Data"
newpath = r"C:\Users\mittcla\Documents\NewProjects"
newbase = r"C:\Users\mittcla\Documents\Base Data"
for root, dirs, files in os.walk(ws):
    for f in files:
        if f.endswith('.mxd'):
            fullpath = os.path.join(ws,f)
            mxd = arcpy.mapping.MapDocument(fullpath)
            print "Replacing path for " + f +"..."
            mxd.findAndReplaceWorkspacePaths(oldpath, newpath)
            mxd.findAndReplaceWorkspacePaths(oldbase, newbase)
            mxd.save()
            del mxd

I get an error saying

  Runtime error  Traceback (most recent call last):   File "",
  line 14, in    File "c:\program files
  (x86)\arcgis\desktop10.2\arcpy\arcpy\arcobjects\mixins.py", line 609,
  in init
      assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename") AssertionError: Invalid
  MXD filename.

What is causing it to break when entering the new directory?


texts: How to split overlapping polygon isochrones in QGIS?

texts:
I have two overlapping isochrones -- 10 minutes by bike from 2 neighbouring railway station -- and I want to split them in a balanced way, so as to determine the bikeshed of each railway station. The separation should occur at equi-distance from each station.

On the image form QGIS the green polygons are the isochrones around railway stations represented by red stars. I have added a red line showing where I would like the two isochrones to be separated. How could I process this in QGIS?


texts: Routing from individual start point to individual destination point

texts:
I'm doing routing on android using OpenStreetMap. The routing is working well. But the problem is that I do not know how to use the individual points of the user. I use osm2po to convert the OSM data to a routable graph. At the moment I'm finding the nearest routing point of the user individual selected point. But this is not a satisfying solution. Because it can happen that the user is selecting the middle of the street, but in the most cases the next routing point is at the end of the street. So it can happen that the end point is at the one side or on the other side.

What I tried?

First I tried to connect the routed start/end point with the selected individual point. But that provides sometimes routes where the user has to go back.

Second I tried to calculate the distance from the second last point to the last point and to the individual selected point. This works for some examples well, but not for all.
So the problem is that the Geom_Way does not represent the line with points in a defined distance. So I thought it is like this start point o---x---x---x---o dest point. Where o are start/dest point and x middle points. But this is only available by curved lines. Straight lines have only o----------o a start and a destination point. Therefore the second last point in the routed point list can be far away and I can get the following construct:

I remove the coordinates as long as the distance from the last point is shorter to the destination point as to the second last point. But this can cause that all point will be removed. Otherwise if I do it only once, than I run in the cases that maybe to less points will be removed and therefore the result do not correspond to that what I want. So it is at moment a bit luck to get right result.

Is there any possibility to make a routing from an individual point to an individual point by using OSM? I don't want to use neither pgrouting nor storing of routes in the database. It is classically routing: User selects two points and the software is delivering the way from start node to the destination node.

EDIT: Maybe I calculate the distance wrong. I use UTMCoordinates and not Lat/Long. The distance will be calculated by using the Euclidean distance and I calculate the difference of lat/long from the first two coordinates.


texts: GeoServer WMS service CQL filter query with Mapbox GL

texts:
Is there any way to query WMS tile layer for Mapbox GL?

map.addLayer({
    'id': 'wms-test-layer',
    'type': 'raster',
    'source': {
        'type': 'raster',
        'tiles': [
            'https://geodata.state.nj.us/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=Natural2015'
        ],
        'tileSize': 256
    },
    'paint': {}
}, 'aeroway-taxiway');

and query like this ??

"filter": ["==", "icon", symbol]

Leaflet example:

var layer = L.tileLayer.betterWms('localserver/geoserver/geoserverlayer/wms?', {
    layers: '',
    format: 'image/png',
    transparent: true,
    version: '1.1.0',
    CQL_FILTER:'department_id like something',
    proxy:'',
    proxyParamName:'url'
}).addTo(map_pa);


texts: Project to NAD83 (epsg:26912) with projectRaster - gives epsg:2152

texts:
I am working with some Landsat 8 images from the U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center. I am processing the images in R, and after masking the clouds, I want to project from the following CRS "+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0" (as they are defined in the original data) to NAD 1983 UTM 12N.

I apply de following function (because I have 70 images):

test <- raster(xmn=220785, xmx=455115, ymn=4029285, ymx=4267815, res=30)
crs(test) <- "+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"

vals <- 1:ncell(test)
test <- setValues(test, vals)

pred.list <- list(test)
names(pred.list) <- c("test")

NAD83proj <- "+init=epsg:26912 +proj=utm +zone=12 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

projtoNAD1983 <- function(x) {
    l8_NAD1983 <- list()
    for (i in 1:length(x)) {
        print(i)
        l8_NAD1983[[i]] <- projectRaster(from="+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0",crs=NAD83proj, filename= paste0(names(pred.list[i]), "_nad83.tif"), type="GTiff", overwrite=T)
    }
    return(l8_NAD1983)
    gc()
}

test_nad1983 <- projtoNAD1983(pred.list)

But the output GTiff has a deprecated crs: "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"

I do not know what I do wrong. My version of rgdal is 1,1-1, GDAL 1.11.2 (2015/02/10).

Should I just assign the projection epsg:26912 manually?


texts: In QGIS, my contour layer is always in meters despite settings, and DEM

texts: I have a DEM file in Raster Layer that has elevations in meters, I have used the Raster Calculator to convert them to feet, and saved as a new DEM layer. The legend shows feet. When I run an extraction > contour layer on that DEM (the one in feet) it comes out with contours in meters still. I know how to 'cheat' and show converted numbers in feet, but it's a real pain the get the actual contours to be in 1ft intervals, style the 5' lines, etc. I have changed all the Project Settings I can to feet, though I have not found anything that sets elevation to feet.


texts: Does the National Hydrology Dataset geodatabase work in qgis?

texts:
I am running QGIS 1.8 on a windows xp pc and trying to put the USGS National Hydrology Dataset (more info herefor Oregon into a project. I try to "add vector data", using directory option then selecting the unzipped folder but it says NHDH_OR_931v210\NHDH_OR.gdb is not a valid data source.

It looks like this was created in ArcGIS 9.2 -- is that the problem?

I am very new to GIS and there may be something very simple I'm doing wrong.


texts: Raster Calculator - Error 000539: Error running expression

texts:
I'm trying to simply combine 5 different rasters in raster calculator to do a site suitability analysis using this map algebra expression:

"bo_reclasstemph3" + "bo_reclassph" + "bo_raster_precip" + "bo_raster_elevation" + "bo_raster_soiltext"

However, I keep getting this error message:

  Messages
      Executing: RasterCalculator ""Reclass_ph3" + "Reclass_annualmintemp" + "Raster_precipitation" +
  "Raster_soiltexture" + "Raster_elevat""
  T:\Barnett_GIS_Spring18\Agroforestry\California_Agroforestry.gdb\final1_plzwork
      Start Time: Wed May 09 15:22:46 2018
      Raster(r"Reclass_ph3") + Raster(r"Reclass_annualmintemp") + Raster(r"Raster_precipitation") + Raster(r"Raster_soiltexture") +
  Raster(r"Raster_elevat")
      ERROR 000539: Error running expression: rcexec()
      Traceback (most recent call last):
        File "", line 1, in
        File "", line 5, in rcexec
        File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 4329, in
  Plus
          in_raster_or_constant2)
        File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\sa\Utils.py", line 53, in swapper
          result = wrapper(*args, **kwargs)
        File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 4326, in
  Wrapper
          ["Plus", in_raster_or_constant1, in_raster_or_constant2])
      RuntimeError: ERROR 999998: Unexpected Error.

Failed to execute (RasterCalculator).
Failed at Wed May 09 15:22:46 2018 (Elapsed Time: 0.08 seconds)

The day before I completed the same process with the same data but different rankings and it worked:


texts:
This script has several parts:

Select by location grid elements that overlap a specific feature class.
Use a search cursor to create a list of DEMs from a field in the grid layer.
Mosaic to new raster using the list of DEMs as input.
Clip the newly created mosaic to the shape of the feature class.
Project the clipped mosaic.
Create contours.

Currently I'm getting this error message:

  ExecuteError: Failed to execute. Parameters are not valid.

  Undefined coordinate system for input dataset.

  Failed to execute (ProjectRaster).

I'm still somewhat novice at coding.

Does anyone have experience doing something similar to this?

import arcpy
import arcpy.sa

arcpy.env.overwriteOutput = True
prj = r"C:\Desktop\NAD_1983_UTM_Zone_14N.prj"
InputGrid =r"S:\NED_10Meter_2010\metadata\NED_1_3_arcsec_Tiles.shp"

# Create Grid
GridLyr = arcpy.mapping.Layer(InputGrid)
NEDlist = []
fc = r"C:\Desktop\ContourTesting\Output\Area.shp"

arcpy.SelectLayerByLocation_management(GridLyr, 'INTERSECT', fc)
destination = r"C:\Desktop\ContourTest.gdb"
cursor = arcpy.da.SearchCursor(GridLyr, ["NAME"])
for row in cursor:
    Path = r"S:\NED_10Meter_2010\grid" +"\\" + row[0][3:10] + "\\" + row[0]
    NEDlist.append(Path)
arcpy.MosaicToNewRaster_management(NEDlist, destination, "Area_mosaic_tif", "", "32_BIT_FLOAT", "", "1")
arcpy.CheckOutExtension("Spatial")
arcpy.env.workspace = r"C:\Users\Desktop\Area_contour.gdb"
arcpy.Clip_analysis ("Rosebud_mosaic_tif", fc, "Area_mosaic_clip")
mosaic_tif = arcpy.ProjectRaster_management("Area_mosaic_clip", "Mosaic_project", prj, "CUBIC")
arcpy.gp.Contour_sa(mosaic_tif, "Script_contour", "10", "0", "1")
arcpy.Clip_analysis ("Script_contour", fc, "Area_mosaic_clip")


texts: How do I make vectorlayer with sql on PostGis via python code

texts:
I need to make a vectorLayer and fill with the SQL's results on PostGIS via python code.

I'm working with python 2.7, QGIS 1.8 and PyQt 4.5

How do I it ?

thanks


texts: Converting KML with data from hyperlink to GIS file?

texts:
I am struggling to convert a KML file to a layer which can be read in GIS software.

The data is offshore geological data for the UK, which was downloaded from the onegeology.net portal as a kml (http://portal.onegeology.org/OnegeologyGlobal/). After isolating the KML layer of interest, the resulting file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<GroundOverlay>
    <name>UKContShelf BGS 1:1M Seabed Sediments</name>
    <Snippet maxLines="0"></Snippet>
    <Icon>
        <href>
        http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?language=eng&amp;&amp;VERSION=1.3.0&amp;REQUEST=GetMap&amp;SERVICE=WMS&amp;FORMAT=image/png&amp;width=1024&amp;height=1024&amp;STYLES=&amp;TRANSPARENT=TRUE&amp;CRS=CRS:84&amp;LAYERS=UKCoShelf_BGS_1M_SBS&amp;</href>
        <viewRefreshMode>onStop</viewRefreshMode>
        <viewRefreshTime>5</viewRefreshTime>
    </Icon>
    <LatLonBox>
        <north>58.00648580063467</north>
        <south>46.70507310978916</south>
        <east>7.372255064920498</east>
        <west>-13.20387175647202</west>
    </LatLonBox>
</GroundOverlay>
</kml>

I can open the data in Google Earth, but it fails to convert to a GIS layer using ArcGIS KML To Layer (ERROR 000401: No features were found for processing).

I thought that perhaps the problem was that the underlying image to the KML file is stored online, and not locally. Hence, I tried to download it, using the URL in the KML and wget, with the aim of creating a new kml file for conversion in ArcGIS. The download process I followed is outlined in the following question: Saving MapServer output to file? However, it just downloads a blank white image, using the code below:

wget "http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?
language=eng&amp;&amp;VERSION=1.3.0&amp;REQUEST=GetMap&amp;SERVICE=WMS&amp;
FORMAT=image/png&amp;width=1024&amp;height=1024&amp;STYLES=&amp;
TRANSPARENT=TRUE&amp;CRS=CRS:84&amp;LAYERS=UKCoShelf_BGS_1M_SBS&amp;&mode=map" -O out.png

How can I convert the KML file into a GIS layer?


texts: How to Initialize ArcObjects license in a 64 bit process (such as ArcGIS Pro)

texts:
Attempts to initialize an ArcObjects license fails in a 64 bit process.  The same code works fine in 32 bit process.

Update: I'm able to bind to the server runtime in 64 bit console app on a machine where Server is installed (but where desktop is not authorized).  Next I will attempt to do this on a machine where Server is installed but not authorized.  (Desktop is installed and authorized.)

While some are under the impression that ArcObjects won't work in 64 bit mode, I know this is not true.  I've written custom GP Tools using ArcObjects that run in 64 bit Background Geoprocessing. In a GPTool however, I don't have to deal with initializing a license. But now, I need to.

How do I initialize an arcobjects license in a 64 bit process?

Eventually the .NET class library assembly needs to be called from a module built with ArcGIS Pro SDK v1.4.  For now I'm just trying to use it from a simple console app. I'm assuming in both cases I'll need to initialize an arcobjects after calling RuntimeManager.Bind, which is in the ESRI.ArcGIS.Version assembly.

The library works in 32 bit mode, but I get a runtime exception when it tries to load the assembly in 64 bit mode:

An unhandled exception of type 'System.DllNotFoundException'
occurred in ESRI.ArcGIS.Version.dll

Additional information: Unable to load DLL 'ArcGISVersion.dll':
The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I tried registering the dll:

%windir%\syswow64\regsvr32 "C:\Program Files (x86)\Common Files\ArcGIS
\bin\ArcGISVersion.dll"

But get same error.  I've downloaded and installed the Background Geoprocessing package.


texts: Selecting strange line-like objects in QGIS?

texts:
I'm having a difficult time trying to select what seems to be a dead polygon.

Does anybody know how do I get rid of those using select and delete operations?

I'm attaching an image to help me explain the issue. If the line-like object pictured was a feature, it's ID should appear selected on the attribute table
of the layer I'm working on. Now, thatś not what happens when I try to select
this object using the select feature tool or the node tool.

Here's what QGIS tells me when I try Check Geometry Validity on the problematic layer. After logging the following text, the tool freezes in 1% and stays there, never completing the validation process. However, it seems that QGIS performs geometry validitation everytime I toogle off editing mode and at that moment no errors are found.

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/fTools/tools/doValidate.py", line 284, in run
    success = self.check_geometry( self.vlayer )
  File "/usr/share/qgis/python/plugins/fTools/tools/doValidate.py", line 309, in check_geometry
    geom = QgsGeometry(feat.geometry()) # ger reference to geometry
TypeError: arguments did not match any overloaded call:
  QgsGeometry(): too many arguments
  QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'

Python version:
2.7.3 (default, Feb 27 2014, 20:11:37)
[GCC 4.6.3]

QGIS version:
2.4.0-Chugiak Chugiak, exported

Python path: ['/usr/share/qgis/python/plugins/processing', '/usr/share/qgis/python', u'/home/dvalenteneto/.qgis2/python', u'/home/dvalenteneto/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/usr/share/qgis/python/plugins/fTools/tools', '/home/dvalenteneto/Proyectos/Visualizador Poder Judicial/Shapes Simplificados del Atlas Judicial']


texts:
How can I get directions from one place to another on my Google Maps for Android at a specific time?

Surely by now it's learned how congested traffic is from 4:30 to 6:00.


texts: Georeference old historic maps of Africa in ArcGIS 10

texts:
I have a couple of historical maps of Africa which need to be georeferenced. There are latitude and longitude information on the map and now my question is may I use wgs84 in order to georeference these maps or there is some other coordinate system better for this?

The work is in ArcGIS 10.4, so I have used wgs84 control points and after that connected with each point from raster. There are some bad results in raster position so I want to increase the accuracy on some way.

The map is annotated with Streit 1929.

The scale of the original maps are 1:10000000, with Africa broken up onto 5 pages. Pictures of the maps are here.

The map scales are listed here.


texts:
I'm using ubuntu 12.04.
I installed mapnik from packages as described here: https://github.com/mapnik/mapnik/wiki/UbuntuInstallation
now I want to run node-mapnik-sample-code from here: https://github.com/mapnik/node-mapnik-sample-code

The example is:

node ./examples/simple/render.js examples/stylesheet.xml map.png

but if I run this command it shows the errormessage

/home/tiletest/node-mapnik/examples/simple/render.js:27
map.loadSync(stylesheet);
    ^
Error: Could not create datasource for type: 'shape'  encountered during parsing of layer 'world' in Layer at line 11 of     'examples/stylesheet.xml'
    at Object.<anonymous> (/home/tiletest/node-mapnik/examples/simple/render.js:27:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

do I have to edit the stylesheet.xml or how can I run the example ?


texts: Function Join attributes by location in PyQGIS script generates incomplete results

texts:
I had recently removed QGIS 2.14 and then I installed QGIS 2.18 through OSGeo installer.
Since then I have noticed problems with the function Join by Attributes in QGIS standalone script.
Despite the fact all features in the input layer should be present in the output layer, the output layer is incomplete. It means that the output layer contains always only 1 feature. I tested that function on different data including the layers that had worked fine with installed QGIS 2.14. There are not any error notifications though.
The code is as follows:

# -*- coding: utf-8 -*-
from qgis.core import *
from qgis.utils import *
import os, sys

QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True)
app = QApplication([], True)
QgsApplication.initQgis()

sys.path.append('C:/OSGEO4~1/apps/qgis/python/plugins')
from processing.core.Processing import Processing
from processing.tools import *

Processing.initialize()

layer1 = "D:\\point_shapefile.shp"
layer2 = "D:\\polygon_shapefile.shp"
result = "D:\\output_shapefile.shp"

general.runalg("qgis:joinattributesbylocation", layer1, layer2, u'intersects', 0, 0, '', 1, result)

Although it works as a charm, if I run a script in a QGIS window with the same data:

import processing
layer1 = "D:\\point_shapefile.shp"
layer2 = "D:\\polygon_shapefile.shp"
result = "D:\\output_shapefile.shp"
processing.runalg("qgis:joinattributesbylocation",layer1,layer2,u'intersects',0,0,"",1,result)

How could I resolve the problem with incomplete output layer from QGIS standalone script?

I would like to avoid downgrading to QGIS 2.14.

UPDATE (09.11.2016):

I decided to report that issue on the site


texts: Shapefile to MSSQL with ogr2ogr fails to make connection

texts:
I am using ogr2ogr from OSGeo4W on my Windows 7 box to import a shapefile into a SQL Server database on one of my servers. I was able to successfully complete the conversion using shp2sqlserver, but I can't figure out why it fails when I try the same thing with ogr2ogr directly.

Here's the syntax of my ogr2ogr command:

ogr2ogr -f MSSQLSpatial "MSSQL:server=[server];database=[dbname];User Id=[uid];Password=[pwd]" C:\Path\to\file\shapefile.shp

When I run this, it fails first with an error saying "Cannot open database [dbname] requested by the login. The login failed." Next is another error that the "MSSQL Spatial driver doesn't currently support database creation. Please create database with the Microsoft SQL Server Client Tools."

I have checked and double-checked that the user id and password given works properly, that there is already a database with the name given (I substituted [dbname] here to speak in generalities), and that the database is owned by the user.

As mentioned, I was able to do this with shp2sqlserver so I don't think it's my database setup that is the problem. Is there a problem with my connection string? Is there some peculiarity within ogr2ogr that I'm not aware of?

I am using a Windows 7 machine connecting to SQL Server 2008 R2. Gdal is version 1.9.1.


texts: Nearest line feature from point using ArcGIS for Desktop?

texts: In the image given below, solid lines are showing as road elements and points are showing as data collected for those road segments. I want to update road element id to the points shapefile. "Near" tool of ArcMap has almost solved this problem except for the points lying in red region (marked in the image) which is obvious as per the algorithm of this tool. In this red region, "Near" tool updates the id of BE road element but I want to update the id of AB and BC road elements respectively because those points belong to AB and BC road elements.


texts: Getting geohash of LINESTRING in PostGIS?

texts:
I have some LINESTRING in PostGIS.

 LINESTRING(104.011 30.637,104.014 30.638,104.022 30.640,104.026 30.645)
 LINESTRING(104.022 30.666,104.031 30.659)
 LINESTRING(104.044 30.655,104.056 30.655)

I want to get all the geohash that intersects LINESTRING on level 6 (or others). So I excepted result like:

[wm3yqc,wm3yr1,wm3yr4]
[wm3yrn,wm3yrj,wm3yrm]
[wm3yrs,wm3yru]

I know ST_GeoHash to get geohash in PostGIS. But as the document says:

  For non-points, the starting point of the calculation is the center of
  the bounding box of the geometry.

Add

There is a bug to compute a geohash for vertices in adding vertices by ST_Segmentize method. As shown in the figure below, if parameter max_segment_length of ST_Segmentize is larger than  the length of LINESTRING passing through the grid geohash, it will be omitted.

The length of the length of LINESTRING passing through the grid geohash may be  close to zero. We can't avoid this result by adjusting the parameters.

Does anyone have a good solution? It is also acceptable to use geopandas or shapely without complex loop.


texts:
I have created an R package (https://github.com/chrisvwn/Rnightlights) that processes VIIRS nighttime light rasters from the NOAA dataset hosted at https://eogdata.mines.edu/pages/download_dnb_composites_iframe.html in order to apply zonal statistics and other calculations to extract meaningful data. However, I have learned that the rasters require some pre-processing before use, but, it is not clear to me which preprocessing is required and if there are standard algorithms for each.
What pre-processing is required for VIIRS nighttime lights before use?


texts:
I'm trying to open this xml source in Qgis:
http://webgis.regione.sardegna.it/tms/ortofoto1977_EPSG3003/tilemapresource.xml
but I see only a corrupted image.

Where did I go wrong?


texts: How to convert lines to start and end points?

texts: I know there are several ways to convert lines to points in QGIS but I have not been able to find a solution that will convert the file so that it indicates if the point is the start point (upstream) or end point (downstream).


texts:
Goal:
Gain WGS84 decimal to locate some cities in Google Map.

Problem:
I don't know how to convert the value of the RT90 coordinate system into WGS84 in SQL Server.


texts:
I am trying to draw a set of arrows using the draw toolbar which point labels to certain features in my map in the layout view. I have data frame clipping set up and when I move the graphic outside of the clipping extent, it gets clipped too.

How can I omit the graphics from the data frame clipping?


texts: Primary key field hidden on attribute table added to QGIS

texts:
I'm having the following issue with QGIS. Adding a sqlite text table (Layer > Add Vector Table) QGIS hides the primary key field (having name id). I understand also QGIS uses this field as unique id, but I need to have it in the attribute view because all my links and joins use this field.
I'm not able actually to perform a join with my vector tables.
I can neither change the column names, nor create views.


texts:
I have an image file in pdf format which includes some drawings (lines, closed areas, and points). I want to digitize it into a shapefile so that I can show it on a Google map. I have a couple of questions:

Can I digitize it into a shapefile?
Which coordinate system should I assign it so that it fits on the right place on a Google map. My image belongs to some place in Sweden, but I don't know the exact place. Which coordinate system should I choose for digitizing?
Is there any free software available for digitizing? I have Map Window - can I digitize with the help of Map Window?


texts: How do I Import a .shp file into PGSQL via terminal?

texts:
I am stuck trying to import a .shp file into my pgsql database. I have been trying for the longest to import this one .shp file into pgsql. Below is my import statement.

       /usr/local/pgsql/bin/psql -h xxx.xx.xxx.xx -d areaft -U Mc shp2pgsql -s 4326 -W "latin1" travel.shp

The error messages I receive are:

psql: warning: extra command-line argument "shp2pgsql" ignored
psql: warning: extra command-line argument "4326" ignored
psql: warning: extra command-line argument "latin1" ignored
psql: warning: extra command-line argument "travel.shp" ignored

Can someone guide me in the right direction?


texts: How configure Spatialite for PHP Version 5.6.14 (on Windows 7 and Apache 2.4)?

texts:
I'm on Windows 7, using PHP Version 5.6.14 on Apache 2.4 and I'm trying to access to a Spatialite database.

All works fine when execute "no spatial" SQL query in my PHP procedure but when I try to use the PtDistWithin in a query like ...

 SELECT .......... WHERE PtDistWithin(distr.geometry, MakePoint(13.571386, 37.314926, 4326), 1000);

the response is

SQLSTATE[HY000]: General error: 1 no such function: MakePoint

I'm sure that my query is right because if I execute it on Spatialite GUI it works.

In my php.ini I've enabled as follow

extension=php_pdo_sqlite.dll
extension=php_sqlite3.dll
[sqlite3]
sqlite3.extension_dir = D:\Programmi\Php\ext

and I've put in my PATH "D:\Programmi\Php\ext". In this directory there is

07/09/2015  16:32         8.118.531 mod_spatialite.dll

and all the others dll ... here you are the list

22/03/2015  16:43            62.671 libfreexl-1.dll
07/12/2014  23:35           113.152 libgcc_s_seh_64-1.dll
03/09/2015  18:09         1.335.271 libgeos-3-5-0.dll
03/09/2015  18:09           195.167 libgeos_c-1.dll
20/12/2014  10:01         1.546.608 libiconv-2.dll
20/04/2015  08:58           211.181 liblzma-5.dll
20/04/2015  09:36           461.564 libproj-9.dll
03/09/2015  18:13           956.115 libsqlite3-0.dll
07/12/2014  23:35         1.014.272 libstdc++_64-6.dll
15/02/2015  10:36         1.699.757 libxml2-2.dll

Any suggestion?


texts:
I try to calculate slope data. This is the DEM source https://www.earthenv.org/DEM

Firstly, I translate data with gdal.Warp according to image UTM zone. Original image .bil extension so first I convert to tif and then reproject the image. You can see gdalinfo of this image in below.

I try to calculate in Jupyter notebook.
gdal.DEMProcessing(dest,source,"slope")
I get "ValueError: Received a NULL pointer."
I try with the same input image in command line and Qgis Slope tool, everything is fine. What I miss it?


texts: Disable anti-aliasing in QGIS Server WMS

texts:
The QGIS composer has an option to toggle anti-aliasing (composer-options=>rendering=>rendering-quality=>"make lines appear less jagged at the expense of some drawing performance"). The standard map renderer does not seem to have such an option.

Anti-aliasing is a visualization feature. For visual use, the anti-aliasing result is almost always 'better' than without. However, sometimes, map output may be used for other purposes: the pixel colors can be used as categories or raster values or be used to mask other maps or rasters, etc. When used for such cases, the visually intermediate pixel-values produced by anti-aliasing distort the category or pixel information.

For comparison, Geoserver has an option to disable anti-aliasing.

I have set up QGIS as a WMS server and want to somehow disable anti-aliasing in order to use the WMS output as a mask for other data.

Can I somehow configure the layer style or rendering options or WMS server output to disable anti-aliasing?


texts: Exporting rendered raster image from graphical modeler

texts:
I am new to using the graphical modeler and am trying to export the result raster from my model as a rendered image.

Basically trying to replicate what happens by doing the following to the result raster that shows up in my project layers after I run the model, but would like to automate in the graphical modeler:

right click on raster
export
save as
output mode = 'Rendered image'
filepath  = "............./xxx.tif"


texts: ArcGIS: raster table only shows two groups of cells

texts:
I am working on the raster map below, which has 352 rows and 350 columns. When doing Data Management Tools->Raster->Raster Properties->Build Raster Attribute Table in ArcGIS 10.3.1 (licence type: Advanced), the analysis of the Attribute Table reveals two groups of cells, as opposed to 352x350 elements.

My question: is there a way to "unpack" all the cells, so that they all appear in the Attribute Table with their value and their position index in the raster?

I have tried Data Management Tools->Raster->Raster Properties->Split Raster, but the procedure is incredibly slow given the number of cells, and it creates individual rasters, which is not what I want.

EDIT

I am also using QGIS Version 2.18.2 for Windows, where I have the exact same problem. Hence, a solution for QGIS would work as well.


texts:
As seen on the screenshot, my MapProxy reverses Y axis and I can't figure why.

MapProxy.yaml:

services:
  demo:
  tms:
    use_grid_names: true
    # origin for /tiles service
    origin: 'nw'
  kml:
      use_grid_names: true
  wmts:
  wms:
    md:
      title: MapProxy WMS Proxy
      abstract: This is a minimal MapProxy example.

layers:
  - name: gisdb
    title: gisdb WMS
    sources: [gisdb_cache]

caches:
  gisdb_cache:
    grids: [osm_grid]
    sources: [gisdb_tms]
    disable_storage: true

sources:
  gisdb_tms:
    type: tile
    url: http://localhost:1234/styles/positron/%(z)s/%(x)s/%(y)s.png
    transparent: true

 grids:
    webmercator:
        base: GLOBAL_WEBMERCATOR
    osm_grid:
        base: GLOBAL_MERCATOR
        srs: 'EPSG:3857'
        origin: 'sw'
globals:

I've tried changing origin: to sw , nw or 'nw', but that didn't help at all. Caching is disabled. I'm using https://github.com/klokantech/tileserver-gl


texts: What coordinate data could this ASCII file represent?


texts: Polygons created for holes after running ST_Collect

texts:
I ran an ST_Collect query on a polygon dataset using ogr2gor -dialect sqlite -sql

SELECT ST_Collect(geometry),id
FROM wl_test
GROUP BY id

The result is a multipart polygon, which is what I want, but it also creates polygons for some of the holes, which I do not want. I created a point shapefile of all the vertices from the resultant dataset and labeled the points according to vertex id. The vertices of the polygons that should be holes are in reverse order as a hole is required to be in a shapefile.

Why are polygons being created for some of the holes after running ST_Collect?


texts: How /or what QGIS plugin do I use to open these layers? (they seem to be served by Geoserver)

texts:
I'm new to this field. I'm trying to open in QGIS the layers that are provided in this page: http://geoportal.asig.gov.al/(X(1)S(j2y2e0qp4wnyij4q2lvko2wt))/en/InfoandServices.aspx?lang=EN.

(each layer has a links option)

I have some links but I dont have any info on what standard are those, or how do I open them. (They seem to be served by Geoserver). I tried with OpenGeo Explorer plugin but those Links dont work. I also tried to add them as WMS/WMTS Layer in QGIS but nothing. (the legend of the layer appears some times, but the vector layer itself doesnt show up)

I have seen two types of links in that page so far.
http://geoportal.asig.gov.al/Services/host/host.ashx?url=http://localhost:8080/geoserver/asig/wms&Version=1.1.1&srs=EPSG:32634&layers=view_alb_n
and

http://geoportal.asig.gov.al:85/utm34n/wmts/1.0.0/WMTSCapabilities.xml

Anyone knows what tool should I use to access & analyse those layers?


texts: Add Attributes from polyline / polygon to polyline layer by best coverage

texts:
I have two polyline layers in QGIS containing information on a network and I need to transfer some attributes from the second layer to the master layer. Unfortunately their geometries are not equal, meaning, the polylines in the different layers usually do not sit in the same place, mostly a few meters apart, neither are they of the same length. That is why a common spatial join does not work, as far as I found out.

My try was to build buffers "around" the polylines of the master layer and then join certain / all attributes from the second one. But here the problem is, that at the nodes between network links I, of course, get overlapping buffers an so mostly at least 2 links of the second layer lie (at least a bit) in one buffer from the master layer.

In the left picture (a) you see the initial situation: the links on the left side (pink and bright blue) are from the master layer, the links on the right (blue and green) from the second layer. The right picture (b) shows the buffers representing the links from the master layer and again the two links from the second layer. Each of the two links lies (at least with some portion) within both buffers.

a)
b)

I was not able to find out, how the algorithms of the several join functions I used, chose one of the the two possible links to reference to the buffers.

What I am looking for is a function in which I can set, that (only) the link (from second layer) with the best / biggest "coverage" within a buffer of the master layer is referenced and its attributes are transferred.

Does anybody know, how I could manage to do this?


texts: What is the point of standard symbology?

texts:
There are several questions on the site asking for standard symbology to represent markers of specific types of objects (i.e. Power Distribution, Crime Mapping, Emergency Symbols, Lakes).

What is the point of having these standard sets of markers? I think I can rationalize standard sets of symbols for elements frequently encountered in maps across many fields (such as roads or socio-political boundaries), but I don't quite get the point of cheesy point markers (such as a body outline for a homicide scene). These symbols will never be able to replace a legend, so what is the point in having them standardized?


texts: Why are layers imported into a DB with Spatialite-Gui locked from editing?

texts:
I have a Spatialite DB which I have imported some shp files too using Spatialite-Gui.
I have full read-write access to these layers via the Spatialite-Gui, however when I open these layers from QGIS I only have read access. I am able to successfully insert a new table column using the QGIS editor, but cannot modify any rows.

I have read the documentation on the Sqlite page and it seems that something is holding a Reserved lock on the table. I have tried disconnecting Spatialite-Gui from the DB but the lock still remains.

This problem only occurs with DBs that have been created with Spatialite-Gui. Spatialite DBs originally created in QGIS retains read-write access in both QGIS or Spatialite-Gui. I do notice that the Spatialite DBs created in Qgis are in Spatialite 3.0 could this be the problem?

I am using QGIS 1.8, Spatialite 4.0, and Spatialite-Gui 1.6


texts: Is there a way to get the full extent of a map? I am looking to use this extent to zoom out to whole world view on a button click.


texts: Determining which latitude and longitude values fall within township/district/polygons

texts:
Is it possible to export the boundaries of one layer, as well as the latitude and longitude falling within each boundary, from a program/by programming?

I seem to have gotten fairly close to a solution in QGIS but I am completely new.

Rather than bringing the subset of X,Y coordinates to the software and running an intersect, I believe it could be possible to transform the polygon into points, then intersect given points with the polygons with the points being an attribute of individual parts.

Would this be possible?

While I'm able to export all the points making up a shape file/boundaries -> points/lines, etc., I seem to not be able to extract the exact x and y for each polygon combined with where points fall within them.

Ideally, I'd like to implement this in Microsoft/T-SQL using the extracted data (but this would be after the fact).

I have so far from QGIS been able to extract centroids and transform the polygon into points.

I have been trying to use v.distance to calculate the distance from centroids to the boundaries in the polygon but I'm not sure if this is even close to what I want.

From further reading, I am not as far along as I believed. I think I have to find a way to import the shapefile into SQL - so any tips there would be appeciated. I have shape_length/shape_area, but I'm unsure how that helps me.


texts: Overlaying two vector shapefiles on a basemap results in a misalignment

texts: I have been trying to overlay two shapefiles of the Harare Zimbabwe streetmap one with centerlines and the other digitized as polygons. the challenge i am facing is that the two overlay but not on the same position they are both projected to wgs 1984 utm zone 36s.


texts: Do ModelBuilder or Geoprocessing tasks run slower if screen locked?

texts:
Is it true if you are running ModelBuilder or a geoprocessing task on a large raster\vector dataset then locking the computer would that cause the ModelBuilder or any geoprocessing to run slower?

Is it the computer itself?  I am running a large raster datasets using ModelBuilder on a different computer machine and I unplugged the network to prevent from reboot or push in such as update patches.

I’d like to hear your comments or tips?

My work has these Insomina.exe and I'm wondering if this does made the difference to speed up the geoprocessing/model builder work ?

Here is the link: Insomina.exe


texts:
I want to add a custom label which would contain param1 on the map. So, I created a datastore from the .csv file, added my custom parameters to the SimpleFeatureTypeBuilder as properties and created a TextSymbolizer. But I've got only lat/lon parameters on my map. What do I do wrong?

SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();

    b.setName("MyFeatureType");
    b.setCRS(crs);
    b.add("location", Point.class);
    b.add("param1", String.class);
    b.add("param2", Double.class);
    final SimpleFeatureType TYPE = b.buildFeatureType();

    SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);
    GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();

    Point point = geometryFactory.createPoint(new Coordinate( coordinate.getX(), coordinate.getY()));
    featureBuilder.add(point);
    SimpleFeature feature = featureBuilder.buildFeature(null);
    DefaultFeatureCollection featureCollection = new DefaultFeatureCollection("internal", TYPE);
    featureCollection.add(feature);

//        Style style = SLD.createSimpleStyle(TYPE,Color.GREEN);

    StyleBuilder styleBuilder = new StyleBuilder();
    FilterFactory ff = styleBuilder.getFilterFactory();
    Style style = SLD.createSimpleStyle(TYPE, Color.GREEN);
    style.setName("MyStyle");
    TextSymbolizer textSymb = styleBuilder.createTextSymbolizer(Color.black, styleBuilder.createFont("Arial", 10),
        "fred");
    textSymb.setLabel(ff.function("Concatenate", ff.function("getX", ff.property("location")), ff.literal(" "),
        ff.function("getY", ff.property("location")), ff.literal(" "), ff.function("env", ff.property("param1")),
        ff.literal(" "), ff.function("env", ff.property("param2"))));
    //textSymb.setHalo(styleBuilder.createHalo(Color.white, 1));
    style.featureTypeStyles().get(0).rules().get(0).symbolizers().add(textSymb);

    Layer layer = new FeatureLayer(featureCollection, style);

here is the fragment of my .csv file

LAT,LON,param1,param2,param3,param4,param5
27.0,-30.0,280.9,-6.37312,-1.79618,6.621398154805826,74.2571170243146,
27.0,-27.0,281.1,-6.43312,-2.77618,7.006582132534355,66.65431728639881,
27.0,-24.0,281.3,-4.54312,-3.10618,5.50347827615005,55.63552261029227,
27.0,-21.0,281.1,-3.38312,-3.72618,5.032881324695736,42.23329167237091,
27.0,-18.0,280.7,-2.34312,-4.09618,4.718990859456285,29.766254126085926,
27.0,-15.0,280.3,-2.90312,-3.95618,4.907080650538935,36.26771217705186,
27.0,-12.0,280.0,-4.31312,-4.31618,6.101834652637045,44.97572026458005,
27.0,-9.0,279.2,-5.72312,-4.12618,7.055454644009236,54.20595659912361,
27.0,-6.0,279.3,-6.43312,-3.90618,7.526171230830957,58.73038946633453,
27.0,-3.0,279.4,-8.03312,-4.58618,9.250083120363465,60.27405416053762,
27.0,0.0,279.7,-8.76312,-4.05618,9.656336569885982,65.15865639285987,
27.0,3.0,283.7,-8.00312,-1.12618,8.081968231070002,81.98720020607146,
27.0,6.0,284.8,-6.68312,1.19382,6.788910822952606,100.1257130758201,
27.0,9.0,284.8,-4.84312,3.27382,5.84583022595845,124.05602094541278


texts: I have  polygon shapefile representing administrative districts. There are small spaces between polygons where the polygons should be touching. There are probably also overlapping polygons. How can I have the polygons snap together, filling the gaps or slivers and removing overlap (possibly in R, QGIS or SAGA)?


texts: Any open source raster applications that accept floating point rasters with attribute tables?

texts:
I understand that Arc floating point rasters don't have attribute tables because of the high potential number of unique values in each cell but at a theoretical level, I think a floating point raster could have an attribute table that acted like a lookup table.

For example, if:

cell value was between 1.0 and 1.999, the attribute value = 'low'
cell value was between 2.0 and 10.999, the attribute value = 'med'
cell value was between 11.0 and 10000, the attribute value = 'high'...

It seems to me that this capability would be useful, retaining more detail than converting the floating point raster to an integer.

Are there any open source raster applications that accept floating point rasters with attribute tables?


texts: Interpolating into polygons using ArcGIS Desktop?

texts:
I need to interpolate values from points to polygons.

I have a point shapefile and a shapefile of adjacent polygons. Some polygons get several points falling inside, some have nothing.
I thought about interpolating values for polygon centroids only, but this is rather crude. I would like to take into account whole polygon areas.

I was going to produce a grid in ArcGIS with very small cells and then calculate average values of cells falling inside each polygon (by zonal statistics), but this way is very time and memory consuming (I have a lot of points and polygons and a large area).

Also I found in ArcGIS for a geostatistical layer: Predicting values for specified point locations.
I can set there polygons as my specific locations and have the output with predicted values for each polygon in the attribute table. But I have no idea how ArcGIS calculates values for polygons there (they appear different from the values for the point centers of the polygons).


texts: List all layers in MXD and whether or not it is broken

texts:
I have a script that lists all layers in an MXD and I have a script that lists all broken layers in an MXD (http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/listbrokendatasources.htm). I want to list all layers, their name, source, description, and whether or not their source is broken. Can anyone help me with this? I can't quite figure out how to integrate the two...

import arcpy, os, fnmatch, csv

#Create an empty list of ArcMap documents to process...
mxd_list=["A.mxd", "B.mxd", "C.mxd"]

for mxd in mxd_list:
    mxd = arcpy.mapping.MapDocument(mxd)
    mapPath = mxd.filePath
    fileName = os.path.basename(mapPath)
    layers = arcpy.mapping.ListLayers(mxd)
    filepath = "C:/Users/USERNAME/Desktop/"+ fileName[:-4]+".csv"
    writer = csv.writer(file(filepath, 'wb'))
    sourcelist = []

    for layer in layers:
        if layer.supports("dataSource"):
            layerattributes = [layer.longName, layer.dataSource]
            #Write the attributes to the csv file...
            writer.writerow(layerattributes)
    writer.writerow(sourcelist)
    del writer


texts: Join operation does not return any matching records if the join table contains "coded value domains"

texts:
I have a point feature class and performed a join operation against a destination table with two fields containing coded value domains defined in the same file geodatabase. Another field called "LocationId" matches a field called the same "LocationId" in the source feature class. Both fields in the their respective tables are with the same field type (Long Int) as well as other settings.

The join is not on the "domain" field in the join table.

I know there should be one matching row in the resulted feature class as I made up the values. However, when the "join" command was run, it returned no matching rows at all. When I got rid of those two fields (of coded value domains) from the destination table, the "join" worked with one row returned.

Is there anything I did wrong? Or "domains" just don't work with "join"?

The domains are of coded value. What I did was:

1. Create two coded value domains [Height] (coded value 0, 10, ..., 200) and [Curing] (coded value 0, 10, ..., 100)
2. Create a feature class containing fields LocationId (long int), LocationDesc, blah blah
3. Create a native table containing fields LocationId (long int), Height (in short int and Height domain) and Curing (in short int and Curing domain)
4. Add the FC to ArcMap, and run Joins and Relates > Join...
   Select the FC as source table; select the native table as the table to join the source table; select "LocationId" as the field the join is based on.
5. Run "Validate Run" and it returns no matching records.


texts: ArcGIS modelbuilder: Iterate through Excel sheets?

texts:
I am trying to use modelbuilder (ArcGIS 10.1) to add XY data to ArcGIS, then export the events as Feature Classes. The data comes in one xlsx document with a large number of sheets, each with an X and Y column. So in the end I would have a set of point feature classes.

So far I haven't been successful in automating this procedure with modelbuilder. My idea was to use the "Iterate Tables" tool and choose the xlsx document as input workspace; then continue with "Make XY Event Layer" and finally "FC to FC". In order to not overwrite previous results, I have added "%i%" to the output name. To be more precise, the model does run through the first sheet; the second run fails because the model tries to overwrite the first result (despite the %i% appendix). Using "%n%" instead, I get an infinite number of results all using the first sheet.

I suspect that either it is not possible to iterate through the sheets of an Excel table, or else maybe something is wrong with my naming system. Any help on this / workarounds much appreciated.


texts:
I have 70Gb of raster data from drone photography that I need to serve  via Openlayers.

The data is currently provided as georeferenced jpegs each is 175Mgb in size.

What is the best strategy to cut these into manageable tile sizes for serving via the web.

I have access to the gdal suite and was looking at the gdal2tile.py script. Can this be run on a set of tiles to produce a directory of georeferenced smaller tiles?


texts:
I have this list of sampling points and they told me to display them in ArcMap 10.3.1.
This are Gauss Krüger coordinates of soil samples in Austria:

From a table I use -> "Display XY data" and the Projected Coordinate system "MGI_M34" for Austria.
Unfortunately the points get displayed somewhere in the Indian Ocean and I do not get why?
Can somebody help me?

I used country borders and I projected them into MGI_M34 as well. I did try now to add 750000 to the east-coordinates and subtracted 5000000 from the north-coordinates. this is what is written in Wikipedia...
This is the result:

Afterwards I displayed them and this comes out:

So the points are in Germany now...
Any idea what that could mean?


texts: In R, how do I generate r random sample of contiguous polygons?

texts:
I'm trying to find a way of generating sample of contiguous polygons.
This code correctly generates sample of 5% of original data.
library(sf)
library(tmap)
tmap_mode("view")

nc <- read_sf(system.file("shape/nc.shp", package="sf"))

nc %>%
  qtm()

sample <- st_sample(nc,
                    size = round(nrow(nc)*0.05),
                    type = "random")
sample %>%
  qtm()

st_join(nc, st_sf(sample),
        join = st_intersects,
        left = FALSE) %>%
  qtm(borders = "purple", fill = NULL)

However the polygons are (correctly) all over the map. Is there a way to constrain them to be spatially (queen) contiguous?
I could probably start with one random polygon, find neighbours and repeat the process until n% of polygons are in the set. If however there is a simpler and more elegant way to do it I will totally not object to using it.


texts: I would like to call this processing function in PyQGIS but I don't find the name of the processing tools that matches with.


texts: Getting popuptemplate from feature layer to pop up when selecting row from table using ArcGIS API for JavaScript?

texts:
Using esri javascript api 4.3 in an Angular 2 application.

I initially generate the map using this code:

OnInit() {
  this.map = new Map({
    basemap: 'streets'
  });

  this.map.layers.add(new FeatureLayer({
    url: 'http://test/rest/services/Project_map/MapServer/0',
    id: '0',
    visible: true,
    outFields: ["*"],
    popupTemplate: this.jobsTemplate
  }));

  this.view = new MapView({
    container: "viewDiv",
    map: this.map,
    center: new Point({
      x: -111.876,
      y: 40.758,
    }),
    zoom: 12,
    rotation: 0
  });
}

When a feature on the map is clicked I get a popup containing the values for that feature. That works fine.

There is also a table that has a row for each feature on the map.

When a table row is clicked, I execute the following code, passing into it the lat and long for that feature:

zoomToPoint(zoomLong: number, zoomLat: number) {
  this.view.center = new Point({x: zoomLong, y: zoomLat});
  this.view.zoom = 15;
  this.view.popup.open({location: this.view.center});
}

I get a popup at the correct location. But, the popup is empty.

I want it to use the popupTemplate assigned to the feature layer and containing the values for the feature at that location.

Just like what happens if I click on the feature.


texts: Raster overlay with different projection in Google Maps

texts:
I have a map created with Google Maps. I want to overlay over some data I am downloading dynamically, covering the whole world. That data is a matrix as follows:

1024 values for the longitude (fixed 0.3515625 degrees/value)
512 values for the latitude (fixed 0.3515625 degrees/value)

I have created an html5 canvas that I populate dynamically with the data above, as one pixel per value of the input matrix.
However, the superimposed image does not match the (Google Maps) map below, which is in Mercator projection.
I have searched how to specify a specific projection for the overlay, expecting Google Maps to stretch the canvas for me, but I am afraid it won't do that, and will only convert the corner coordinate.
Is there a way to tell Google Maps to dynamically reproject my image? (a la GDAL, but in realtime).


texts: How to prevent deleting missing layers in qgis

texts:
When I open a project containing WMS layers while the internet connection is off, I get a message that the layers will be removed from the project.

I can choose a new source or confirm it and lose the layers.

How to prevent this?


texts: Creating an Esri multipatch object in ArcScene

texts: Can you give me more detailed information about creating a multipatch object? When we import a 3D data format to ArcScene how does it convert it to multipatch? How does it triangulate a polygon surface to triangles? Which algorithm or rule does it use to create patches such as triangle strip, triangle fun and ring from polygon surface? How does the software decide creation of triange strip of fan for a surface? As you can see in the attaching file


texts: Get just not null values from intersection of shapefile and buffer with Python

texts:
I generated a buffer using this question: Creating buffer circle x kilometers from point using Python?

I did an intersection with this buffer and a shapefile using:

intersection_origem = shp_geom.intersection(Polygon(buffer_origem))

The "intersection_origem" looks like above:

Apparently nothing wrong with it, but I need just the not null values like it's from 2595 to 2597. Is there a "filter" that can do what I need?

I tried the code above but with no success:

for i in range(0,intersection_origem.length):
    if (intersection_origem[i] != ""):
        print(intersection_origem[i])


texts: Can I create a Model in MapInfo, like in ArcGIS? (Modelbuilder)

texts:
I have some Forumlas I use quiet often. I want to create a Model like in ArcGIS with it(Drag&Drop put in some Parameters, and so forth), is that possible?

Is there a GUI for that? Or is it only possible to write MapBasic code?


texts: Reclassifying rasters to two values (1 and NODATA)?

texts:
I am trying to reclassify a bunch of rasters, but when I run my script arcGIS crash.
What I want to do, is reclassify rasters this way: every accepted value (0,1,5 and 64) to 1, and the others values just assign "NODATA". By this way, every processed raster would be like a binary raster, just values 1 and "NODATA". The value 1 is because I need to multiply this raster with other raster, acting like a mask. Maybe, I need to reclassify to logical raster (TRUE/FALSE values).

I suppose this problem is caused because every raster could have or not all accepted values, so when I run my script, the actual raster perhaps don't have one of the accepted values, so it crash.

My script is this:

import arcpy, os
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/Data/modis_arc/processed/CHL3"
rasterlist = arcpy.ListRasters("*", "TIF")
for raster in rasterlist:
    clt_name = os.path.join("C:/Data/modis_arc/processed/CHL3/reclass2/", raster)
    outReclass1 = Reclassify(raster, "Value", RemapValue([[0,1],[1,1],[5,1],[64,1]]), "NODATA")
    outReclass1.save(clt_name)


texts:
In ArcGIS Dektop, I can use SQL expressions to query enterprise geodatabase data (expressions are essentially the WHERE clause in a query).

I'd like to do more than this. I want to use the full capabilities of SQL, such as group by, subqueries, st_geometry functions and PL/SQL. I'm really only interested in accessing live data in the database; not exporting the data as a copy.

What are the options for accessing Oracle geodatabase data using full-blown SQL?

Here's what I know of so far:

ESRI tools:

Database View

Create with ArcGIS Desktop tools or the Create Database View geoprocessing tool (or just create using DBMS tools)

ArcSDESQLExecute  (ArcPy)
Query Layer

Create with ArcGIS Desktop tools or the Make Query Layer geoprocessing tool

Subqueries in an SQL expression (credit: @Brent Edwards)

Ex. objectid IN (SELECT objectid FROM...more complex SQL here...)

Non-ESRI tools:

Microsoft Access Pass-through Query

Create with MS Access  or using VBA

Microsoft Query

Use Windows >> Start >> Find to locate it by searching MSQRY32.EXE or MSQUERY.EXE

SQL Plus (Credit:  @Dowlers)
Oracle SQL Developer
TOAD
Python libraries

pyodbc
cx_oracle

Java (via JDBC) (credit: @Albert Godfrind)

Environment:

ArcGIS Desktop 10.3.1
SDE 10.3.1
Oracle 12c
SDE.ST_GEOMETRY


texts: Exporting polygons and their associated text to a DXF in QGIS

texts:
I have a layer called polygons in QGIS 3.4 and i make the text attribute "PID" visible on screen within each polygon.
I select several polygons with the visible "PID" text attribute.
I then go to Vector..Geometry Tools..Polygons to Lines, and convert the polygons to "lines".
I then export these lines to a dxf.
I open the dxf and the polygons are visible, but no text is showing.


texts: ArcGIS Pro: Points to Line will not accept point feature class

texts:
I'm trying to make a graphic for a presentation where multiple points are connected to a single origin (hub and spokes). I initially had over a thousand spoke end points but many of them were duplicate locations so I dissolved them and got the number down to 26. I then duplicated the hub location 25 times to get a matching number between spoke points and hub points and have values of 1 to 26 for the spoke points and corresponding values 1 to 26 for the duplicate hub points in a line field.

I want to run the points to line field to generate crow flies paths from the spoke points to the hub but the tool will not recognize my point file as an acceptable input. It recognizes the file I did the dissolve from but not it's output.

What do I need to do to make this tool run?


texts: Which of XYZM-coordinates match the result of grids algorithm in QGIS?

texts:
When you create a grid in QGIS, in the attribute table for each square, you have a corresponding column left, right, top, bottom in coordinates. Which of these four correspond to the X, Y, Z, M coordinates?
I am trying to import a grid from a CSV file with the left, right, top, bottom columns. I had to export the grid because I couldn't figure out how to add the values from multiple columns correctly in the field calculator in QGIS. So I exported it into a CSV, added the columns in Excel, now I want to bring the file back into QGIS.
Alternatively, how do I create a new column in the attribute table that adds the values in multiple columns by using the field calculator? I tried "Col1"+"Col2"+"Col3" and sum(col1,col2,col3) but couldn't get completely correct values for some reason. In the first case it only seemed to be adding some of the columns.


texts: I currently am using a Python label expression to label parcels. I have 4 fields labeled. About 60% of my polygons label correctly, and the rest display the code in the expression, but still label. There is no difference between the polygons that DO label correctly and those that don't. There are no differences in the joined data either. Does anyone know why the label expression is being displayed in two ways on the same polygon data? I can't figure it out.


texts:
I am trying to add to rows using the calculate fields.

An error message appears stating that my expression

!base_co_p! + !base_co_j!

has some null values, hence it cannot proceed with the addition.

How can I change my expressions as seen below so that it:

It adds row-wise
If ever there is a  observation, ignore it and treat it and treat it as a zero?

I am familiar with python, but do not know how to implement it with ArcGIS pro.


texts: Does Osm2Po support administrative boundary extraction?

texts:
I already used osm2po for ways extraction, but still cannot understand how to get administrative boundaries with osm2po.

There is relationTagResolver in config section and v.5.1.0 description says, that
here is a strong emphasis on Boundaries and Polygons.

Does somebody used osm2po for successfull getting different (admin_level 2, 3, 4, ...) boundaries?


texts:
I installed sDNA and got my license, now I'm trying to runthe sDNA License Manager. I entered the code in the field to get the Challenge URL but the status information still says:

  Please wait...

I've waited now for almost three hours.

Does it normally take so long or is there something wrong?


texts: How to change the number of decimal digits in arcmap in symbology

texts: I'm using ArcMap 10.3. In symbology, there are 6 decimal digits for the different classes of the variable I'm presenting. I'd like to show only 3 decimal digits. I can edit the label and change the decimals manually for each class. Is there any faster way to do this for all classes in ArcMap 10.3?


texts:
I am working on a project where I am classifying different types of shorelines in the Hudson River near Manhattan. My adviser is interested in seeing the depth changes along the different shorelines. The depths are a raster so I used the Raster to Point tool and then used the Spatial Join Tool (Analysis Tools-Overlay-Spatial Join Tool) to join the depths (to the shoreline classification attribute table) that intersect with the shorelines.

However, I need to find out the depths of the shorelines that don't quite intersect with the shoreline (bathymetry data was taken by a boat so most of the depth data does not intersect with the immediate shoreline).

Is there a near function tool where I can get the depths near each shoreline?

I have attached a screen shot to give you an idea of what I am talking about.


texts: Building Masks (0-1 binary image) out of ROIs in Envi Classic?

texts:
I have the following 701x551 image in Envi with the shown raster ROIs (By pressing pixelbutton of ROI Tooldialogue window, I've converted the ROIs into raster format but I have access to ROI vectors eg. polygons if necessary) as training data.

I want to extract a binary image (a mask) with 701x551 pixels in Envi format in which the pixels inside the ROI are 1 and outside the ROI are 0, so I can use the ROIs as a matrix of 0-1 values and multiply it with my 701x551 data matrix in MATLAB to extract the the training vector for libsvm tool.

Is there any way to do this?

I'm using the classic GUI of Envi 5.3.


texts: How to save only polygon features out of a geojson using GDAL?

texts: I have some geojsons that contain OSM data with points, lines, and polygons-- how can I extract only the polygon or line features using GDAL?


texts: Geoexplorer (Opengeo Suite) cannot upload data

texts:
i am following the tutorial how to create a simple map. However, I got stuck in the step to upload the data. It gives me an error and I dont know why (see photo). I zipped the shapefile with all the respective other files and uploaded it. Doesnt work. This is why I also added a Spatial Reference. The data is WGS84 --> EPSG:4326.

I just downloaded and installed Opengeo Suite. So its the latest version. I have Windows 7, 32 bit on my PC.