texts: if/then with VBScript in ArcGIS Field Calculator giving Error 000539: SyntaxError: invalid syntax?

texts:
What is wrong with this VBscript in the field calculator?

ColumnC=

if [ColumnB] > 0 then
    [ColumnC] = [ColumnA] / [ColumnB]
endif

Each time I receive this syntax error message:

  Error 000539: SyntaxError: invalid syntax (expression, line 1) Failed
  to execute

All 3 columns are the double field type, although they vary in precision and scale. I have tried converting the columns to float type and doing the same expression. I received the same error messages.

For the first line (starting with 'if'), the script is left-justified. For the second line (starting with '[ColumnC]) I included four spaces before the script. In the codeblock on the field calculator the equation does extend into the third line (and is left justified) simply because the actual name I use for !ColumnB! is longer.


texts:
I'd like to share WMS-WMTS links via GeoServer to the users; by using username and password system for accessing the layers with ArcGIS/QGIS and I'm having problem with the database connection to GeoServer right now.

So should I create user table with database and connect it directly to GeoServer with JDBC user group service ?

or am I able to make it in GeoServer's own website?

or is there any other solution for the encrypting?


texts: Measure shortest distance between all points in a layer and a polygon's border line

texts:
How do I measure the distance between all points in a vector layer and a polygon (not to the polygon centroid, but to it's border line)?
In the image points are fires and the polygon is a National Park. I need to measure how far is each fire from the park's border.


texts: Optimize ArcGIS Feature Service Layer display in QGIS

texts:
I am using a set of ArcGIS Feature Server layers in QGIS.  I use QGIS to query the data in these layers and to symbolize the layers for export to print.  In the past I had accomplished these tasks by downloading the data and accessing it from a local server.  Now I would like to do as much as possible using the web ArcGIS Feature Server layers to stay up to date with periodic updates from the data provider.  I have reviewed this question and this question, but would like to ask for a more specific answer.
What steps can be taken to improve rendering performance of ArcGIS Feature Server in QGIS 3.10.12.?
So far I have been changing the scale dependent visibility so that QGIS isn't constantly trying to render all of the layers at inappropriate scales.  Are there other settings that can be manipulated to increased rendering performance? Would rendering performance be increased if the QGIS project is in the same projection as the Feature Server data?


texts: Problems aligning layers digitized from Google earth into ArcMaps10

texts:
I'm a PhD student new to ArcGIS.

I'm digitizing features from Google Earth to use in ArcGIS (I work in India, where the mapping in GIS is at best scanty). I drew along a river in Google Earth, saved the line as a .kml file and then used the 'from KML' feature in ArcMaps10 to convert to a layer file. It worked, except my line is about 270m north of where it is meant to be. I tried downloading some python scripts from the ESRI website to convert .kml to .shp  - they load fine into ArcToolbox but then won't run my .kml files, citing bad magic numbers. I also tried using an online converter which still left the line north of where it is meant to be.

All my inherited raster and vector files for the area should be in GCS_WGS_1984 as they were either in this format or I've converted them. I've also added XY data I took using a GPS and converted from DD.MM.MMMM to DD.DDDD which is all correctly aligned with the raster and vector files. The .kml file I converted to a layer file says it has the same coordinate system and datum (D_WGS_1984). I'm banging my head against a brick wall trying to see where the problem is!

Any suggestions would be immensely valuable.


texts:
Given an area with depressions in open area from; say all terrain vehicles driving on soft surface. The vehicles will cause parallel depressions (paths) of about 10-20 centimeters in depth and around 15-30 cms in width, with lengths varying with the robustness of the surface.

Which remote sensing platforms would be relevant for later analysis? Quickbird, smaller drones, lidar, aerial photography?
Are there any available procedures in tools (FME/QGIS/ESRI/other)
which can be used to document the paths?

Let us for the sake of simplifying this question assume that we positively know that there are no other paths in the area, or that they have been filtered out of the imagery.

Full automation is not necessary, and probably not even possible.

This is an example of what tracks would look like.


texts: Use only points within a polygon for heat map in ArcMap?

texts:
I'm trying to make a point density heat map where the calculation for each cell considers only points inside a containing polygon and ignores those falling outside it (mainly because the outside points are across a river or bay).

I figured out how to use Processing Extent and Raster Analysis to limit the heat map to the extent of the polygon in question, but it's still computing density for each cell based on outside points.

Is there a way to do this (ignore those points), short creating a new shapefile with points only within the polygon in question and then feeding that in as "Input point features" for the point density analysis?  I'm a novice user, so maybe missing something obvious...

(I need to use a radius size larger than the distance across the river, so decreasing that won't work.)

I am using ArcMap 10.3.1.


texts: I am building QGIS 2.6.1 from source code on windows 7, 32 bit and after successfully building all projects I get this error

texts:
Couldn't load PyQGIS.

Python support will be disabled.

  Traceback (most recent call last):
    File "", line 1, in
  ImportError: No module named qgis.core

Python version:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

QGIS version:
2.6.1-Brighton 'Brighton', exported

Python path:
['C:/OSGeo4W/./python', u'C:/Users/Awet/.qgis2/python', u'C:/Users/Awet/.qgis2/python/plugins', 'C:/OSGeo4W/./python/plugins', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL',


texts: QGIS - Map Tips - Using CASE WHEN to determine image name

texts:
I'm a new user to GIS and am learning as I go.  I'm using QGIS 3.2 on a MacBook Pro.  I have a delimited text layer with a number of points for which I've set up Map Tips.  I want information to come up for each point including a hyperlinked image.  The images are pictures of samples taken.  The image file could be named in either of two formats, depending on whether or not the sample was sent off for assay.  If it was, the point will have a "Tag_Num" and the image will be named with that Tag Number.  If it was not, the image will be named for the "Sample_Name", and "Tag_Num" will be NULL.  "Tag_Num" and "Sample_Name" are fields in the attribute table, to be clear.  The path is the same for all images.

I've tried a couple different ways of doing this, neither works.  Here's what I've tried...

[% "Sample Name" %]

Date: [% "Date" %]

Tag Number: [% "Tag_Num" %]

Disposition: [% "Disposition" %]

Location: [% "Latitude" %], [% "Longitude" %]

Sample Type: [% "Sample Type" %]

Location Description: [% "Loc_Desc" %]

Sample Description: [% "Sample_Desc" %]

Sample Photo:

[% CASE WHEN "Tag_Num" IS NOT NULL THEN '' ELSE '' END CASE %]

Using that route, I get this output in the map tips window:

VC18JW036

Date: 08/28/2018

Tag Number: M123456

Disposition: blah

Location: xx.xxxxx, -xxx.xxxxx

Sample Type: bleh

Location Description: blah blah

Sample Description: blah blah blah

Sample Photo:
[% CASE WHEN "Tag_Num" IS NOT NULL THEN '' ELSE '' END CASE %]

For whatever reason, the "[% CASE WHEN..." all comes across as text.  It does load and properly hyperlink the image(s) if they exist, but it tries to load both.  It will just be the empty image frame if the image file does not exist.

I also tried it this way...

This way, I get a single blank image frame as though the image is nonexistent, but I do not see any of the "[% case when..." arguments coming over as text...

As I said, I'm new to this, so I'm guessing it's a syntax error, I'm just typing something in a way I'm not supposed to.  Or perhaps I cannot nest [% [% %] %] those, or am erring in the way I nest my quotation marks?


texts: Cannot Convert Polylines to Polygons with Curves to JSON

texts:
I am getting this specific error and the following technical article solution does not work, any suggestions?

  The local edits were not synchronized to the server.

  Cannot convert polylines or polygons with curves to JSON format

  http://support.esri.com/fr/knowledgebase/techarticles/detail/43902/print
  I got the following error, but the solution from the technical artical did not work - any suggestions?

  Cannot convert polylines or polygons with curves to JSON format

  Article ID: 43902

  Error Message Attempting to synchronize local edits containing
  true curves from ArcMap to ArcGIS Online displays the following error
  message: “The local edits were not synchronized to the server. Cannot
  convert polylines or polygons with curves to JSON format.”
  Cause
  This is a known limitation. The error occurs if the edits contain true
  curves; a true curve is a curve that only has two vertices as
  endpoints. Currently, ArcGIS Online does not support true curves
  created in the geometry of lines and polygons. Solution or Workaround

  In ArcMap, create a local copy of the feature service for editing.
  Export the feature service as a shapefile, and save the shapefile to the desired location.
  Select and delete all features in the local copy of the feature service.
  Copy and paste the features from the shapefile into the local copy.
  Save the edits, and sync the edits to the server. Related Information ArcGIS Help: Making a local copy of a feature class for
  editing Created: 1/14/2015 Last Modified: 3/3/2015


texts: Using OpenCV function in PyQGIS - Module not found

texts:
I would like to write a code using the OpenCV function cv2.bitwise_and, and run it in the Python console on QGIS. To do so, I start my code with import cv2. QGIS is returning the following error : ModuleNotFoundError: No module named 'cv2'.

To install OpenCV, I followed this tutorial: How to install Python 3 and Opencv 4 on Windows.

The version of Python I install is the 3.6.8, and for OpenCV it is the 4.2.0. When I use the cmd, I can see that OpenCV is correctly install (+ when I run import cv2 in IDLE, it is working, and so is the function).

I have QGIS 3.10.2, and Windows 10. Does anyone knows what is wrong with my installation? Why can't I use OpenCV in QGIS?


texts: How to set pen width of rivers based on scalerank attribute (QGis 2.2)?

texts:
I have a Vectorlayer from NaturalEarth.com with riverdata that includes "scalerank" information. Now I want to display these with different pen width  based on their scalerank, like this:

scalerank 1 = 0,5 mm pen width

scalerank 2 = 0,3 mm

and so on.

I guess you do this in the Layer Properties. I selected the "Simple Line" and opened the "data defined properties". Here I selected "pen width" to the left, under "field" i selected "scalerank" and then I don´t know how to build the expression. Were my steps even correct up to this point? It would be really great if someone could describe in detail how I would proceed or point me towards a simple guide for beginners.
I already read through the "Symbology" and "Classification" Chapter of the Training manual but they focus on the fill element there :(


texts: Giving Projection for more than one .png format at same time using ArcGIS Desktop?

texts:
I want to give a projection for multiple PNG files at the same time i.e. not one by one.

Is there a tool for this or can we give a projection to that folder?


texts: Project file read error: Unexpected end of file at line 9957 column 1

texts:
On reading the answers from a similar question earlier i still cannot retrieve my project.

I last used this project in June and obviously something went wrong when saving or creating the new layer that i did. I tried to restore is to a previous state and there doesn't appear to be one even after refreshing.

I now try to open the QGIS file and i get "project file read error: unexpected end of file at line 9957 column 1 for file"

I ended up creating a new QGIS project and copying the SHP files over, discarding the layer that i played with before!


texts: Add value in attribute field using arcpy

texts: I need to add values to an existing field in the attribute table. The values are to be determined by values in another field in the same attribute table. I am unable to define the values in another field in the script. Can anyone help me with it?


texts: Working out travel time from gdistance's conductance values in R?

texts:
Introduction
This question is indirectly related to a previous post of mine (Calculating accumulated walking pace from starting location outwards using R?), but asks guidance about a different aspect, that's why I am creating a new post.
I have put togheter some doce (below) to provide a reproducible example.
Aim
Calculating cumulative cost-surface expressing walking time from a given location outwards.
Background
I have followed the code provided by this source (https://mran.microsoft.com/snapshot/2014-11-17/web/packages/gdistance/vignettes/gdistance.pdf) to calculate an accumulated cost surface from a location outwards, using the 'gdistance' package. The cost surface has to represent walking time according to the Tobler's hiking function (https://en.wikipedia.org/wiki/Tobler%27s_hiking_function).
## EXAMPLE ##

library(gdistance)

# create the data to work with
dtm <- raster(system.file("external/maungawhau.grd", package="gdistance"))
A <- c(2667670,6479000)

# define the Tobler's function, re-expressed not in Kmh but in meters per hour
tobler.mperh <- function(x){ (6 * exp(-3.5 * abs(x + 0.05))) * 1000 }

altDiff <- function(x){x[2] - x[1]}
hd <- transition(dtm, altDiff, 8, symm=FALSE)
slope <- geoCorrection(hd,scl=FALSE)

adj <- adjacent(x=dtm, cells=1:ncell(dtm), direction=8)
speed <- slope
speed[adj] <- tobler.mperh(slope[adj]) #this should be speed in m/h

#sanity check for speed:
plot(raster(speed)) #flat areas should feature around 5000 m/h

#geocorrection divides speed by distance (i.e., cells' centers)
conduct <- geoCorrection(speed, scl=FALSE) # conductance = speed/distance = 1/travel time
plot(raster(conduct))

cost_surface <- accCost(conduct, A)
plot(cost_surface)      # = 1/travel time

Workflow followed
The abovementioned PDF was implementing Tobler's function not to create an accumulated cost surface but to calculate shortest path. With reference to the code above, I am rather confused about how to work out travel time from the last result of the code, i.e. the accumulated cost surface.
In other words:
all seems fine till the calculation of the speed (meters per hour) data (see code flagged by #sanity check for speed). The speed raster I got (see below) seems to make sense, since flat areas feature a speed of about 5000 m/h (i.e., 5 Kmh) as predicted by the Tobler's function.

The above is confirmed by the following chart of speed vs slope:

The subsequent operation that uses geocorrection divide the speed (m/h) by the distance (i.e., distance between cell's center), so producing what is called conductance. The latter (according to the abovementioned PDF) is equal to 1/travel time.
The accumulated conductance looks like the image below (see plot(cost_surface)      # = 1/travel time):

Issue
In an attempt to devise the travel time (tv), I simple calculated the reciprocal of the accumulated cost, the latter being based on the conductance data. But taking the inverse produces a raster that seems to make no sense:
tv <-cost_surface
values(tv) <- 1/values(cost_surface)

Question:
Is the issue caused by including 0 values into the calculation of the reciprocal?


texts: Converting 12-hour time to 24-hour time in QGIS

texts:
I have a data set with hours such as 8am to 6pm.
I would like to convert this from 12 hour clock format into 24 hour clock format.
So instead of "8am to 6pm" I would want "08:00-18:00"
Does anyone know how to do this in QGIS, using Field Calculator or using a script with Python?

I would be very thankful if someone could help me with this.


texts:
I recently started the geodjango tutorial from the django documentation, but I'm currently stuck because I keep getting a DoesNotExist: WorldBorder matching query does not exist error when I run WorldBorder.objects.get(mpoly__intersects=pnt) in the shell.
This is my models.py file
from django.contrib.gis.db import models
class WorldBorder(models.Model):
    # Regular Django fields corresponding to the attributes in the world borders shapefile.
    name = models.CharField(max_length=50)
    area = models.IntegerField()
    pop2005 = models.IntegerField('Population 2005')
    fips = models.CharField('FIPS Code', max_length=2, null=True)
    iso2 = models.CharField('2 Digit ISO', max_length=2)
    iso3 = models.CharField('3 Digit ISO', max_length=3)
    un = models.IntegerField('United Nations Code')
    region = models.IntegerField('Region Code')
    subregion = models.IntegerField('Sub-Region Code')
    lon = models.FloatField()
    lat = models.FloatField()

    # GeoDjango-specific: a geometry field (MultiPolygonField)
    mpoly = models.MultiPolygonField()

    # Returns the string representation of the model.
    def __str__(self):
        return self.name

I don't know if the error is from the world borders zip file I downloaded (but that was the file from the official django tutorial) and I've been getting data from importing DataSource but this time around it is not working. I've been stuck on this for a while now.
NB: There was a part in the tutorial where I was supposed to run this
from pathlib import Path import world world_shp = Path(world.__file__).resolve().parent / 'data' / 'TM_WORLD_BORDERS-0.3.shp'in django shell but I was getting a WindowsPath not subscriptable error. And since I did not know what to do I just skipped it, so is it possible that that might be the reason for this?


texts:
With a Python script, I want to split a vector layer by attributes. For each unique value of a define field, I want to create a new layer with a name that contains this attribute in camelCase and with features concerned. I divide my logic in three steps :

Iterate throught my source layer to find every unique value of my field of interest (city_code).
Create each necessary new layer, with the good name (city_name in camelCase).
Insert values in this respectives layers.

OGR give me good results for steps 1 and 2, but I can't achieve step 3. I can't iterate a second time in my features and insert values in corresponding layers I've created in step 2. Maybe my logic is wrong.

Documentation says "You must call ResetReading if you want to start iterating over the layer again.", perfect for my purpose but I'm not able to apply this.

What the best way to split a vector layer by attributes with OGR ?

Data (parcel.shp)

id | city_name | city_code
--------------------------
1  | New-York  | 001
2  | New-York  | 001
3  | New-York  | 001
4  | Toronto   | 002
5  | Toronto   | 002
6  | Toronto   | 002
7  | Seattle   | 003
8  | Seattle   | 003
9  | Seattle   | 003

Script

from osgeo import ogr
from collections import OrderedDict

# Input
file = r"parcel"
inputFolder = r"C:/Users/me/myFolder/"
outputFolder = r"C:/Users/me/myFolder/shapes/"

# Layer
extension = r".shp"
inputFile = inputFolder + file + extension
driver = ogr.GetDriverByName('ESRI Shapefile')
dataSource = driver.Open(inputFile)
layer = dataSource.GetLayer()
spatialReference = layer.GetSpatialRef()

# Step 1

# List by attributes
listeCityCode = []
for feat in layer:
    cityCode = feat.GetField("city_code")
    listeCityCode.append(cityCode)

listeCityCodeUnique = set(listeCityCode)
listeCityCodeUniqueOrdered = list(OrderedDict.fromkeys(listeCityCodeUnique))

# Selection by city_code
index = 0
for i in listeCityCodeUniqueOrdered:
    sql = f'SELECT * FROM {file} WHERE city_code LIKE \'{listeCityCodeUniqueOrdered[index]}\''
    index += 1
    layerQuery = dataSource.ExecuteSQL(sql)

    # Get fields
    for feature in layerQuery :
        id = feature.GetField("id")
        city_name = feature.GetField("city_name")
        city_code = feature.GetField("city_code")
        geom = feature.GetGeometryRef()

    # City name in camelCase
    c0 = str(city_name)
    c1 = c0.replace("-"," ")
    c2 = c1.title()
    city_name_camelCase = c2.replace(" ","")

    # Step 2

    # Create a layer by city name
    newDataSource = driver.CreateDataSource(r"{}parcel_{}_{}.shp".format(outputFolder, city_code, city_name_camelCase))
    newLayer = newDataSource.CreateLayer("parcel_{}_{}".format(city_code, city_name_camelCase), spatialReference, ogr.wkbPolygon)

    # Create fields
    newLayer.CreateField(ogr.FieldDefn("id", ogr.OFTInteger))
    field_city_name = ogr.FieldDefn("city_name", ogr.OFTString)
    field_city_name.SetWidth(50)
    newLayer.CreateField(field_city_name)
    field_city_code = ogr.FieldDefn("city_code", ogr.OFTString)
    field_city_code.SetWidth(10)
    newLayer.CreateField(field_city_code)

    # Step 3

    for feature in layerQuery:

        newFeature = ogr.Feature(newLayer.GetLayerDefn())

        newFeature.SetField("id", id)
        newFeature.SetField("city_name", city_name)
        newFeature.SetField("city_code", code_code)
        newFeature.SetGeometry(geom)

        newLayer.CreateFeature(newFeature)

        del newDataSource, newLayer


texts: Is it possible to extract the depth of an inland lake from a DTM or DSM? Is it recorded or just the surface elevation of the water?


texts:
In our project we do a GetFeature request to a WFS service. This service returns some GML. To parse this GML, we are playing with the GML parser of OpenLayers. This is working as long the GML isn't 'complex'. It isn't returning everything.

This is how a GML object looks like:

<gml:featureMember>
  <mag:keywords gml:id="TopografischElement_Trefwoord.fid--255d1722_146cd32a493_b9c">
    <mag:keywordid>1</mag:keywordid>
    <mag:keyword>Vlees</mag:keyword>
    <mag:keywordtopografischelement>
      <mag:keywordtopolink gml:id="1">
         <mag:keywordid>1</mag:keywordid>
         <mag:topografischelementid>4</mag:topografischelementid>
         <mag:typologie1>Wegennet</mag:typologie1>
         <mag:typologie2>Straat</mag:typologie2>
         <mag:typology1>Road network</mag:typology1>
         <mag:typology2>Street</mag:typology2>
      </mag:keywordtopolink>
   </mag:keywordtopografischelement>
 </mag:keywords>
</gml:featureMember>

This the code we use to parse it:

var content = _this.format.read(data);

and _this.format is:

this.format = new OpenLayers.Format.GML();

So when looping through "content", each object has a data property. When looking that property, we can find the keywordid and keyword (in this example 1 and 'Vlees'). The problem is, I need the data below that, I need the mag:topografischelementid. How can I make it parse that data too, and not only the first 2 fields?


texts:
If I try to uninstall current version of License Manager (ver 9.3.1) I get the following message:

This a problem because now I can't install the new version of License Manager for ArcGIS 10. Do you know the solution?


texts: How do I save edits from an ArcMap editing session using VB.Net?

texts: I have figured out how to do a map save document, but I would also like to be able to save edits whether or not I am also saving the map document.


texts: ERROR 000728: Field Code does not exist in ModelBulider using iteration

texts:
The first join in the model is working, but after this the names of the fields are changing in the name of the Shape and a number . Therefore get the ERROR 000728.

So I like to ask you if there is a way to work with this chanced field names by knowing which field need to be the join field. I like to make this question clearer with the following table.

So I know my Input field at the second join has to be the field “de021l_g_2”. I think the 2 is always there perhaps I can work with this, but how?

What can I do to make clear which field is the join field in the model which has to get a scripttool? Do you have an idea?
By the way is the “Feature Classes Iterator” the right one to loop through a folder with shapes?

Is it generally possible to do this join with the Modelbulider? I really can not find a solution for the problem. It just couldn’t find the field from the input table but it is there and it is the same fieldtype than the join field. I think I need to write this model with python to get a scripttool out of it. Is this the way I have to go? Or are there opportunities with the ModelBulider?

The first steps of the model, why is the raster attribute table empty???

It is working with this code now:

import arcpy
import os
from arcpy import env

env.overwriteOutput = True
env.workspace = r"C:\Ju\Pr\urban_atlas_cities"
env.qualifiedFieldNames = False
#make a list with input cities as shapefiles.

fcList = arcpy.ListFeatureClasses()

for shpFile in fcList:
    shpFileName= os.path.splitext (shpFile) [0]
    print shpFileName # works
    # Process: Make Feature Layer
    arcpy.MakeFeatureLayer_management(env.workspace + "\\" + shpFile, "shpFile_ly")
    # join the city with the reclasstable
    jointable = r"C:\Ju\Pr\reclass.dbf"
    arcpy.AddJoin_management("shpFile_ly", "CODE", jointable, "joinCODE", "KEEP_ALL")
    # Process: Copy Features
    outFeatureClass = shpFileName + "_join.shp"
    arcpy.CopyFeatures_management("shpFile_ly", outFeatureClass)
    # Process: Polygon to Raster
    outraster = shpFileName + "_join.img"
    cellSize = 200
    arcpy.PolygonToRaster_conversion(outFeatureClass, "CODE", outraster, "CELL_CENTER", "NONE", cellSize)
    # Process: Make Raster Layer
    arcpy.MakeRasterLayer_management(outraster, "outraster_ly")#works
    # Process: Add Join
    arcpy.AddJoin_management("outraster_ly", "Value", jointable, "code", "KEEP_ALL")
# Process: Copy Raster
    outraster2 = shpFileName + "_join2.img"
    arcpy.CopyRaster_management("outraster_ly",outraster2) #works
# Process: Raster to Polygon
    outPolygons = shpFileName + "reclass.shp"
    arcpy.RasterToPolygon_conversion(outraster2, outPolygons, "NO_SIMPLIFY", "Value")#works


texts: Seeking automated techniques for cleaning bad data from GPS track log?

texts:
I have been having some problems with "bad trackpoints" in the track logs I've been creating, especially in bad signal conditions.  In some cases these obviously jump miles away from the true location; other times they are just as incorrect but resemble legitimate movement.

I've noticed that the worst of these errors tend to be limited to a specific unit at a specific time: other units will not show the same errors.  For example:

Below is a plot of three simultaneously recorded tracklogs from three different consumer GPS units (each unit has a different color, either red, green, or blue):

Here is the same plot with some the bad trackpoints highlighted.  You can see the red unit recorded a couple really bad points at one time, and at another time the blue unit recorded a whole series that resembles travel that did not actually occur.

I've been trying to manually remove this bad data using GPS Track Editor and manually selecting and deleting points that looked out of place, but that's a pain.  I've also started thinking of ways I could write programs to fix it, but I'm an amateur and I suspect this is a well studied problem (but I don't know where to look).

What are some automated techniques I can use for cleaning these bad trackpoints from my track logs?

Specifically, I'm hoping to find out about:

Techniques to reject a set of "bad points" from a single track log as "inconsistent" with the ones before or after (seems like that could catch the problem in the red track)
Techniques to cross-check two or more track logs of the same trip against each other (may fix the problem in the blue track)
Tools that implement the above


texts: Automatically locating endpoints (river sources) in a stream network

texts:
I have a stream network in ArcGIS 10.2.2 and I would like to know if it is possible to automatically add endpoints based on the stream network.

The network is pretty big and doing this manually would take too much time.


texts: Enabling all layers by default using Leaflet?

texts:
I am using leaflet maps to compare heat layer and marker layer.  I've an option to add multiple marker and heat layers dynamically. For me Heat layers are enabled by default as on when user adds new layer.  I face issue when user adds marker layer the layer is created and it is not enabled by default.  User needs to go and check the check box then it's getting enabled.

My question is,  How to enable marker layers by default as on when users adds a new layer.  Attached screen shots for better understanding of my question.


texts: Creating symbology by category in python?

texts:
I'm trying to create a python script that creates color-coded symbology by county for multiple maps with different data. I've never created a layer file for the purposes of symbology before, but I figured you simply had to save the layer. However, every time I run by script, no symbology is visible. Is there a way to automate symbology that I'm missing? Thanks!

    # Process: Add Join
    arcpy.AddJoin_management(Map_Lyr, "CNTYIDFP", selected_input, "FIPS", "KEEP_COMMON")

    #Process: Make Feature Layer
    arcpy.MakeFeatureLayer_management(Map_Lyr, lyr_again)

    #Process: Add Symbology
    arcpy.ApplySymbologyFromLayer_management(lyr_again, symbol_lyr)

    # Save to Layer File
    arcpy.SaveToLayerFile_management(lyr_again, Final_Product, "", "CURRENT")


texts: Is there any WMS/WFS to get soil data of US?

texts:
I am developing a QGIS script that requires Soil Data as Input. Without automation one can go to this link, upload Area of Interest Boundary, and download the data.

https://websoilsurvey.sc.egov.usda.gov/App/WebSoilSurvey.aspx

I have found these links as well and have tried to add these connections, but none of them is working.

https://sdmdataaccess.nrcs.usda.gov/WebServiceHelp.aspx

https://data.nal.usda.gov/dataset/soil-data-access-web-service/resource/b806fe02-041c-4902-9441-e3a042cb0227

What I want to do finally is to create an script/model that will clip the soil data for my area of Interest so that I can perform spatial analysis on it. The soil data should have Hydrologic Soil Group or Map Unit Symbol as one of the attribute.


texts: Create UTM NetCDF to be opened in ArcGIS Pro

texts:
I successfully created a NetCDF file in C++ and opened it in ArcGIS Pro using a coordinate system with longitude and latitude, the resulting .nc file looks like this:
dimensions:
    longitude = 601 ;
    latitude = 341 ;
    time = UNLIMITED ; // (17 currently)
variables:
    double longitude(longitude) ;
        longitude:units = "degrees_east" ;
        longitude:long_name = "longitude" ;
    double latitude(latitude) ;
        latitude:units = "degrees_north" ;
        latitude:long_name = "latitude" ;
    int time(time) ;
        time:units = "seconds since 1970-01-01 00:00:0.0" ;
        time:long_name = "time" ;
        time:calendar = "gregorian" ;
    float data(time, latitude, longitude) ;
//////////////data////////////

Now I wanted to create the same NetCDF file in UTM coordinate system but I can't seem to figure out how to put the values in the .nc file, I tried to simply put the UTM coordinates inside the latitude and longitude variables and setting both of them with the attributes found on this page but ArcGIS doesn't seem to detect the coordinates correctly.
Are UTM coordinates inside .nc files supported by ArcGIS? if so, can someone provide an example of how the .nc file is supposed to look (I can recreate the structure in my C++ program once I figure out how it's supposed to look and it's parameters)?


texts: QGIS: rotatable markers with offset from point

texts: Im wondering, if its possible (in QGIS), to set a rotatable marker with offset from point, like in my example below. Any suggestion?


texts: Arcsde and Oracle on same machine but while creating a Enterprise Geodatabase giving TNS Error

texts:
I have Installed Arcgis Desktop 10.2 and Oracle 11G and Arcsde 10.2 and oracle Client

When I am Creating a Enterprise Geodatabase it is giving me this error:

ORA-12154: TNS:could not resolve the connect identifier specified
No extended error.
Failed to execute (CreateEnterpriseGeodatabase).


texts: Is there a way to get the extent of a query and not each individual feature?

texts:
I'm using this solution to get the extent of a query.  It brings every feature geometry back to the client where I then calculate the extent of all the individual geometries.  Since these can be polyline and polygon features this is a very expensive process.  Is there a way to form the query so only the extent is returned?

    app.filter.on("zoom-to-features", () => {
    console.log("set map extent to include all annotations matching this criteria");
    all(common.GeoUtil
        .getFeatureLayers(app.map)
        .map(l => {
            var query = new EsriQuery();
            query.returnGeometry = true;
            query.outFields = [];
            query.where = where;
            return l.queryFeatures(query);
        })).then(results => {
            var features = <Array<{ features: Array<esri.Graphic> }>><any>results;
            var extents = features.map(result =>
                result.features
                    .map(f => common.GeoUtil.getExtent(f.geometry))
                    .reduce((a, b) => a ? a.union(b) : b, null));

            var extent = extents.reduce((a, b) => a ? b ? a.union(b) : a : b, null);
            extent && app.map.setExtent(extent);
        });

});


texts: How to add north arrow to map using ArcGIS silverlight API?

texts: I think it's a simple question but i don't answer it. I want to add North arrow in my webgis using silverlight API. How can I do it? Is there any sample code to add north arrow using silverlight api ?


texts: ImportError: No module named gdal qgis2.8.1

texts:
i am using QGIS 2.8.1 (32 bit) in windows 7).
I imported two DEMs and trying to merge (QGIS>Raster>Miscellaneous>Merge)them.
Unfortunately it gives me import error as below.

Traceback (most recent call last):
File "C:\PROGRA~1\QGISWI~1\bin\gdal_merge.py", line 37, in
import gdal
ImportError: No module named gdal

How do I fix this in windows 7 32 bit environment?


texts: Is there a workaround for 80+ layers in OpenLayers?

texts:
My Map web app reads client list from SQL server and for each client it draw points on a different layer so that the user could turn on and off that layer and see his entire customers.
Problem is that once I have around 80+ layer than popups are appearing below the layers.
Is there a workaround how I can show different features and turn them  on / off without screwing with the popups ?


texts: ArcGIS Engine BaseTool derived classes stops receiving OnKeyDown messages?

texts:
I have two BaseTool derived classes in a custom ArcGIS Engine application. Both tools do the same thing: start a INewBezierCurveFeedback on a first mouse click and then stop it and return the resulting polyline on a second mouse click. Both also have "Overrides Sub OnKeyDown" handlers to allow users to "cancel" the tool by pressing the Escape key.

Test Scenario:
Start with Tool #1, click on the map to start the line feedback and press the escape key and OnKeyDown gets fired, great! Do it again and get same result.

Problem:
Now select Tool #2, and repeat. I don't get the OnKeyDown message here. Go back to Tool #1 and not longer get it there either! I can also reverse this test, starting with Tool #2 and produce the same results.

What's going on here?


texts:
I think I've had it. I've been struggling to create polished scenes and flyover animations using the ESRI tools. SketchUp is great but it does not handle large datasets and most 3rd party models (3D DXF, COLLADA) do not retain spatial reference when imported into SketchUp.

I've been able to build fairly large scenes in SketchUp in the past after I prepared my GIS data in ArcGIS 9.x and then used the Sketchup Plugin to export my features. Adding new features was very easy simply export them to SketchUp then copy the model from a new SketchUp project and paste into place in my primary model.  This is no longer possible in ArcGIS 10 and the "Collada" method; files exported from ArcGIS are centered at 0,0,0 when opened in SketchUp. The existing "ESRI" workflow seems to be designed only around improving the 3D characteristics of simple extruded multipatch features in SketchUp but the ArcGIS --> SketchUp workflow via the legacy Google plugin has been obliterated.

I am not looking for a freeware but rather a solid, polished software that is capable of producing large 3D scenes from GIS data. My budget is up to $8,000 or less.

What are alternatives are there?  I have fairly large datasets; Usually LiDAR surface and my scenes need to be very large and detailed so this software needs to handle large datasets and also need to be able to retain spatial reference in files imported from 3D DXF, Collada, etc.


texts:
As I know, GPS gives accurate data for everyone.

I've heard GLONASS have two types of data.

High precision data available only for the Military.
Low precision data for civilians.

İs there an visible difference, is it similar to the Selective Availability protocols from pre 2000?


texts: Coordinates with leading zeros ignored in QGIS

texts:
I am using Irish national Grid (EPSG: 29902) with X and Y coordinates. Some coordinates start with leading '0's. Example: X= 081800 Y=339700. When imported in to QGIS, the leading zero of the coordinate is lost and the point is located in the wrong place. Example the X coordinate becomes: 81800 instead of 081800.
Options I have tried:

Importing as .txt to avoid missing zeros in .csv files
Editing the coordinates in the attributes table in QGIS (3.4) but
leading zeros disappear once put in.

What can I do to ensure leading zeros recognised and points plotted correctly?


texts: OpenLayers, adding all layers from a WMTS GetCapabilities response?

texts:
If I have a WMTS URL, is it possible to feed in the URL and have it automatically add all the layers onto my map instance?

Currently, I can replicate the demo, but only if I pass in options, etc. Unfortunately, these streams are going to be dynamic and I will only be given the URL.

https://openlayers.org/en/latest/examples/wmts-layer-from-capabilities.html


texts:
I'm trying to loop through a directory of shp files with an XTool Pro tool via arcpy. My script successfully performs the operation on the first shp file, but then fails on the rest with a 000584 error "Implementation of this Tool's Validate is invalid" Here is my script:

import arcpy, os
from arcpy import env
arcpy.env.workspace = r"C:\Data_State\MT\temp"
arcpy.AddToolbox("C:/Program Files (x86)/DataEast/XTools Pro/Toolbox/XTools Pro.tbx")
for fc in arcpy.ListFeatureClasses():
   arcpy.XToolsGP_AddXYZ_xtp(fc,"X longitude;Y latitude","CENTER","GEOGCS['GCS_WGS_1984',DATUM['D_WGS84',SPHEROID['WGS84',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]","NONE")

Does anyone know why the tool is unable to loop through the files?

Updated script and I'm still having the same issue

import arcpy, os
from arcpy import env
arcpy.env.workspace = r"C:\Data_State\MT\temp"
arcpy.AddToolbox("C:/Program Files (x86)/DataEast/XTools Pro/Toolbox/XTools Pro.tbx")
for fc in arcpy.ListFeatureClasses():
    if fc.endswith(".shp"):
        try:
            print(fc)
            arcpy.RepairGeometry_management(fc)
            print(fc + " Parcels Repaired")

        except:
            print(fc + " repair failed.")
for fc in arcpy.ListFeatureClasses():
    if fc.endswith(".shp")
        try:
            arcpy.XToolsGP_AddXYZ_xtp(fc,"X longitude;Y latitude","CENTER","GEOGCS['GCS_WGS_1984',DATUM['D_WGS84',SPHEROID['WGS84',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]","NONE")
        except:
            print(fc + " failed.")


texts: Unable to set remote store for geoserver

texts:
I can not set remote store for my geoserver. Technically, I have two servers. Geoserver is installed on one server and data (rasters) is stored on another server. Data itself is reachable through url. When I set local store for my geoserver (using some test rasters), it works. I do it like so:

requests.post("http://" + geoserverhost + ":" + geoserverport + "/geoserver/rest/workspaces/" + workspace +\
"/coveragestores?configure=all", data="<coverageStore><name>" + layer_name + \
"store</name><workspace>accent</workspace><enabled>true</enabled><advertised>true</advertised><type>" + tif_type +\
"</type><url>file:" + targetPath + \
"</url></coverageStore>", headers={"Content-Type": "text/xml"}, auth=(geo["user"], geo["password"]))

The most important part here, is where I set data url:

"...<url>file:" + targetPath + "</url>"

Here targetPath is local to the geoserver itself. Now, I want to switch to remote data storage. I do it like so:

"...<url>" + targetUrl + "</url>"

Here target url is a valid url reachable form everywhere. But unfortunatelly, it does not work. When I publish my layer, I get some rubbish on the client. So, what is wrong with that and how can I fix it?


texts: I want to get map/layer information (no profile or lat/long) on mouse hover on popup in a QGIS map. I don't know how to do it, please let me know?


texts: What does "Ensemble average for a given window of pixels" mean?

texts:
Can someone please let me know what does "ensemble average for a given window of pixels" mean when calculating a coherency or covariance matrix? I have taken this sentence from a paper "Polarimetric Target Decompositions and Light Gradient Boosting Machine for Crop Classification: A Comparative Evaluation".

According to my understanding I have to consider a window of size m x n and take the pixels of a radar image in that window and then perform ensemble averaging i.e. mean of those pixels. Please let me know whether my understanding is correct or not.

As of now I am performing a 2D convolution with a square window and varying their size to analyse the performance.

Here is the document that I am referring to: Polarimetric Target Decompositions and Light Gradient Boosting Machine for Crop Classification: A Comparative Evaluation


texts: PATMOSX bit values inconsistent with documentation

texts:
I'm looking for a way to determine day vs night for pixels in the Google Earth Engine PATMOSX dataset and found that the 'dcomp_info' band has a bit (bit 2) that it says represents day (0) vs night (1). However, toying around with this band has shown that the bits may not actually correspond to what the documentation claims (e.g. doc says bit 1 has 0 for land and 1 for sea, but empirically looks like bit 0 has 0 for sea and 1 for land as seen here: https://code.earthengine.google.com/97d4c158883fa97e36653f266c74193b.
I've combed through every bit of documentation I can find for this dataset and nothing seems to explain this inconsistency. Can anyone help me figure out what's going on?


texts: How do I transform values using a dictionary or lookup table?

texts:
I'm reading rows (~20 fields per row) from a database using a SearchCursor and placing them into an array. Then, I loop over the array and use an InsertCursor to insert them into a Feature Class in a different database.

The problem, I need to transform field values in the source data. For example, a column may contain the strings "T", "true", "Yes", and "1"  and they must be converted to a string value of "TRUE" before being written to the destination column.

There may be multiple values in a source column that need to be mapped to a single value in the destination. This is the example above.
There may be multiple lookups per column. For example, one column may have as source value of "A" that gets transformed to "Z1" and in the same column, "B" gets transformed to "Z2", and still in the same column, "C" gets transformed to "Z1" (multiple source values mapped to same destination value).
There are many columns that will need lookups created. I'd prefer to have a different dictionary / lookup table for each column as there will likely be subtle differences between columns and trying to reuse dictionaries will get frustrating.

How should I approach this problem?

Update #1

Sample using suggestions by @mr.adam: Throws an error on the line if row[key].lower() in lookup(key[1]): with the message TypeError: int object is not subscriptable

lookup = {
    3: ("TRUE", ["t", "true", "1", "yes"]),
    4: ("FALSE", ["f", "false", "0", "no"])
     }

rows = []
rows.append(("abc", "123", "xyz", "True", "F"))
rows.append(("lmo", "456", "xyz", "1", "no"))
rows.append(("tuv", "456", "xyz", "yes", "0"))

for row in rows:
    for key, value in lookup.iteritems():
        if row[key].lower() in lookup(key[1]):
            row[key] = lookup(key[0])

for row in rows:
    print row

Update #2

after some additional digging, breaking down the above referenced line, row[key].lower() evaluates to "true" as expected for column 4 of the first row in the dataset. The error is thrown when evaluating the in clause of that line, lookup(key[1]).


texts: Accessing Network Link layers through Google Earth API

texts: When creating a Network Link, in ArcGIS Manager, I am able to add multiple layers to the KMZ. Is there a way to access each of the layers separately using the Google Earth Plugin API?


texts: Selecting by attribute and calculating field of new selection in ModelBuilder?

texts:
I have a polygon shapefile (with 4000 records in it) that I want to group into different regions by doing a "select by attribute". I need to do this about 164 times because of the different selection ranges I use in the expression (eg nr >= 1000 AND nr <= 1119).

For each new selection I need to calculate the Fieldname(Region) to the name of the new region (again 164 times)

How can I achieve this in ModelBuilder?


texts: Osmosis Extremely Slow After Postgres 9.6 Upgrade

texts:
I am seeing extremely slow processing times for syncing my local osm database with the master repo after a Postgres upgrade to 9.6 from 9.5 (Postgis 2.3 from 2.2). The syncing used to happen every day and took about 500 seconds on average. After the upgrade, after 24 hours, it is still not over. I notice very slow (below zero) object processing times (log record below) compared to before.

Log record after the update:

Oct 31, 2017 12:23:59 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.45
Oct 31, 2017 12:24:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Oct 31, 2017 12:24:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Oct 31, 2017 12:24:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Oct 31, 2017 12:24:16 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 26022046 with action Modify, 0.06660006660006661 objects/second.
Oct 31, 2017 4:12:49 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 26022047 with action Modify, 7.292125918680253E-5 objects/second.
Oct 31, 2017 6:54:27 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 26022053 with action Modify, 1.0311411856040729E-4 objects/second.
Oct 31, 2017 9:39:22 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 26022056 with action Modify, 1.0106204077408672E-4 objects/second.
Nov 01, 2017 5:07:11 AM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 26022057 with action Modify, 3.72178939465691E-5 objects/second.
Nov 01, 2017 7:43:20 AM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 26022058 with action Modify, 1.0673723278600615E-4 objects/second.

Log record before the update:

Oct 22, 2017 11:00:01 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.45
Oct 22, 2017 11:00:02 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Oct 22, 2017 11:00:02 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Oct 22, 2017 11:00:02 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Oct 22, 2017 11:00:17 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 557521 with action Modify, 0.06700616456714018 objects/second.
Oct 22, 2017 11:00:22 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 49820266 with action Modify, 58.15347721822542 objects/second.
Oct 22, 2017 11:00:27 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 81804664 with action Modify, 40.64719810576164 objects/second.
Oct 22, 2017 11:00:32 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 109690032 with action Modify, 24.57577530719719 objects/second.
Oct 22, 2017 11:00:38 PM org.openstreetmap.osmosis.core.progress.v0_6.ChangeProgressLogger process
INFO: Processing Node 124684125 with action Modify, 58.35490938060148 objects/second.

Command for Syncing:

/usr/share/osmosis/bin/osmosis --read-replication-interval workingDirectory=. --simc --lpc --write-pgsql-change host="127.0.0.1" user="xxx" database="osm_master" password="xxx">> osm_update.log 2>&1


texts: Using attributes for output filenames in QGIS Process Modeler?

texts:
How can I use process inputs (eg: Table field) inside an expression for an output file when using Process modeler?

I have a process which outputs a raster, whose output filename should be the value of one of its attributes. When I select "Use Expression..." when executing the process, I try to use @filename_value but the preview shows only ". The fields and values category in the expression calculator shows NULL.

So how can I output multiple files using attribute fields as filenames within process modeler?

Here's the process I've made:

And the expression editor:


texts: Maintaining times with points2one in QGIS?

texts:
I have a problem that might be trivial, but I really cannot find a solution!

I have a csv files with several points (x,y).

These points represent the position of different animals at different times, and thus can be joined in several tracks (each point belongs to a single track, but a track can have from 2 to several points). Now these points have clearly also a time, but if I join them using Points2one I loose this information that I need to calculate the speed of the animals.

Is there a way to have a multime time column (or at least first-last time) or to calculate the speed of an animal if I have such dataset?


texts: Error while clipping raster by mask layer

texts:
I am using QGIS 3.8 on Mac. When I tried to extract raster by mask layer, it gives following error and its been a while I am not able to fix this.

"GDAL command output:
/bin/sh: gdalwarp: command not found

Execution completed in 0.08 seconds
Results:
{'OUTPUT': '/var/folders/bn/d_gr7r2j03x_j9gphh4ncpz80000gn/T/processing_433a42df84c4486bb4b36bc2b3753302/27fec80e7c114dcebaba61cfe351e593/OUTPUT.tif'}

Loading resulting layers
The following layers were not correctly generated.

/var/folders/bn/d_gr7r2j03x_j9gphh4ncpz80000gn/T/processing_433a42df84c4486bb4b36bc2b3753302/27fec80e7c114dcebaba61cfe351e593/OUTPUT.tif

You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm. "

What could the problem be?


texts: Merging several feature classes into one pre-existing feature class in geodatabase with coded domains?

texts:
I have several point feature classes that I want to merge into one pre-made feature class with coded domains. The pre-made feature class already has all of the fields named (although differently from the multiple feature classes, so I will need to be able to match them with where they go) and has all of the coded values set.

Outside of manual manipulation (merging, field calc all values to coded values, etc) is there an easier and simpler way to accomplish this?

So far I haven't been able to find anything about joining/merging non-domain GDB feature classes with coded-domain GDB feature classes.


texts: ArcGIS Javascript API Global Variable Issue

texts:
I'm trying to return a string when I click on a country in a map. The string is the country name, which will then be passed to a geoprocessing tool. I've definied "country" as a global variable. I'm trying to define it inside the click function and it's not working. console.log() doesn't print anything.

Here is the code snippet:

var country = {};
map.on("click", function(evt) {
  var selectQuery = new Query();
  selectQuery.returnGeometry = true;
  selectQuery.geometry = geometry;
  featureLayer.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(results) {
    country = results[0].attributes["NAME"];
    console.log(country);
  });
  map.infoWindow.setContent(content);
});


texts: Changing "Stretch Type" of list of rasters to "Histogram Equalize" with ArcPy?

texts:
Goal:  To modify a list of rasters using the histogram-equalize stretch-type

What is the appropriate tool to use to change the stretch type of a list of rasters to histogram equalize with arcpy?

Here is how you access the tool from the ArcMap GUI:

Here is my code sans necessary tool which would preform histogram equalization on all of my rasters.

import arcpy, os

inFolder = "pathway to folder containing rasters"

arcpy.env.workspace = inFolder
arcpy.env.overwriteOutput = True
arcpy.env.parallelProcessingFactor = "50%"

rasterList = arcpy.ListRasters("*", "ALL")  # this calls folder in workspace

newlist = []
for raster in rasterList:

# Looking for tool which would help with running Histogram Equalize on all rasters.
# Does such a tool even exist?  I am temporarily calling such tool: Name_of_appropriate_tool
# Tools I have tried are listed below along with explanation

HistEqualized = Name_of_appropriate_tool(raster)

newlist.append(HistEqualized)

print newlist

I have tried

1. ApplySymbologyFromLayer

ApplySymbologyFromLayer_management (in_layer, in_symbology_layer, {symbology_fields}, {update_symbology})

but I cannot use an in_symbology_layer which would apply to all rasters.  The required in_symbology_layer parameter changes all rasters uniformly, whereas the histogram equalize feature accessible in ArcMap -which I want- will change (equalize) all rasters according to their min and max value as well as the distribution of values between the min and max value.  This is not a uniform change, it is an alteration which is based on each rasters' unique values.

2. ZonalHistogram

ZonalHistogram (in_zone_data, zone_field, in_value_raster, out_table, {out_graph})

but this just outputs a dBASE table.  I want to output a histogram equalized raster, not a table.

3. Stretch Function

This seems to just give me the option of gamma.  Gamma modifies each raster according to a standardization equation, but this is not the same standardization equation as the "histogram equalized" standardization equation.

Any advice?


texts: How to add large file (in GB) in Xcode project?

texts:
I am working with Mapbox Framework. I have generated MBTiles file which I want to use in my project (for iPhones and iPads) but that file is having size of 3GB (which I can't use in project). When I added that file in project, it created a build of 3.29GB.

When I gave reference of that file too, created build in GBs.

Is there any way that I can use that file in my Xcode project without increasing build size?


texts: How can I solve "Shortest and Fastest With time" routing issue?

texts: Please see the image below.  (If you can't see the image please search "Bangalore to Palakkad" in Google Maps.)  I am searching for a route from Bangalore to Palakkad. Google shows two routes.  I think the first one is the shortest path and other is fastest.  But look  at the distance and time.  385 for the shortest (time to travel : 6hr 51 min) and 410 for fastest (time to travel : 6hr 7 min).  How are they calculating this?


texts: QGIS server legend does not show diagram colors

texts:
I have a QGIS version 2.18.18 map with pie-chart diagrams. The pie-chart maps display correctly in both QGIS-desktop and QGIS-server versions. The pie-chart classes are correctly displayed in the QGIS desktop layers panel.

However, when I request the legend from QGIS server using a getlegendgraphic request, the pie-chart colors are not drawn.

The getlegendgraphic request is formatted as follows:
http://qgis-server-host/cgi-bin/qgis/qgis_mapserv.fcgi?map=myproject.qgs&service=WMS&version1.3.0&request=getlegendgraphic&layer=cbsbevolking2017legenda&format=image/png

Images
Map with diagrams:

Pie charts defined with Layer-Properties->Diagrams->Assigned Attributes:

The legend in QGIS-desktop layers panel:

QGIS server getlegendgraphic response (missing colored classes):

Am I doing something wrong? Is this a bug? Is there a work-around?


texts: Project UTM Coordinates to three.js Coordinates With D3

texts:
I've been working on an application where I am building a 3d terrain, using three.js. The part I have working so far is building the 3d terrain mesh from standard 30m elevation data, and then draping NAIP imagery on top.  The elevation and imagery are projected to UTM Zone 13 N.  This part works beautifully.  Where I am stuck is with adding vector data, specifically lines.  I can't for the life of me project the line coordinates into the scene space properly.

I am using d3 to help with projecting the line coordinates (also in utm zone 13 N coordinate space) to the three.js coordinates.  I have searched the internet far & wide, and this post is the closest I have found to the answer.  This is how the author creates a d3 projection:

var projection = d3.geo.transverseMercator()
    .translate([terrainSize / 2, terrainSize / 2])
    .scale(terrainSize * 106.4)
    .rotate([-9, 0, 0])
    .center([-0.714, 61.512]);

Per the linked post, translate, rotate, and center are all self-explanatory, and I make the updates based on UTM Zone 13.  Its the scale that I have no idea about.  The author himself says "The scale factor corresponds linearly to the distance between projected points. I figured out that this was terrainSize multiplied by 106.4 for my example, but I don't know why exactly 106.4..."

I have played with the scale factor ad nauseam - and just cant get it to work.  I am hoping someone can help me understand how to compute the proper scale factor.  If there is an easier way to go from UTM to three.js without d3 - I am open to any suggestions.


texts: Watershed extraction using different DEM tiles

texts: I would like to extract the watersheds for a particular area using QGIS.  However, I only have Aster 30m DEMs to work with, each tile covering one degree square.  The problem is that I need to use four different tiles and the results do not all correlate where they meet.  How can I resolve this, or am I doing something wrong?


texts: How can we export selected features from multple shapefiles in a single step

texts:
I have made a spatial query in ArcGIS where i am selecting features from multiple layers from a single source.

How can I export all the selected features from multiple layers at a single step?


texts: Decorating a Leaflet map with borders and texts inside

texts: I'm using Leaflet to create my webmaps, and wondered if there is any way to decorate it by inserting borders, texts inside, legend, etc.


texts: Query returning multiple vehicle_ids when it should only return the top 1

texts:
Using ArcGIS Desktop 10.5.1 I have a point featureclass in an Microsoft SQL Server 2012 Enterprise Geodatabase (ArcGIS Server 10.5) that holds MDS (mobility ride share scooter) data.  The feature class has two fields we are interested in, [vehicle_id] and [route_timestamp].  The [vehicle_id] field contains a unique ID for each scooter and [the route_timestamp] contains the timestamp of the scooter point.

Each [vehicle_id] contains multiple timestamps (making a breadcrumb trail the scooter traveled)

I only want to know the scooters last location (not interested in any of the previous breadcrumbs)  To only see the latest timestamp I figured I would use a TOP 1 SQL query and group them by [vehicle_id].

My definition query on the layer is:

route_timestamp IN (
   SELECT MAX ( route_timestamp )
   FROM ENG_GDB.ENGGISEDITOR.MDS_trips_breadcrumbs
   GROUP BY [vehicle_id])

This query takes the records from around 20,000 records to only 318, but it is returning multiple timestamps for a single vehicle_id, when in fact it should only be returning the top 1.

I have tested a similar query on a different dataset and it works, so I am wondering what is going on here, and why I am getting the results I am getting.

With further testing I got this query to work and return the wanted results directly in SQL but not in a layer definition query.

SELECT MAX (route_timestamp),vehicle_id FROM ENG_GDB.ENGGISEDITOR.MDS_trips_breadcrumbs where vehicle_id in (SELECT distinct (vehicle_id) FROM ENG_GDB.ENGGISEDITOR.MDS_trips_breadcrumbs) group by vehicle_id

Still trying to figure out how to put a definition query directly on the layer.


texts: Looking for a wind WMS for Europe and Africa

texts: I was looking for a wind WMS but couldn't find. I wanted a wind WMS for Europe and Africa. Does anyone know about any?


texts: Creating image pyramid datastore using GeoServer REST API?

texts:
I am trying to automate the geoserver configuration process and I am using curl and the geoserver REST API.

I am able to create workspaces and for instance a WMS datastore, but I am not able to create an image pyramid datastore.

Is this possible at all?

I haven't found any examples online. I have tried the suggestion from Creating Store in GeoServer workspace using REST API?. I tried to get information from another datastore and modifying the result to post it again. I created a file using statement below:

curl -v -u username:password -XGET -H 'Accept:text/xml' http://myserver:8080/geoserver/rest/workspaces/workspacename/coveragestores/datastorename_X/ > logfile.log

I modified the name and path of the coverage store and tried to upload it again using:

curl -v -u username:password -XPUT -H 'Accept:text/xml' -H 'Content-type:text/xml' -d @logfile.log http://myserver:8080/geoserver/rest/workspaces/workspacename/coveragestores/datastorename_Y/

< HTTP/1.1 500 Internal Server Error
< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Tue, 18 Apr 2017 13:20:19 GMT
< Connection: close
<
coverages : coverages : coverages : coverages
 ---- Debugging information ----
 message             : coverages : coverages
 cause-exception     :         com.thoughtworks.xstream.mapper.CannotResolveClassException
 cause-message       : coverages : coverages
 class               : org.geoserver.catalog.impl.CoverageStoreInfoImpl
 required-type       : org.geoserver.catalog.impl.CoverageStoreInfoImpl
 line number         : 1
 * Closing connection #0


texts: I upgraded to SP5. The service "ArcGIS Server Object Manager" not start. How to fix this?

texts:
I updated my ArcGIS Server from the SP4 to SP5. On a Windows 7 OS.
But I cannot to start the "ArcGIS SOM" service. An error appears in a popup.

Because of this, the following error occurs in "ArcGIS Server Manager" (the administrator by browser):

"Manager Could not connect to the GIS Server. PLEASE CHECK That the server is online and Functioning properly. Some Manager operations will not be available until the next time you log in to GIS Manager When the server is available."

What can I do to start the "ArcGIS SOM" service?

Thanks!


texts: QGIS Raster Calculator resample algorithm

texts:
I want to substract two covering raster sets in the Raster Calculator in QGIS to get a difference map. The raster sets have different extents and raster size.
How does the algorithm of Raster Calculator exactly interpolates the difference raster?


texts: Discover multipart features in a layer in QGIS

texts:
I am trying to identify multipart features using QGIS version is 1.8.0.

I've tried:

look at the attributes table
select a random feature and check in the canvas if there are
multiple geometries selected
repeat until found one or all features have been examined

What I would like to check is something like a Boolean value in the Layer properties!


texts: Adding a download button using sdk gxp opengeosuite

texts:
I'm using GeoExt to make an  Open Geo suite SDK viewer, I have added many tools but I need also to add a  "download" button -connected with geoserver- in order to download each layer in different formats as csv, WFS....
Any idea?


texts: How do I get the current Undo and Redo item in ArcMap Operation Stack?

texts:
I just posted this on ESRI forum and found this link so I am trying it here too:

Research ArcGIS Resource Center document - How to work with the operation stack:
http://help.arcgis.com/en/sdk/10.0/a...00000288000000

I found out the following:
"The Undo and Redo methods do not remove operations from the operation stack, but rather move an internal pointer up and down the stack."

Question:
So how do I get access to the operation that ArcMap is getting ready to Undo or Redo?

History and sample code:
I have been working on trying to manage ArcMap operation stack from a custom form. In the custom form we are actively editing data using ArcMap controls (add a sketch, modify feature, etc..) and we are also calling custom edits which are enclosed within StartOperation and StopOperation("EditOperationName").

In my code, I would like to evaluate the actual operation that ArcMap is getting ready to Undo or Redo and then perform a specified action if the Operation is a specified custom edit operation that was added within the edit session. I am able to return the name of all the menu string edit operations in the IOperationStack, I am able to call the mxDoc.OperationStack.Undo and Redo methods but I have not found a way to evaluate the actual Undo or Redo operation that ArcMap is pointing to.

Refer to the code sample below for the Undo button click:

Private Sub btnUndoLastTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUndoLast.Click
'Dim pOperationStack As IOperationStack
'pOperationStack = _mxDocument.OperationStack

If _mxDocument.OperationStack.Count > 0 Then
Debug.Print("Before Undo is Selected")
For i = 0 To _mxDocument.OperationStack.Count - 1
Dim pOper As IOperation = _mxDocument.OperationStack.Item(i)
Debug.Print("operation number: " + i.ToString() + " Name: " + pOper.MenuString)

If pOper.CanUndo Then
Debug.Print("CanUndo Operation")
Else
Debug.Print("Can NOT Undo Operation")
End If
If pOper.CanRedo Then
Debug.Print("CanRedo Operation")
Else
Debug.Print("Can NOT Redo Operation")
End If
Next

'_editor.UndoOperation()
Dim pOperation As IOperation = _mxDocument.OperationStack.Item(_mxDocument.Operat ionStack.Count - 1)
Debug.Print("Operation Name = " + pOperation.MenuString.ToString())

If pOperation.MenuString = "Apply Rules" Then
'reset the IsApplyRules variable
_geoeditWorflow.IsApplyRulesSet = False
End If

pOperation = Nothing

_mxDocument.OperationStack.Undo()

Debug.Print("After Undo is Selected")
For i = 0 To _mxDocument.OperationStack.Count - 1
Dim pOper As IOperation = _mxDocument.OperationStack.Item(i)
Debug.Print("operation number: " + i.ToString() + " Name: " + pOper.MenuString)

If pOper.CanUndo Then
Debug.Print("CanUndo Operation")
Else
Debug.Print("Can NOT Undo Operation")
End If
If pOper.CanRedo Then
Debug.Print("CanRedo Operation")
Else
Debug.Print("Can NOT Redo Operation")
End If
Next
End If
End Sub

NOTE:
1) It is interesting to see that ArcMap acutually sets ALL Operations in its stack to either true or false for CanUndo or CanRedo properties regardless of wether this was the last operation that you applied undo or redo.

2) ArcMap keeps an Internal pointer to the stack and moves this pointer up and down. So, this means that the OperationStack is NOT reorganized (or even a true STACK.POP) based on an Undo and Redo.

Therefore it doesn't appear like there is an easy way to get the operation Item that ArcMap is getting ready to undo or redo. You can see in ArcMap tools what the undo or redo operation name is by either hovering over the undo and redo buttons or in the standard Menu toolbar --> Edit -> Undo "Name" or Redo "Name"

Any Ideas on how I can get the name of the NEXT Undo or Redo operation? I am trying to avoid having to write my own UndoStack and RedoStack if at all possible.

Thanks for any help you can provide.


texts: Adding new menu item to ArcCatalog using ArcObjects?

texts:
I'm trying to a add a new menu drop down to the ArcCatalog menu bar.   I tried to use the built in ArcGIS base menu template in Visual Studios 2010 but no luck.   I also tried to manually add the dll create with the base menu template in the custom dialog box but my menu does or menu items do not appear in the list.

I think my best approach is to use the IExtension but all the example I see online is using ArcMap.   The examples retrieve the main menu by getting it from a new or open document using the "IApplication...CommandBar.Find" but I don't think there's a "document" in ArcCatalog?

I tried the following with no luck.   I assume the document return from the IApplication is a GxDocument.   I might be wrong.

    public void Startup(ref object initializationData)
    {
        ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);
        ICommandBar topMenu = null;
        UID topMenuUid = new UIDClass();
        object index = null;
        ICommandBars commandBars = null;
        IDocument document = null;

        if (initializationData is IGxApplication)
        {
            m_application = (IApplication)initializationData;
            topMenuUid.Value = ARCCATALOG_MAIN_MENU_UID;
            document = m_application.Document;
            ICommandBars commandBars = document.CommandBars;
         }
    }


texts: How can I handle tables with 256+ variables?

texts: I'm working with census data and downloaded several CSV files, each with with 600ish columns/variables.  I'd like to store them all in a query-able database, but everything I've tried so far (MS Access, Arc geodatabase table) truncates the table to 256 columns.  Are there any solutions for handling large tables that are accessible to someone who isn't a DBA?


texts:
In ArcGIS when I try to calculate some raster values or statistics, sometimes I get values that contain e, for example: 1.4e6.

What does e mean, and how is it interpreted in ArcGIS?


texts: PostGIS Raster - geocoordinates - where is pixel center

texts:
I am using PostGIS raster to store geographical data - usually height maps. I wonder, how is raster represented. Where is pixel center?

For example, I create raster with upper left corner [lat: 50, lon: 40] and scale set to 1. Is this upper left corner coordinate meant as a center of pixel (red color) or really an upper left corner (green color)?

If I later read from DB and request value at [lat: 49.9, lon: 39.9], will I get the value of pixel with red center or some neighbour?


texts: Unpack error occuring when sampling raster values to points with rasterio

texts:
I'm new to Python. I'm trying to sample raster values to points based on the geometries of a shapefile using the below code but I'm receiving the below error .
import fiona
import rasterio as rio
import pandas as pd

 multi_values_points = pd.Series()
 with fiona.open(inputShape) as shp:
     for feature in shp:
        Name = feature['properties']['Name']
        coords = feature['geometry']['coordinates']
        with rio.open(inputRaster) as stack_src:
           value = [v for v in stack_src.sample([coords])]
        multi_values_points.loc[Name] = value

 **ValueError: not enough values to unpack (expected 2, got 1)**


texts: Creating map of travelling salesperson problem solution with pgrouting?

texts:
I have created the "ways" (=edges) and "ways_vertices_pgr" (=nodes) tables from OSM road data with osm2pgrouting in PostGIS. I work with this data in QGIS.

Given a set of ids from the "ways_vertices_pgr" table I would like to tackle the following task:

perform a travelling salesperson problem
create a vector layer that represents the result

So far I have managed to create a cost matrix with pgr_dijkstraCostMatrix, and pass it to the pgr_TSP function.

SELECT seq, node, the_geom FROM pgr_TSP(
    $$
    SELECT * FROM pgr_dijkstraCostMatrix(
        'SELECT gid AS id, source, target, cost, reverse_cost FROM ways',
        (
            SELECT ARRAY[9769, 20604, 48398, 42533, 49819, 41141, 45520] node_array
        ),
        directed := false
    )
    $$,
    start_id := 9769,
    randomize := false
) as res
JOIN ways_vertices_pgr
ON ways_vertices_pgr.id = res.node;

The result is the sequence, in which the nodes should be travelled:

From here I am stuck.

How do I connect the dots, to create a full path from this which can be represented as a vector layer?

My naive approach is to use pgr_dijkstra on every segment of the path and then create a large table from the result. It is a real pain to implement this in PostgreSQL, though and I haven't managed to do that. This approach seems to be too complicated and not very elegant, anyways.


texts: PostGresql and PostGIS courses in Canada

texts:
I have been looking for good professional courses for learning more than just the basics for PostGresql nd PostGIS.  I have found a number of good courses, but they seem to all be in the US.  I was wondering if anyone knows of similar type courses being offered in Canada.

http://www.otg-nc.com/implementing-databases-postgresql/
http://www.otg-nc.com/postgresql-administration/

Thanks...


texts: arcpy.mapping.MapDocument("CURRENT") fails when running python script in background as tool

texts:
The engineers I work with have requested an autosave feature for ArcGIS, so I thought I'd make them a python tool that routinely saves. The script works fine when run in the foreground, but fails when "Always run in foreground" in not checked.

The returned messages:

Is there a workaround for this issue?

The code:

"""Autosave"""

import arcpy
import time
import os

arcpy.env.overwriteOutput = True

autosaveFolder = arcpy.GetParameterAsText (0)
autosaveFile = arcpy.GetParameterAsText (1)
waitTime = arcpy.GetParameter (2)

if not autosaveFile.lower().endswith (".mxd"):
    autosaveFile = autosaveFile + ".mxd"

waitSeconds = int (waitTime * 60)

autosaveMxd = os.path.join (autosaveFolder, autosaveFile)

while True:
    time.sleep (waitSeconds)
    mxd = arcpy.mapping.MapDocument("CURRENT")
    mxd.saveACopy (autosaveMxd)
    del mxd


texts: Aligning Rasters With Different Resolutions and CRS

texts:
I have two rasters. Let's call them "Green" and "Red".
The details for the "Green" raster are:

The details for the "Red" raster are:

There is a small skew between these two rasters and the pixels are also not perfectly overlapping.

I would like to remove this skew that exist between the two rasters (to make the rows and columns parallel to each other) and also have perfectly overlapping pixels (with equal number of rows and columns). What processing chain is necessary to achieve this in QGIS (without disturbing the pixel values and retaining the image statistics as much as possible)?


texts:
I have a Raster Catalog containing 4 File GeoDatabase Raster Datasets.

Each raster is about 150-250 GB. I want to convert these to rasters with .TIFF extension so I can publish it in a map service.

The .gdb however, that contains the rasters, are strangely enough around 65 MB.

How can this be? I have tried using Copy Raster tool, and also exported directly from TOC. Both of these are taking ages to even get started.


texts: How to display a Google Maps with Qt + QGIS

texts:
I am developing an application with Qt + QGIS. It will have a map component to be rendered by QGIS. The map needs to contain a base layer with Google Maps tiles and additional layers with data loaded from local files.

Is this possible with Qt + QGIS?

As far as I understand, displaying Google Maps data requires using the Google Maps JavaScript API. In Qt, one can have a browser component, where the map can be displayed. I'm not sure if this is a good approach, specifically because of projections problems and lack on synchronization with map layer and the other layers. See also this question: Overlaying Google Map in standalone PyQgis application?

I couldn't find clear answers in the extensive searches I have done.


texts:
I have reclassed my data so show areas were wind speed is greater than 5m/s and were it is not.

I have  converted this raster file to a vector file however it showing as one single colour and not defining between the white and black separated boundaries in the raster file.

I have looked at the style menu and tried to change the colours but nothing seems to work.


texts: Geoserver set the Geowebcache Max Cache Level

texts:
We are wanting to display image cache for the entire of England to a level of 1:3000 (level 10 in our gridset). Beyond that we want to call upon the standard WMS service, feeding dynamically from the database/file store. The Layer is being published to level 19.

In Geoserver 2.4.0 any layer that has a "Cached Zoom Level" set to a particular level (i.e level 10) will dynamically render a WMS service beyond that level. In geoserver 2.6.0 this no longer happens and we receive an error from geowebcache:

400: Null (network response in chrome - 400:Bad Request)

I understand that this is beyond the level of cache available but why is geowebcache no longer going directly to the Layer WMS like before? Is it possible an error in the geowebcache.xml could cause this?

I have tried this test on the Geoserver sample layers, as well as my own to highlight the fact that this is not an independent issue.


texts:
I'm installing pgrouting (ver 1.03_pg-8.4.2) on my windows machine.
I installed PostgreSQL and postgis without any problem, then I downloaded the binary package of pgrouting and I installed it (copy and Paste in postgresql dir). Now I'm trying to configure my first database following the instructions of http://genuchten.blogspot.com/2008/04/untitled.html but I get some errors:

1)

psql -U postgres -f ../share/contrib/lwpostgis.sql routing
ERROR: ../share/contrib/lwpostgis.sql No such file or directory

2)

psql -U postgres -f ../share/contrib/spatial_ref_sys.sql routing
ERROR: ../share/contrib/spatial_ref_sys.sql No such file or directory

3)

psql -U postgres -f ../share/contrib/routing_core.sql routing
ERROR: incompatible library: librouting.dll: verion mismatch

4)

psql -U postgres -f ../share/contrib/routing_core_wrappers.sql routing
ERROR: Type "geoms" does not exist

Can anyone help me?
Thanks Laura


texts: SAGA GIS ----> need to export shapefiles to SVG

texts:
I am trying to export three shapefiles to svg files but the problem I could not make these shapefiles polygon to black outlines to be export to svg files. How do I do that ?

I tried to run that in ArcGIS 10.1 but it failed.

HELP !!!

Robert


texts: Is it possible to run ArcGIS 9.3 python script for ArcGIS 10.3?

texts:
I need to translate python 2.5 script for ArcGIS 9.3 to python 2.7 for ArcGIS 10.3.

Our office has now all computers with ArcGIS 10.3. So, I need to translate these scripts to arcgis 10.3.
Could anyone give me some information please?


texts: Empty Shapefile after MMQGIS attribute join from CSV file

texts:
I've been trying to use the Attribute Join from CSV File function in MMQGIS, but it does not seem to work in Version 2.0.1.  I've tried to join the same CSV and Shapefiles using V.2.0.1 running under both Ubuntu and Windows 7.

In each case, the procedure runs but returns no matches.  It creates a new shapefile, but the file is empty.  The same procedure with the same files works under QGIS 1.7.5.

Is this a known bug?


texts: Can true curves be copied into Spatialite from ArcGIS Desktop?

texts:
Inspired by a question that was asked earlier today about curves in a Spatialite database.  I haven't been able to find any documentation online about whether a Spatialite database can store true curves (or true arcs).

I am using ArcGIS Desktop and am unable to edit a Spatialite database directly, so any data in the Spatialite DB will be copied across using ArcMap.

If I have polyline feature classes and copy these into a Spatialite database, will any true curves in my feature class remain as a true curve in Spatialite, or will it be densified somehow?


texts: Determining gaps in polylines and identifying continuing sections?

texts:
Is there a relatively quick way to identify where gaps < a certain size are present between polyline? E.g. would there be an easy way to join line likes the ones in the below image if the gap was <10m?

I have access to ArcMap, MapInfo and QGIS.


texts: All the third level Submenus in QGIS are gone

texts:
I suddenly am missing all of my third level submenus in QGIS.  I wanted to use count points in polygon which exists on the vector analysis menu- but selecting it shows no other menus or dialog box with the options to select.  It is completely unresponsive.

Same is true for select by location, buffer etc.  Corrupt program?  I am using version 3.8.2


texts: CartoDB infowindows - only show title if data exists?

texts:
I have a data set in which not all tuples have info for all columns.

I want to show those columns in the infowindow, but if the data value is inconsequential (doesn't exist, is zero in a field where zero equates to doesn't exist), I don't want the title of the field shown - absence should be sufficient to show the user that the data isn't there.

How would I do that?


texts: Responsive design via an iframe for ArcGIS Java Script API 3.2

texts:
Currently I am working on ArcGIS JSAPI ver 3.0/3.2 . I have  created few maps in .html files then my IT admin putting this file in i-frame (at our custom site)

I am not using i-frame in my .html file. Interesting fact is that  when I  access the map on various device say (i-pad ,tab ,laptop ,mobile) my map is not resizing properly even I am testing in Firefox (Responsive Design View) its not resizing.

1.I have inserted the  meta tags for i-os still its not resizing.

2.Checking the CSS also (CSS might not the issue)

3.Going though similar questions 1 , 2

4.Researching on this at my end

Any help/suggestions will be great.. thanks..

Complete code @ JS Fiddle

Update :

I am using the resizer code still facing display problem. Please check the screenshots.


texts: Leaflet Routing Machine won't read waypoints from variable TypeError: t is null

texts:
I am trying to add waypoints from a variable to a leaflet map.  The resulting variable split_route1 is formatted correctly and when I hard-code the waypoints from the console log results, the waypoints render fine.  When I try to use the var splitroute1 I get an error: TypeError: t is null (leaflet.js (line 6, col 17396))

 function splitroute(route1){

 split_route1 = '';

 for (x = 0; x < route1.length  ; x++) {

            split_route1 +='L.latLng(' +      route1[x].ordered_locs.displayLatLng.lat + ',' + route1[x].ordered_locs.displayLatLng.lng + '),'
    }
console.log(split_route1)
L.Routing.control({
   waypoints:   [

          split_route1

    ],
    routeWhileDragging: true
}).addTo(map2);

     }


texts: who to contact about issues with geoserver plugin for qgis

texts:
I have a project in QGIS that I am trying to publish using GeoServer via the plugin.

When I try and publish a layer I get:

global name 'provider' is not defined Traceback (most recent call last):
File "/Users/rful011/.qgis2/python/plugins/opengeo/gui/explorer.py", line 118, in run command(*params)
File "/Users/rful011/.qgis2/python/plugins/opengeo/gui/confirm.py", line 18, in publishLayer catalog.publishLayer(layer, workspace, overwrite, name)
File "/Users/rful011/.qgis2/python/plugins/opengeo/qgis/catalog.py", line 379, in publishLayer self.upload(layer, workspace, overwrite, title)
File "/Users/rful011/.qgis2/python/plugins/opengeo/qgis/catalog.py", line 245, in upload self._publishExisting(layer, workspace, overwrite)
File "/Users/rful011/.qgis2/python/plugins/opengeo/qgis/catalog.py", line 171, in _publishExisting uri = QgsDataSourceURI(provider.dataSourceUri())
     NameError: global name 'provider' is not defined

I have looked at the plugin code and can not find any references to ‘provider’ before the fateful reference that fails.

Any ideas what is wrong?  I am aware that this plugin is labeled as experimental but it is unclear who I should contact.  I have tried to contact boundlessgeo without response and posted to the geoserver mailing list, again without any resolution.


texts: How to delete last part of a string starting from the 1st non numeric character?

texts:
I'm looking for a Python or VB statement to remove the last part of a string, starting where the 1st non Numeric character appears, using the Field Calculator in ArcMap 10. Here's an example of what I'm looking for:

Is it possible?


texts: Intersection tolerance error with Shapely

texts:
I am using Shapely to do a basic intersection operation. However, Shapely doesn't return the intersection line I am looking for. I though the reason might be Shapely's intersection doesn't have ArcGIS's tolerance setting.

As shown in this image, I want to use red 'pass' polygon to clip the green rectangle polygon and get yellow polygon which is the polygon intersection between red and green polygon. Then I'd like to get the intersection line between red 'pass' polygon and yellow interesction polygon.

However, as shown in this image, only part of the intersection line is returned. (The red line is the intersection line. The upper-right corner line is missed)

Here is my script:

import shapely;import geopandas as gpd;import os

def Shapely2GDF(ShapelyGeom):
    import pandas as pd
    import geopandas as gpd
    SampleDict = {}
    SampleDict[0] = [ShapelyGeom]
    SampleDF  = pd.DataFrame.from_dict(SampleDict, orient='index', columns=['geometry'])
    SampleGDF = gpd.GeoDataFrame(SampleDF, geometry = 'geometry')
    return(SampleGDF)
folder_path = r"YourFolderPath"
CRS = {'proj': 'laea',
     'lat_0': 33,
     'lon_0': 87,
     'x_0': 0,
     'y_0': 0,
     'datum': 'WGS84',
     'units': 'm',
     'no_defs': True}

Pass_wkt = 'POLYGON ((189758.9127545664 -66191.8185786074, 180329.3792152433 -116707.8439576719, 178965.1189195188 -124016.6660195934, 178800.8029019888 -123985.4142005378, 158503.0483487034 -233805.3173365155, 156868.4312602524 -242649.6541701788, 143913.7618549466 -312744.5093643814, 143758.953929076 -312715.355133106, 140197.0832145372 -332169.2871406805, 138084.9767773161 -332169.2871406805, 127821.3433724809 -332169.2871406805, 107552.6633413704 -332169.2871406805, 89774.74872879591 -332169.2871406805, 95330.73292863928 -301751.8496292587, 95488.81857719552 -301781.133725035, 98283.33938273881 -286624.8484239653, 107910.5678397901 -234411.9796224758, 129528.0923211118 -117176.5374084665, 130316.8087657643 -112899.3632158041, 130484.6345863547 -112930.7501034001, 132069.1199091757 -104422.3853548318, 148632.9652992385 -15482.73408142012, 158222.2461373163 -15482.73408142012, 178599.7741489997 -15482.73408142012, 192824.6413851511 -15482.73408142012, 199225.1582247838 -15482.73408142012, 189758.9127545664 -66191.8185786074))'
Polygon_wkt = 'POLYGON ((172956.2479248047 -124143.5767211914, 188165.8128662109 -120930.9952392578, 190789.2002563477 -133351.0950317383, 175579.6354980469 -136563.6763916016, 172956.2479248047 -124143.5767211914))'

Pass_geom = shapely.wkt.loads(Pass_wkt)
Test_polygon_geom = shapely.wkt.loads(Polygon_wkt)

Pass = Shapely2GDF(Pass_geom); Pass.crs = CRS
Test_polygon = Shapely2GDF(Test_polygon_geom); Test_polygon.crs = CRS

intersection_polygon = gpd.overlay(Pass, Test_polygon, how = 'intersection')
OutFileName = 'Polygon_intersection.shp'
OutFilePath = os.path.join(folder_path, OutFileName)
intersection_polygon.to_file(OutFilePath)

Intersection_geom = intersection_polygon.iloc[0].geometry
#Pass_geom         = Pass.iloc[0].geometry

Contain_result   = Pass_geom.contains(Intersection_geom)
Intersect_result = Pass_geom.intersects(Intersection_geom)

CurrentGeometry = Pass_geom; PointList = []
for pt in list(CurrentGeometry.exterior.coords):
    PointList.append(pt)
Pass_boundary = shapely.geometry.LineString(PointList)

intersection_line = Intersection_geom.intersection(Pass_boundary)
LineType = type(intersection_line)

intersection_line_gdf = Shapely2GDF(intersection_line)
intersection_line_gdf.crs = CRS
intersection_line_gdf.to_file('Result_line.shp')


texts:
I have a set of data that corresponds to zip code, and I'd like to turn that into a map.  From what I've gathered thus far, zip code shapefiles are difficult to find and work with due to the fact that they're not polygonal. However, I found an old version of the US Census's 5-Digit zip code tabulation areas on the Census website that I think will do the trick.

I'm currently using Magic Maps in an attempt to do keep this mapping process as non-technical as possible, and I was able to import map the outlines of the zip codes quite easily.  However, when it comes to incorporating my data into this map, I'm a little lost.  I was able to plot the points in the appropriate location on the map (very simple copy/paste process thanks to Magic Maps).

However, the data shows up as a point on the map, and I'd like it to fill the entire zip code instead.  See here for an example.  I'm new to GIS and shapefiles and dbfs and whatnot, so correct me if I'm wrong, but I'm guessing this is due to the fact that the zip code "tag" in my csv data isn't connected in any way to the dbf file, so it's not actually connected to the contour that shows up on the map.  As a result, the software just places a point on the map that's more or less in the center of the zip code, which is in no way connected to the shapefile that I downloaded from the Census website.  Is this correct?  And if so, is there a way that I can add my data to the dbf file?  Or, is there a better way of going about all of this?


texts:
I want to create WFS-T update/insert/delete requests in my java application. As a result I want to save the requests in XML encoding, as specified by the OGC standard.

Does someone know a library (prefarably Java) which helps to create the WFS-T update/insert/delete requests?..


texts: Getting time taken for the edge using GraphHopper map matching

texts:
Here is the GPX data I am giving to GraphHopper Map matching library:

private List<GPXEntry> getList()
{
    List<GPXEntry> sampleEntries = new ArrayList<GPXEntry>();
    GPXEntry point1 = new GPXEntry(13.0009316,77.5947316, 1431849367077L);
    GPXEntry point2 = new GPXEntry(12.9868999,77.6042,1431849683112L);
    GPXEntry point3 = new GPXEntry(12.9867766,77.6043633,1431849718336L);
    GPXEntry point4 = new GPXEntry(12.98658,77.6043283,1431849752169L);
    GPXEntry point5 = new GPXEntry(12.9846133,77.6052366,1431850069237L);
    sampleEntries.add(point1);
    sampleEntries.add(point2);
    sampleEntries.add(point3);
    sampleEntries.add(point4);
    sampleEntries.add(point5);
    return sampleEntries;
}

It is list of GPXEntry objects each containing lat, long and the timestamp of vehicle when the location was recorded.

Now, with map library, I am able to get edges and path using Dijkstra's algorithm.
The QueryResults object has the following:

for (QueryResult item : queryResult) {
        System.out.println("Snapped position: "+ item.getSnappedPoint());
        edgesMap.put(item.getClosestEdge().getEdge(), item.getQueryDistance());
    }

I am getting edge ID and in the end the distance calculated is also correct when I compare with GoogleMaps distance. But, I want to use the timeStamp(epoch) data which I have given in the GPX data. I am assuming the library creates edges based on location points I have given and snaps it to actual route referred by OSM file.

I want to know for each edgeID, how do I get the time taken? For e.g., time between point1 and point2 should be (1431849683112L-1431849367077L).
 Does the library provide anything for this or I need to do it separately.


texts: Leaflet Custom Control - changing background colour of existing control

texts:
I have a Leaflet map with two custom controls on it (coverage1000Control and coverage2500Control).

coverage1000Control is defined thus:

coverage1000Control =  L.Control.extend({

  options: {
    position: 'bottomleft'
  },

  onAdd: function (map) {
    container = L.DomUtil.create('input');
    container.type = "button";
    container.title = "1,000 ft";
    container.value = "1,000 ft";
    container.style.backgroundColor = "red";
    container.style.backgroundSize = "100px 30px";
    container.style.width = "80px";
    container.style.height = "30px";

    container.onclick = function(){
      clearMap();
      setHeight(1000);
    }
    return container;
  }
});

Coverage2500Control is defined in exactly the same way with the only difference is that container.style.backgroundColor = "white";.

I'd like to change the background color of each button when the user clicks on it to indicate which button was last clicked. In other words, when the map loads the coverage1000Control button is red as it's the default. When the user clicks on the coverage2500Control button, coverage1000Control goes white and coverage2500Control goes red.

I've tried putting coverage1000Control.container.style.backgroundColor = "white" in the container.onclick but it doesn't work.

Is it possible to change the background color of an exising Leaflet control and if so, how?


texts: Extending selections based on value of selected features in QGIS?

texts:
I have a layer with lots of features. Every feature has the data attribute. I could select some features by Select by location based on other layer(s) or just by free hand (yellow points as example).

The task is to select all other features with the same data attribute.

I am working in QGIS 2.18.10

I am seeing the solution by creating a new layer, than looping for the features for selecting ones with the same value in the raw layer. However, I need to process large datasets, so this solution looks unefficient.


texts: How to remove layer names from the print composer legend?

texts:
I'm creating a map in QGIS Composer that is the result of two merged layers. The legend (screenshot below) is adding two rows with the titles of the layers. The edit property sheet does not give me an option to remove one of these - the minus symbol is grayed.

I can remove the con07 layer, but the desired layers are children of the Assembly_India layer (next screenshot), so I don't see how I could remove it from the original map.

I'm sure this is a very basic principle of QGIS that I am missing here. How can I remove the "con07" and "Assembly_India" rows from my legend?


texts:
I am trying to make a map of a property fenceline based on a survey which gives precise bearings and distances between landmarks. Following recommendations in Creating points based on distance and bearing from survey point using QGIS?, I used a CSV file to turn distance & bearing values into x- and y-offset values.

Now I want to know how to translate those offsets into actual coordinates.

My file contains X and Y shift values — that is to say, the values for any given point are not X and Y coordinates, but rather Delta-X and Delta-Y values relative to the point before it.

Given the coordinates of the initial point, one may solve for the coordinates of all other points in the polygon by evaluating their offsets from that initial coordinate point.

How can I write a script that will give me the actual coordinates of the points in my polygon?


texts: No image showing CQL_Filter on QgsRaster Layer

texts:
I am trying to add a cql filter to a WMS QgsRasterLayer. I was able to pull in the layer using this code:
urlWithParams="contextualWMSLegend=0&crs=EPSG:4326&IgnoreGetMapUrl=1&format=image/png&layers=locations:deerwgs&styles&url=https://localhost:8080/geoserver/wms%3FCQL_FILTER=(aid=%MULD2720112947%27)"
rlayer = QgsRasterLayer(urlWithParams, 'deerwgs', 'wms')
QgsProject.instance().addMapLayer(rlayer)

Result url: http://localhost:8080/geoserver/wms?CQL_FILTER=(aid%3D%27MULD20112947%27)&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=44.74008059553205641,-121.8661270141599999,44.92827190130818593,-120.9374197909033626&CRS=EPSG:4326&WIDTH=1205&HEIGHT=244&LAYERS=locations:deerwgs&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE

but no image is displaying. When I copy the actual url outputted in the log into the browser the expected image does return successfully. I am not sure what my next steps are to go about debugging.


texts: Dividing country into maps of scale 1:25000 (metres)?

texts:
I want to divide a country into a grid of maps that will be of 1:25000 scale. I am not sure how to approach this. Create fishnet seems like a good ending point. I have some old maps of the given scale.

Do I just create a template A4 outline and multiply that?

I also need to think about the corners and such, to extend the maps that fall outside of the country and make the extended blank (white). These old maps that I have cover approximately 10km x 14km and are A4.

Should I follow this or?

Basically, I want to subdivide the country into regions of the same size and scale 1:25000.


texts: Why is QGIS 2.8.1 crashing when enabling Grass Plugin?

texts:
I am running Linux Mint 13 "Maya" (Ubuntu 12.04 Precise). I installed
Grass via the software center. Than I installed Qgis 2.81 following this procedure:

Add the lines for one of the repositories to your /etc/apt/sources.list:

deb     http://qgis.org/debian precise main
deb-src http://qgis.org/debian precise main

After that type:

sudo apt-get update
sudo apt-get install qgis python-qgis qgis-plugin-grass

QGIS runs fine, but when enabling the Grass plugin it crashes.