texts:
I'm having trouble creating a ArcSDE Connection File.  When I bring up the GP tool to do this, I enter the folder I was save the sde file to, enter an name for the file 'MySDEConnect.sde', enter the Server name 'VirtualXP-64180\SQLEXPRESS', enter the Port number I found under SQL Config Manager>SQL Native Client 10.0 Config>Client Protocols>TCP/IP Properties>Default Port which is "1433".  I enter ArcSDE database name "MySDEDB" and uncheck Database authentication since I have not entered any username/password for the SQL Express database.

After I enter in the port number in the Service textbox, it shows a Caution sign by the Server saying it can't connect to it.  Could I have the port number wrong, if so where do I find the correct one.  Any help or direction here would be appreciated.


texts: Is there a simple way to add symbols (circles, triangles etc) to the end of a line in QGIS?


texts:
I'm trying to customize the GeoExt.form.field.GeocoderComboBox to use Here maps geocoder.

I can get the label field to display in the combo box and also convert the position into the format I need however I am unable to actually select the value in the combobox. It looks like the 'select' event is not firing and I have no idea why.

It looks like this does fire when I go with the default queryParam "q" although obviously it won't return what I actually want. So it would seem that me changing the queryParam to the one required by Here maps for some reason is stopping me selecting the address I put in.

Here's my code:

Ext.define('HQMap.view.tools.HereGeoCode', {
extend: 'GeoExt.form.field.GeocoderComboBox',
requires: [
    "Ext.data.proxy.JsonP",
    "Ext.data.JsonStore"
],
initComponent: function() {
    var me = this;
    var hereUrl = "http://geocoder.api.here.com/6.2/search.json?app_id=&app_code=&gen5&country=GBR";
    var hereStore = Ext.create("Ext.data.JsonStore", {
        root: null,
        fields: [
            {name: "bounds", convert: function(v, rec) {
                var bbox = rec.raw.Response.View[0].Result[0].Location.MapView;
                    return [bbox.TopLeft.Latitude, bbox.BottomRight.Longitude, bbox.BottomRight.Latitude, bbox.TopLeft.Longitude];
                    }
            },
            {name: "lonlat", convert: function(v, rec) {
                return [rec.raw.Response.View[0].Result[0].Location.DisplayPosition.Longitude, rec.raw.Response.View[0].Result[0].Location.DisplayPosition.Latitude];
                }
            },
            {name: "name", mapping: "Response.View[0].Result[0].Location.Address.Label"}
        ],
        proxy: Ext.create ("Ext.data.proxy.JsonP", {
            url: hereUrl,
            callbackKey: "jsoncallback"
            })
    });

    Ext.apply(me, {
        srs: "EPSG:900913",
        emptyText: "Search Address",
        url: hereUrl,
        locationField: "lonlat",
        displayField: "name",
        valueField: "bounds",
        queryParam: "searchtext",
        forceSelection: true,
        store: hereStore
    });

    me.callParent(arguments);
}

});


texts:
I have the following task.

This is my sample data.

WGS84 datum (longitude/latitude):
-123.75 36.59788913307022
-118.125 40.97989806962013

Spherical Mercator (meters):
-13775786.985667605 4383204.9499851465
-13149614.849955441 5009377.085697312

Pixels
2560 6144 2816 6400

Google
x:10, y:24, z:6

TMS
x:10, y:39, z:6

QuadTree
023010

I'm using the code from this source

http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/.

How should I chain the methods in order to get from google tiles (x:10, y:24, z:6)
the Sperical Mercator meters -13775786.985667605 4383204.9499851465
-13149614.849955441 5009377.085697312?

I have used lots of combinations but I'm getting wrong numbers.


texts: Improve Performance of Geoprocessing Service - GPServerSync.Load

texts:
I have a geoprocessing service in ArcGIS Server 10.1 that is a simple Print Task.  The task is running as an Asynchronous service.  It renders one MapService from the same ArcGIS Server instance, and another basemap mapservice from ArcGIS online and generates a PDF.  The service is taking over 3 minutes to run.  When I turn verbose logging on, I notice that the elapsed time between the following log messages is around 3 minutes:

<Msg time='2014-06-16T06:11:55,546' type='VERBOSE' code='20023' target='WebPrinter.GPServer' methodName='GPServerSync.Load.PrintTask' machine='AGDC-DEV4.LOCAL' process='9632' thread='10020' user='null' elapsed='0.00084'>Load job jc01d9192a4bb4eecbc8317b3d12b34d9 message type REST message size 1218</Msg>
<Msg time='2014-06-16T06:14:13,724' type='VERBOSE' code='103004' target='WebPrinter.GPServer' methodName='Map.Draw' machine='DEV4.LOCAL' process='9632' thread='10020' user='null' >Beginning of geography phase.</Msg>

Once the draw phase starts, the job finishes in seconds.  I am unclear on what the GPServerSync.Load method does, and how to optimize it.  If I try making a PDF in ArcMap of the two same services, it takes seconds.  I do not think that the services involved in making the map are the holdup.

EDIT
Upon digging further, the culprit is in this following line of arcpy:

result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, templateMxd)

The method ConvertWebMapToMapDocument is taking 2+ minutes to complete.  Now, I feel like this issue is related to the issue Why is arcpy.mapping.ConvertWebMapToMapDocument slow?

Thoughts?


texts:
https://en.wikipedia.org/wiki/Decimal_degrees

I found this chart in one of the questions here.
Additional to this:  When making a measurement and getting 2 Measures of Latitude, for example  51.1901354 and 51.1901359.
Is it then possible to say that these points are 5.55 cm apart?
Also, I am using this formula to get meters rather then degree:

Northing = (Latitude-Base_Latitude)*(6378137*pi/180)

Easting =(Longitude-Base_Longitude)*(6378137*pi/180) * cos(Base_Latitude*pi/180)

Is the Chart above usable with this Convertion?


texts: Add features to point layer in QGIS 2.12

texts:
I work with QGIS 2.12 and i try to edit point layer by adding it more point features with "add feature" button. Here my point layer:

after i add the features (features num. 58-62) i save editing. The problem is that i can see the added features in the attribute table:

but in the map they disappear and i can't see them

I red Point features disappear when adding new data but in my situation the features can be seen when i in edit mode.


texts: Project a subset of GeoTIFF image from UTM 32651 to EPSG:4326 by bounding box in EPSG:4326?

texts:
I have a GeoTIFF file which is in UTM 32651 and I need to develop a program, using GDAL library version 1.x (e.g., not using gdalwarp/gdal_translate binary tools) which takes a subset bounding box in EPSG:4326 and applies this subset on the GeoTIFF file (i.e: crop the GeoTIFF file), after that it projects the cropped file from UTM 32651 to EPSG:4326.

For example, I have this input GeoTIFF file in UTM 32651

Size is 9371, 12381
Coordinate System is:
PROJCS["WGS 84 / UTM zone 51N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32651"]]
Origin = (200085.000000000000000,2823015.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Upper Left  (  200085.000, 2823015.000) (120d 1' 0.12"E, 25d29'38.49"N)
Lower Left  (  200085.000, 2451585.000) (120d 5'32.63"E, 22d 8'36.74"N)
Upper Right (  481215.000, 2823015.000) (122d48'46.95"E, 25d31'27.38"N)
Lower Right (  481215.000, 2451585.000) (122d49' 4.06"E, 22d10' 9.72"N)
Center      (  340650.000, 2637300.000) (121d26' 7.36"E, 23d50'21.01"N)

And I have a requesting bounding box in EPSG:4326 like this:

Lat_Min=23.5546875   Long_Min=120.849609375
Lat_Max=23.642578125 Long_Max=120.9375

I knew that I could translate a pair of Long, Lat (EPSG:4326) to X Y (EPSG:32651) e.g:

gdaltransform -s_srs EPSG:4326 -t_srs EPSG:32651

However, I feel like I'm missing something about affine transformation here as the bounding box is a square and I cannot just project each pair of Long, Lat in EPSG:4326 to EPSG:32651 and crop the input GeoTIFF image by these transformed coordinates and after that warp the cropped GeoTIFF from UTM EPSG:32651 to EPSG:4326.

So my question is, how can I use GDAL (e.g: gdal python library) to work on
this case properly? I knew so far about opening GeoTIFF file with GDAL Python, e.g:

from osgeo import gdal

driver = gdal.GetDriverByName('GTiff')
filename = "rescale.tiff" #path to raster in UTM 32651
dataset = gdal.Open(filename)
band = dataset.GetRasterBand(1)

cols = dataset.RasterXSize
rows = dataset.RasterYSize

transform = dataset.GetGeoTransform()

xOrigin = transform[0]
yOrigin = transform[3]
pixelWidth = transform[1]
pixelHeight = -transform[5]

Just need some concrete steps (with gdal Python functions).


texts:
I'm working on some code for a toolbar I made using Python-addin that makes buildings. Part of the code that does this makes a Temporary table view. If my code attempts to make that table view again when it already exists, this error is thrown:

Traceback (most recent call last):

File "filepath", line error happens on, in onClick
    '')
  File "otherfilepath", line I didn't code, in MakeTableView
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Table Name: Dataset editViewStormBill already exists.
Failed to execute (MakeTableView).

I've already made changes in my code to ensure that this error isn't thrown every time a building is drawn. This error is only thrown right now if the user takes a specific action that shows they don't really understand how the toolbar works. What I would like to do is catch the error with an exception that prints out a few lines explaining what the user did wrong and then pass over that part of the code so the rest of the code can attempt to run. I've done this before, but I don't know what to call the error in the try except statement. Here is the bit I'm struggling with:

if button2.isTableView == False:
                try:
                    tableView = arcpy.MakeTableView_management(fc,
                                                "editView" + str(button2.i),
                                               "",workspace,
                                               '')
                    arcpy.ChangeVersion_management((tableView),"TRANSACTIONAL",
                                                       button2.currentVersion,
                                                       '')
                    button2.isTableView = True
                except ???:#What goes here?
                    pass

So far I have tried putting ExecuteError where the questions marks are and nothing happens. What do I put after except; what part of the error tells me what to write for my exception in python?

I'm not overwriting output because that approach would have my code make the tableView every time this button is pressed which would make the toolbar slower and less useful.

If you need to reproduce this error in order to explain how to read error messages then do this:

                try:
                    tableView = arcpy.MakeTableView_management(fc,
                                                "editView",
                                               "",workspace,
                                               '')
                    tableView = arcpy.MakeTableView_management(fc,
                                                "editView",
                                               "",workspace,
                                               '')
                    arcpy.ChangeVersion_management((tableView),"TRANSACTIONAL",
                                                       button2.currentVersion,
                                                       '')
                    button2.isTableView = True
                except :#What goes here?
                    pass


texts:
I have been experimenting with the Delineate Built-Up Areas tool in ArcToolbox and have been unable to get it to properly work.  The tool works properly without giving error messages, however I get an empty output.  My paramenters are as follows:

Input Building Layers: 250 foot buffered point poly's

Identifier Field: An empty short integer field named 'Identifier'

Grouping Distance: 2 miles

Minimum Detail Size: 5 feet

Edge Features: a layer of polygons which contain the input features

Minimum building count: 2

Environment>Reference Scale: 5000.

I get the message that some features have geometries below tolerance in the GUI but other then that it is successfully completed but I have an empty dataset.  I am just trying to get the tool to work so I can tweak it as needed to get the desired result.


texts: Geopackage - select on geometry column returns null

texts:
In DB Manager in QGIS 2.18.26

I want to select geometries in geopackage table.
The returned geometry column is null but the source layer can be loaded as a geometry table in Qgis and i can read the geometry text.

Source Layer:

Select on geometry column

How can i get the geometries?

EDIT: Here is the file


texts: OpenLayers 3 how to keep original image extent

texts:
I'm new at ol3, I'm trying to display my GIS view by updating my ol2 code.

I created the projection and I can display my static image but I'm obliged to use local extent [0, 0, 1024, 968] instead of my image extent [44823.715846278064, 66102.38217556383, 49823.715846278064, 71102.38217556383] otherwise I get a blank screen. In ol2 I made my bounds with the original datas and everything worked fine :/

here the new code :

    var extent = [0, 0, 1024, 968];
    var projection = new ol.proj.Projection({
                       units: 'pixels',
                       extent: extent
                     });

    MAP = new ol.Map({
              target: target,
              view: new ol.View({
                  projection: projection,
                  center: ol.extent.getCenter(extent),
                  zoom: 2
              })
          );

   var imageProjection = new ol.proj.Projection({
                            units: 'pixels',
                            extent: [0, 0, 1024, 968]
                         });

   var graphic = new ol.layer.Image({
                        source: new ol.source.ImageStatic({
                            url: layerData,
                            projection: imageProjection,
                            imageExtent: [0, 0, 1024, 968]
                        })
                 });

   MAP.addLayer(graphic);

I need to keep the original extent to communicate with my server to generate the good image when moveend happens. I tried to use an EPSG:4326 projection but it doesn't work. I'm missing something but I don't know where.


texts: How to ensure ArcPy CalculateField expression runs if one or more input shapefiles from workspace are missing a field referenced in that expression?

texts:
I have a basic ArcPy script that reads an input folder of shapefiles, copies them to a separate output folder, defines this output folder as the workspace and then performs a CalculateField action, followed by DeleteField action.
The script runs without issues until it comes across a shapefile that does not contain a field referenced in the CalculateField expression, at which point the script stops. I have tried to account for this by adding the lstFields line and associated if/try statement, which results in the script running through but it now ignores the CalculateField expression all together but successfully deletes the required fields. Script is below:
# Import arcpy module

import arcpy
import os

# Local Variable

arcpy.env.workspace = arcpy.GetParameterAsText(0)
output = arcpy.GetParameterAsText(1)

#Copy shp files from original input directory to working output directory

fcList = arcpy.ListFeatureClasses()

for shapefile in fcList:
    outFeatureClass = os.path.join(output,shapefile.strip(".shp"))
    arcpy.CopyFeatures_management(shapefile, outFeatureClass)

#Set workspace for edits

arcpy.env.workspace = output

for fc in arcpy.ListFeatureClasses():

    lstFields = arcpy.ListFields(fc)

    if "SRC_NAME" in lstFields:
        try:
            # Process: Calculate SRT field value using SRC_NAME field if present
            arcpy.CalculateField_management(fc, "SRT", "30 if !SRC_NAME! == \"CHUM\" else 110", "PYTHON_9.3", "")
        except IndexError:
            continue

for fc in arcpy.ListFeatureClasses():

    # Process: Delete required fields
    arcpy.DeleteField_management(fc, "SRC_NAME;SPEC_ID;SRC_DATE;SCALE;Shape_Leng;Shape_Area;ID")

The field that is causing issues is SRC_NAME. This field is present in the majority of inputs and is used in the CalculateField expression to populate SRT field. Once this action is done SRC_NAME is then no longer required and therefore referenced in the DeleteField action. If SRC_NAME is not present in input shapefiles, then SRT value does not need to be calculated, but this lack of SRC_NAME is the cause of the issue. The CalculateField expression is directly from ArcMap Model Builder.
I am not sure if the CalculateField expression needs to be referenced as a loop or similar to address this issue or the use of if/try statements is the correct approach. Any advice/comments would be most welcome.
Edit
Using suggestions from comments the script now works. Updated code:
for fc in arcpy.ListFeatureClasses():
    lstFields = [field.name for field in arcpy.ListFields(fc)]
    try:

        if "SRC_NAME" in lstFields:

        # Process: Calculate SRT field value using SRC_NAME field if present
            arcpy.CalculateField_management(fc, "SRT", "30 if !SRC_NAME! == \"CHUM\" else 110", "PYTHON_9.3", "")

        # Process: Delete required fields
            arcpy.DeleteField_management(fc, "SRC_NAME;SPEC_ID;SRC_DATE;SCALE;Shape_Leng;Shape_Area;ID")

        if "SRC_NAME" not in lstFields:
            continue
    except IndexError:
            continue

for fc in arcpy.ListFeatureClasses():

    arcpy.DeleteField_management(fc, "SRC_NAME;SPEC_ID;SRC_DATE;SCALE;Shape_Leng;Shape_Area;ID")


texts: WFS GetFeature query where typeName is a Layer Group not a Layer

texts:
I am loading layers in OpenLayers, and dynamically building a protocol for "identifying" elements in that layer when the user clicks the map, and that layer was the selected "Identify" layer.  This is pretty standard in many applications.

Now one of the "layers" I am loading is actually defined as a Layer Group in GeoServer.

I traced the HTTP request made by OpenLayers to a WFS service at GeoServer, and here is the POST payload:

 <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" maxFeatures="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
    <wfs:Query typeName="MYWORKGROUP:MyLayerGroup" srsName="EPSG:900913" xmlns:MYWORKGROUP="http://www.myurl.com">
        <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
            <ogc:BBOX>
                <ogc:PropertyName>the_geom</ogc:PropertyName>
                <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913">
                    <gml:lowerCorner>-8081435.512129 5125105.8658893</gml:lowerCorner>
                    <gml:upperCorner>-8081411.6255577 5125129.7524606</gml:upperCorner>
                </gml:Envelope>
            </ogc:BBOX>
        </ogc:Filter>
    </wfs:Query>
</wfs:GetFeature>

Here is the response:

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows https://mygeoserver:8080/schemas/ows/1.0.0/owsExceptionReport.xsd">
  <ows:Exception exceptionCode="InvalidParameterValue" locator="typeName">
    <ows:ExceptionText>Could not locate {http://www.myurl.com}MyLayerGroup in catalog.</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Perhaps I just can't do this, and need to configure the actual layer(s) to query for identifying items completely separately from the list of layers to make available for viewing, as some of the viewable layers will be Layer Groups?  That's a pain - if someone changes the layer(s) in the group, I would need to change my configuration for including that layer.

What made me think I could do this was the fact that you can "preview" a LayerGroup in GeoServer's UI, and click on that group, and it returns items under the mouse click from every layer in the layer group.  But that query is a WMS GetFeatureInfo query...  Not sure how to put THAT into a protocol for an OpenLayers featureControl...

Here is the URL I traced when previewing:

http://mygeoserver:8080/geoserver/MYWORKGROUP/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=994584.172875%2C840872.462615%2C1009320.511125%2C855119.508385&SERVICE=WMS&INFO_FORMAT=application%2Fjson&QUERY_LAYERS=MyLayerGroup&FEATURE_COUNT=50&Layers=MyLayerGroup&WIDTH=512&HEIGHT=495&format=image%2Fpng&styles=&srs=EPSG%3A2234&version=1.1.1&x=382&y=276&


texts: I am looking for the file "Mexico.gsb" which used with ArcGIS when datum shifting from NAD27 to NAD83 in Mexico.


texts: Comprehensive list of filter string options in readLAS

texts:
Is there a comprehensive list of string based filters that the lidR package supports in readLAS()? For example:

filter = "-drop_z_below 0"
filter = "-drop_withheld"

I know there are many more ...


texts: How to select a multiple field value by expression from the same layer in QGIS?

texts: Using QGIS in the operation 'select by expression' how is the correct expression to select multiple field value? ex. City NAME = ROME and NAPLES (expression is invalid)


texts: Using if/elif for passing null values to Python of label expression in ArcGIS for Desktop?

texts:
I am trying to pass the Null values in label expression in advance python section. I have this code and it's not working. Note that all my values in [TX_SECT] and [ABSTRACT] are numbers.

def FindLabel ( [TX_SECT], [ABSTRACT] ):
    if [TX_SECT] == "None" and [ABSTRACT] != "None":
        return [ABSTRACT]
    elif  [TX_SECT] != "None" and [ABSTRACT] ==  "None":
        return [ABSTRACT]
    elif [TX_SECT] == "None" and  [ABSTRACT] == "None":
        return ""
    else:
        return [TX_SECT] + '\n' + [ABSTRACT]


texts:
How to delete duplicate points in QGIS (3.14)?
I insert a layer into the project. The layer contains several objects (61 points), some of which are duplicates. In the menu I select "Vector" > "Check Geometries...".
Here I set up to find duplicate points and work with the source layer. It finds duplicates - 26 points. I'll pick them out and set them to be removed.
The dialogue will confirm this to me. But they are not deleted in the source layer, and the layer still has 61 points.
Where am I making a mistake?


texts:
I currently have a faulty WMS layer that I am pulling from Geoserver. I am trying to understand why they are faulty by using Leaflets in-built 'tileerror' hook though the info that comes back doesn't seem to actually contain any info on what the error is.
Where in the tree should I be looking for some sort of error message / diagnostics?


texts: Overpass install fails with std::bad_alloc

texts:
I'm following the official HOWTO here: http://wiki.openstreetmap.org/wiki/Overpass_API/Installation I get to the database import step. I have osm.bz2 dumps downloaded from Geofabrik.de.

init_osm3s.sh script fails with this:

Reading XML file ...Reading XML file ...terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
./init_osm3s.sh: line 44:  8618 Broken pipe             bunzip2 < $PLANET_FILE
      8619 Aborted                 (core dumped) |  $EXEC_DIR/bin/update_database --db-dir=$DB_DIR/ $META $COMPRESSION

Google tells me that it is possibly "out of memory" exception. But that machine have 4G RAM + 4G swap on it. I tried monitoring memory usage with top and free and I see there is plenty of memory left. It gets to around 3000MB/600MB total system used/free, nothing used from the swap and then it fails.

Overpass version 0.7.52
Ubuntu 12.04


texts: I have created a database on QGIS Cloud Pro. I want to share this database with another user for live updates on QGIS desktop. How can I do this?


texts: Count the intersection of buffers, in the same layer. qgis

texts: If I have one shape of buffers, How to count the number of times, the different buffers (in the same layer) intersect each other.


texts: QGIS 2.8.1-wien: how to unselect multiple layers from imported dxf?

texts:
I'm using the following syntax within the query builder in order to unselect a layer from a dxf added as a vector to the project:

'Layer' NOT  LIKE '15%'

It works but now I want to deselect some other layers e.g. '16%'

Now my question is why the following expression is not returning the correct result (just a selection of layers) but rather all possible layers of the dxf file?

'Layer' NOT  LIKE '15%' OR 'Layer' NOT  LIKE '16%'

Would any other syntax be possible for this purpose?


texts: QGIS Invalid Geometry when importing a delimited CSV file

texts:
I am fairly new to QGIS. I am attempting to import a CSV file with lat/long coordinates into a project I have been working on. Each time I import the file, I receive an error stating my geometry is invalid. I did some research, and found that as I am working on a mac, it was important to save the file as a windows formatted CSV. This has not helped. I also tried separating the columns such that the lat/longs were formatted differently, and did not include letters. This has also not worked either. I've tried to upload some images but unfortunatly i have very poor internet in the area in which I work. Can anyone help me out here?

Errors in file /Users/coreydickinson/Documents/Uganda/ICS Hybrid Inventory 2.csv
4 records discarded due to missing geometry definitions
184 records discarded due to invalid geometry definitions
The following lines were not loaded into QGIS due to errors:
Invalid X or Y fields at line 3
Invalid X or Y fields at line 4
Invalid X or Y fields at line 5
Invalid X or Y fields at line 6
Invalid X or Y fields at line 7
Invalid X or Y fields at line 8
Invalid X or Y fields at line 9
Invalid X or Y fields at line 10
Invalid X or Y fields at line 11
Invalid X or Y fields at line 12
Invalid X or Y fields at line 13
Invalid X or Y fields at line 14
Invalid X or Y fields at line 15
Invalid X or Y fields at line 16
Invalid X or Y fields at line 17
Invalid X or Y fields at line 18
Invalid X or Y fields at line 19
Invalid X or Y fields at line 20
Invalid X or Y fields at line 21
Invalid X or Y fields at line 22
Invalid X or Y fields at line 23
Invalid X or Y fields at line 24
Invalid X or Y fields at line 25
Invalid X or Y fields at line 26
Invalid X or Y fields at line 27
Invalid X or Y fields at line 28
Invalid X or Y fields at line 29
Invalid X or Y fields at line 30
Invalid X or Y fields at line 31
Invalid X or Y fields at line 32
Invalid X or Y fields at line 33
Invalid X or Y fields at line 34
Invalid X or Y fields at line 35
Invalid X or Y fields at line 36
Invalid X or Y fields at line 37
Invalid X or Y fields at line 38
Invalid X or Y fields at line 39
Invalid X or Y fields at line 40
Invalid X or Y fields at line 41
Invalid X or Y fields at line 42
Invalid X or Y fields at line 43
Invalid X or Y fields at line 44
Invalid X or Y fields at line 45
Invalid X or Y fields at line 46
Invalid X or Y fields at line 47
Invalid X or Y fields at line 48
Invalid X or Y fields at line 49
Invalid X or Y fields at line 50
Invalid X or Y fields at line 51
Invalid X or Y fields at line 52
There are 134 additional errors in the file

Format of coordinates: N  0 27.888  E   30 18.648


texts: Risk and vulnerability analysis for the spread of alien species

texts:
Based on knowledge about the potential for proliferation of alien forests species we are looking at possibilities for modelling the process.

Inputs should be area for initial plants, wind, elevation, nature types. The model should run n model years. Output should be an surface (shapefile or raster) indicating the risk of spread for the species.

The input information to such a system should probably conform to the BAM model  after Peterson et al (2011) Ecological Niches and Geographic Distributions (MPB-49).

Species distribution analysis systems like Lifemapper exists. An other example is QSDM – Species Distribution Modelling for the QGIS Processing Toolbox.

The mentioned systems are not only providing the libraries but also providing interfaces to the actual computation system. A system would typically look like this:

We are most interested in the "black box" in the above setup. In particular the web front end could make things unnecessary complicated. Interfacing properly with GIS tools is a better start.

Does anyone have experience which points to how one of the above or other systems could serve as proof of concept. An answer should include reference to:

Plugins, software or libraries website with documentation
Papers, reports or blogs giving the use a proper context
Information about license status


texts: Selecting certain segments when creating training set for classification in ArcGIS?

texts:
I am trying to classify an RGB image in ArcGIS 10.7.

When I try to use the 'select segment' option to create a training set I am allowed to pick only certain segments to add to my training set. For example, if there are 3 segments next to each other that belong to 1 class I am sometimes only able to select 2 out of the 3 segments. I don't get an error message but I'm simply not allowed to add the 3rd segment to the class I want, for some reason. In the corner of the ArcGIS window I get the message 'Oversimplified training sample selected'.

I have been able to successfully classify the image before, so I dont think there's a problem with the image itself.

What could I be doing wrong that is preventing me from using certain segments (that really do belong to the class I'm trying to ID)?


texts: Joining Origin, First point, Second Point and Destination to create routes in ArcGIS Desktop?

texts:
I am using ArcGIS 10.3.
I have a table with the X,Y coordinates for 4 points along a route - 1st point, 2nd Point, 3rd Point and 4th Point. The 1st point is the origin and the 4th point is the destination.

The set of points each have a unique response ID.
I need to join the four points thus created along a road network - one route for each response ID.


texts: How to turn off QGIS legend band number by default?

texts:
QGIS automatically generates legends for single band rasters in the print composer legend window.
In the latest releases, it appears that the legend automatically creates a "Band" title in the legend as seen in the figure below.

I find this unnecessary as the vast majority of the raster data that I deal with is single band and I dont wish to manually turn remove the band in the legend item everytime. My audience is not aware of raster bands and hence I dont wish to add this in the legend.
I am looking for the following output:

Is there a setting somewhere where I can turn off this behaviour for single band rasters? I could not locate it. Perhaps a default variable that can be editted?


texts:
I have external WMS server, which have a layer pusblished in Mercator projection (EPSG:3395). I have this layer set up in Geoserver (2.8.1, GeoTools 14.1).

I need to expose this layer via WMTS in EPSG:4326.

The problem occurs when I try to query it using EPSG:4326 projection.

Basically, whatever I try I run into the following error:

Caused by: org.geotools.referencing.operation.projection.ProjectionException:
Latitude 90°00.0'S is too close to a pole.

with varying value depending on the bbox I use.

So far, I've tried the following:

changing layer's Native Bounding Box from [-20037508.3428, -15496570.7397, 20037508.3428, 18764656.2314] to [-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428] back and forth;
setting layer's Lat/Lon Bounding Box to [-180, -80, 180, 84], [-180, -85, 180, 85] and [-180, -90, 180, 90];
trying to create custom grid for GWC layer based on EPSG:4326 with bounds of [-180, -80, 180, 84]

It works perfectly well when I query it with EPSG:900913 projection, with blank zones on the top and the bottom of the map. It also works well when I query it via OpenLayers in EPSG:4326, if I don't get past the 90° latitude. Is there something I'm missing?


texts: Gdal Warp TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *'

texts:
When I try gdal warp in Jupyter lab I get the error below. Also, I add the full error below.

  TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *'

gdal.Warp(output_path, input, format = 'GTiff', dstSRS = 'EPSG:4326 ')

I am working in Ubuntu(not anaconda env) and also in the Docker file. As you see, the code is very simple. In Docker, also I try in Python console in cmd and I got the same error.

I open this issue because first, I supposed that the reasons could be my Docker env but I got the same error in my local env. I have been using the same code for basic translation jobs and I haven't changed anything in my python env.

Any idea?

gdal version= 2.4.0

Full error

    TypeError                                 Traceback (most recent call last)
<ipython-input-20-7fb1940e5e91> in <module>
----> 1 gdal.Warp(r'./data/elevation_tif/EarthEnv-DEM90_N40W005.tif', './data/elevation_files/EarthEnv-DEM90_N40W005/EarthEnv-DEM90_N40W005.bil', format = 'GTiff', dstSRS = 'EPSG:4326 ')

~/Documents/geo/lib/python3.6/site-packages/osgeo/gdal.py in Warp(destNameOrDestDS, srcDSOrSrcDSTab, **kwargs)
    599
    600     if _is_str_or_unicode(destNameOrDestDS):
--> 601         return wrapper_GDALWarpDestName(destNameOrDestDS, srcDSTab, opts, callback, callback_data)
    602     else:
    603         return wrapper_GDALWarpDestDS(destNameOrDestDS, srcDSTab, opts, callback, callback_data)

~/Documents/geo/lib/python3.6/site-packages/osgeo/gdal.py in wrapper_GDALWarpDestName(*args)
   3351 def wrapper_GDALWarpDestName(*args):
   3352     """wrapper_GDALWarpDestName(char const * dest, int object_list_count, GDALWarpAppOptions warpAppOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"""
-> 3353     return _gdal.wrapper_GDALWarpDestName(*args)
   3354 class GDALVectorTranslateOptions(_object):
   3355     """Proxy of C++ GDALVectorTranslateOptions class."""

TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *'


texts: Combining two rasters based on a Condition using Open Source Python

texts:
I'm new to Python. My only experience is with Arcpy. I need to combine two rasters with the same extent into one output raster based on a condition. Using Arcpy, I would do something like this:

outCon = Con ((inRaster1 > 0.5), inRaster2, inRaster1)

but I don't have access to Arcpy and need to use an Open Source Python (Rasterio, numpy, gdal, ...). Any ideas or thoughts?


texts: How to get the right scale and total value of a world population map using GEE?

texts:
I'm trying to understand worldpop data using GEE.
While the scale should be 100 m., using the following code line I get a scale of '111319.49079327357'
var pop_scale = pop2015.select(['population']).projection().nominalScale();

print('Scale pop: ', pop_scale);
Moreover, when I try to estimate the world population using a scale of 100 m as it should be, the total world population is about 6.2 billion in 2015, when it should be in fact about 7.3 billion people.
https://code.earthengine.google.com/76f608f35460bd6287173cef2f9e940c
How can I get the right scale using the original data in order to start working with a realistic value of the total world population, that is about 7.3 billion people?


texts:
I try to cascade WMS that is published by different mapping server(Bentley GeoWebPublisher) in epsg:2320 to WMS service as epsg:4326 using GeoServer.

I selected epsg:2320 as "Native SRS". I tried epsg:2320 for "Declared SRS" and requesting the layer from client (to say QGIS and Leaflet) with epsg:4326 hoping that GeoServer will make necessary on the fly transformation based on the request's SRS code. I keep getting "Invalid SRS specified." As an alternative solution I tried to declare "Native SRS" as epsg:2320 and "Declared SRS" as 4326 with options "Force declared","Reproject from native". All alternatives resulted with same error-"Invalid srs specified."

Is it wrong to expect on the fly transformation from GeoServer?

As an additional information, source WMS is provided only as epsg:2320.


texts: Coercing to sp and dealing with duplicate field names

texts:
I am dealing with a very similar situation as described at:
rgdal::writeOGR collision in column names results in NULL data
I have an sf object with duplicate field names (in a case-insensitive way). Coercing to sp with as(foo, "Spatial") does not do any sanitizing  and this breaks downstream processing.
The errors I get are variously:

ERROR: Cannot insert new row: insert into foo values ( 1, 55800, )
Failed to create feature

Is there an automated solution other than manually checking for dups and renaming?


texts: Making place names permanently visible in Google Earth?

texts: It is not possible to make place names permanently visible in Google Earth, only by hovering over the place or zooming in. How can I fix this?


texts: QGIS - Unable to get OSM data on re-opening project

texts:
I have now successfully got OSM maps to import as I would like, but if I save the project then later re-open, I always get a bad layer message and I have to reload the OSM once the project is open.

How can I save the datasource reference with the project so I don't get this every time?


texts: Querying Adjacent Polygon Features using ArcMap

texts:
I have a layer of polygon features representing forest stands with a vegetation type and age. For every forest stand I want to assign it a value in an empty field if any of the adjacent stands have a specific vegetation type and age.
How would I go about doing this inside ArcMap?


texts: Extract some attributes in field to a new field in attribute table

texts:
I want to transfer in the TESTE field(img) only cities(strings) to a new field but but with the same numeral representation. Ex: |1| |Guimarães|; |2| |Porto|.

@BERA and @Aaron I want that the final product looks like this
final product


texts: Generate training data from FeatureCollection in Google Earth Engine

texts:
My goal is do a land cover classification using Landsat 8 imagery and my shapefile which when imported to GEE, looks like this,
Feature  HID    ClassName   SuperclassID
Index
  0      911      Veg1           900
  1      911      Veg1           900
  2      912      Veg2           900
......

So far using the below script I've been able to load the imagery and the vector file
var L8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_RT_TOA");
var table = ee.FeatureCollection("path/to/shapefile")

function preprocess(table, class_id){
  /**
   Preprocess and return training data points

   * @param  {ee.FeatureCollection} table - Shapefile
   * @param  {number} class_id -  Id of superclass to be classified
   * @return {[type]}     [description]
   */

   var vfilter = ee.Filter.inList('SuperClassID', [class_id]);
   var filtfeats = table.filter(vfilter);

   var ids = [911, 912, 913];
   var labels = [0, 1, 2]

   // Remap ids
   filtfeats = filtfeats.remap(ids, labels, 'HID')

   // Generate training points
   ......
   return points

points = preprocess(table, 900)

How can I generate training data points from filtfeats or more generally a FeatureCollection?


texts: Export attribute table from ArcGIS Online and format it in Google Sheet/Excel Online etc

texts:
Some background:

I'm using Esri's Modelbuilder to produce some data from a view I've created in Microsoft SQL Server. I open the result from running the model in ArcGIS desktop and publish as a feature layer to ArcGIS online. I use that feature layer to feed a number of web maps, apps etc in ArcGIS online so that when I rerun the model and update the feature layer online, (as I do weekly-ish) my maps and apps update as well.

Many of the relevant users of this data would prefer to simply view a table but are not savvy enough to open the attribute table and find their rows/columns of interest so I'm looking for a way to automatically export SOME of that information AND be able to format the document in way that's consumable online. Ideally someone would be able to access our website and choose to either view the map or view a (formatted) table of the same data and BOTH would be updated when I re-publish/update the feature layer.

My thoughts on possible solutions:

Someone with saavy in writing scripts could probably do this but I do not possess that saavy unfortunately.
If I could have ArcGIS online automatically output its attribute table (unformatted) into Google Sheet/Excel Online I could produce a different formatted version with references to the source data created by ArcGIS Online, but I don't know how to achieve the first part.


texts:
In QGIS 3.0 the print layout window shows the following:

The result after pdf exporting is this:

How can I prevent the downsizing?


texts: What sampling tools are available in QGIS?

texts:
I'm looking for a tool to generate a stratified random set of points within the boundaries of a polygon layer.
In ftools 0.6.1 there is a tool which almost does what I need, but misses the stratified part. For example, I needed to generate 100 random point inside each polygon, accordingly with the polygon's class (from a given field).
I know Hawth's Tools had this...
Thanks


texts: Add and edit Oracle Spatial Layer in QGIS

texts:
When I connect oracle layer are not enabled me all editing options. I can create and delete but not update.

It is an issue of users? permissions or privileges? metadata?

All works OK in AutoCADMap3D with the same credentials.

I'm working on Oracle Spatial 11g and QGIS 2.12


texts: KD-Tree implementation with lat/lon coordinates

texts:
I have implemented a KD-Tree that stores coordinates (latitude, longitude). I have also implemented a Nearest Neighbor search algorithm using the Haversine distance.

Will I get correct results (same nearest neighbor) if I use euclidean distance instead ?

If not, can you give me a concrete example of 3 GPS coordinates (WGS84, for example 32.5321141, 35.23215122) where euclidean distance fails to distinguish which coordinate is closer to which ?


texts: Update values from layer one to layer two where there is no identical ID but identical geometry

texts: I have one huge problem and that is to get the value from one layer into another. It is a network with over a million links and I need to update a table from a layer of + 100 000 links. I am using QGIS and tried intersect, overlap on smaller data but I don't get the result I want. The two layers have identical geometry but one layer for example can have one long link compare to layer two that can have several links (road intersections) so overlap and intersection does not work. I did try the "Select by location" and "Include input features completely within the selection features" It did work as I wanted but when trying on the bigger data it just sit there for many hours (or overnight) and I don't know if it is working or just freezed in the process. All I want is to match the data and update the values from one layer to the other. As there is no identical ID I can not use the "Join" function but have to use geometry match instead. Is there another way around this problem?


texts: Update query does not affect any rows, privileges are set to public and allow all actions

texts:
I've been trying to update a column of integers called level_dept in a table called adminboundaries within the sql query tool on pgadmin3 and the query runs and finishes with a lot of lag, but 0 rows are affected. I didn't receive any syntax errors and I've set the privileges to allows the user role to perform all actions, are there any other particular settings or things I should check that I should know about?

BEGIN;
EXPLAIN ANALYZE
UPDATE AdminBoundaries
SET "LEVEL_DEPT" = "LEVEL_DEPT" - 1
WHERE "NAME_3" = NULL AND "LEVEL_DEPT" = 3;
COMMIT;

Error Log:

2013-01-03 15:58:03 EST STATEMENT:  BEGIN;
    EXPLAIN ANALYZE
    UPDATE AdminBoundaries
    SET "LEVEL_DEPT" = "LEVEL_DEPT" - 1
    WHERE "NAME_3" = NULL AND "LEVEL_DEPT" = 3;
    COMMIT;

Despite trying a few variations of syntax, I think it might be a pgadmin related issue? I'm not sure though. I'm considering changing the postgresql.conf file. I've already enabled seq_scan to be off. There are other parameters I'm considering changing.

Is it necessary to look into the nuances of postgresql as far as dirty reads, commit delays, etc when processing in a table of only 250k rows?


texts: Download OSM data with QuickOSM and QGIS Modeler example and/or tutorial to share

texts: I would like to automatically search and save my results (11 layers) via the QuickOSM plugin using the Qgis Graphical Modeler. Could anyone help me with some already prepared example or some tutorial on this?


texts: QGIS 2.6 - Point Sampling Tool plugin producing empty shapefile

texts:
I use a DEM file (*.tif) and a points layer. My need is basic : getting the Z value for each point by extracting them from the DEM. Both layers correctly opened with QGIS 2.6. The DEM returns a Z value if I click with the « i » button (informations).

'Point Sampling Tool' plugin is set as below :

Layer containing sampling points : my points layer
Layers with fields/bands to get values from : I select my DEM, which appears in the list as : 'EUD_CP_DEMS_3500015000-AA-86 : Band 1 (raster)'
Output point vector layer : output.shp
Add created layer to the TOC : activated

The following message in still issued in the 'Status' part :

Complete the input fields and press OK...

I don't undertand what to do with this message. Anyway, I validate the dialog and get my output.shp added to the TOC properly... BUT the attributes column is empty (NULL values). I have the right number of lines matching the number of points in my source points layer.

I can't find any further help on the Web. Such clear tutorials do not show any difficulties.

Is my DEM format a possible issue?


texts: Congressional/Legislative Member Data Set

texts:
I am working on a web map of congressional and legislative districts. I am able to find the boundary lines but not up to date data on the representatives per legislative district.

Anyone know of such a data set and where to find it?


texts: Showing layout of layout manager from Python console or Python script QGIS 3

texts:
How can I show/open layout '2019_A' of Layout Manager from Python console?

How show window layout specific?

I checked in menu Interface Customization, mActionShowLayoutManager and I do not know how to call from Python console.


texts:
I’ve been tasked with a habitat classification project which is requiring me to assign thousands of empty polygons different classification types and I do not know how to automate this process.

Examples of assignment are things like “upland forest”, “tidal flat”, “unconsolidated mud”, etc. Said features also have other attributes which need to be included, such as sub-types, unique identification codes and other required records as per. NOAA guidelines.

Background: polygons derived from eCognitition software, polygons delineated off of variability in from satellite imagery. The polygons have automatically been parsed out to these “upland forest”, “tidal flat”, “unconsolidated mud”, etc. categories based on variability in the imagery.

What I need to do now is assign the blank polygons their respective categories into the attribute table – as right now are just empty polygons. Below is an example of what the finished product should look like.

My idea is to train pixels an order to define the numerous habitat classification types and then create some kind of temple which has the attributes already populated – then join them somehow.

I know there are better, more consistent and more accurate ways to accomplish this though they are unknown to me.

Can anyone advise?


texts: Changing hard coded variable value to user input in Python script with ArcPy

texts:
I have exported "Con Tool" script from ModelBuilder. The model has two input parameters one is the DEM and the second is "Long Variable". When I run the model it executes perfectly fine but as I import the script to tool box and assign the variables and type and run them the Python log shows errors.
I believe the script is taking the variable name instead of its value.
How do I fix that?
This is the script:
# ---------------------------------------------------------------------------
# conmodelscript.py
# Created on: 2020-07-24 11:51:39.00000
#   (generated by ArcGIS/ModelBuilder)
# Usage: conmodelscript <DEM> <Input_Value>
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Script arguments
DEM = arcpy.GetParameterAsText(0)

Input_Value = arcpy.GetParameterAsText(1)

# Local variables:
Long = "1"
Output = "C:\\Users\\92347\\Desktop\\test\\output.tif"

# Process: Con
arcpy.gp.Con_sa(DEM, Long, Output, "", "Value<=%Input Value%")

This is the model

This is how I add and run the script


texts: Reproducing GRASS GIS network analysis tutorial in QGIS Field Calculator

texts:
I'm looking to reproduce the assigning of road speeds as denoted in a GRASS GIS tutorial (v.net.alloc tutorial), where the road speed is assigned by road type (i.e. 'interstate' = 75 mph etc.) to then work out the 'cost' of travelling on that road (i.e. drive time analysis).

I have the road type in one column, I have calculated the road length in another, I now wish to set the speed limit of the road by road type, however I can't work out how to do this in QGIS using the field calculator.


texts:
In QGIS 3 does anyone know how to copy the geometry of one feature and paste it into another selected feature to just override the geometry?
Within postgis I did this with an update, but I'm looking for a visual way in QGIS. Simply copy and paste.
The only solution I found, is to insert the copy of a feature as a new entry, edit the missing attributes and delete the old one.


texts:
How to manage space in between labels (or density)?

I would like to have less labels in order to have more space in between.
The label order is not important.

I would like to precise is just for city name labels, not street name or like.

A picture is better than a long explanation :

THE RESULT


texts: Where to download 4-band NAIP imagery for California?

texts:
I've been trying to find orthoimages with 4 bands for a couple of counties in California. I managed to download some from the GeoSpatial Data Gateway from the USDA (NRCS), but they all only have 3 bands even though it says that images from after 2010 were acquired with 4 bands. (They are called 2012 National Ag. Imagery Program Mosaics.)

I've tried so many other sites - USFS, USGS, etc. to get 4 band images (that aren't massive) to no avail. I feel like EarthExplorer from USGS possibly has what I need, but I can't figure out which data is what I'm looking for since they have so many options. Can someone please advise on how I can get this info? The pictures I downloaded from the USDA are perfect and beautiful if they just had the 4 bands.


texts: How to calculate the number of buildings along the left/right side of a street?

texts:
I'm struggling to find a way to get the line direction stored on shape file from its geometry, is there any tool can get it for me?

Also, I have two layers of map: Roads layer  (of type polyline), Building layer (of type polygon)

I want to get the number of buildings located on the left, right sides of a street segment. Is there any way to do that?


texts: Why do classic google maps and the modern google maps show different types of driving times?

texts:
As I am currently working on a project, where driving times are quit important, I've noticed that classic google maps and modern google maps show different types of car driving times.

While the modern google maps shows driving times with and without traffic, the classic gui shows only driving times with traffic and one figure, which is not further specified. BUT: driving time with traffic is always lower than the not further specified figure. How can this be? How can low traffic be faster than calculating the driving speed without traffic?

Has anybody any ideas? Am I getting something wrong?


texts:
I have a time series of lat/lon data with timestamps. The data is in ~5 seconds intervals. There are no jumps in the data, so I don't need to smooth it.

However, points can be slightly off due to inaccuracy. And as I know that the true path follows smooth patterns (model aircraft), I want to interpolate the data to get a better representation. It was straightforward to build bezier splines where I assume my recordings as knots, but then the path doesn't follow those points as it's not really an interpolation.

I had a look at SciPy's interpolate functions. However, the 1D functions don't work with lat/lon data due to the patterns in the data (e.g. flying in a circle causes duplicate recordings). I tried the multivariate data with time on the X axis and Y,Z as lat/lon. But the function assumes that Z=f(X,Y) which is not really correct and thus leads to wrong results. In my case it'd rather be Y,Z=f(X). And I'm not sure if I want to include time at all at this stage as I'd then also make assumptions about speed patterns.

Are there any built-in functions that can handle the data? Or other packages that I could have a look at?


texts: Appending in Modelbuilder to a derived dataset

texts:
I have a simple model with a file gdb model parameter InputGDB, which contains a feature class fc1. Inside the model is a preset output folder and a template (empty) file gdb TemplateGDB, which contains a feature dataset template_fds and a feature class template_fc. A copy of TemplateGDB is made in the output folder and takes its name from InputGDB (using inline variables).

I would like to Append fc1 into template_fc with the schema set to NO_TEST. However, since the target dataset template_fc does not exist yet because the model hasn't run, the Append tool will obviously not validate. Is there a way for me to run the model without having to first run the first section, then validating to run the Append process?


texts:
I'm using cartodb's static maps API to create a hi-def printable map. The map is placed on top of a basemap generated in Mapbox studio.

Looks pretty good but I have an issue that prevents me to industrialize the process :
When using the anonymous endpoint with a bounding box (http://docs.cartodb.com/cartodb-platform/maps-api.html#bounding-box), the map does not exactly respect the coordinates sent, it's more of an approximation. My intuition is that the renderer needs to stick to a discrete zoom level, and will send a map at this zoom level, with the bounding box center as the center.

So for now, I have to guess what's the bounding box actually set on the cdb map and try and make the Mapbox map use the same bounding box. Not so handy.

A solution could be to use a named map using the view set in the template (http://docs.cartodb.com/cartodb-platform/maps-api.html#named-map), but I really like being able to modify the SQL and the css on the fly.


texts: spatialpolygons heatmap in R - NAs in grey?

texts:
I have a spatial polygon data-frame and I am trying to plot a heatmap via spplot. It's a map of Europe and the values for the heatmap are in a column of the data-frame.
Plotting it works fine but I have some NAs in the column used for the colors and these countries are just not colored, so they are white. I'd really like them to be grey, however.. I have no idea how I can do this in spplot.. can anyone help?


texts: Michigan Projection with GDAL or FWTools

texts:
Has anyone come across a specific projection for Michigan, specifically:
NAD_1983_CORS96_StatePlane_Michigan_South_FIPS_2113_Ft_Intl

When I look at spatialreference.org I do not find any instance of the projection, so I can locate the ESPG code.


texts: Is it possible to apply affine transformation (translation) to raster image?

texts: Is it possible to move/translate a raster image in QGIS 2.2 (without using georeferencer) just like it can be done with a shapefile ? If not, alternatively can this be done with ArcGis?


texts: Kernel Density Map points rejected as outside window

texts:
I am trying to make a kernel density plot of a points shapefile like so:

library(rgdal)
library(spatstat)
library(maptools)

points <- readOGR(dsn = "C:\\Documents",
                  layer = "points")

points$X <-  coordinates(points)[,1]
points$Y <-  coordinates(points)[,2]

aoi <- readOGR(dsn = "C:\\Documents",
                  layer = "aoi")

W <- as.owin.SpatialPolygons(aoi)

pp <- ppp(points$X, points$Y, W = W)

but this returns:

Warning message:
7978 points were rejected as lying outside the specified window

which is the number of rows in points.  Both projections for aoi and points are:

"+proj=utm +zone=14 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"

And when I plot:

plot(W)
plot(points, add=T)

So my points do overlay, however I'm not sure why I get the error.


texts: SDE views not showing values in joined table

texts:
I created an SDE view between a point feature class and a table (stored in SDE) - the join is done on a text field called RFRNC.  I changed the view so that it is now a LEFT OUTER JOIN in line with this doc:

http://www.jamesrichards.com/post/2009/07/16/How-To-Create-an-ArcSDE-Spatial-View-With-an-Outer-Join.aspx

Problem is - when create a row in my flat table in the RFRNC column with a value I know exists in the featureclass - it never shows up or updates in the view - what is going on here? Any ideas greatly appreciated.


texts: Finding the max. zoom level containing imagery at a point in Google Maps?

texts:
Is there a way to find the maximum zoom level containing imagery at a point in GMaps?

I'm wanting to automatically zoom my map in as much as possible when a user chooses a point, but sometimes there is no hi-res imagery (i.e. only level 18, not 21) at that point?

Is there a way to know beforehand?


texts: Coloring circleMarkers based on category in Leaflet?

texts:
My question is, how can I get Leaflet to color each of circleMarkers I am generating/points with a different color, based off the type property of the point?

I've done a bit of research, but all I've seen is coloring points based on manually created dictionary, while my "known list of types" can be expanded at any time, and additional colors have to be added to accommodate new types of points. Also I am quite weak in Javascript and its actual syntax.

I have the list of all unique types before the iteration over data.

I am working in C# MVC if that helps.

My view (presentation layer of the program - generates a HTML page based off its contents) iterates over Model data (basically data which I need to show on the map) which contains latitude, longitude and type properties (more than that, but irrelevant for this), and adds the points to map, drawing them.

Code that generates my points:

{
foreach (var item in Model)
{
    <text>var point = L.circleMarker(["@item.Latitude",     "@item.Longitude"]).addTo(mymap)
        .bindPopup("@item.Type.TypeDesc" + ", " + "@item.Latitude" + ", " +     "@item.Longitude" + ", " + "@item.RPT_DT").openPopup(); </text>
}
}

I need each point to be of a color depending on TypeDesc property. List of TypeDesc properties can be easily accessed via a Viewbag.TypeDesc list.


texts: Executing multiple PostGIS functions in a single query

texts:
I am brand new to PostGIS and this question is probably just due to my limited SQL experience, but what is one way to execute multiple functions sequentially in PostGIS? For example, I have vector shapefile that I want to (in this order):

Select by attribute
Multipart to single part
Buffer these single parts

I have completed steps 1 and 2 with the following code:

SELECT some_col,
    (ST_Dump(geom)).geom As geom FROM some_table
WHERE some_col= '1';

This brings me to part 3 - what would be a way to nest the buffer call to these now single parts?


texts: ogr2ogr csv conversion with latlon in one column

texts:
I have a csv with "lat\,lon" in a single column. I am trying to convert it with ogr2ogr to another format, and cannot figure out how to format the VRT file to accept this format.

I cannot do anything other than change the VRT at the moment due to other limitations. I would love to rewrite the csv, but this is the format that I have to deal with for now. I have been pulling my hair out all day, and have yet to figure out a viable solution.

example for formating:

name, date, value, latlon
a, 20130101, 0, "100.8\,40.2"
b, 20130101, 1, "101.2\,40.4"
c, 20130102, 1, "100.2\,41.2"
d, 20130103, 2, "102.0\,40.7"
e, 20130104, 3, "100.6\,41.0"

Any ideas would be greatly appreciated.

edit for clarification:
The data is not a set number of characters, so splitting at a character number does not work right.

a, 20130101, 0, "10.844\,-40.2745"
b, 20130101, 1, "101.2010\,40.411111"
c, 20130102, 1, "-100.27867\,1.24522"
d, 20130103, 2, "-1.04577\,16.745637"
e, 20130104, 3, "100.617417\,-1.0757"

EDIT: Accepted answer actually does not require the intermediate CSV, it can be done straight from original CSV. The INSTR is what I managed to get to work.

<OGRVRTDataSource>
    <OGRVRTLayer name="result">
        <SrcDataSource>test2.csv</SrcDataSource>
        <SrcSQL dialect="sqlite">SELECT name, date, value, SUBSTR(latlon,2,INSTR(latlon,"\,")-1) AS lat, SUBSTR(latlon,INSTR(latlon,"\,")+2,-1) AS lon FROM test2</SrcSQL>
    </OGRVRTLayer>
</OGRVRTDataSource>


texts:
Following this initial thread I'm having some problems implementing what was suggested here:

Can I Store An ArcObject inside a BLOB?

Well, following the link Kirk provided, I've came up with this:

    public static object GetBlobValue(this IActiveRecord wrapper,FieldAttribute attribute)
    {
        IMemoryBlobStream blobStream = wrapper.UnderlyingObject.get_Value(attribute.Index) as IMemoryBlobStream;

        IPersistStream blob = new PropertySetClass();
        blob.Load(blobStream);

        return blob as IPropertySet;
    }

    public static void SetBlobValue(this IActiveRecord wrapper,FieldAttribute attribute,object value)
    {
        if (!(value is IPersistStream))
            throw new ActiveRecordException("Nâo é possível persistir um objeto que não implementa IPersistStream.");

        IPropertySet property = new PropertySetClass();
        property.SetProperty(attribute.FieldName, value);

        IMemoryBlobStream memStream = new MemoryBlobStreamClass();
        IPersistStream persist = (IPersistStream)property;
        persist.Save(memStream, 0);

        wrapper.UnderlyingObject.set_Value(attribute.Index, memStream);
    }

Looks like the SetValue code is working. I can see the values in Oracle just fine. But the GetValue method always returns an empty IPropertySet.

I've decided to always wrap an object within the IPropertySet as recommended. I'm not sure what I might be doing wrong, since ESRIs documentation on this is sparse not very detailed.

I've followed tons of examples (tried using IObjectStream, setting IObjectStream.Stream property with IMemoryBlobStream as described here) but no luck. Always an empty IPropertySet. Oh, also I've should mention that I'm trying to persist another IPropertySet to this field - could that be the problem?

Thanks!


texts: ArcPy not detecting colorizer when layer set to stretched symbology

texts:
ArcPy is not detecting a raster layer's "colorizer" type when the layer is set to "Stretch" symbology. The ESRI documentation suggests this should be possible. Am I missing something?
Here is the Python snippet shown in the screenshot:
import arcpy
p = arcpy.mp.ArcGISProject('current')
for mp in p.listMaps('*'):
  print(f"Check '{mp.name}' map for raster layers, and their symbology")
  for l in mp.listLayers():
     if l.isRasterLayer:
         sym = l.symbology
         if hasattr(sym, 'colorizer'):
             print(f"\t {l.name} has a colorizer type of {sym.colorizer.type}")
         else:
             print(f"\t Unknown symbology for '{l.name}'")


texts: Equivalent tool to Copy raster using ArcCatalog

texts:
I am using ArcGIS 10.8.
It take less than 3 seconds to copy raster (25k*30k cells) from one file geodatabase to another manually (Copy-Paste).
When I use Copy Raster tool it takes much-much longer.
What tool shall I use to perform this operation faster?


texts: ArcGIS method for declustering a spatial dataset?

texts:
I have previously asked this question but perhaps was using the wrong terminology. I would like to run some type of cell declustering on a spatial dataset. Is there a tool for doing this in Arc? Alternately, if I overlay a grid over my points, how would I randomly sample 1 point per grid cell - this would be one way of generating a declustered set of points. I have geostatistical analyst but I don't see the option to spit out a declustered dataset.

OLD QUESTION: In ArcGIS 10.2, is there a simple tool/process for declustering a spatial dataset via Spatial Analyst package? My data are spatially clustered in some areas. I want to filter some locations out such that I end up with an equal density of points throughout. (Kriging achieves this by weighting data values differently depending on the density of point values around the center point.)

I've looked a the resource notes and they suggest using the Geostatistical Analyst Wizard, which I don't have.


texts: What is your workflow for designing "antique" maps?

texts:
I currently work with ArcGIS 9.3 and have decent competence with Adobe CS4-5 of Photoshop and Illustrator. I'm more than happy to branch out to other software.

Essentially, I'd like to get really good at creating maps that look like old maps with unknown "there be dragons" areas. One project I have in mind is maps of old spice trade routes. I'm thinking of a Art Noveau style like Alphonse Mucha. I get a kick out of imaginative maps that are aesthetically pleasing, simple, and easy to read.

This isn't exactly what I'm looking for, but yes, in this general direction. Map-poster from Conservation GIS 2011 Contest


texts: Drawn polygons in QGIS (3.2) are not accurate in ArcGIS Online?

texts:
I am drawing polygons in QGIS (see figure 1), but when I import the shapefile to ArcGIS Online, it does not look like what it is on QGIS (see figure 2). Instead of being an intricate polygon, its all clunky and jagged. What am I doing wrong?

The projections are WGS-84 3857

Figure 1: Shapefile in QGIS

Figure 2: Shapefile in ArcGIS Online


texts: I have a vector layer, in which structures (pipes under roads) are made up of multiple lines. I wish to spatially join all the lines that make up a single structure, but cannot figure out a way to do this. I've been messing around with things like "dissolve", but that merges all lines in the layer into a single feature. In the example below, I would like to join all of the orange lines that touch, resulting in 3 features.


texts: Exporting an ArcGIS model to a script, with a script?

texts:
I would like to automatically export ArcGIS models to python scripts (and graphics for the model diagram).

In order to apply version control to ArcGIS Models my current workflow is to: a) build and refine the model, b) export to script and graphics, c) commit to source code control. Rinse, lather, repeat.

Step (b) is a brainless pointy clicky exercise with too much friction which c/should be automated. How?


texts: I have a few strange "zigzag" patterns in my TIN surface (see below images). The CURBF points represent the curb, so ideally it would be smoothly connected. Does anyone have any ideas on how to acheive this within Civil 3D 2021?


texts: Calculating Nth percentile from table in ModelBuilder of ArcMap

texts:
I am trying to build a complex tool, using ModelBuilder and I am new at this.

I have two feature classes full of polygons. The first contains 1300 polygons, dividing a city in zones (ex: residential, industrial, etc.). The second FC contains 35000 land parcels. Each parcel has unique data stored in the data table (area, width, depth, etc).

As you can see in the screenshot, each Zone "contains" many Parcels.

I need to summarize statistics for each zone. I have built this model using ModelBuilder. It makes a spatial join between my Land parcels and the Zones, so every Land Parcel will get a Zone ID, as you can see in the data table in screenshot. It will take the resulting feature class, and iterate it by unique Zone ID, to calculate statistics, and export the result by creating a table for each Zone.

After that, I Merge the resulting tables, to get a single table, with the stats for all Zones, as you can see here.

I can do all those things, using the tools available in the ModelBuilder.
For example, the zone RES_810 contains 266 land parcels. The minimum area is 459.7m², the max is 1574.6m², but the mean is 645m². My problem is that I need to get the percentile 0.05, and 0.95, to eliminate extreme values the 5% bottom, and 5% top.

The percentile is not an available option in the Summary Statistics tool.

How can I calculate the percentile 0.05, and 0.95, for each Zone, to include that statistic in my result tables?


texts: Adding ArcGIS JS Direction widget in separate function

texts:
I am working with ArcGIS JS library, I am trying to add direction widget in my code, and it is working fine. I am following this example:
https://developers.arcgis.com/javascript/jssamples/widget_directions_basic.html

Now, what I want to do is to add direction widget in separate function and return its object to the calling function, but I am getting undefined when I log returned object. Is ArcGIS JS adding widget asynchronously? If it is then is there any way to add this widget synchronously? I studied the documentation and couldn't find anything related to this. I want to access its object in calling function and I have to initialize this widget in another function. And also, I cannot use global variable for this widget.

This is my code:

<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
    <title>Directions Widget</title>
    <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">


texts: GUI for raster uploads to PostGIS/PostgreSQL

texts:
We can currently upload raster data with raster2pgsql to our PostgreSQL db.

I am wondering if anyone is working on a GUI or plugin, maybe even through QGIS, that would make the raster upload process easier and more efficient for less experienced GIS users?


texts: QGIS 3.4.Is there a way using advanced digitizing to use a bearing, i.e. N 45° 15' 25" E as the angle?


texts: Cross validation in thiessen polygons interpolation

texts:
I apply Thiessen Polygons interpolation using the krige command in the gstat R package. Using krige without a variogram model sets automatically krige function to perform IDW, and when nmax parameter is set to 1, it is actually performing thiessen polygons interpolation.
What I have is this:

dec_vor = krige(Dec ~ 1, st, grd, nmax = 1)

Then, when I want to perform cross validation, i do this:

dec_vor_cv = krige.cv(Dec ~ 1, st, nfold = 52, dec_vor)

and I get this error message:

"Error in load.variogram.model(object$model[[name]], c(i - 1, i - 1)) :
  model should be of mode variogramModel (use function vgm)"


texts: GeoAlchemy get largest area within intersected polygon

texts:
I am using the world borders dataset to try and perform an intersection based on the buffer of a point. I need to return the country with the largest area within the buffer.

For example, in the diagram below my query should return the United States:

This query is incorrectly returning Canada:

        point = WKTElement('POINT({} {})'.format(*center_point), srid=4326)

        q = db.session.query(WorldBorders.iso2, WorldBorders.geom)\
            .filter(func.ST_Intersects(WorldBorders.geom, func.ST_Buffer(point, 1))).first()

Do I need to use an aggregate function and group_by?


texts: Overlapping polygons in the same table/ layer

texts:
I have catchment areas as polygons in a GIS layer. They were derived from two different sources (coded as "ws" and "dr" in a separate column named "use").
It's good to have these two sources as they complementing each other. However sometimes they overlap "too much": I want to exclude the "dr"-polygons that overlap (with the "ws" ones) with more than 70% (area). In any way I am want to keep the "ws"-polygons.

If "dr" and "ws" were two different tables I'd query as follows:

SELECT *
FROM table.ws w
JOIN table.dr d ON ST_Intersects(w.geom, d.geom)
WHERE ST_Area(ST_Intersection(w.geom, d.geom) / ST_Area(w.geom) > 0.7;

However in my case ALL the polygons are in the same table only distinguishable by the "use"-column.

Any ideas how to do this? The data lies on a PostgreSQL DB and I access it mostly through PostGIS commands in R.


texts: Converting SimpleGeo Places GeoJSON file to shapefile?

texts:
SimpleGeo has recently made their "Places" data set freely available which is GREAT, because now we can use it for our own purposes, even offline.  So I went about downloading the 2GB dataset, which contains zipped country files in GeoJSON format.

Here is where my problem begins... when I try loading a country file (*.geojson) directly into QGIS or even converting it to shapefile using ogr2ogr, I end up with just 1 point feature.

Clearly there is more data available in these files that I am not able to "see" or retrieve, so what am I doing wrong?  Can someone provide me any suggestions on how to turn these files into useable GIS features?

Updated Question: I really want to convert the geojson file into a shapefile (or similar standard GIS format) for use in a desktop GIS software.

Snippet from SimpleGeo blog on Aug 1, 2011:

"SimpleGeo’s CC0 Places data set is now available for download at no cost. If you’d like to get your hands on 21M+ POIs that cover 63 countries, we’re ready to hand that over to you in one file. The file is about 2GB in .ZIP format, and remember, with the CC0 license, this data becomes yours – free and clear – to do whatever you want. We hope you do awesome things with it!  You can download it now by clicking here."

Update:
January 12th, 2012: After SimpleGeo was acquired by Urban Airship in Oct 2011, Urban Aiship said “wind down the availability of the current versions of [SimpleGeo's] Places, Context, and Storage over the next few months.”...The target date for pulling the plug officially will be March 31, 2012. Link


texts: How to prevent users from removing QGIS layers?

texts:
I need to prevent users from removing layers. In my plugin code I use the following to achieve that:

QgsMapLayerRegistry.instance().layersWillBeRemoved.connect(self.dontremovefunc)

def dontremovefunc(self, layerids):
    QMessageBox.information(None,"Info!","Cannot remove layer!")
    return

But layers are removed.
What's the best option to prevent layer removal?


texts: QGIS Openlayers tool not showing tiles, but showing question mark

texts: We have a proxy server which I've added to QGIS, but when I load openlayers, I get a grid with lots of questions marks, yet the watermark is supplied; any ideas?  Fiddler doesn't show anything out of the ordinary.


texts: How to access the rows in an ArcGIS Server JavaScript FeatureTable?

texts:
Using the ArcGIS Server JavaScript API v4.x how can I access the rows in a FeatureTable?
As an example, I modified the ArcGIS FeatureTable sample to log the table object to the console:

Note that the table contains a columns object listing the attributes, but I can't see a rows object holding the data (same situation with the grid object).
The table.grid.store.itemCache.items object looks promising but only holds 100 features, out of the 7,735 in the example dataset:

Is there a function to fetch the full set of data in the table? I want to obtain the data from the FeatureTable and not the source FeatureLayer, so I can access the field visibility, sorting, etc that is modified by the Feature Table.
Is it possible to obtain a reference to the table's dataset?


texts: Annoying little line in color ramp legends - how do I remove it?

texts: This was never a problem with ArcGIS 9 but it appears that in 10.0 Esri has added small horizontal lines as the default when including color ramps in legends.  I want to get rid of these annoying lines, but I haven't figured out how to.  Anyone else run into this problem?


texts:
I am working on a street addressing project.
I want to add a number to every odd number.
Example if [field] is odd [field]+=1.
How can I do this in ArcMap using the field calculator.

I used to work programming in Microsoft Visual Basic And C++.But how can i do this in Arc Map field calculator.

What is wrong in this expression.

I used the expression that Ali Put.
But still I am Having errors.


texts: Creating Near Table between points in one layer that share an attribute with points in another layer?

texts:
I am trying to calculate the distance between some geographic features (point layer) and the capital of the country that they fall in. I have a shapefile of "features" and a shapefile of "world capitals". My current system is to generate a NearTable between the two layers and then use another program (Stata) to keep only the relevant distances (where the country of the feature and city are the same). However, my program takes a while to run when I do this because, due to the size of the countries I'm looking at, I need to calculate the distance between all points and the nearest 20 capital cities.

Is there a faster way to do this?

Here is a snippet of my code:

in_features = gpts
near_features = world_capitals
arcpy.GenerateNearTable_analysis(in_features, near_features, near_world_capitals_tbl, \
closest="ALL", closest_count="20", method="GEODESIC")

I am working in ArcPy, but answer in ArcMap are also helpful.


texts:
I have connected a series of points into a line in ArcMap 10 with the Points to Line tool in the ArcToolbox.

The line is, of course, in its own layer, and I added a 5-meter buffer around the line. It appears that this buffer is in the layer/feature class as the original line.

Is there a way for me to turn this buffer into an independent polygon, in its own layer?

Once I achieve that, I would like to be able to slice the polygon (buffer) into pieces.


texts: How to view the Area of Selected Feature in ArcGIS 10.1?

texts:
I think this is simple. I am looking for a way to convert the area of a selected feature to acres. The unit for my geodatabase is feet.

The ruler tool almost does it, but it only returns the top-most feature's area.

I've read lots about the calculate geometry functions in ArcMap, but that's for editing. I just want to see the area of the selected polygon feature, converted into another unit.

How can this be done?


texts:
I am currently working on a project involving a spatial ontology. However, it is not very clear to me to what extent spatial ontologies are available in practice (and not only sketched in scholar papers). LinkedGeoData seems to be a good choice, as I am gathering spatial data (e.g. amenities, etc) from OSM, still it seems that I can't download the RDF triples directly from their SPARQL endpoints (see some OSM Example Queries), and also I'm not sure whether I can enrich (and extend) such ontology with new open-data from third-party sources (in addition to OSM nodes and ways).

Once I select a node, I need to gather as many information as possible about it (e.g., considering a shop: position, leisure/work, similar places, ...), possibly integrating the ontology with third-party open data. As such, I need somehow to be able to extend LinkedGeoData knowledge with external sources. How can I add this new data if not by downloading the ontology, its instances, and enrich the ontology with my data?

Am I missing the scope of LinkedGeoData? Are there any (real) alternatives to it?


texts: How to get individual features from a GeoJson-Multipoint feature using map.on('click'…) in openlayers 4.6.5

texts:
I'm trying to get the features of each MultiPoint-point when i click on a point in my openlayers map (4.6.5). The points shows on the map.

I want to add a pop-up on each feature when i click on the points in my MultiPoint array. Each individual point consists of [LON, LAT, TIME].

In have previously achieved this with a "LineString" geometry. So i wonder if this a problem with "MULTIPOINT" as geometry?

My click function looks like this:

 map.on('click', function (evt) {
    var pointfeature = map.forEachFeatureAtPixel(evt.pixel, function (feature, vectorLayer) {

        if (feature) {
console.log(feature)
           var coordinate = evt.coordinate;
            var hdms =
ol.coordinate.toStringHDMS(ol.proj.transform(coordinate, 'EPSG:3857',
'EPSG:4326'));

        var geometry = feature.getGeometry();
        var mypoint = geometry.getClosestPoint(coordinate);
        var pointtoshow = point[1];
        content.innerHTML = '<p>feature </p>';
        overlay.setPosition(coordinate);
        }
        return feature;
    });
});

My geojsonObject looks like this:

var geojsonObject = {
    'type': 'FeatureCollection',
    'crs': {
        'type': 'name',
        'properties': {
            'name': 'EPSG:3857'
        }
    },
    'features':[
'type': 'Feature',
            'geometry': {
                'type': 'MultiPoint',
                'coordinates':
                    mycoordinates().map(function (x) {

                        return ol.proj.transform([x[0], x[1]],
   'EPSG:4326', 'EPSG:3857')
                    })
                ,
                "properties": {
                    "Time": mycoordinates().map(function (x)
                {
                        return x[2]
                })
            }
        },{
        'type': 'Feature',
        'geometry': {
            'type': 'Point',
            'coordinates': ol.proj.transform([refpointlon, refpointlat],
        'EPSG:4326', 'EPSG:3857')
        }]
};

What i get from the console.log(feature) is the following:

Hk {Wa: {…}, qa: {…}, oa: {…}, g: 1, xp: 2, …}
N: {geometry: No}
Wa: {}
a: "geometry"
ab: {change:geometry: Array(1), change: Array(1), propertychange:
Array(1)}
c: undefined
f: null
g: 1
i:
Ch: Hk {Wa: {…}, qa: {…}, oa: {…}, g: 1, xp: 2, …}
Dh: ƒ b(b)
Eh: false
listener: ƒ ()
target: No {Wa: {…}, qa: {…}, oa: {…}, g: 1, xp: 1, …}
type: "change"
__proto__: Object
j: undefined
oa: {change:geometry: Array(1), change: Array(1), propertychange:
Array(1)}
qa: {}
xp: 2
__proto__: Vc

But this does not contain the feature coordinates, and not the feature property: TIME, as spesified in the geojsonobject.

Any suggestions for why i don't get the individual feature-information??


texts:
There seems to be a lot of material on getting GTFS feeds and converting them into GeoJSON, but I want to do the other way around.

I want to create a shapes.txt file from a trackpoints that I have in GeoJSON format, and mapped in QGIS. This would require to extract lat/long of each point and assign a point sequence to each point.

Converting into KML and then using this: https://bdferris.github.io/kml-to-gtfs-shapes/ doesn't work

How do I do that?


texts: Copy multiple feature-class schemas to new geodatabase

texts:
I am trying to write a script that copies the schema (no data) for multiple feature classes from one geodatabase to another (in this case SDE to File Geodatabse).  I'm not copying all feature classes, but a list of them.

The only way I've been able to find that will allow me to copy the schema to another database is using arcpy.ExportXMLWorkspace_management() and then arcpy.ImportXMLWorkspace_management() for each feature class.

import arcpy, os
workspace = r"D:\Processing\myGDB"
myGDB = os.path.join(workspace, "TempGDB.gdb")
sdeDB = r"Database Connections\Geodatabase.sde"

fcList = [['Layerone'], ['LayerTwo'], ['LayerThree'], ['LayerFour']] # See note below!

for x in fcList:
    fc = x[0]
    xmlFile = os.path.join(workspace, "{}.xml".format(fc))
    arcpy.ExportXMLWorkspaceDocument_management(os.path.join(sdeDB, fc), xmlFile, "SCHEMA_ONLY", "BINARY", "METADATA")
    arcpy.ImportXMLWorkspaceDocument_management(myGDB, xmlFile, "SCHEMA_ONLY", "")
    arcpy.Delete_management(xmlFile)

This process is quite long-winded, as it has to step through each feature class, export the schema from geodatabase 1 to an XML file, import from that XML into geodatabase 2, and then delete the XML file.

Is there a tool or function within ArcGIS Desktop that will allow me to copy the schema to another geodatabase for selected feature classes without having to loop through them one at a time?

Note: The fcList is a list of lists as in the actual script it performs a SQL query to get the list of feature classes, and this is returned as a list of lists.


texts: How can I add an infowindow to an OpenLayers GeoJSON layer?

texts:
In my OpenLayers script I refer to an geojson layer. Is it possible to add an info window?If yes, how can I create this. Script is as follows:

var lon = 5,
    lat = 52,
    zoom = 7,
    epsg4326 = new OpenLayers.Projection('EPSG:4326'),
    epsg900913 = new OpenLayers.Projection('EPSG:900913');

function init(){

        var myStyles = new OpenLayers.StyleMap({
        "default": new OpenLayers.Style({
        fillColor: "${getColor}",
            strokeWidth: 1,
        strokeColor: "#000",
        fillOpacity: 0.8,
        graphicZIndex: 5

    },
    {
        context: {
            getColor : function (feature) {
                return feature.attributes.INW_T > 100000 ? '#ffc000' :
                       feature.attributes.INW_T > 10000 ? '#00317c' :
                                                          '#FFEDA0' ;
            }
        }
    })
        });

        var map = new OpenLayers.Map('map', {
        units: 'm',
        numZoomLevels: 19,
        controls: [
            new OpenLayers.Control.Navigation(),
            new OpenLayers.Control.ScaleLine(),
            new OpenLayers.Control.MousePosition(),
            new OpenLayers.Control.LayerSwitcher()
        ],
        projection: epsg900913,
        displayProjection: epsg4326 //Is used for displaying coordinates in appropriate CRS by MousePosition control
    });

    var lay_goo = new OpenLayers.Layer.Google('Google', {
        type: google.maps.MapTypeId.SATELLITE,
        sphericalMercator: true
    });

    var lay_osm = new OpenLayers.Layer.Google('OSM');

    var geojson_layer = new OpenLayers.Layer.Vector("GeoJSON", {
            styleMap: myStyles,
        projection: epsg4326,
        strategies: [new OpenLayers.Strategy.Fixed()],
        protocol: new OpenLayers.Protocol.HTTP({
            url: "pc2.geojson",
            format: new OpenLayers.Format.GeoJSON()
        })
    });

    map.addLayers([lay_osm, lay_goo, geojson_layer]);

        map.setCenter(new OpenLayers.LonLat(lon, lat).transform(epsg4326, epsg900913), zoom);
}

GeoJson file has the following format:

{
"type": "FeatureCollection",

"features": [
{ "type": "Feature", "id": 0, "properties": { "PC2CODE": "10", "PC2NR": 10, "INW_T": 697830 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 5.016855446988143, 52.349866914447176 ], [ 5.014431962156695, 52.347111770955848 ], [ 5.009350157428187, 52.344472149717674 ], [ 5.012133851358907, 52.344143065780877 ], [ 5.012314670330961, 52.343410242383534 ], more geometries

Hope someone can help?

UPDATE

Selecting an feature is working now. In the function init I added the following 2 things:

feature select

function onFeatureSelect(feature){
    alert("boom");
}

function onFeatureUnselect(feature){
    alert("unBoom");
}

selectControl

selectControl = new OpenLayers.Control.SelectFeature(geojson_layer, {
    onSelect: onFeatureSelect,
    onUnselect: onFeatureUnselect
});
map.addControl(selectControl);
selectControl.activate();

So now I have a popup with 'boom' on my screen. How can I put the data from the geojson layer in the pop-up.

Even better, I rather not have a pop-up but want the data to be visible below the map. Similar to http://workshops.opengeo.org/openlayers-intro/controls/select.html (step 4)

The code they use:

buildings.events.on({
    featureselected: function(event) {
        var feature = event.feature;
        var area = feature.geometry.getArea();
        var id = feature.attributes.key;
        var output = "Building: " + id + " Area: " + area.toFixed(2);
        document.getElementById("output-id").innerHTML = output;
    }
});

Can I refer to a geojson layer with this code?

Thanks!


texts: pgRouting: weight routes with similar attributes higher

texts:
I am creating my own routable network using pgRouting. I would like my shortest path queries to prefer a route made up of the same attribute.

For example, in the image below (please excuse my terrible drawing), I don't necessarily care if the best route is made up of either A or B as long as it's only A or only B.


texts: Adding“last modified” and “created” column in SQLite/SpatiaLite table

texts:
I am designing a new db schema for a SQLite/SpatiaLite database.

Each table should get two extra columns called modified and created which should be automatically change as soon a row gets inserted or updated.


texts: Getting extents of spatial reference system using Proj.4?

texts:
In general, how does one get the valid extents of a spatial reference system but in particular, is there a way using the Proj.4 library?

I attempted to use the information from the epsg.io website, but to the best of my understanding the bounds are not quite right.  For example, for EPSG:3857 the vertical extents are stated as from latitude -85.06 deg to 85.06 deg.  But the correct extents should be closer to -85.0511288 to 85.0511288.  I realize that the "corners" in one SRS may not carry over to another, because straight-line-boundaries can transform to curves, but I can't get the 85.0511288 value using the extents given in the Projected Bounds section either.

In this particular case I could, naturally, look the answer up elsewhere, but I have failed to find a source that provides these extents for, say, all EPSG-provided spatial reference systems.

My need for the precise extents is related to an efficient tiling algorithm for geopackage-format tile pyramids.  Unfortunately it seems that geopackage doesn't provide the spatial reference extents.


texts: How to find least cost path subject to distance constraint?

texts:
I have a raster with each cell representing a travel cost. I need to find the least cost path from one point on the raster to another point on the raster. One additional twist: the path cannot exceed 50% of the distance of the most direct route.

I'm using numpy and scikit for managing my graph, but I'm open to other solutions (except non-free software such as ArcGIS).

Example costs:

[ 2,  2,  2,  2,  2,
 10,  9,  2,  7,  2,
 11, 12, 13, 14,  2,
 20, 19, 18, 17,  2,
  2,  2,  2,  2,  2 ]

If I'm evaluating a route from the top left to the bottom left, the absolute least cost route follows the edges along the top, right, and bottom of the graph (total cost=26):

[ 1,  1,  1,  1,  1,
  0,  0,  0,  0,  1,
  0,  0,  0,  0,  1,
  0,  0,  0,  0,  1,
  1,  1,  1,  1,  1 ]

The shortest distance is 5 cells:

[ 1,  0,  0,  0,  0,
  1,  0,  0,  0,  0,
  1,  0,  0,  0,  0,
  1,  0,  0,  0,  0,
  1,  0,  0,  0,  0 ]

In this case, the absolute least cost path is too long (13 cells compared with 5). The answer I'm looking for would be:

[ 1,  1,  0,  0,  0,
  0,  0,  1,  0,  0,
  0,  1,  0,  0,  0,
  0,  0,  1,  0,  0,
  1,  1,  0,  0,  0 ]

Total cost: 40, total distance: 7 cells. This is the minimum cost within the allowable path distance (5 cells * 150% = 7.5 cells).

Are there packages that offer algorithms to solve this?

I don't see anything out of the box in scikit.

Short of calculating every possible shortest path, what is a good strategy for solving this problem?


texts: ArcPy Tool Validator error with defined parameter value

texts:
I am using ArcMap 10.3.1.

I have two parameters for my script tool. The first is the type of product to be created, the second is the scale of the product. Digital Map / No scale required are the default values defined in the Tool Validator code.

If it is a paper product, the user selects the appropriate scale from the drop-down list. As it exists now, the problem I can't solve is that if the user changes the value of parameter 0 to paper map, the list of scales from the list becomes available but the value is still the default ("No scale required") so an error is thrown because that option is not in the scale list. The error clears when I select the scale from the list, but I want only those choices available and obviously don't want the error to appear at all.

Likewise if I then change parameter 0 back to Digital Map the "No scale required" value appears but the error message is thrown again because that value is not in the scale list, which is somehow still appearing. There is no way to clear the error at this point.

Ideally it works as follows: If user picks Paper, only the scales appear. If user switches back to Digital, only the "No scale required" value appears. And so on with switching back and forth (because I can't guarantee my users' behaviour). How can I get these different combinations to appear and change as intended without any errors.

import arcpy
class ToolValidator(object):

  def __init__(self):
    self.params = arcpy.GetParameterInfo()

  def initializeParameters(self):
    # Define the list of product types the user can choose from
    self.params[0].filter.list = ["Digital Map", "Paper Map"]
    self.params[0].value = "Digital Map"
    return

  def updateParameters(self):
    if self.params[0].value == "Digital Map":
        self.params[1].value = "No scale required"
    if self.params[0].value == "Paper Map":
        self.params[1].filter.list = ["1:10,000", "1:25,000"]
    return

  def updateMessages(self):
    return


texts: Creating python script to split selected lines at a set length

texts:
I have been having trouble trying to come up with a python script that will go through a polyline feature class representing a river system and split all the streams intersecting with a central river at distance of 2km. The added difficulty is that any given stream can be made up of multiple polyline segments. Thus if a stream that intersects with the central river is made up of 2 line segments 1.5km long, the first would need to be unclipped, and the second after 0.5 km.

Does anyone have any suggestions on how to write a script that will accomplish this? I know  positionAlongLine tool might help but I am not sure how to implement it.


texts: How to semantically differentiate all that is called "projections"?

texts:
I'm a beginner GIS student and I was always wondering why so many different things seem to be called Projections.

E.g.:

(orthographic, stereographic, gnomonic) Projection, but also
(azimuthal, conical, cylindrical) Projection

These sets represent different things, and IMO the first makes more sense to be called a projection, since it’s about projecting the imagined light rays in a specific way.

Is the second set actually called something like “projection planes”?

I've come across a lot of sources that name both sets simply “projections”.

Wikipedia's list of map projections sorts them as Types and Properties respectively, but I've never heard those terms in the wild.

Is it correct to call an azimuthal orthogrpahic projection an "azimuthal type projection with orthographic properties"?

Should they be called like that and is the reason it's not happening only common practice?

I’m really confused about that, and seek to untangle this misunderstanding regarding the proper semantics that I've had for a while!


texts: Recoding values based on contents using ArcGIS Field Calculator?

texts:
Is there a convenient (or even effective) method for recoding field values using the field calculator?

In this case, I am given several unique strings to identify a type of road feature. For the purpose of creating a unique ID-based join field, I want to give each road type a number to act as its equivalent when matching and classifying.

For example:

Say we have a shapefile of road line links called "Roads" with attributes "Type" and "TypeCode". If there are 3 types "Foo", "Bar", and "Other", I would like the calculation to assign the number 1 to whichever type it encounters first, and fill "TypeCode" with 1 for each successive row that contains the same type. It would do the same for the other two types, assigning 2 and 3 based on order encountered and fill the "TypeCode" for the appropriate rows.

In an attempt to make things more clear, another way of explaining what I'm looking for:

With a table of polyline road links, we have two fields, STYLE and STYLE_CODE:

------------[STYLE]----------[STYLE_CODE]
    Feature 1 -- [4WD]----------------[]
    Feature 2 -- [DIVIDED]------------[]
    Feature 3 -- [HIGH CLEAR]---------[]
    Feature 4 -- [4WD]----------------[]

The point is to have the hash table created after being given a set of data. In this case, the script would see Feature 1's Style as the first ocurrence of the Style and assign it an arbitrary unique value (Let's say the value is 1). Feature 2's Style would also be the first occurence, so the script assigns it the value 2. Feature 3's Style gets the value 3. When Feature 4 is iterated, the script already has a value set for the key 4WD, so it assigns a 1 to the STYLE_CODE field again. This continues until the end of the table.

Result:

------------[STYLE]----------[STYLE_CODE]
    Feature 1 -- [4WD]----------------[1]
    Feature 2 -- [DIVIDED]------------[2]
    Feature 3 -- [HIGH CLEAR]---------[3]
    Feature 4 -- [4WD]----------------[1]

I'd like to create a ubiquitous script that processes a table in this fashion. Sure, I only have to make the hash table once per product if I do it by hand, but making it for every product will eat up too much time.


texts: How to break a Linestring in n parts in PostGis

texts:
I have a Linestring shapefile, one of the columns of the table has a number inside (2, 6, 7, etc), I need to break the linestring into equal segments based on that field. For example:

If the linestring has a 6 in that field, I need it to break in 6 equal segments, if the number is 10, in ten segments and so on.

I tried ST_Subdivide, ST_Segmentize, ST_Linesubstring but I can't manage to reach that, I get to break the line based on specific distance but I don't want that.