texts: Improve performance of a stand-alone table join in a Feature Service

texts:
I have an mxd with data-driven pages using Feature Layers from ArcGIS for Server (Workgroup Standard) with MS SQL Server Express.  The DDP index layer has a join to a stand-alone table.  I am displaying values from the stand-alone table on the layout.  I know the join is the bottleneck as simply moving the text box around on the layout causes a CPU spike (but not to 100% and no other resources max out) on the server.  (I'm looking at it with RD.)   Looking at the logs I can see a bunch of REST requests, as expected.

These are the feature layers:

Polygons for DDP: https://gisserver/arcgis/rest/services/myData_featurelayer/FeatureServer/0

Table: https://gisserver/arcgis/rest/services/myData_featurelayer/FeatureServer/3

(Layers 1 and 2 are not in the mxd.)

The DDP text field:

<dyn type="page" property="attribute" field="3.inactive_acres" domainlookup="true"/>

The stand-alone table actually has 15 fields, but I removed all but one from the text box.  I then merely clicked on the text box.  There were then 13 REST requests (side-note: why not 15?) that took 13 seconds according the logs, so it looks like it is re-querying almost anytime you do anything.

Any suggestions on how to improve response time or reduce the number of requests?

I tried both joins types (keep all and keep only matching).
I tried rebuilding the index on the stand-alone table.
You can’t use joins when publishing Feature Layers.
I know direct SDE/SQL Server connections are faster but that’s not an option.
At no point are any resources maxed out (I know there’s a 1GB limit on Express but this is the only feature service and it only has four layers).
Server ping is <1ms.
Nothing crazy in the Activity Monitor in Management Studio.

I’m running Windows Server 2012 R2 Standard, 64bit, 8GB RAM (ESXi hypervisor).
Desktop is Windows 7 Pro, 64bit, 3Ghz, 12GB RAM, Gb ethernet.


texts: geoserver and overlapping multipolygons from postgis

texts:
What does geoserver do when you get a result set from a postgis layer that contains multiple Geoshaps (of type multipolygon) that overlaps the same area?

Does geoserver add the two overlapping values together and middle (average) them or does it only show one of the values or does it add them together without middling them?

Edit: ive added an example that shows two maps - and then the the third image is the result from asking for both the maps - but without doing any aggregation. So geoserver will get polygons for two areas - and it looks like geoserver is applying some function to average or merge the two layers.

Edit2: If geoserver doesnt do any aggregation - is it possible in sld to add aggregation function like avg or sum?


texts: QGIS Shortest Route Network Analysis using multiple features

texts:
Below are the steps to find the shortest route between two points in a road network https://docs.qgis.org/2.18/en/docs/training_manual/vector_analysis/network_analysis.html

Is it possible to find the shortest route using the road network, but from a point feature where the point doesn't sit on a road, to the nearest road and follow the shortest route to a point on another feature? So three features, initial start point, road and end point.

If so, can this be done for multiple routes that all end up at the same end point? So the start point feature will have many points, and follow the shortest routes to one endpoint.


texts: Adding XY coordinates from a point feature class to a one to many related table in ArcGIS 10.0

texts:
I have a point feature class with a one-to-many relate to a table. I would like to add the XY coordinates of each point in the feature class to the related table where the ID field matches. Of course, it's simple to get the XY coordinates for each point but it's adding them to the table where I'm getting stuck.

Thanks in advance


texts: Drawing circle with OpenLayers3, but not seeing on map?

texts:
I am trying to draw a circle on a map, using OpenLayers 3, but I am not sure why the circle is not rendering. My expectations with the code below is that is should be centering on -73.5971431341708, 45.5323780468158 (Montreal, Canada) and drawing a circle at that location, with a radius of 1000m.

Below is the code:

var baseLayer = new ol.layer.Tile({
                    source: new ol.source.OSM()
                });

var layer = new ol.layer.Vector({
    source: vectorSource,
    style: [
    new ol.style.Style({
        stroke: new ol.style.Stroke({
            color: 'blue',
            width: 3
        }),
        fill: new ol.style.Fill({
            color: 'rgba(0, 0, 255, 0.1)'
        })
    })]
});

/* Example of a low poly circle */
var features = [];
var circle = new ol.geom.Circle([-73.5971431341708, 45.5323780468158], 1000);
circle = circle.clone().transform('EPSG:4326', 'EPSG:3857');;
var precisionCircle = ol.geom.Polygon.circular(
    /* WGS84 Sphere */
    new ol.Sphere(6378137),
    circle.getCenter(),
    circle.getRadius(),
    /* Number of verticies */
    64);

features.push(new ol.Feature({ geometry: precisionCircle }));
var vectorSource = new ol.source.Vector({
    features: features
});

var layer2 = new ol.layer.Vector({
    source: vectorSource,
    style: [
    new ol.style.Style({
        stroke: new ol.style.Stroke({
            color: 'red',
            width: 3
        }),
        fill: new ol.style.Fill({
            color: 'rgba(255, 0, 0, 0.1)'
        })
    })]
});
var map = new ol.Map({
    layers: [baseLayer, layer2],
    target: 'map',
    view: new ol.View({
        center: ol.proj.transform([-73.5971431341708, 45.5323780468158], 'EPSG:4326', 'EPSG:3857'),
        zoom: 14,
    }),
    units: 'm'
});

I also have a JSFiddle.


texts: Problem converting EPSG 3035 to EPSG 4326 with GDAL & Python

texts:
I have following problem:

I want to convert EPSG 3035 coordinates to GPS Latitude & Longitude coordinates (EPSG 4326) via Python.

Therefore I'm using GDAL and following Python Code with EPSG 3035 coordinates: N2628/E4704

pointX = 2628
pointY = 4704

# Spatial Reference System
inputEPSG = 3035
outputEPSG = 4326

# create a geometry from coordinates
point = ogr.Geometry(ogr.wkbPoint)
point.AddPoint(pointX, pointY)

print pointX, pointY

# create coordinate transformation
inSpatialRef = osr.SpatialReference()
inSpatialRef.ImportFromEPSG(inputEPSG)

outSpatialRef = osr.SpatialReference()
outSpatialRef.ImportFromEPSG(outputEPSG)

coordTransform = osr.CoordinateTransformation(inSpatialRef, outSpatialRef)

# transform point
point.Transform(coordTransform)

# print point in EPSG 4326
print point.GetX(), point.GetY()

unfortunately this returns me a a point somewhere in the South Atlantic, but it should be somewhere in Austria.

The Data Vendor of the EPSG 3035 Coordinates mentions following Reference System of the layer:

  +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

What am I doing wrong?


texts: Configuration problem anaconda python in ArcGIS

texts:
I used Eclipse with PyDev to create a script in Python (windows 7 x64). My code runs perfect when I start the run in Eclipse, but when I add it as a Tool in ArcGIS 10.1, I have the following problems:

If I select ‘run python script in progress’ (which I know I shouldn’t do):

If I don’t select ‘run python script in progress’, there are two possibilities:

1) Eclipse is closed when I start the run:
ArcGIS automatically opens Eclipse, and the script seems to run, but doesn’t do anything, this windows stays open until I cancel the run:

2) If eclipse is opened before I start the run, it seems as if the run is completed within 0.00 seconds, but the script was not executed…:

My configuration in eclipse is as follows (anaconda python + paths for functionalities arcgis):

I run the tool in ArcGIS without any parameters, so the code is exactly the same as the code that I run from Eclipse…
I already tried this solution, but it doesn’t seem to work for me:


texts: "Select by location" fails for points touching/intersecting on lines

texts:
I try to use the "Select by Location" tool in QGIS 3.10 to:

Select points in one layer located on lines of another layer (I am using "intersect" option but I have also tried the other options)
Select the lines whose end points are located on the lines of another layer (Touch option) and I get no results.

Does the tool work or is it only usable with polygon layers?
What are the other solutions to get what I want?
Layers in GeoPackage available on https://drop.infini.fr/


texts: Querying and Evaluating Rasters within a Mosaic Dataset for a series of Years

texts:
I am fairly new to mosaic datasets and I haven't been able to figure out if what I'm attempting to do is appropriate for a mosaic dataset.  I have constructed a mosaic dataset in ArcGIS 10.5, which is made up of rasters for 3 continents (Africa, Asia, South America/Latin America) at 5 different time points (2000, 2005, 2010, 2015, 2020).

Each of these rasters holds information on the number of people within each pixel.  I'm interested in summing up population for both an area of interest and several time points of interest.  To find my area of interest I've created a Reference Mosaic Dataset and set the spatial extent to my area of interest.  This works fine.  Here is my Reference Mosaic Dataset set to the extent of Kenya:

Then, to get my years of interest, I need to select each raster within the Reference Mosaic Dataset that is consistent with the year in question (note that the first screen shot doesn't capture a column that I've created for each Year).
What I'd like to do is search my Reference Mosaic Dataset for each year and sum up the population within the area of interest.  So, for my Reference Mosaic Dataset, I'd like to select first the raster for the Year 2000 and sum up the Kenyan population, then select the raster for the Year 2005 and again sum up the Kenyan population while keeping a running total (ie, 2000 population plus 2005 population).  Ideally, given the size of these rasters, I'd like to somehow be working with only temporary rasters for each selection.

Is there an efficient way to iterate through the rasters within the Reference Mosaic Dataset where I select the first time point, perform an operation, save that result, then work with the next time point, and so on?


texts: Create multiple bar graphs out of a single data table

texts: I have data for obesity rates and alcohol consumption for 20 different countries, all in the same data table. I want to create 20 separate bar graphs, which I can then place over each country to show these two statistics for that specific country rather than one single bar graph for everything. Is there any way I can do this in ArcMap or Adobe Illustrator? Or do I have to separate the data into 20 tables?


texts: Cumulative field calculation using Python in ArcGIS for Desktop?

texts:
I am using the following Python code to sum cumulatively but I need the summation to take place while the other field is equal to 1 and then again start the summation when it's equal to 2. I need the code to loop this until Near_Fid is 128.Please look at the attached Image of the Scenario. I need the code to Sum up thesame way as the field in Cummulative sum in the attached Picture

Expression box:

accumulate(!GRID_CODE!)

Code Block box:

total = 0
def accumulate(increment):
global total
if total:
  total += increment
else:
  total = increment
return total

The above code works fine but needs to be modified in order to consider changes in the other field(Near_Fid).


texts: Automating Excel to Table in larger script in ArcMap using Python?

texts:
This is the first part of a larger script i'm working on to automate heatmaps.

Currently I'm receiving this error with ArcMap 10.5:

  Traceback (most recent call last):   File "\coacd.org\dfs\SWS\Code
  Enforcement\ACD Admin Operations\GIS\Operations\Council District
  Analysis Reporting\Auto_HeatMap_WIP\autoheatmap.py", line 16, in

      xyPointsPlotted = arcpy.ExcelToTable_conversion(SOURCE_DATA, autoLayer,"")   File "C:\Program Files
  (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\conversion.py", line 63, in
  ExcelToTable
      raise e arcgisscripting.ExecuteError: Traceback (most recent call last):   File "c:\program files
  (x86)\arcgis\desktop10.5\ArcToolbox\Scripts\ExcelToTable.py", line
  253, in
      arcpy.GetParameterAsText(2))   File "c:\program files (x86)\arcgis\desktop10.5\ArcToolbox\Scripts\ExcelToTable.py", line
  204, in excel_to_table
      out_fields = gen_out_fields(workbook, sheet, out_path, is_gdb)   File "c:\program files
  (x86)\arcgis\desktop10.5\ArcToolbox\Scripts\ExcelToTable.py", line
  175, in gen_out_fields
      out_fields.append(clsField(f, out_path, is_gdb, out_fields))   File "c:\program files
  (x86)\arcgis\desktop10.5\ArcToolbox\Scripts\ExcelToTable.py", line 33,
  in init
      if not name[0].isalpha(): IndexError: string index out of range

  Failed to execute (ExcelToTable).

This is the first part of the script which is supposed to convert an Excel doc to a table, plot the lat/long, and reproject it:

import arcpy
import xlrd
import os

workspace = r"\\coacd.org\dfs\SWS\Code Enforcement\ACD Admin Operations\GIS\Operations\Council District Analysis Reporting\Auto_HeatMap_WIP\shps"
arcpy.env.workspace = workspace
arcpy.env.overwriteOutput = True
autoLayer = r"\\coacd.org\dfs\SWS\Code Enforcement\ACD Admin Operations\GIS\Operations\Council District Analysis Reporting\Auto_HeatMap_WIP\shps\autoLayers.gdb"
shps = r"\\coacd.org\dfs\SWS\Code Enforcement\ACD Admin Operations\GIS\Operations\Council District Analysis Reporting\Auto_HeatMap_WIP\shps"
mxd_path = os.path.join(autoLayer, workspace)

SOURCE_DATA = r"\\coacd.org\dfs\SWS\Code Enforcement\ACD Admin Operations\GIS\Operations\Council District Analysis Reporting\Auto_HeatMap_WIP\Source_Data\SOURCE_DATA.xlsx"

#convert the workbook called XY doc to a table
xyPointsPlotted = arcpy.ExcelToTable_conversion(SOURCE_DATA, autoLayer,"")
spatial_ref = arcpy.SpatialReference("WGS 1984")
output_layer = "sample_xy_points"
saved_Layer = shps +"\\sample_xy_points.lyr"

arcpy.MakeXYEventLayer_management(xyPointsPlotted, "Longitude", "Latitude", output_layer,"WSG 1984","" )

arcpy.SaveToLayerFile_management(output_layer, saved_Layer)

#project layer into Texas FIPS
arcpy.CopyFeatures_management(saved_Layer, "coded_xy_points")

repr_spatial_ref = arcpy.SpatialReference("NAD 1983 StatePlane Texas Central FIPS 4203 (US Feet)")
arcpy.Project_management(shps +"\\coded_xy_points", shps +"\\coded_xy_points_FIPS4203", repr_spatial_ref)

df = arcpy.ListDataFrames(mxd)[0] # address location data frame and turn on select layers
df.zoomToSelectedFeatures()

arcpy.env.extent = df.extent #set extent to current one
arcpy.env.overwriteOutput = True #overwrite existing files

scratch_output = working_gdb+"\\scratch"


texts: How can I apply a raster style to multiple layers using MapServer?

texts:
I'm using Mapserver to display a raster in browser using a WMS request from OpenLayers. At the moment I have just one raster, and used the following method of styling it:

MAP
    ###########
    NAME         "ny_pop"
    UNITS         meters
    SIZE          256 256
    STATUS        OFF
    DEBUG         ON
    IMAGECOLOR    128 128 255
    CONFIG        "MS_ERRORFILE" "ms.log"

    ###########
    PROJECTION
        "init=epsg:900913"
    END

    ###########
    OUTPUTFORMAT
      NAME "png"
      DRIVER AGG/PNG
      MIMETYPE "image/png"
      IMAGEMODE RGB
      EXTENSION "png"
      FORMATOPTION "GAMMA=0.75"
    END

    ###########
    WEB
        METADATA
            "wms_title"           "WMS population layer"
            "wms_onlineresource"  "http://mysite.com/mapserv.cgi?map=population.map&"
            "wms_enable_request"  "GetMap GetFeatureInfo GetCapabilities"
        END
    END

    ###########
    LAYER
        NAME      "new_york_pop"
        DATA      /home/mysite/webapps/htdocs/data/ny_pop_den.tif
        STATUS    OFF
        TYPE      RASTER
        METADATA
            "wms_title"  "WMS NY Raster"
            "wms_srs"    "EPSG:900913"
        END

        CLASSITEM "[pixel]"

        # class using simple string comparison, equivelent to ([pixel] = 0)
        CLASS
            EXPRESSION "0"
            STYLE
              COLOR 0 0 0
            END
        END

          # class using an EXPRESSION using only [pixel].
        CLASS
            EXPRESSION ([pixel] > 0 AND [pixel] < 5000)
            STYLE
              COLOR 215 25 28
            END
        END

        CLASS
            EXPRESSION ([pixel] >= 5000 AND [pixel] < 10000)
            STYLE
              COLOR 253 174 97
            END
    END

END

I want to include several more rasters layers in this mapfile. Is there a way that I can apply the style to multiple layers by creating a style object and applying it to each layer? I'm not sure if this is the correct terminology as I could not spot how to do this on the mapserver site.

I thought about generating this using php, or copy/pasting this layer structure. If I go the copy/paste route the mapfile would become extremely long and hard to read.


texts: Counting intersections from multiple shapefiles in counties?

texts:
I have several polygon shapefiles of counties in 6 US states. I also have three shapefiles of country-wide "impaired waterways" a line, a polgyon, and  a point feature classes.

What I want is a count of the number of the total geometries (ALL of the impaired waterways) that are within each COUNTY.

Is there a way I can do this in a loop or a batch? I can understand some code, but I do not code myself (yet! working on it!), but is there a tool somewhere that I can use to accomplish this goal?

I know I could split each county shapefile into individual shapefiles and then do a select by location on the three impaired waterways layers, and then get three separate totals to add together, but this will be immensely time consuming, as I have 654 total counties, and I would have to do it three times, once for each waterway layer.


texts:
Here is an example of my issue:

There are two point layers displayed in this image:
The yellow dots are my currently used layer with the most updated data.
The green dots are legacy data from when the points were originally collected.

The green dot positions are accurate.
As you can see, the yellow ones have shifted south-west by a considerable amount.

The yellow positions are from a Geodatabase I have created, amassing all of the data into one spot.
The green positions are from an original shapefile before being appended to the Geodatabase.

Both layers have the same information under "Source":
EDIT: Within the data frame, they have the same coordinate system. But from the Catalog properties, they are different

Projected Coordinate System: NAD 1983 StatePlane Oklahoma North FIPS 3501 Feet
Projection: Lambert Conformal Conic
Yellow Geographic Coordinate System: GCS North American 1983
Green Geographic Coordinate System: WGS 1984 UTM Zone 10N
Datum: D North American 1983

The offset seems to be pretty consistent across all of the data points.
Does anyone have an idea of how this happened to my data?
(Highly likely that it was user-error on my part, but I need to know how to reverse this mess I have made)


texts: How to use field calculator to create a field based on another?

texts:
I have a field called RTS (Range,Township,Section(typically looks like 153320 with each two digits representing)). Would like to transpose to Township Range Section. Example from above would look like 331520.

Is there any VB or Python that would work?

For labeling, I used the following, which worked by the way.

Function FindLabel ( [RTS] )
  FindLabel = mid([RTS],3,2) & mid([RTS],1,2) & mid([RTS],5,2)
End Function


texts: Disable Case Sensitivity for Queries in ArcGIS Server 10

texts:
I am searching a field on a layer in ArcGIS Server 10 with wildcards.

The query will be something similar to "STREETNAME like '%MAIN%'"

Right now the searches are case sensitive, so it will only return results with MAIN in the STREETNAME field as opposed to Main.

Is it possible for me to disable case sensitive searching?

Thanks,
Seth


texts:
How to replace three parts string with  (like John Doe Street) to form where first word has only one letter like (J. Doe Street)?

I am using FME (StringReplacer) so RegExp should be fine method for this case.


texts: On opening the page i get this type of view.The lines are very thick. On clicking anywhere in the map it changes to 2nd picture.I am not being able to figure out why this is happening.


texts: Get the features count of a GPFeatureRecordSetLayer before execute python script tool

texts:
I am trying to get the count of features in a GPFeatureRecordSetLayer parameter before executing the tool. By using the arcpy.GetCount_management tool I am getting 0 all the times (see code below). I have also tried to use the JSON property of the input FeatureSet but still with no success. Running the arcpy.GetCount_management tool in Execute method of the tool gives me the correct number but I need it before that so I can use it for validation.
Is there a way to get the features count of a GPFeatureRecordSetLayer parameter and use it to add an error message to the parameter if the count is greater than 1?

import arcpy

class Toolbox(object):

    def __init__(self):
        """Define the toolbox (the name of the toolbox is the name of the
        .pyt file)."""
        self.label = "Toolbox"
        self.alias = ""

        # List of tool classes associated with this toolbox
        self.tools = [Tool]

class Tool(object):

    def __init__(self):
        """Define the tool (tool name is the name of the class)."""
        self.label = "InteractiveInput"
        self.description = "Test Interactive Input"
        self.canRunInBackground = False

    def getParameterInfo(self):
        params = []

        prmInPolygon = arcpy.Parameter(
            displayName='Interactive Polygon',
            name='inPolygon',
            datatype="GPFeatureRecordSetLayer",
            parameterType="Required",
            direction="Input")
        #replace with a valid template
        prmInPolygon.value = r"C:\\template.lyr"
        params.append(prmInPolygon)

        prmDebug1 = arcpy.Parameter(
            displayName="Debug 1",
            name="debug1",
            datatype="GPString",
            parameterType="Optional",
            direction="Input")
        params.append(prmDebug1)

        return params

    def isLicensed(self):
        """Set whether tool is licensed to execute."""
        return True

    def updateParameters(self, parameters):
        """Modify the values and properties of parameters before internal
        validation is performed.  This method is called whenever a parameter
        has been changed."""
        result = arcpy.GetCount_management(parameters[0].valueAsText)
        count = int(result.getOutput(0))
        parameters[1].value = count

        return

    def updateMessages(self, parameters):
        """Modify the messages created by internal validation for each tool
        parameter.  This method is called after internal validation."""
        return

    def execute(self, parameters, messages):
        """The source code of the tool."""
        return


texts: Which output data type to choose in QGIS SAGA Raster Calculator in Batch Mode?

texts:
I have 5 years of MODIS13Q1 NDVI .tiff images for time series analysis. I want to multiply all the images with the scale factor of 0.0001 before using them. In order to process all at once I try to use Processing Toolbox -> SAGA -> Grid-Calculus -> Raster Calculator in Batch Processing Mode. As MODIS13Q1 is a 16 bit signed integer I couldn't decide which output Data Type I should choose?

The choices are:

bit;
unsigned 1 byte integer;
signed 1 byte integer;
unsigned 2 byte integer;
signed 2 byte integer;
unsigned 4 byte integer;
signed 4 byte integer;
4 byte floating point number;
8 byte floating point number;

It's suppose to be a floating number but should I choose 4 byte or 8 byte?


texts: Building a table from for loop values in QGIS

texts:
I am calculating the volume of a few lakes at 1 cm intervals. In QGIS I am using the raster surface volume tool and I am trying to iterate the process in a for loop so that I don't have to manually adjust the base level a couple of hundred times.
The problem I am running into is the output overwrites the previous output and I end up with a single value (whatever value was last in the list of values). Is there a way to write each output onto a new line in the csv?
my code:
from qgis import processing
'lake_level'= (169.50,169.49)
processing.run("qgis:rastersurfacevolume",{'INPUT':'/mydata.TIF',
    'BAND': 1,
    'LEVEL': lake_level,
    'METHOD': 1,
    'OUTPUT_TABLE': '/MY_TABLE.CSV',
     })


texts:
I'am using mapbox-gl-js draw, and I need to draw custom markers inside the map. I can't find anyway in the documentation that talked about this issue.
Work around is needed, any ideas?


texts: Panning to Point in WrapAround180 past initial extent in Arcgis Javascript API

texts:
With my map set to WrapAround180: true, I have a icon list outside of the map that pans to a location on the map when you select an icon in the list. If you are outside of the initial extent and select an icon in one of the maps wrap around extents, it will pan all the way to the initial extent instead of in the extent that the user is currently viewing. Is there a way to convert the initial extent geometry of a point to be the current extent geometry so the icons popup will open regardless of whatever extent you are in?

I tried:

screenUtils.toMapGeometry(this.map.extent, this.map.width, this.map.height, currG.geometry)

but this is giving me a very large number that is not located on the map. my geometry points are in SR 102100.


texts: Lat/Long as X/Y value on a map image using Robinson projection

texts:
I have a map of the world as SVG file using the Robinson projection on which I would like to place a circle. The width of the map/image is X (2754) and its heigth is Y (1398). I would like to place the center of the circle at Lat 40.7127, Long -74.0059 (New York City). How can I calculate, based on the coordinates at which position X,Y on the map, I have to place the circle to correctly point out New York City?
I would also be happy to use another SVG of the world as long as it uses the Robinson projection and allows me some styling options such as lines between countries, possibly color of the ocean etc.


texts: When joining tables, style of vector layer can't find new column in QGIS

texts:
When I joined a csv file with the attribute table of my vector label everything's cool. Now, when I open the attribute table of the vector layer I can see that I successfully added the new designated column say: data

But when I want to add a graduated style to that new data column in my vector layer I can't find it in the column drop down menu.

I don't understand, what am I doing wrong?


texts: Can I deploy .NET server object extension to a linux box hosting ArcGIS Server 10.1?

texts:
We have developed a server object extension in Visual Studio 2010, and successfully deployed to the ArcGIS Server hosted on a windows box. However, when we try to deploy it to a linux server, it complains that the DLL is not found in the .SOE file, which actually contains. Is it possible to deploy a .NET SOE on a linux box? If so, what's the steps to deploy it?

Thanks.


texts: Where to find a polygon database of golf courses in the US?

texts: Does anyone know where I can find an accurate polygon database of all golf courses in the us?


texts: Georeferenced Image Rendering As Black Shape in QGIS?

texts:
I'm georeferencing an image in QGIS, it shows up fine on the georeferencer and goes to about the right position on the map where it's supposed to. But as you can see below, the image shows up as a black box.

Any suggestions for a fix?


texts:
My project aims at updating automatically point feature classes in a ESRI local geodatabase using MySQL tables with X,Y coordinates. The updates should be launched with the Windows task-scheduler.
I am following closely the process described on blogs.esri.com, using ArcGIS 10.1 on Windows Server 2008 R2 Standard. I work in folder where I have full R/W permissions.

I have created the OLE DB connexion in ArcCatalog (following this GIS-SE post), and a ModelBuilder to run the conversion process. It works fine when launched in ArcCatalog.

I have created this ArcPy script to launch the ModelBuilder :

    # -*- coding: utf-8 -*-
    import arcpy

    # Import the toolbox containing the model.
    arcpy.ImportToolbox(r"c:\myTBX.tbx", "myTBX")

    # Run the model "myTool".  The model has two parameters:
    #    1- the geodatabase to update
    #    2- the input connection file to MySQL:

    out_geodatabase = r"c:\mygeodatabase.gdb"
    in_connection = r"c:\myConnection.odc"

    arcpy.myTool_myTBX(out_geodatabase, in_connection)

    print "process complete"

What I get is an errror message that says that the connection to MySQL does not exist or is not supported: the behaviour is different is I call the Model from within ArGIS (runs without error) or from ArcPy outside a user session (the connection to MySql is not recognized).

Does anyone know why this is happening, and how I could resolve it?


texts: How to call/insert legend created by GetLegendGraphic request url of GeoServer on web-page?

texts:
I have followed the steps as mentioned on in the GeoServer Documentation for GetLegendGraphic
Now as I click over it, it gives out an image of the legend on the next web-page

and I have added this in the HTML as
    <link rel="stylesheet" href="http://localhost:8080/geoserver/agrodss/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=agrodss:Rainfall">
    <layout>
        <decoration type="legend" affinity="top,right" offset="0,0" size="auto"/>
    </layout>

I usually work at back-end and front-end is not my domain, so I am not sure how to proceed after this.
Can someone tell, How to call this URL request in the HTML so that it can appear on the webpage?


texts: PostGIS vs shapefile vs geodatabase precision

texts:
How coordinates are stored in a PostgreSQL/PostGIS database? If not adjusted manually, is it "infinite"? Or up to some digits(15?).

My question is the following: If I work in a PostGIS database with "infinite" precision how is saving a layer as a shapefile or a feature class, process it and then paste it back to the PostGIS database, is going to affect my topology checklist? (for example exactly same nodes in a line segment).

And what would you do if you were to move from PostGIS and back regarding the precision and tolerance of your layer?


texts: Creating neighbors, area and perimeter in spatial econometrics using R

texts:
I’m working on a spatial cross section model with R-programming-language. I’m running these codes which refers to anselin data (spatial_columbus) in spdep package. I found them from these links:

Main Page for more information

Dataset

library(spdep)# Loading required package: sp &Loading required package: Matrix
data(Columbus)
mydata<-columbus
attach(mydata)
y<-cbind(CRIME)
 x<-cbind(INC,HOVAL)
xy<-cbind(mydata$X, mydata$Y)
neighbors<-col.gal.nb
coords<-coords
summary(neighbors)

When I used these codes for data (columbus) in spdep package, everything is fine, but when I want apply them to my data (human capital index) I’m not able to define neighborhood for my data . My problem is in this line ( neighbor<-col.gal.nb). it’s the neighbors list from an original GAL-format file and it’s a pre-defined file . I don’t know any codes for creating neighbors to my data and I think my data framework is different from spatial Columbus data framework (There is AREA, PERIMETER,ID and polyID columns that I don’t have these columns in my data framework).

The help link for col.gal.nb is here (you can open this link in R environment after above codes)

http://127.0.0.1:20991/library/spdep/html/columbus.html

My questions are here:

How can I use ArcGIS  to create AREA and PERIMETER to my data file? I have some counties as samples. Are any easier solution for finding these values or I should only use ArcGIS for this purpose? (In sample codes the author used ArcGIS to calculating these values).
Which code pack can I use to creating neighbors based on contiguity and distance in R?
My dependent variable is HCIand Y is latitude, X is longitude and other variables are independent variables.

My data set framework : http://www.mediafire.com/view/lf43qm1h5ptztt6/spatial_columbus.csv

Pre-defined framework : http://www.mediafire.com/view/ml76tbrf6p69vkf/human_capital_index.csv


texts: Printing to PDF with Vector shapefiles, text, etc using ArcPy?

texts:
I have a small python script which exports a set of data driven pages to PDF. This works fine, including appending each page to an 'all' pdf.

My issue is that it creates rasters of each layer in the map.

I can use something like CutePDF to print to a vector map, and that works great. Much smaller filesizes, but this is not easily done in a batch process. It requires you to choose the file name of each page manually.

Can you make ArcPy's export to pdf method actually use vector format for the content of the map. If not, is there a way to automate the printing to file, using cutePDF or something else?


texts: Defining projection for FEWS rainfall data in ArcMap?

texts:
This problem has been tackled here previously (see Manually adding spatial reference information for FEWS rainfall data in ArcMap?) but i couldnt get a solution to my problem from the thread.

I am using the RFE data data for Kenya. After using Define Projection to Copy and Modify the Africa Albers as suggested (in ArcMap), the African rain does not map in the right place. The rain .bil data is a dot inside Africa in the ESRI world map (CNTRY92 shapefile).

However when i open the same .bil file in QGIS, it maps correctly.

Any ideas what i am doing wrong?

I need to use the data in ArcMap for further analysis.


texts: Arcmap: attach python script to a button?

texts: In ArcMap 9.x how can I attach a python script to a button?


texts: Formula to calculate DGPS correction factors

texts:
I am trying to implement a differential GPS algorithm. During my research, I found a paper at https://opus.bibliothek.uni-wuerzburg.de/opus4-wuerzburg/frontdoor/deliver/index/docId/11361/file/144_Ali_TransNav.pdf which is pretty easy to understand for me. However, on page 5, there are the following formulae:

ρ = r + c.(dtr - dts + dT)

r = √((Xs-Xr)2 + (Ys-Yr)2 + (Zs-Zr)2)

CF = r - ρ + (dtr - dts + T) * c

where CF is the correction factor I want to calculate and ρ is the pseudorange.

Since the tropospheric delay T is not used in the algorithm according to the paper and and dT corresponds to 'other biases' which I for simplicity assume to be 0, the part c(dtr - dts) is the same in both the equation for ρ and CF. If I now substitute ρ with its equation, these parts cancel out each other and I get:

CF = r - rρ

Therefore, the correction factor would just be the difference of the geometric position. However, as far as I understood, differential GPS has to use more parameters to calculate the correction factor. What did I do wrong?


texts: data-defined attributes in QGIS' point cluster symbols

texts:
I'm wondering how data-defined attributes work for the cluster symbol when using the point cluster layer styling in QGIS 3.*. How can you use the values of the points within the cluster for data-defined attributes?

The image below is the result of using the winddirection "D" attribute  as the rotation parameter for the cluster symbol. It seems reasonable, however I don't know if this is the average, the sum, the mean or even the first value of the clustered points.

I would like to use the mean value of the clustered points, because I would like to get the prevailing winddirection. I tried using the expression mean( "D" ) but that results in all the points pointing the same direction. Documentation is a bit sparse and the only variables in the expression builder related to clustering that I can find are cluster_color and cluster_size which are both of no use in this case.

Here is the dataset if someone wants to try.


texts: How to get zonal stats only for fully covered pixels in Python

texts:
I want to get the statics of raster values per polygon in a shape file in Python.
Currently I use: https://pythonhosted.org/rasterstats/.
But as I understand it has two raster stategies:
all_touched=True: Takes all pixels that are somehow covered by the polygon
all_touched_False: Take all pixels, with the pixel center covered py the polygon.
Right?
What I am looking for is a stragegy, that only selects pixels that are covered FULLY covered by the polygon.
What I currently do, is to buffer the polygons with a negative buffer, which is somewhat unprecsise. Is there a better strategy to achive this?


texts: License Manager Option File - How to Checkout/Borrow Specific Licenses?

texts:
I have a very specific scenario which I want to confirm does NOT work. What I would like to do is allow a specific license to be checked our OR borrowed and for that license I would like this ability to be available to only a specific group of people. To help illustrate I will give a link to the ESRI documentation and I will show the groups and types of licenses I want this accomplished with.

ESRI Doco here

That^ should describe the options file and how to use it. below are the things I have in the options file:

GROUP CartoGroup tzjohn epnewto gdtowse plulare fastuar kgjaela

GROUP EnginGroup pbgreld hjcruco rrdale dljacob tjhobsi

RESERVE 4 VIEWER GROUP CartoGroup

RESERVE 3 VIEWER GROUP EnginGroup

Now the above license server stores licenses from two different business groups. Their licenses belong to their group only and are NOT to be shared between each group. There are 7 Viewer licenses installed on the license server. What I want is for the CartoGroup to be able to BORROW two licenses however I want their 4 licenses to still only be reserved for them to be checked out. So I would think that the below configuration is closest to what I would want but it won't work.

GROUP CartoGroup tzjohn epnewto gdtowse plulare fastuar kgjaela

GROUP EnginGroup pbgreld hjcruco rrdale dljacob tjhobsi

RESERVE 4 VIEWER GROUP CartoGroup

RESERVE 3 VIEWER GROUP EnginGroup

INCLUDE_ENTITLEMENT EFL546888774-1010 GROUP CartoGroup

INCLUDE_ENTITLEMENT EFL224676441-1010 GROUP CartoGroup

The reason why the above settings won't work is because tzjohn and epnewto can BORROW a license which means their group is using two licenses. Then all the other users in the group could check out up to 4 licenses as well which leaves a total of 6 licences being used by the CartoGroup! The CartoGroup needs to only have access to BORROW/CHECK OUT up 4 licenses as once combined.

Does anyone know how to configure the options file so I can allow borrowing and checking out licenses for ONE group up to the amount of licenses they own?

Server: Windows 2008 r2

ArcGIS Server 10.2.2

ArcMap 10.2.2


texts: Converting polyline to polygon in ArcGIS Desktop for floodplain map?

texts:
I'm using ArcGIS Desktop 10.5 and working with a flood map from FEMA, which uses polylines with distinct attributes for each hazard zone (1%, 0.2%, floodway, etc). I'm trying to convert these polylines to polygons.

I followed the guide Esri provides, but I don't seem to have access to Production Editing. http://desktop.arcgis.com/en/arcmap/latest/extensions/production-mapping/creating-polygons-from-polylines.htm

Is there another way to create polygons from polylines, or an alternative to this to achieve the same results? My last resort will be manually filling each area with using InkScape.


texts: Converting point grid to raster using GRASS?

texts:
If I load the original .csv file, I then have a map of the African continent represented by 14069 data points covering it at 40x40km resolution. Each data point shows solar radiation means across the year, (jan, feb, etc).

What I want to be able to do is convert that vector into a raster using GRASS.

What I have managed to do already, is import the .csv (tab delimited) file into the GRASS mapset using v.in.ascii. However, when I try use v.to.rast.constant to convert that vector into a raster, I get a solid square covering Africa, that cannot be edited. I.e. there is no data from the vector within the created raster.

What am I doing wrong?


texts: Leaflet map with 'query of features' on mouseover and multiple layers

texts:
I have produced two working Leaflet maps that in total contain the features that I need for my application. However, I cannot solve how to have multiple 'overlay' layers that can be queried with mouseover.

This map has the query features and display data feature that I want:

Map with polygon query

This map has the multiple layers and multiple legends that I want:

Map with multiple layers

When I try to implement the 'query and return data' in the 'multiple layers' map I think I am failing to properly understand the way the data structure has changed when the data is part of a layer instead of just in the map object.

Any ideas on how I can make this work? Feel free to make a pull request to my github repo if you want.


texts: Custom icon for clusters in Mapbox GL Js

texts:
Is it possible to use a custom icon instead of a circle and a symbol (with the cluster_count string) for Mapbox GL Js' "Superclusters?"

My goal here is to approximate something like Pie Clusters or MiniCharts that used to be possible in Leaflet. I need some way to visually represent what's inside a cluster.


texts:
Is there a way to access QGIS plugins in Python?

I'd like to write a script to do some geoprocessing, and I'd like to use the clip, regular points and convex hull tools in fTools, as well as the Road graph plugin. The latter is probably a different can of worms because it is a C++ rather than Python plugin.


texts: QGIS 3.4 Select by Location Returns Geometry Error - Processing Settings Ignored

texts:
I am using QGIS 3.4 on Ubuntu 18.04.  I have a county wide city boundary polygon layer and a county wide building footprint polygon layer.  I would like to select all the buildings that are within a selected city polygon.  Both datasets share the same CRS.
When I use Vector - Research Tools - Select by Location the tool returns no selected features but it does return the error below.  On investigation I see that you can set the Processing Options - General - Invalid features filtering setting to ignore features with invalid geometries.  This setting has no effect on the tool which again, returns no selection.  I have used the Fix Geometries tool in the Processing Toolbox but still no selection is returned.  Why can I not perform a select by location on these data?

Processing algorithm…
Algorithm 'Select by location' starting…
Input parameters:
{ 'INPUT' : 'MultiPolygon? crs=EPSG:2285&field=YEAR:double(18,11)&field=TYPE:string(25,0)&field=NAME:string(50,0)&field=NUM_FLOORS:double(18,11)&field=APPRAISAL:double(18,11)&field=BLDGTYPE:string(20,0)&field=YRBUILT:double(18,11)&field=STYLE:string(20,0)&field=SF_1ST:double(18,11)&field=SF_2ND:double(18,11)&field=SF_3RD:double(18,11)&field=SF_ATTIC:double(18,11)&field=SF_LOFT:double(18,11)&field=TOTAL_SF:double(18,11)&field=SF_BASEMEN:double(18,11)&field=OWNER:string(50,0)&field=GLOBALID:string(38,0)&field=RuleID:long(10,0)&field=created_us:string(254,0)&field=created_da:date(10,0)&field=last_edite:string(254,0)&field=last_edi_1:date(10,0)&field=SHAPE_Leng:double(18,11)&field=SHAPE_Area:double(18,11)&uid={d01536ed-3181-4ec9-9044-7f52e58136b0}', 'INTERSECT' : QgsProcessingFeatureSourceDefinition('WhatcomCityLimits_beaad58e_2210_456a_b1ba_0e407406cef5', True), 'METHOD' : 0, 'PREDICATE' : [0] }

Feature (7) has invalid geometry and has been skipped. Please fix the geometry or change the Processing setting to the "Ignore invalid input features" option.
Execution completed in 0.08 seconds
Results:
{'OUTPUT': <qgis._core.QgsVectorLayer object at 0x7fa7a888b5e8>}

Loading resulting layers
Algorithm 'Select by location' finished

Edited:  Setting the processing option to Do Not Filter allowed the Select by Location to process although I do not understand why Ingnore invalid inputs did not.


texts: ArcMap 'Add Locations' field mappings not showing added field for network analyst layer

texts:
I have successfully created a new field 'Status' in the incidents sublayer of a closest-facility network analyst layer, using the 'Add Field to Analysis Layer' tool.

However, when I try to populate the incidents layer with the 'Add Locations' tool, I can't seem to get the field to show up in the field mapping box.
I've tried searching ESRI's webpages on the two tools but can't seem to find anything regarding how to populate the field other than in the field mapping area. How can I get the field to show up?


texts: STContains always returns 0 when i query from table. But same data works when I manually create a polygon geometry object and select


texts: I've created a grid using make grid in QGIS. The type of grid is rectangular (polygon) and it's 0,1 x 0,1 decimal degrees. I now want to assign an X and Y coordinate to the centre of each grid. Would anyone know how to do this?


texts: Comparing Random Point generators of ArcMap and QGIS

texts:
I have just compared the random point generator functions of QGIS and ArcGIS and had confusing results. My setup was: Create random points within an existing extent with a minimum dist between points of 5m - max number of points was set to 40000 (which is far beyond the max amount possible with 5m dist).

The results are :

ArcGIS: overall point count  3699; mean dist to next pt: 7.53m; std dist to next pt: 2.04

QGIS: overall count 13993; mean dist to next pt: 5.31m; std dist to next pt: 0.32

parameters used:

ArcGIS: Create Random Points: Constraining Extent: an existing polygon dataset. number of points: 40000, min allowed distance / linear unit: 5m, create multipart: no, environments/random numbers / random number generator / seed: experimented with different values and different generator types

QGIS / Random Points In Extent, extent from the same polygon dataset). number of points: 40000, min dist: 5m, CRS: 31256;

I've been searching for any kind of reason and found ArcGIS Random Point generator producing same points every iteration. But changing the seed-value in ArcGIS did neither change the number of points nor the mean distance value significantly. Esri doesn't answer my question ... and I have to use ArcGIS for that task.

So, does anybody have an idea what could be responsible for this huge difference and how to solve the problem.


texts: QGIS - Sorting of features in referenced child layer

texts:
I'm using QGIS 2.18 and 3.2. I have a point layer (PostGIS) and another layer without geometry. The layers are connected with 1 to many relationship, the parent being the layer with the geometry. Everything is working fine, on the pop-up form  both layers are visible.
The only issue I have is the sorting of the child layer. It doesn't follow any column by default. Of course it can be sorted by clicking on the column label in table view, but the sorting resets every time I close the form.

Any idea how can I set a default sorting by a chosen column?


texts: How to find all objects deleted by user in specified time

texts: Is there any way to get list of objects with their geometries deleted by specified user in specified time?


texts: Access python toolbox input parameter - list of excel files

texts:
I have a python toolbox I built with a tool which takes multiple excel files as an input parameter. The problem is I cannot figure out how to get the files or file names in order to import them in the execute block.

relevant code:

    def getParameterInfo(self):
    param0 = arcpy.Parameter(
        displayName = "Service Tap Placement output excels",
        name = "Excels",
        datatype = "DEFile",
        parameterType = "Required",
        direction = "Input",
        multiValue = True)
    param0.filter.list = ['xls', 'xlsx']

and

    def execute(self, parameters, messages):

    # from parameters
    excelList = parameters[0].values
    move = parameters[1].value
    myPath = parameters[2].valueAsText

things I've tried :

1) defining excelList as shown in the second code block, returns:
[geoprocessing value object object at 0x28BFC848, geoprocessing value object object at 0x28BFC770, geoprocessing value object object at 0x28BFC3C8]

2) excelList = parameters[0].valueAsText, returns:
C:\Workspace\TapResnap\testE_script\Results_ServiceTapPlacement\Results_nfp01.xls;C:\Workspace\TapResnap\testE_script\Results_ServiceTapPlacement\Results_nfp02.xls;C:\Workspace\TapResnap\testE_script\Results_ServiceTapPlacement\Results_nfp03.xls

Problem is I can't figure out how to access the objects (from try 1) as needed, I got close using Multivalue parameter as text in Python toolbox - reading in to imported module function but I'd like to avoid having to separate them out from one string (try 2) if possible (there must be an easier way), and obviously I'm not working with rasters (is there something similar for my case?). I also see some promise here, but I'm not fully understanding how to apply it to my situation.

3) adding "return excelList" to the execute block (just to be able to play with it in the python window, I'm actually trying to import them to arc tables) after using the same assignment as try 1, importing the toolbox, then setting a variable to the tool result in the python window: fileList = arcpy.[Tool]_Toolbox... but then I have the same problem as try 1, I'm unsure how to access the individual file values (in any way).

This is my first python toolbox experience, and I have (obviously) limited experience dealing with result objects and output parameters.


texts: QGIS Server, Postgres (PostGIS) data, and password less data access with pg_service.file on Windows

texts:
We are trying to put set QGIS Server on Windows via IIS. The project on the QGIS Desktop uses pg_service.conf file without problem. When the project is moved to the Windows server, we set the PGSERVICEFILE variable, it is not loaded.
Does anybody have hint, how to setup IIS server along with PGSERVICEFILE configuration option, so it works?


texts: selection by location with search cursor

texts:
import arcpy

arcpy.env.overwriteOutput = True

points = r'C:\Users\Temitope\PycharmProjects\Scripts\DATA\ne_10m_populated_places_simple.shp'
countries = r'C:\Users\Temitope\PycharmProjects\Scripts\DATA\ne_50m_admin_0_countries.shp'
outpath = r'C:\Users\Temitope\PycharmProjects\Scripts\Output'

arcpy.MakeFeatureLayer_management(points, 'points_layer')

with arcpy.da.SearchCursor(countries, ['FID', 'SOVEREIGNT']) as country_cursor:
    for x in country_cursor:
        print x[1]
        arcpy.MakeFeatureLayer_management(countries, 'countries_layer', """ "FID" = {} """.format(x[0]))
        arcpy.SelectLayerByLocation_management('points_layer', 'WITHIN', 'countries_layer')
        formatted_output_name = x[1].replace('(', '_').replace(')', '_')
        arcpy.FeatureClassToFeatureClass_conversion('points_layer', outpath, 'cities_in_{}'.format(formatted_output_name))
        print 'Successfully converted {}'.format(formatted_output_name)

print 'Finished'

THIS IS MY OUTPUT:

Senegal
Successfully converted Senegal
Saudi Arabia
Successfully converted Saudi Arabia
    Traceback (most recent call last):
      File "C:/Users/Temitope/PycharmProjects/Scripts/gis_scripts/gis_script.py", line 17, in <module>
        arcpy.FeatureClassToFeatureClass_conversion('points_layer', outpath, 'cities_in_{}'.format(formatted_output_name))
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 1: ordinal not in range(128)

    Process finished with exit code 1

Any ideas?


texts: Layer not staying on top of all other layers

texts:
I am trying to keep a specific layer named popDensity on top of all the other layers on my map despite what other layers I may click in the layers control. I am using the Leaflet overlayadd event to listen for my popDensity layer and then using the bringToFront() method to ensure that popDensity stays at the top of my other layers when they are clicked.

Here's my sample setup:

//establish the data
var popDensity = L.geoJson(popDensity, {
    onEachFeature: onEachFeature
    style: myCustomstyle
});

//Create the legend control for the popDensity layer
var popuLegend = L.control();
popuLegend.onAdd = function(map){
    var container = L.DomUtil.create('div', 'info');
    container.innerHTML = '
Population

1000+

500+

etc..

';
    return container;
};

My layers control:

var baseMaps = {
    "Base map 1": basemapOne,
    "Base map 2": basemapTwo
};

var ethnicGroups = {
    "Pashtun": pashtun,
    "Tajik": tajik,
    "etc..": etc,
    "District Population": popDensity
};

map.fitBounds(pashtun.getBounds());
L.control.layers(baseMaps, ethnicGroups).addTo(map);

Here's my event handler:

map.on('overlayadd', function(eventLayer){
    if (eventLayer.name === 'District Population'){
        popDensity.bringToFront();
        map.addControl(popuLegend);
    }
});
map.on('overlayremove', function(eventLayer){
    if (eventLayer.name === 'District Population'){
        map.removeControl(popuLegend);
        map.removeLayer(popDensity);
}
});

This setup successfully adds the popuLegend legend control when the 'District Population' overlay is checked, but when it is unchecked, and then checked again, I get the following error in console:

Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

At the same time, when I click on the Pashtun and Tajik layer(s) these layers will show on top of the popDensity layer which defeats the purpose of trying to use the .bringToFront() method on the popDensity layer.

how can I ensure that my popDensity layer is the top layer at all times as long as that layer is checked on?


texts: Checking Vegetation height accuracy in urban areas

texts: I have digitized vegetation as polygons covering the canopy of trees in urban areas. Are there any suggestions to check the accuracy of height. I have been manually validating with visual checks, comparing to google earth street view with kmz/kml, though these check are time consuming its the most reliable so far. Please advise if there are easier alternatives.


texts: How to download Landsat 5 specific band using Google Earth Engine?

texts:
I am trying to download Landsat 5 Band 6 using Google Earth Engine. When I run the code I am getting the following error: Error: Invalid argument: 'image' must be of type Image. I found on this post that I was trying to export an ImageCollection instead of a single image. I also found this post but the getDownloadURL is not working. I would like to ask, because I am new to GEE how can I download a single band? Below it's the code:

   var sub_geom = region.geometry();
    var sub_region = JSON.stringify(sub_geom.bounds(1).getInfo().coordinates);

Map.addLayer(sub_geom);
var cloudMaskL457 = function(image) {
  var qa = image.select('pixel_qa');
  // If the cloud bit (5) is set and the cloud confidence (7) is high
  // or the cloud shadow bit is set (3), then it's a bad pixel.
  var cloud = qa.bitwiseAnd(1 << 5)
                  .and(qa.bitwiseAnd(1 << 7))
                  .or(qa.bitwiseAnd(1 << 3));
  // Remove edge pixels that don't occur in all bands
  var mask2 = image.mask().reduce(ee.Reducer.min());
  return image.updateMask(cloud.not()).updateMask(mask2);
};
//Import Landsat Image
var L7200508NDVI = ee.Image(ee.ImageCollection('LANDSAT/LT05/C01/T1_SR')
.filterDate('1995-01-01', '1995-01-31')
.map(cloudMaskL457)
.filterBounds(sub_geom)
.mean());

// Export the image, specifying scale and region.
Export.image.toDrive({
  image: L7200508NDVI,
  description: 'imageToDriveExample',
  scale: 120,
  region: sub_geom
});


texts:
First off sorry if this question have been asked, I have been looking for an answer for some time now but can't find any solution.

I have created a .mbtiles file with Tilemill, extracted the .png and the .grid.json files using mbutil. I used IIS to display the PNG tiles using Leaflet. All that works great, except for the utfgrid(.grid.json)info isn't showing.

Do I need Wax?

I have tried Wax but with no success. Any suggestions will be immensely helpful.

Most of the info I have comes from:

http://build-failed.blogspot.com/2012/03/custom-map-tiles-part-2-tilemill.html.

My map code is shown below, the info for each grid comes from the key "Un"

HTML

.....

Java

    var map = L.map('map').setView([-28.7640911,24.302625], 6)//Load my tile layer
        var tilesUrl = 'http:/localhost/GP_Un_Lable/{z}/{x}/{y}.png',
        tilesLayer = new L.TileLayer(tilesUrl);
        tilesLayer.setOpacity(0.7);
        map.addLayer(tilesLayer);
        var utfGrid = new L.UtfGrid('http:/localhost/GP_Un_Lable/{z}/{x}/{y}.grid.json?callback={cb}');
        map.addLayer(utfGrid);
            utfGrid.on('mouseover', function (e) {
                if (e.data) {
                    document.getElementById("UtfGridTextHere").innerHTML = e.data.Un;
                } else {
                    document.getElementById("UtfGridTextHere").innerHTML = "nothing";
                }
                //console.log('mouseover: ' + e.data);
            });
            utfGrid.on('mouseout', function (e) {
                document.getElementById("UtfGridTextHere").innerHTML = "nothing";
            });


texts: Voronoi Polygon Algorithm seems to exclude a Point from processing

texts:
I am using the QGIS (2.8.1) Voronoi Polygons Algorithm on a point shapefile.
See image below, the red triangles are the points I am using.
The resulting polygons miss a part (around HP87).

Any ideas why?

Here is some example data (EPSG:2154) that reproduces the error (excluding point A):

X,Y,NAME
816682.58,6391443.637,A
820180.458,6391708.558,B
821325.8429,6394449.982,C
822550.1316,6397547.124,D


texts: Do you know how to become Navteq (Here Maps) reseller?

texts:
Before we begin, I'd like to state that I know that Navteq has been acquired by Nokia and Nokia has been acquired by Microsoft. However, Navteq was out of the deal. When I go through pages of Here Maps (old Navteq), I cannot find any information regarding the distribution of raw data other than APIs.

However, on the other hand, there are plenty of companies that claims to be Navteq data provider and they are able to provide sample datasets and license those datasets for commercial usage. As Nokia removed all pages related to Navteq and redirected the visitors to here.com I wonder if someone knows how to become Here Maps Premium Reseller?


texts: Map on Leaflet freezes if load shapefile data with large size

texts:
I am currently using Leaflet shapfile as a source of my data.

When the shapefile [30MB] contains 1 big layer (Feature is big with many coordinates | A whole big polygon), the UI still working but loads very long.

When the shapefile [20MB] contains multiple layers (Many Polylines, Polygons markers | Multiple Features), the UI already freezes upon load.

Is there any work around on this like load only what is visible on the map view port so performance issue will be addressed? Is this possible?

Map with shapefile:


texts: I have one problem i am thinking how to solve. My workbench is started from python script. Workbench reads xml file, but name of xml file is each time different. So is it possible to solve this with generic reader or with another python script which will read folder where is xml file, find the name of xml file and proceed it to the fme as a reader? Any other idea?


texts: Transforming coordinate system in ArcMap gives Warning 001293?

texts:
I have lats and lons in EUREF FIN35 system and I'm trying to transform it to WGS1984. Here is and example of my data.

6906030,3689220
6906269,3691008
6907518,3691012
6908265,3690256
6908630,3689801
6909489,3689358
6907607,3690761
6907880,3690409
6907214,3690251

And I'm using the ArcToolbox like below:

However, it gives the error

Can someone please let me know what's wrong here and how to fix it?


texts: How can I export selected features in Processing Modeler?

texts:
This question is a follow up from a suggestion from this thread:

How to export a single feature (line) from multiple layers and export to individual layers?

I'm creating a batch process that selects a line (feature) from a vector layer and saves the selected feature to a child layer containing the name of the parent.

I'm using $length = maximum($length, group_by:= "id") as the expression because I want to select the longest line in each layer.

The question is how do I export only selected features in the Processing Modeler? I can't find a "Export - Save Selected Features As..." option.


texts:
I have a raster of land cover (resolution roughly 300x300 m) and a raster grid of zones (cells about 14000x14000 m). What I need is to calculate the precentage of each land cover category within each zone. As far as I got, I found out that Tabulate Area is a pretty handy tool, although rather unpredictable. What troubles me most at the moment is that I need to automate this process, but within the Python script which saves the land cover dataset as a variable, I only get one category of land cover assigned to each zone.

custom_land_use_tif = "D:\\<path>\\custom_land_use.tif"
arcpy.gp.TabulateArea_sa(grid, "Value", custom_land_use_tif, "Value", "Tabulate")

However, when I run the TabulateArea line in Python Window within ArcMap and add the class layer which is loaded in the data frame, the results are plausible (nevermind the inaccuracies in the total area, although if anyone has any thoughts on that, it would be helpful as well).

arcpy.gp.TabulateArea_sa("grid", "Value", "custom_land_use.tif", "Value", "Tabulate")

Any ideas if there's a way to convince the tool to produce the second shown table within a script? I'm on ArcGIS 10.3 Basic.


texts: Failure deleting in_memory features ArcMap

texts:
Here is code and a function giving me grief. Unless issue is noticed specifically with merge and buffer, I am pretty sure my problem lies in the process of creating and overwriting (or deleting) intermediate data in_memory - could be any geoprocessing funciton in arcpy.  I want to find workflow creating intermediary data in_memory that can be run multiple times by overwriting (or deleting) the intermediatary data from in_memory. However the intermediatary data feat_to_buff_<20 or 100>ft is NOT being overwritten.
import arcpy
import os

def buffer_range_merge(fp_in, buffer_list, base_dir_out):

    arcpy.env.overwriteOutput = True

    # create string to used to create output filename with buffer vals and units
    buffer_string_formatted = [buff_string.replace(' ', '') for buff_string in buffer_list]
    buffer_string_formatted = '_'.join(buffer_string_formatted)

    # if/elif/else block for passing as .shp, full file path, or as layer string
    # Note - have not tried using .shp yet
    if fp_in[-4:] == '.shp':
        fname_orig = os.path.splitext(os.path.basename(fp_in)[-1])[0]
    # if full file path to feature
    elif '\\' in fp_in:
        fname_orig = os.path.split(fp_in)[-1]
    # if string dragged from TOC directly (in ArcMap mxd)
    else:
        fname_orig = fp_in
    fname_new = '{}_merged_buffers_{}'.format(fname_orig, buffer_string_formatted)
    fp_out = os.path.join(base_dir_out, fname_new)

    # loop through and buffer feature for each paramaeter (string) in buffer_list
    lyr_list = []
    for buff_val in buffer_list:
        lyr = 'in_memory\\buff_{}'.format(buff_val.replace(' ', '_'))
        # accumulate buffered layer names to merge
        lyr_list.append(lyr)
        arcpy.Buffer_analysis(fp_in, lyr, buffer_distance_or_field = buff_val, dissolve_option = 'ALL')

    # now merge all buffered layers in memory
    arcpy.Merge_management(lyr_list, fp_out)

Import and call function  from Python Console in ArcMap
import file_containing_function

fp_in1 = 'temp_lyr1'
fp_in2 = 'temp_lyr2'
buffer_list = ['20 feet', '100 feet']
base_dir = 'path/to/default.gdb'

file_containing_function.buffer_range_merge(fp_in1, buffer_list, base_dir)

This works - I get my desired feature:
temp_lyr1_merged_buffers_20feet_100feet which contains two features: 20 and 100 foot buffers of temp_lyr1 along with the intermediate in_memory layers: buff_20_feet and buff_100_feet
But when I run it again with a different feature layer:
file_containing_function.buffer_range_merge(fp_in2, buffer_list, base_dir)

I get the EXACT SAME final merged feature as the first run temp_lyr1_merged_buffers_20feet_100feet with a new name:  temp_lyr2_merged_buffers_20feet_100feet.
Apparently buff_20_feet and buff_100_ft are not being overwritten in_memory.
 So why aren't the in_memory feature layers being overwritten?  And yes, I have tried using arcpy.Delete_management.
ArcMap 10.6.1


texts: Where can I get British Agricultural Field Boundaries as Vector Data?

texts:
I am looking for vector data outlining the agricultural field boundaries in the UK (Specifically Scotland, England and Wales). I have tried all sources of open source data I can find and looked at Ordnance Survey Data.

Ordnance Survey have the data however they package it as part of the Vectormap Local data which costs in excess of £800k for the UK. The actual sub layer is called Rural Boundaries when the Shapefile is extracted.

If there is no realistic way of getting this data, or purchasing it for a reasonable price, is there a way to extract the data from aerial photography?


texts: Why do area measurements from "measure area" tool and field calculator differ?

texts:
My problem is when using the "measure Area" tool on the toolbar I get the correct value but when using the field calculator in the Layer Attributes the area is very different including -ve areas.  Both the project and layer are using a UTM CRS.
Using version 2.0.1


texts: Changing Number values to specific text in Attribute table (QGIS)

texts:
I'm working with a column in an attribute table that has number values and NULL values. I want to create a new column in which NULL values are changed to "Directory" and any number values to "Submitted."

I used the formula from the answer from How to do a simple find and replace in QGIS field calculator? and successfully converted NULL to text.

How can I use a version of this formula to also convert all number values to the word "Submitted"?


texts: Merge dbf files from different folders in Python or Arcpy

texts:
I am new to Python. I have over one hundred dbf files to merge in two diffrent workspaces.

Workspace 1:
PCPT100100
PCPT101101
PCPT102101

Workspace 2:
s100100
PCPT101101
s102101

I want to merge "PCPT100100 (workspace1) - s100100(workspace 2)", "PCPT101101 -PCPT101101".....
I am using the tool "append" but I don't know, how can I specify the name of the files.

I read about glob or os.walk to find files recursively.

Example:

import arcpy,glob

# Local variables:
PCPT100111_dbf = "C:\\PCPT100111.dbf"
s100110_dbf__2_ = PCPT100111_dbf

yourlist = glob.glob(r"C:\\s*.dbf)

s100110_dbf = "C:\\s100111.dbf"

# Set Geoprocessing environments
arcpy.env.workspace = "C:\\"

# Process: Append
arcpy.Append_management("'C:\\PCPT100111.dbf'", s100110_dbf, "NO_TEST", "Field1 \"Field1\" true false false 10 Long 0 10 ,First,#,C:\\PCPT100111.dbf,PRECIPITAT,-1,-1", "")

print "Append is done"


texts: Can QGIS give GeoJSON layers a meaningful default name?

texts:
When I add a GeoJSON layer to my QGIS project, it always gets the name OGRGeoJSON. This is in contrast with shapefile layers, which seem to be named after the file name by default.

Is there a way to either configure QGIS or change my GeoJSON files so that they get a meaningful default name when I first add them to a project?


texts: Polygon layer only rendered if crossing extent boundaries

texts:
I have two MapServer layers that get rendered only if the polygon boundaries are overlapping with the extent boundaries.

If the red lines were below the upper rim of the extent, the layer would not be visible (no red square, no red polygon). Neither the inner red hollow polygon nor the outer red rectangle do display unless they intersect the image boundary no matter if at the top, bottom, left or right. Data comes from a shapefile, it is not a DB query.

The error log says the layer gets drawn:

[Thu Jun 16 11:44:31 2011].947918 msDrawMap(): Layer 47 (simmodb), 0.014s
[Thu Jun 16 11:44:31 2011].973253 msDrawMap(): Drawing Label Cache, 0.024s
[Thu Jun 16 11:44:31 2011].973279 msDrawMap() total time: 0.621s

Why is that. Here is an extract of my mapfile:

MAP
    CONFIG "MS_ERRORFILE" "errorlog/mapsurfer-clean.log"
    NAME "MyProject"
    STATUS ON
    SIZE 600 440
    RESOLUTION 96
    IMAGECOLOR 255 255 255
    IMAGETYPE AGGA

    PROJECTION
      "init=epsg:31468"
    END

    INCLUDE "mapfiles/outputformat.map.inc"

    # salzwedel oben
    EXTENT 4443704.656113 5629700.821527 4685449.281400 5944601.022604
    LAYER
        NAME "geomodb"
        GROUP "model boundaries"
        TYPE POLYGON
        STATUS ON
        DATA "simgeomod/GEO-Modell"
        CLASS
            STATUS ON
            OUTLINECOLOR 255 10 10
            SIZE 20
        END
    END
    LAYER
        NAME "simmodb"
        GROUP "model boundaries"
        TYPE POLYGON
        STATUS ON
        DATA "simgeomod/SIM-Modell"
        CLASS
            STATUS ON
            OUTLINECOLOR 255 10 10
            SIZE 20
        END
    END

It does not change if layer status is set to DEFAULT.


texts: How can I create isochrones in postgis/osm2po/pgrouting and then save the isochrones as polygons?

texts:
I am creating some isochrones in pgrouting based upon a table from osm2po. Now I have a query that will get all of the edges that are c driving distance away from a point. How can I save this query or these individual isochrones into a table of polygons?

Perhaps a little background might help: I want to show how the isochrones change over time as different events occur or as event intensities change. So I wanted to be able to create a video that shows how the contours of the isochrones changes over time. Hence I need to create a table that has each isochrone polygon, as well as a timestamp for the date.

Any help you can provide in converting the isochrones into polygons — hopefully in PostGIS — is welcome.


texts: Remove first seven characters from field string using Field Calculator

texts:
I wrote an expression/codeblock that removes the words "Nearby:" from the field value string if it has it.

Codeblock:

import string
def splitme(s):
    if s[:7] == "Nearby:":
        aList = string.split(s, ":")
        return aList[1]

    else:
        pass

Expression:

splitme(!Street1!)

It removes "Nearby:" on all fields that contain it in the string but it also deletes the strings in the field records that are fine and do not contain "Nearby:". I thought the if/else check would handle this.


texts: How can a single line be computed from multiple possibilities

texts:
I have datasets containing continuous GPS streams of data that represent routes or trails. For any given route, I probably have at least 5 (in some cases many more) different sets of data. Given that it's uncorrected GPS data, there can be a lot of variation in the location of the route.

Is there a way to algorithmically computing the "best" representation of the location of the route? Does anyone know of an implementation in existing softare? The only literature I've found thus far is this, which looks promising, but would be custom development.


texts: Error while trying to upload a .bsq file to the geoserver

texts:
I am trying to upload a .bsq file (ENVIHdr Coverage Format) to the geoserver. While doing this I got an error message. I am using the "GDAL" Extension for the geoserver. The error message is: "Could not list layers for this store, an error occurred retrieving them: Incorrect input type!"
Do I use the wrong extension or is there an other mechanism to upload a .bsq file to the geoserver ? After the upload I want to publish this raster data as a WCS service.


texts: Finding out which input raster has highest value, based on "score" field using ArcGIS Pro

texts:
I want to know which input rasterlayer has the highest value, based on a score field.
The highest position tool in ArcGIS Pro seems the best option.
However, it compares the original values of each raster layer.
I want to know which raster layer has the highest "score" value.
These values are stored in a separate field of the attribute table of each raster layer.
I added and calculated these scores based on the original values.
How can I refer to the "score" field, when using the highest position tool?


texts: National Map downloading wrong coordinates?

texts:
Edit 2
I figured out the problem.  The download is a whole panel in the ballpark of 50 miles x 50 miles.  The bounding box I requested was about 3x3 miles.  My BB is a subset of the whole dataset that was sent to me.

I am downloading an elevation raster from the USGS national map.  I am using the method where you view a map of the US and draw a box on it.

I am able to downoad the data and view in in ArcGIS Pro 1.3.  But I am familiar with the topo of the area I am downloading, and it is clear that the area the National Map is sending me is not the same as the coordinates of my request bounding box.

How do I troubleshoot this?  If I know my BB lat/long, is there a way to enter the coordinates numerically?

Edit 1

The link is:
http://viewer.nationalmap.gov:80/basic/?basemap=b1&category=ned&q=&zoom=15&bbox=-81.90256119,35.87566326,-81.86385155,35.90215654&preview=&avail=&refpoly=

The product I am downloading is USGS NED 1 arc-second 2013 in GridFloat file format.

Here is the map on the screen of the National Map Viewer (in Internet Explorer):

It sends me a zip file with several files in it.  The one with the data in it is floatn36w082.flt.  I open this file from ArcGIS Pro (the problem seems to happen in other software as well.  It's not a projection issue.)  After loading the file in ArcGIS Pro, to help you see better what this terrain looks like (and for comparison, I process it with Shaded Relief, which renders this:

I hope all can see that the elevation data is not the same between these two images, regardless of the map projection.  Table Rock (north of Morganton, NC) is a north-south running ridge line with the Linville River running north-south to its west.  These features appear on the contour map I have uploaded.

Whereas the shaded relief image, downloaded from the National Map, has no river on the left and the ridge near the middle just looks way different.  This is what makes me think the National Map is sending me elevation data for the wrong box.

The metadata xml files inlcudes

-<bounding>
 <westbc>-82.00166666667</westbc>
 <eastbc>-80.99833333334</eastbc>
 <northbc>36.00166666666</northbc>
 <southbc>34.99833333333</southbc>
 </bounding>

so it thinks it is at the right place.  It is just that the topo does not look correct.


texts:
Are there any vector map data providers with API's, that i can use to build my app on iOS natively (not on a webview). Specifically im looking for:

For a library/framework that uses existing map servers as datasources to get  vector maps. Even a HTTP based API that returns vector map data would be helpful!
Any tools that would help me render (on openGL) such a map on iOS. Mapnik (http://mapnik.org/) looks good, but im still unsure on how i would go about using it!

Things I've looked and why those wont work for me (tell me otherwise!):

Google Maps & Apple Maps : Cannot use as a datasource for vector map format.
Mapbox : Coming out with map vector support. Not yet out there.
TileStache : Looks promising. Would like more information on this if anyone has used it?


texts: segfault on exit when map layer has connection to "layerRemoved"

texts:
Here's my sample code that shows the problem - apologies if this is a big load of code but this is as minimal as I can get it:

import sys
from qgis.core import *
from qgis.gui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *

app = QgsApplication([], True)
app.setPrefixPath("/usr", True)
app.initQgis()

class OgrLayer(QgsVectorLayer):
    def __init__(self, path, name, connect_remove):
        QgsVectorLayer.__init__(self, path, name, 'ogr')
        if connect_remove:
            QgsMapLayerRegistry.instance().layerRemoved.connect(self.layerRemoved)
    def layerRemoved(self, id):
        print "removed ",id

layer1 = QgsVectorLayer(sys.argv[2],'layer1','ogr')
layer2 = OgrLayer(sys.argv[3],'layer2', sys.argv[1]=="break")

if not layer1.isValid():
    raise ValueError("layer 1 not valid")
if not layer2.isValid():
    raise ValueError("layer 2 not valid")

QgsMapLayerRegistry.instance().addMapLayer(layer1)
QgsMapLayerRegistry.instance().addMapLayer(layer2)

canvas = QgsMapCanvas()
canvas.setLayerSet([QgsMapCanvasLayer(layer1), QgsMapCanvasLayer(layer2)])
canvas.show()

app.exec_()

When run as:

python layertest.py ok shape1.shp shape2.shp

it runs, presents an empty canvas window (because I've not bothered to set the extent) and quits cleanly when I close the window.

When run as:

python layertest.py break shape1.shp shape2.shp

it runs as before, but on closing the window I get a segmentation violation. The only difference is the attachment of the layerRemoved signal to the map layer registry within my OgrLayer class.

If I define the OgrLayer class in a Qgis application python console, it all works and Qgis quits cleanly on exit. Its only when running from a standalone python script that this code segfaults on exit.

Is something not initialised properly? Is something in the QApplication exit code trying to access a layer that has been deleted from memory?

The real situation I have is in trying to use a plugin that defines layers in this way with connections - so any solution would ideally not involve "don't connect the signal" since that would mean editing that plugin (and probably breaking it).

I can disconnect the signal after creating the layer and that seems to work, but that's a bit ugly. I'd rather find out what the underlying problem is.

Obviously seg faults on exit aren't as much of a problem as seg faults in the middle of a program, but I'd like to know what the underlying problem is and fix it.


texts: How to work with projections - shapefiles indicate all shapefile are located south of North Africa

texts:
I am trying to follow the standard QGIS tutorial for Swellendam based on QGIS version 2. Specifically the chapter which address coordinate systems

If I go to a layer and try to re-project it from WGS 84 to WGS 84 / UTM zone 34 S it shows that my data (purple square) is somewhere south of North Africa in the sea. Obviously if I set the CRS all my measurements gets messed up.

How do I proceed or do I only set the project CRS? Please try and explain the reasoning behind this.

Details:

Using Version 3.2
Windows 10


texts: Debugging ERROR 000725: Output Dataset: Dataset ... already exists

texts:
Using ArcMap 10.2 I am trying to run a Merge function by Arcpy as
# Set environment settings
env.workspace = "E:\\GIS\\ROR"

path = "E:\\GIS\\Data\\"
featureClass = "band-tailed_pigeon.shp"
InputFeature = path + featureClass
FinaloutLocation = "E:\\GIS\\Data\\Final"

dissolve_1 = "dissolved_1.shp"
dissolve_2 = "dissolved_2.shp"
dissolve_3 = "dissolved_3.shp"
dissolve_4 = "dissolved_4.shp"
dissolve_5 = "dissolved_5.shp"
# Process: Merge
inFeaturesToMerge = [dissolve_1,dissolve_2,dissolve_3,dissolve_4,dissolve_5]
arcpy.Merge_management(inFeaturesToMerge, FinaloutLocation)

but I am getting this error:
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Dataset: Dataset E:\GIS\Data\Final already exists.

Why is this happening?


texts:
I am willing to add attributes to objects I drew. So if I create a rectangle I am willing to give it name and id attributes.  will see it on the dxf file as one of the attributes. Is there a way to do it?
I am using AutoCAD 2015 on Mac


texts: OpenLayers event cluster feature id does not appear on layer vector feature id list

texts:
My application's objective is to:

click on a cluster and produce a popup
with a list of all placemarks clustered there
where every entry is a hyperlink
that closes current popup
and opens a new popup with data from placemark

I can execute everything EXCEPT FINDING the EVENT.FEATURE (placemark) in the layer.  I can read the layer (vector) feature list, but the original clustered feature (placemark) is not among the features that compose the layer.

Is the clustered feature "hidden" while its cluster is displayed?  if so, how can I access it?

I am using OpenLayers with JavaScript, loosely based on the sundials example, yet with a cluster strategy.

1 is a standard cluster strategy.

var pointStyleTaxi = new OpenLayers.Style({
    externalGraphic: "img/taxi.png",
        pointRadius: 20,
    graphicYOffset: -30,
    fillOpacity: 0.6,
        'label': "${label}"
  }, {
    context: {
      label: function(feature) {
    // clustered features count or blank if feature is not a cluster
    return feature.cluster ? feature.cluster.length : "";
      },
      radius: function(feature) {
     return Math.min(feature.attributes.count*5, 20) + 5;
      }
    }
});

var styleMapClusterTaxi = new OpenLayers.StyleMap({
  'default': pointStyleTaxi,
});

var clusterStrategyTaxi = new OpenLayers.Strategy.Cluster({ distance: 35, threshold: 2 });
var refresh = new OpenLayers.Strategy.Refresh({force: true, active: true});

var stops = new OpenLayers.Layer.Vector("Paradas", {
    styleMap: styleMapClusterTaxi,
    strategies: [new OpenLayers.Strategy.Fixed(), clusterStrategyTaxi, refresh],
    projection: map.displayProjection,
    protocol: new OpenLayers.Protocol.HTTP({
        url: "<?php echo $fileNameKML; ?>",
        format: new OpenLayers.Format.KML({
        extractStyles: true,
        extractAttributes: true,
        maxDepth: 2
        })
    })
});

map.addLayers([wms, stops]);

I achieve 2 by identifying that the selected feature is a cluster inside onFeatureSelect(event)

if (feature.cluster) {

and proceeding to extract the name of each clustered placemark.

for (var i = 0; i < feature.attributes.count; i++) {
    var feat = feature.cluster[i];
    var featId = feature.cluster[i].id;
    var featName = feat.attributes.name;

3 is obtained by creating a JavaScript hyperlink for each clustered placemark

    content += "
"+featName+"";
}

after clicking on link, 4 is obtained by calling

function popupClear() {
    //alert('number of popups '+map.popups.length);
    while( map.popups.length ) {
         map.removePopup(map.popups[0]);
    }
}

Which produces Jecabitiba

Which is a JavaScript call to  onFeatureSelectFeature('OpenLayers_Feature_Vector_58');

function onFeatureSelectFeature(featId) {
    var layerNow = map.getLayersByName('Paradas')[0];
    var layerFeatCount = layerNow.features.length;
    //alert ("featId: "+featId+"\r\nlayer name:"+layerNow.name+"\r\nlayerFeatCount:"+layerFeatCount);
    for(var i=0; i<layerFeatCount; i++){
          if(layerNow.features[i].id == featId){

I'm stuck on 5 because I can't find the clustered feature in the layer feature list.

Any suggestions?


texts:
I am attempting to add a feature to an existing feature layer hosted on the ArcGIS for developers website. However, when I attempt to apply edits to the map, it does not ever actually add it, and when I print out the ID it is -10. Here is my initialization:

gFST = new GeodatabaseFeatureServiceTable(mFeatureServiceURL, 0);
mFeatl = new FeatureLayer(gFST);
mMapView.addLayer(mFeatl);

When I click an addNew button, it calls this code:

Point point = mMapView.getLocationDisplayManager().getPoint();
GeodatabaseFeature gFeat = new GeodatabaseFeature(atts, point, gFST);
long fid = gFST.addFeature(gFeat);
Log.e(TAG, "ADDED fid: " + fid + " and string: " + gFST.getFeature(fid).toString());
gFST.applyEdits(new CallbackListener<List<GeodatabaseEditError>>() {
                @Override
                public void onCallback(List<GeodatabaseEditError> geodatabaseEditErrors) {
                    Log.e(TAG, "In callback, successfull");
                }

                @Override
                public void onError(Throwable throwable) {
                    Log.e(TAG, "CALLBACK error after applying edits");
                }

The log message that prints out is:

dummy_test.MainActivity﹕ ADDED fid: -10 and string: GeodatabaseFeature [geometry=Point [m_attributes=[-9676958.5842, 4933326.738700001], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85], attributes={CONDITION=null, GlobalID={5B1244C6-1DA8-49EC-B568-476DB9C1DBBD}, HEIGHT=null, OBJECTID=-10, TREETYPE=maple}, table=GeodatabaseFeatureTable [Name=ArAGATS.XXX.XXX, ID=0, geodatabase=Geodatabase [gdbPath=/data/data/com.example.XXX.dummy_test/cache/GeodatabaseTempFolder/FeatureServiceTable-1586046028.geodatabase]], oid=-10]

It doesnt seem like the ID should be negative, and when I run this both the onCallback and onError functions are called, and the feature does not appear to be added to the map. Has anyone experienced something like this or see any glaring errors in what I'm doing?

EDIT: Additionally, none of the features from the online feature layer are showing up on my map. although from printouts I have it appears to be connecting to the url and creating a local geodatabase.


texts:
The issue I am experencing is that I have an advanced polygon (buffered lines that were then merged into a multipolygon and then split into single parts) that I can not use the split tool on.

In the polygon below, when I attempt to use the 'split into multiple features' tool it does not perform any splitting action.  'Split Parts' tool also does seem to work on this polygon as well.

The end goal is to have each line separated - ideally each as their own polygon.

Current State

Desired polygon splits


texts: Convert GeoJSON polygon to point before rendering in Leaflet Map

texts:
I have a GeoJSON dataset which has points and polygons. I have a simple Leaflet code which reads them into a map, like this:

var MyLayer = new L.GeoJSON.AJAX("/UrbanSyntax/Desarrollo/twitter/data/boxtest.json", {

pointToLayer: function(feature, latlng) {
return new L.CircleMarker(latlng, {
  radius: 3,
  fillOpacity: 0.75,
  color: getColor(feature.properties.created_at)
});
},
onEachFeature: function(feature, layer) {
layer.bindPopup(
feature.properties.created_at + '
'
+ feature.geometry.coordinates + '
'
+ feature.properties.user  )
}
});

Most of the data are polygons, but I need to translate them to points (the polygon center) to simplify the map. I don't want to change the original GeoJSON when it's parsed since those polygons might be needed later.

I don't know where to "inject" code to read the polygon bounds, calculate a center and send a latlng to make a circlemarker. As it is now, the code reads the points and polygons in the json ok, but there are too many polygons in the data so the browser freezes. It works all right when I filter out the polys from the JSON and just map the points. I'm running out of ideas, and Leaflet documentation is so scarce in the JSON chapter... I just need a way to put an if in the pointToLayer code, separate the points from the polys, and map them all as points.

Any ideas?


texts: ArcGIS javascript: objectid in url - point features

texts:
I want to display objectid information in url link according to this sample for my point feature layer. I´m able to use this sample for my polygon layers, but not for points. My adapted function:

//when users click on the map select the parcel using the map point and update the url parameter
    map.on("click", function (e) {
        alert("test");
      var query = new Query();
      query.geometry = e.screenPoint;
      var deferred = parcels.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (selection) {
          alert("test01");
        //update the url param if a parcel was located
          if (selection.length > 0) {
              alert("test1");
            var parcelid = selection[0].attributes["OBJECTID"];
          //Refresh the URL with the currently selected parcel
            if (typeof history.pushState !== "undefined") {
                alert("test2");
              window.history.pushState(null, null, "?parcelid=" + selection[0].attributes.OBJECTID);
          }
        }
      });
      map.infoWindow.setFeatures([deferred]);
      map.infoWindow.show(e.screenPoint);
    });

Console error: Cannot read property '_getInfo' of undefined

Popup is displayed both for polygons and points.

Can someone explain me why I can use polygon layers but not point layer ?


texts: Can you check if a gps coordinate is inside a gps polygon in R?

texts:
I'm trying to determine if a specific gps coordinate is within a gps spatial polygon.

My gps coordinate is being outputted from the geocode function from the ggmap library and the spatial polygons are being read from a GeoJSON file using readOGR.

So far I've found pieces of what I'm looking for in the sp and maptools library but no specific functions...any suggestions ?


texts:
When i try to compose a workflow im confused to the funcionality of that.

I want to create a workflow to execute commands gdal. what syntax I can use if I wanted to create a .bat file?

For example when i try to use this :

FOR /F %%i IN ('DIR "C:\FOLDER\*shp."') DO (
    SET infile =%%i
    SET outfile=!infile:.shp=.tif!
    gdal_rasterize -a x4031 -ts 1024 1024 -l %FOLDER%!infile! %FOLDER%!outfile!
)

I get some errors. (%%i was unexpected at this time)
 Whats the correct syntax?


texts: Measuring positional accuracy of points in QGIS?

texts:
I am looking for an approach to calculate and assess the positional accuracy of POIs in QGIS.

I have two layers that show the locations of supermarkets:

One is from a commercial database and the other is made by hand based on the addresses given on the websites, I want to see how accurate the commercial data are in the relation to the hand-made as reference data.

How can I measure positional accuracy of points in QGIS?


texts: Obtaining attribute data at given GPS coordinates?

texts:
I have a csv file containing information at given lat and lon GPS coordinates, as well as a shapefile containing, among other things, annual average daily traffic (AADT) values along stretches of road in NYC (TDV_Shapefile_AADT_2015.zip from https://www.dot.ny.gov/tdv).

What I'd like to do is create a bridge to map each GPS coordinate in my csv file to the closest AADT value in my shapefile.

Is this possible in QGIS3?

I'm a total GIS beginner.

What I've been able to do so far is upload a sample of my data as a layer onto my shapefile. What I need to do now is obtain match each point with the closest AADT value.

NYDOT has an online tool here using the data from the shapefile I'm using. If you zoom in, especially in NYC, you can see most streets have a color and a value. What I want is to get that value for each point in my csv.


texts: Visualize polygon above the image of EVI index in R

texts:
I have MODIS images for the EVII index, with a polygon shapefile for specific areas in my area :

files MODISEVI

MODISEVI

all polygons

polygon

The images of NDVI and the polygons have the same projection:

> proj4string(data.shape)
[1] "+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
>
> proj4string(r)
[1] "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

My problem is that I can't overlay my polygon on my NDVI images.

I tried this script but did not work:

library(raster)
library(rgdal)
library(tiff)

r <- raster("D:/Rteledetection/Pivots/MODIS/MOD13Q1.006__250m_16_days_EVI_doy2000209_aid0001.tif")
str_name <- "MOD13Q1.006__250m_16_days_EVI_doy2000209_aid0001.tif"
imported_raster <- raster(str_name)
plot(r)

# importer les fichiers shapefil
data.shape <- readOGR(dsn = "D:/Rteledetection/Pivots/", layer = "2001")
plot(data.shape, border = "red")

# vector-raster
plot(r)
plot(data.shape, col = "red", border = "black", add = TRUE)

I would like to know how I can visualize my polygon above the image?

I have already visualized my image and the polygons above on the image in QGIS and it works but I have to zoom on the polygons to visualize them well, the thing that does not exist can not be on R.

@BrunoConteLeite I tried your suggestion and it works,  but i have another question.  Do I have to load the new line for projection every time?
- another question is that when I tried your script to zoom on the limit of the polygon it gives me results like :

that, even if for the 1st polygon when I zoom it goes beyond the limits:

For  my objective I must extract the spectral profiles inside my polygon , but I do not know if I will have to delimit the area where are the polygons or just zoom before extract the spectral profiles?


texts: Displaying polyline shape with height in its profile?

texts:
Is there a way in QGIS itself or over a plugin to display a polyline shape with heights in its table from a sideview, as in a profile?

I'm talking about QGIS in the version 2.14 and I have simple polyline shapes, which display waste-water and rainwater channel systems.

Every single line has a starting point and end point, and every line feature has a column for the hight at the start and a column for the height at the end point.

I'm thinking about a way to display selected lines in its profile, so you can see the channel from a sideview.

I tried installing a plugin called QGEP that I found by the reference of this picture:

but this plugin is still experimental and is not working unless I install a demo project and backup a specific folder over a server based program.

Maybe not even understood all of what I have to do, but this plugin seems to go in the right direction with what I can see from the picture.


texts: QGIS tools fail with spaces in output file names

texts:
When I use tools in QGIS they generally work. However, when I use them in batch mode, they generally fail.

The difference is that running once I can save results as a temporary file, but in batch mode I save results to disk, and all my project folder paths have spaces.

I've tested, and the tools I have problems with work fine saving to C:\temp or D:\temp, but as soon as a space appears in the file name or path, they fail.

As an example, the SAGA Raster Difference tool works fine running manually saving to a temporary file. When I run the tool in batch mode with the same inputs, I get the following log output:

Converting outputs
Loading resulting layers

The following layers were not correctly generated.    <<--- ERROR MESSAGE
Difference (A - B)
You can check the log messages to find more information about the execution of the algorithm

Algorithm Raster difference correctly executed...

I've tried adding " or ' around the output file path, but neither has worked. Is there a way to utilise paths with spaces?

(running QGIS 2.18 on Windows 7)


texts: Intersection - shapefile with 1000's of overlapping polygons

texts:
I am using ArcGIS Pro.

I have two shapefiles, one being a single USA county outline (1 polygon) and another with 1000s of polygons representing wildfire shapes for an entire USA state. When I run an Intersect, it seems to create the correct looking shapefile but when I dig into the attribute table, there is lots of weird data. I want to retain the information of the wildfires within the county area and for fires that are only partly in the county, I want to know about them and the area that overlaps.


texts: Opening .apr file in ArcGIS for Desktop?

texts: I have a bunch of old .apr files, just wondering if it is possible to open in ArcView 10.3.1?


texts: Multiple pages with different in QGIS print composer / layouts?

texts: Is it possible to make multiple pages with different size in qgis print composer?. so that when i want to print different maps in qgis i will just do it in one print composer.


texts: Where to license non-automotive POIs for France, Spain and Portugal?

texts: qualified POIs are needed for a commercial project - should cover broad out-of-car usecases (not needed: parking, gas stations). Could be commercially licensable data or derived from national geodata portals and INSPIRE related initiatives. Or something completely different.


texts: Can I created a DEM or digital surface model with high resolution image

texts:
I have VHR imagery, 5 cm pixel, and I want to create a DEM but this image has high trees and when I take my model I cant take a real elevation because DEM is not the height of the terrain.

Could I eliminate this effect?


texts: Joining points with nearest polygon using QGIS

texts:
I have a points layer and polygons layer with attributes I want to join for each point. Not all points are exactly within a polygon, so I'm looking for a way to join attributes based on nearest polygon (so that if a point is located within a polygon it will just get its attributes).
I've tried using the NNJoin plugin, but I've noticed that for lots of points that are located within a polygon, it will joing attributes of a different polygon.


texts: Snapping polygons edges within the same shapefile

texts: How can I snap polygons edges within the same shapefile? The objective is to get rid off blank spaces between polygons edges.


texts:
I am trying to build a unique value renderer using ArcObjects .NET.  All the samples that I have seen use the attribute table to build the UniqueValueRenderer.  However, my raster does not have an attribute table and when I try to build the attribute table I get the following exception "Can't build VAT for multiband or floating-point raster dataset".

Currently my renderer is defaulting to stretched.  When I look at it in ArcMap - Properties - Symbology it is set to stretched (this is what we default rasters to in our code if there is not an attribute table).

In ArcMap, I can click on Unique Values under Properties - Symbology.  A message box pops up stating "Unique values do not exist.  Do you want to compute unique values?"  If I click yes, then  my unique floating point values are there.

How can I programmatically define these unique values and set this is as the default symbology / renderer for my floating point raster?


texts:
I have created several TINs in ArcGIS and want to do further calculations on them in QGIS. For every TIN I have a folder with some .adf-files and one metadata.xml file.

If I drag and drop the folder or single files, QGIS does not recognize the data. The same happens if I go via Layer-->Add Layer.

How do I import TINs in QGIS 3.4 or 3.10?