texts: Using Google Distance Matrix to predict points on fixed duration of travel from my coordinates

texts:
I have around 10 000 point data coordinates in excel file, for which I need to find (predict) two points (their cordinates) that are on 2 minutes driving from the location of my points (both directions on the road).
I have idea how to calculate this using network analyst in Arcgis with local data, but the task must be done specifically with the average speed that takes into calculation Google (google maps).
I can not find information if google is offering vector data with the roads and average speed in geodatabase/shapefile/geojson, so the only idea I have is using the Google Distance Matrix API.
At this moment we are doing this manually:
direction 1
https://preview.redd.it/8pfkmcc96wl61.png?width=1052&format=png&auto=webp&s=3c2d0f4091ee6498fad4f4e5663e37ef6cf50c46
direction 2
https://preview.redd.it/yota1xvd6wl61.png?width=954&format=png&auto=webp&s=44813b0046008fc3872c15cbc3476f59ff7ccebf
I am familiar with python, I know how to use the google distance api in python but I can not find how to implement the fixed distance into my itterations.
In the documentation there are informations how to use the API to calculate the distance and duration between two points, not to predict where is the second point if I have the first point and the duration of travel.
I would apreciate if someone could give me idea how to search by duration in the Google Distance Matrix or with some additional Google's service to access the Google Maps and find the points.


texts: Minimum distance from points to nearest line among multiple lines shapefile

texts:
I am new to QGIS. I am looking for any plugin or any manual method in QGIS for finding minimum distance (perpendicular distance) from a point which is part of one shapefile to nearest line among many lines which is part of another shapefile. MMQGIS is not useful for this purpose.   I used v.net.connect command.

I am getting minimum distance (perpendicular distance) from points which are part of one shapefile to nearest line among many lines which is part of another shapefile, but there is one problem. I am not identifying from the attribute table which distance belongs to which line.

In the attribute table, there 32 distance values for 32 points w.r.t nearest line. Is there any method to identify which distance value is belong to which nearest line? I want to identify the line identity in attribute table w.r.t distance value


texts:
I'm developing an ArcMap add-in that takes some specific data from our database, generates some new layers on the map, then populates a multi-select box within the add-in.

All of that was largely working until yesterday.  I did some updates to the geoprocessing, which seemed to work, but the population of that multi-select seemed to break (which was very odd, as I know where the code to do that is, and I didn't touch it).

Anyway, I monkeyed around with it for a while, to no result, and finally tried going back to an older version of the code where that part was known to work.  And it didn't.

Even stranger, it turns out that this select box is populated; you just can't see what's there.  But you can click on it, and the behavior is what is expected.

Some further experimentation this morning revealed that I can't run it on a co-worker's computer (running the same copy of the add-in off a shared drive).  Even starting a new .mxd on her computer did not help; not even without a base-map layer present (so I know that has nothing to do with it).

However, the co-worker can run it on her computer.

Another bit of weirdness is that the progress bar window that opens up during the processing is truncated on her computer, but not on mine (and again, this is with an older version of the software that worked correctly a few days ago).

When something works for one person, but not another, my thinking immediately goes to permissions, but a) I didn't change any permissions yesterday and b) I don't even know what permissions might possibly have this kind of effect.

Anyway, I'm fairly new to ArcMap programming, and was hoping someone here might have some clue what's going on, preferably with a new avenue to approach to try to figure out what's going on.  At this point, I'm not even sure what to try to isolate the problem further.

@danielm suggested exactly the sort of thing that I was hoping for.  Unfortunately, deleting the normal.mxt only forced me to re-add the toolbar for the add-in.  The cache certainly sounded promising, but I was unable to find that.  c:\Users\%user%\AppData\Local\ESRI\Desktop10.3 does exist, but its only contents are the folders ArcCatalog and Configuration.  And a drive-wide search on c: for AssemblyCache turned up nothing.  Am I looking in the wrong place?

Actually, maybe deleting the normal.mxt did work.  I logged out and logged back in (I'm not aware of anything else I did in the meantime), shortly after posting that, and it is now working.


texts: Overlay polygon on raster and save as new raster with same resolution using ArcGIS Desktop?

texts:
New to GIS and trying to learn.

I'm trying to take a blue marble raster, overlay a countries .shp file, and save an image with the original blue marble image and the country outlines "burned into" the image using ArcGIS Desktop.

I know I can place both layers on the map and then save the map, but the resolution is modified to that of the screen. Ex. original raster was 5400x2700, but output raster is 1564x978.

I don't see a way to modify the output files resolution either?


texts: How to view raster attribute data in QGIS?

texts:
I have a single band, 8-bit, unsigned integer tif (National Land Cover Data).  When I view it in Arcmap 10.4.1, I am given the opportunity to also view it's attribute table:

However, when I view this same tif in QGIS 2.16.3, there is no option to open the attribute table:

With QGIS I can also load the tif's .dbf file, which contains the attribute data, but I don't see how to join that to the tif.

In summary, how do I view a tif's associated attribute data?


texts: Which geo-location available in Twitter data should I use?

texts:
I am extracting twitter location on my side.Few tweets has perfect location but in most cases additional details are available (i.e.  Country,bounding_box,poly lines etc)

So confused regarding selecting proper location.

Consider following case  in which country is given and additional information like bounding box and geometry is available.

Please check the screenshots

Complete Twitter string : Click here to see complete extracted tweet (too long hence put on JSFiddle). Due to some reason modified twitter ID's.

So which geo-location should I consider?

If I go country wise then getting many tweets on single point so I am confused.

Therefore, any help/suggestion will be great!!!

Thanks in advance


texts: Using SAGA tools on a subset of raster cells

texts:
I am calculating topographic position index (TPI) using SAGA tools for a DEM. TPI looks at the elevation of a raster cell compared to the mean elevation of raster cells in a surrounding neighborhood (ie 100m radius circle). This can be very computationally expensive for a large DEM, if spatial resolution is high, or if you are looking at a large surrounding neighborhood (large radius).
I do not need TPI to be calculated for the entire DEM, though. I only need TPI calculated for specific raster cells (where I had a forestry plot). Is there a way to only calculate TPI for a subset of raster cells?
I have provided links to download:

DEM
plot buffers (I need to calculate TPI for all raster cells within these polygons.)

https://unh.box.com/s/iohp8z2v7p534xvgpiu50fq1k6574e5e (DEM)
https://unh.box.com/s/pv7t8pkkxoofahu0q4r2ogus5s2k7q3e (plot buffer)


texts: Colorize singleband GeoTIFF raster using Python/GDAL with discrete interpolation like in QGIS

texts:
I have singleband raster with min 0 and max 0.82 values.
For raster I applied next color scheme in QGIS:

I want colorize raster using GDAL command, but receive raster with another color:

GDAL command:

gdaldem color-relief -nearest_color_entry -alpha input.tif color.txt output.tif

Example color.txt file:

0.18 215 25 28 255
0.36 253 174 97 255
0.53 255 255 192 255
0.71 166 217 106 255
0.89 26 150 65 255
nv 0 0 0 0

How I can create colorized raster like in QGIS (no manually in QGIS or other desktop app. I can use only command line tool (python script or GDAL command. Color.txt file I can generate automatically))?


texts:
I have a mapbox satellite map on which I need to load an external image of the seas as an overlay (the image has transparent countries).

This is the map:

 var mymap = L.map('map', {
      center: {lon: 12.39258, lat: 41.69906},
      zoom: 5,
      maxZoom: 8,
      zoomControl: true
    });

L.tileLayer('https://api.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
    maxZoom: 18,
    id: 'mapbox.streets-satellite',
    accessToken: '<mytoken>'
    }).addTo(mymap);

and this is the code to load the overlay image:

 var imageUrl = 'http://.....',
    imageBounds = [[30.1875, -18.125],[45.650167938232421875, 36.101667938232421875]];
L.imageOverlay(imageUrl, imageBounds).addTo(mymap);

The imageBounds are those of the image I am loading. The image has been generated from a system with EPSG4326 coordinates. The result is that the image is drifted from the base map, and the country borders don't overlap perfectly.


texts: Demographic Info within 3 miles of longitude and latitude

texts: I want to get demographic information within three or five miles of a location given its longitude and latitude. The demographic info I am looking for include number of people, age distribution, income distribution, race distribution etc...


texts: PNG disappears when exporting/printing map in ArcGIS Desktop?

texts: Ive added a PNG image of a chart to my map and when i try to export as any image file or print the map the PNG image is not there.  Im using arcmap 9.3. in layout view im adding image which ive tried as a jpg and png. it appears on the layout itself but once i print or export the map the image is no longer visible on the printout or export. Also, the image does not appear on the print preview. Ive added image files to many of my maps before so im not sure what would be causing this


texts: proj4js: converting EPSG:3857 to SWEREF99 TM

texts:
I'm trying to convert a EPSG:3857(Google/OSM) coordinate to a SWEREF99 TM coordinate using proj4js but the following code produces a invalid result:

sweref99 = "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs "
proj4('EPSG:3857', sweref99, [17.375, 62.15])

Output: [-1188634.4915465375, 63.90148326237714].
Expected output: [623764.06663, 6893158.947579].

How can I solve this and convert a EPSG:3857 point to a SWEREF99 TM point?


texts: Subtract two rasters with Raster Calculator in ArcObjects (VB.NET)

texts:
I'm having a hard time subtracting two rastera with ArcObjects sdk 10.1.
I keep getting a null reference exception at the gp.execute() method, but I can't figure out where the problem is, I recall setting other arguments to nothing in the past so don't think this would be the  problem

I'm using both raster paths in the expression and I'm not sure if the syntax will be correctly parsed

Input values are in this test method (don't mind the incomplete assert, I check it manually in ArcMap)

  <TestMethod()>
Public Sub RasterCalculatorTest_ObjectIsFiled_NotIsNothing()
    Dim target As CalculateOVRaster = New CalculateOVRaster()
    Dim rasterPath1 As String = rasterGdbPath & "\" & "subvakken_hpo"
    Dim rasterPath2 As String = dhmPath & "\" & dhmName
    Dim expression As String = "'" & rasterPath1 & "'-'" & rasterPath2 & "'"
    Dim outputPath As String = rasterGdbPath
    target.RasterCalculator(outputPath, expression)
    Assert.Inconclusive("")
End Sub

Main method:

 Public Sub RasterCalculator(ByVal outputRasterPath As String, ByVal expression As String)
    Dim gp As GeoProcessor = New GeoProcessorClass
    Dim toolRasterCalc As New RasterCalculator(expression, outputRasterPath)
    gp.OverwriteOutput = True

    Dim gpResult As IGeoProcessorResult = New GeoProcessorResult
    gpResult = gp.Execute(toolRasterCalc.ToolboxName, Nothing, Nothing)

End Sub


texts: How to add an arrow symbol or marker to a QGIS legend?

texts:
I'm currently making a map of student migrations in the Netherlands, including a legend. Here's what I made so far:

I'm sorry for the blurriness on the map. I'm also adding a legend in the top right corner. Here it is up close:

What I'm still missing, is pictograms of the arrows. The arrows from the original layers are too big, and don't look well in the legend. So I deleted those layers in the legend. However, I'm not quite sure how to add legend items with simple symbols or markers with a text associated with them. I'd like to add two small images of a simple orange and blue arrow without any curves. I would also like to put some text next to it, like “intra-regional student flows” or something along those lines.
Questions:

How do I add pictograms/markers of simple arrows to the legend?
Why does the quality of the print layout of the map seem less good than the quality of the original map in QGIS?


texts:
If a base station can keep a list of known rovers in the area and the rovers transmit their GPS information (coordinates) to the base station, can the base station correct their position ?

For instance would the following work as accurately as sending the corrections directly to the Rover ?

Rover A, has GPS position 13,23
Rover B, has GPS position 13,15

Base station has GPS position 5,2
Base station has known position of 1,1
Base station diff = 4,1

Rover A, is at location 9,22   (13-4),(23-1)
Rover B, is at location 9,14   (13-4),(15-1)

** Added*
The system is for asset tracking. The base station, needs to know where all rovers are with respect to it. The individual rovers are dumb and knowing its position means nothing to it. However, since RTCM is to make corrections AT the rover, I am looking to avoid that due to battery / energy / FCC band limits.


texts:
On a SUSE System (SLES 15) I try to configure MapServer 7.4. with Oracle-Spatial support.
Important: The Oracle Database is installed on another server.

I wonder if I need also the Oracle installation on the SLES 15-server or if the Oracle client is enough?
So far I installed the client at /usr/lib64/oracle/11.2.0.4.0/client/lib/

I try to configure with:

cmake ..   -DCMAKE_PREFIX_PATH=/usr/lib64:/usr/share/gdal:/usr/lib64/oracle/11.2.0.4.0/client/lib
-DWITH_ORACLESPATIAL=1 -DWITH_HARFBUZZ=0 -DWITH_GIF=0 -DWITH_FCGI=0 -DWITH_PROTOBUFC=0 -DWITH_FRIBIDI=0

but in the output I always get:
CMake Error at CMakeLists.txt:73 (message):
  ORACLESPATIAL library/component/dependency could not be found.

Does that mean I definitely need an Oracle installation?


texts:
I found the this to export the current view as image. The following code works and was accepted as answer.

c = iface.activeComposers()[0].composition()
image = c.printPageAsRaster(0)
image.save('output.png','png')

Sadly the images produced by this code are not georeferenced, even if I use different image formats.
How is it possible to programmatically export current view as georeferenced image with QGis?


texts: L.control features showing up only below raster layers

texts:
I've been studying Leaflet and, when I was trying out some plugins, this issue showed up.

Pop-ups and markers works fine, but the line (perimeter) won't show up unless I turn off the raster layers. It happens with different plug-ins, so probably it has something to do with my code - the structure was created by QGIS2Web and I've done some modifications.

Here is the code:

        map.createPane('pane_polylinemeasure');
        map.getPane('pane_polylinemeasure').style.zIndex = 500;
        var polylineMeasure = new L.control.polylineMeasure({
            pane: 'pane_polylinemeasure',
            (...)
        });
        polylineMeasure.addTo(map);

L.control.polylineMeasure refers to one of the plugins I've tried:
Leaflet.PolylineMeasure. But as I said, it happens to others measurement plugins too.

All other layers' zIndex range from 400 to 410 (400 and 401 are my raster layers). Please notice plugin's markers and popups are working as intended, but the lines and polygons it creates aren't.

And the same happens to another measure plugin


texts:
I am  working on script and I´d like to freeze it for use in computers who haven´t got python installed-

The script is running fine but when I freeze it using cx_freeze an error appears.

at the end of the message says

OSError:proj data directory not found. Expecting it at: C:\python34........mpl_toolkits\basemap\data

Is the data not included in the build directory created by cx_freeze ?

I am using the following script for freezing, the 'executable'

base = None

def find_data_file(pyproj):
    if getattr(sys,'XXXXs.exe',False):
        datadir = os.path.dirname(sys.aaEjecutable.py)
    else:
        datadir = os.path.dirname(__file__)
    return os.path.join(datadir,pyproj)

if (sys.platform == "win32"):
   base = "Win32GUI"

exe = Executable(
        script = "Conver.py",
        icon = "logo4.ico",
        targetName = "XXXXs.exe",
        base = base
        )
includefiles = ["Logo1.jpg","Logo2R.jpg","Logo2R.jpg","logo4.ico",
                (('C:\Python34\Lib\site-packages\mpl_toolkits'),("mpl_toolkits"))]
setup(
    name = "Conver",
    version = "V3",
    description = "conve",
    author = "Jose ",
    options = {"build_exe": {"include_files":includefiles}},
    executables = [exe]
 )

I think that something is wrong with it. I must include the basemap but I dont't know how to do it

I cannot go foward. The python script runs fine but I can use it in a computer with no python installed.


texts:
A new version of pgAdmin 4 is released almost every month. I wonder what is the correct way to upgrade a newer version of it?

Is it necessary to uninstall the older version first and install the new one latter? Or will the installer from the newest version overwrite the old ones without fragmenting files in the system?

I could not find the answer in pgadmin.org website or other places as well.

 I believe this is on-topic as discussed in GIS Meta: Are software installation questions on topic? Besides providing great support for PostgreSQL, pgAdmin 4 now even has a geometry viewer (see here).


texts: Finding distance between two coordinates in ellipsoid?

texts:
I have two sets of latitude and longitude.

How do I find the distance between the two locations if I assume the earth is a perfect ellipsoid (with an eccentricity of 0.0167)?


texts: hypsometric colors alà IMHOF, SYDOW or PEUCKNER

texts:
I need a hypsometric color-map to add it to my multishade-model. (High Mountain between 800 and 4000m) There are a lot of different types explained in IMHOFS "Cartographic Relief Presentation". I want to do it traditionally... :-)

So, where can I find "prebuild" colormaps alà PEUCKNER, IMHOF or SYDOW? (I don't like the "Terrain" or "SRTM" ones from Grass)


texts: Choosing geographic and projected coordinate systems for Mexico

texts:
I need to analyze a dataset that covers the whole country of Mexico.
In Oasis Montaj (Geosoft), I chose the Mexican Datum of 1993 as the geographic coordinate system, but I also need to use a projected coordinate system (in order to do the analysis, Oasis Montaj needs to have grid coordinates) and I'm not sure which one to use?


texts:
I use this instruction http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/

I have the problem on the step "Starting your tileserver"

sudo mkdir /var/run/renderd
sudo chown username /var/run/renderd
renderd -f -c /usr/local/etc/renderd.conf

The problem:

renderd[4620]: An error occurred while loading the map layer 'default': Could not create datasource. No plugin found for type 'shape' (searched in: /usr/lib/mapnik/input) (encountered during parsing of layer 'world' in map '/home/oleg/src/mapnik-style/osm.xml')
renderd[4620]: An error occurred while loading the map layer 'default': Could not create datasource. No plugin found for type 'shape' (searched in: /usr/lib/mapnik/input) (encountered during parsing of layer 'world' in map '/home/oleg/src/mapnik-style/osm.xml')
renderd[4620]: An error occurred while loading the map layer 'default': Could not create datasource. No plugin found for type 'shape' (searched in: /usr/lib/mapnik/input) (encountered during parsing of layer 'world' in map '/home/oleg/src/mapnik-style/osm.xml')
renderd[4620]: An error occurred while loading the map layer 'default': Could not create datasource. No plugin found for type 'shape' (searched in: /usr/lib/mapnik/input) (encountered during parsing of layer 'world' in map '/home/oleg/src/mapnik-style/osm.xml')
renderd[4620]: DEBUG: Got incoming connection, fd 8, number 1
renderd[4620]: DEBUG: Got command RenderPrio fd(8) xml(default), z(0), x(0), y(0)
renderd[4620]: Received request for map layer 'default' which failed to load
renderd[4620]: DEBUG: Connection 0, fd 8 closed, now 0 left
renderd[4620]: DEBUG: Got incoming connection, fd 8, number 1
renderd[4620]: DEBUG: Got command RenderPrio fd(8) xml(default), z(0), x(0), y(0)
renderd[4620]: Received request for map layer 'default' which failed to load
renderd[4620]: DEBUG: Connection 0, fd 8 closed, now 0 left
renderd[4620]: DEBUG: Got incoming connection, fd 8, number 1
renderd[4620]: DEBUG: Got command RenderPrio fd(8) xml(default), z(0), x(0), y(0)
renderd[4620]: Received request for map layer 'default' which failed to load
renderd[4620]: DEBUG: Connection 0, fd 8 closed, now 0 left

Update 1: One of the problem was the file "renderd.conf". here is file without error.

[renderd]
socketname=/var/run/renderd/renderd.sock
num_threads=2
tile_dir=/var/lib/mod_tile
stats_file=/var/run/renderd/renderd.stats

[mapnik]
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/truetype/ttf-dejavu
font_dir_recurse=1

[default]
URI=/osm_tiles/
TILEDIR=/var/lib/mod_tile
XML=/home/map/src/mapnik-style/osm.xml
HOST=localhost
TILESIZE=256
CORS=*

But I have another errors:

renderd[8967]: An error occurred while loading the map layer 'default': Shape Plugin: shapefile '/usr/local/share/world)boundaries/shoreline_300.shp' does not exist (encountered during parsing of layer 'world' in map '/home/oleg/src/mapnik-style/osm.xml')
renderd[8967]: An error occurred while loading the map layer 'default': Shape Plugin: shapefile '/usr/local/share/world)boundaries/shoreline_300.shp' does not exist (encountered during parsing of layer 'world' in map '/home/oleg/src/mapnik-style/osm.xml')

Update: The question is solved


texts: Zonal Statistics as Table wrong number of zones

texts:
I have used zonal statistics as table to find the average value of raster pixels over various polygons. The number of polygons in the feature zone data is 1794, while the output table only results in 1299 zones. Is there a possible reason for this? When analyzing which zones did not end up in the output table, they seem to be completely random, not related to size or shape of the zone. I have attempted using the spatial analyst supplemental tools and the tool Zonal Statistics 2, but the result is the same. I am trying to do zonal statistics for the following picture:

Where the lines in red are my feature zone data and the background is my raster.

Additionally, I have tried the same method using a different raster, and a different number of observations are created in the new output table. It is still less than the full amount of polygons in the shapefile. In trying a third raster, (with much higher resolution), the resulting table is only 1 less than the number of polygons in the shapefile. My assumption is there are some pixels that do not have the granularity to cover some of the polygons in my shapefile.


texts: GPS position within search zone on globe?

texts: How to check if some ocean drifters traveled through MH370 search zone which can be defined by 4 points on globe. I need mathematical equation to calculate if the GPS position of some ocean drifters is within the search zone.


texts: How to get QGIS layers style in a single file

texts:
I have layers on my QGIS project.

Rivers
Water pipes
Gas pipes
.....

I set the color, width, size of these layers. All layers are different style.

I want to use these styles in geoserver. I have WMS for each layer. So I should save single SLD files in QGIS and upload them in geoserver.

I want to save all layer styles in a single SLD file from QGIS and create a single style in geoserver. Than Apply it to WMS layer.

Is this possible?


texts: How to use ModelBuilder to convert, insert, and finally delete in one operation?

texts:
I'm working on ArcGIS Server, ArcMap and ArcCatalog

In ArcCatalog I've two databases (Temp.gdb and main.gdb) so I need a ModelBuilder model that :

Convert CAD dwg file to Geodatabase (or dataset)
insert all data from 1st geodatabse to the second one (main) and
then delete all data from the first geodatabase (temp.gdb)

How can I do that with ModelBuilder or a script please the three operations must work in synchronisation.


texts: How to determine projection of the following map. It is a scan of an image.


texts:
I'm looking to create a map similar to the one below--essentially an interpolated map, but using multiple categorical variables. Has anyone seen an application of interpolation that can do this in ArcGIS? I was able to find an article from the author, but the closest reference to the method was:

  Katz created a statistical algorithm that weighted the responses around a particular location. The approach let Katz create colorful maps that show how regional dialects are spread across the country.

I attempted to recreate something like this with basic hotpsot symbology and overlaid transparency but it had a few downsides-- no single dataset for analysis, cannot be clipped, and the weight of each category was heavily influenced by the ordering of the layer.


texts: How to merge MANY lines within same layer that meet (join at some point)?

texts:
I have a line dataset. The dataset is vast and the lines are single features in the data layer. I would like to merge the lines which join at some point. How can I do this using ArcGIS 10.1?

For example:
This is the layer, where line fragments are individual records:

Where separate lines meet other separate lines, I would like to join these to form 1 single line record:


texts: I am working with python plugins for QGIS. I am done with my one of my .py file using python 2.5 and pyqt4. It is just help file for QGIS, which i changed. I wanted to incorporate the same in QGIS. I installed QGIS 1.7.1. I know it to be done through python plugins. But how to go about it? where to copy my file, so that it will get open from QGIS? QGIS already has that page (help file ), I need to change it. Help me out.


texts: Trying to copy features from an in_memory table to feature table

texts:
i just want to write the in_memory table to a table in a .gdb

import arcpy
from arcpy import env
import os
import sys
scriptPath = sys.path[0]
thisFolder = os.path.normpath(os.path.dirname(scriptPath))
env.workspace = os.path.join(thisFolder, "AdminReport", "Workspace")

#get variables
...code here..

#create Table
print("Creating Table...")
tempTable = arcpy.CreateTable_management("in_memory", "tempTable")
arcpy.AddField_management(tempTable, "Parcel_FID", "LONG")
arcpy.AddField_management(tempTable, "Plan_Acres", "DOUBLE")
arcpy.AddField_management(tempTable, "Pres_Acres", "DOUBLE")
arcpy.AddField_management(tempTable, "Conf_Region", "TEXT", field_length=25)
arcpy.AddField_management(tempTable, "Conf_Date", "TEXT", field_length=25)
arcpy.AddField_management(tempTable, "Center_Zone", "TEXT", field_length=25)
arcpy.AddField_management(tempTable, "Center_Muni", "TEXT", field_length=25)

#calculate values for each field
row = arcpy.InsertCursor(tempTable).newRow()
row.setValue("Parcel_FID", objectID)
row.setValue("Plan_Acres", planAcres)
row.setValue("Pres_Acres", presAcres)
row.setValue("Conf_Region", confRegion)
row.setValue("Conf_Date", confDate)
row.setValue("Center_Zone", centerZone)
row.setValue("Center_Muni", centerMuni)
del row

#Output Table to GDB
arcpy.TableToTable_conversion(tempTable, "Workspace.gdb", "outTable")

No errors but I am geting an empty table generated.


texts: Is there a quicker way to spatial join two feature classes?

texts:
I have two large feature classes (3.5 mil point and 3.8 mil poly) that I would like spatially join.

Is there a faster way to do this instead of just using the classic spatial join tool?

I'm guessing this is a repeat question just can't find it.

When joining feature classes of this size I usually just let it run for a few hours to complete.

In the future, I would like to find a way to turn these types of processes from hours to minutes.

I only pull over one unique ID field to create a foreign key and then relate the two tables.

Just looking for advice or ideas.

One to One Join
Intersect

Arcpy friendly
Arcgis 10.1
Processor: Intel(R) Xeon(R) CPU E5-1607 0 @ 3.00 GHz
RAM: 16 GB
System type: 64-bit Operating System


texts: Analyse spatial data and extract results in tabular form in QGIS

texts:
I'm sorry if this question is badly framed, I only started with GIS and QGIS 2 days ago so I don't know any terminology yet - I'll try to explain as best I can.

I have 2 layers in QGIS (1.8, on Win7), one with geological information, and the other with the state boundaries.

I want to get out a report which tells me the composition of each state, i.e. a table of the form:

State name    Rock type 1    Rock type 2
State1            32 %           68 %
State2             5 %           95 %

I guess this is a pretty basic thing to want to do, but I'm having trouble finding how on my own because I don't know what to search for.

Sorry if bad question, thanks for any help.


texts:
Given a point and a line, I am trying to determine the point on the line that is closest to the given point. The given point is always at least fairly close to the line (3-4 meters max)
Originally I was using the nearestPointOnLine function from the turf JS library. However, that gives inaccurate results, especially for long lines: https://github.com/Turfjs/turf/issues/1440
Another approach I tried was using ST_ClosestPoint via postgresql:
WITH geoms AS (
  SELECT
    ST_MakeLine(ST_MakePoint (- 86.26725, 34.32582) , ST_MakePoint (- 86.14040, 34.39281)) AS line
    , ST_MakePoint (- 86.19219 , 34.36546) AS point
)
select
    st_distance(point::geography, line::geography) AS i
    , st_distance(st_closestpoint(line, point)::geography, line::geography) AS closest_point_distance
    , st_dwithin(st_closestpoint(line, point)::geography, line::geography, 0.1) AS closest_point_is_close_to_line
from
    geoms

original_distance
closest_point_distance
closest_point_is_close_to_line

2.64173838
2.68938954
false

This runs into the rounding issue described here: point returned from ST_LineLocatePoint returns false in ST_Contains
At this point I am considering getting a small line segment close to the point from PostGIS, then getting the closest point on that line with turf. But that seems very involved, and I am wondering if I am missing an easy way (via PostGIS or JavaScript) to get the nearest point (to a close by point) on a long line.


texts: Autosize custom form window to its content

texts:
I've created several custom forms using Qt Designer. My problem is that when I open a form, its window size remains the same as the size of the window of the last form I opened. For example, let's say I open the form below and manually adjust its window size so that it fits its contents:

Then, when I open a bigger form, it will look like this:

So, if I want to see the "OK" button, I have to adjust the window size manually again. This gets tedious in the long run.
I tried adding

<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
</sizepolicy>

at the beginning of the .ui files (before the "windowTitle" property), but it causes QGIS to crash when I try and open the forms. I also tried adding these lines:

dialog.parent().setFixedWidth(400)
dialog.parent().setFixedHeight(400)
dialog.parent().setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)

at the beginning of the function that is called when the form is opened, thinking my issue was similar to this one, but it doesn't make any difference.
So, how can I make the window autoresize to the contents of the custom form within?


texts:
I'm pretty new with Leaflet and have a basic question: I added this pop-up to my loaded GeoJSON file according to Leaflet, but it won't work.
Any hint?
// load external GeoJSON file
var nonregWash = $.getJSON("../assets/NonRegulatoryWashes.geojson", function (data) {
    // create GeoJSON layer and add it to the map
    L.geoJson(data, {
            style: function (feature) {
                switch (true) {
                    case feature.properties.Name.includes('Non-Regulatory'):
                        return {
                            color: "CornflowerBlue", weight: 1
                        };
                    case feature.properties.Name.includes('Regulatory'):
                        return {
                            color: "DarkBlue", weight: 1
                        };
                    default:
                        return {
                            color: "Black", weight: 1
                        };
                }
            }
        }) ** // add popup to the layer**
        .bindPopup(function (layer) {
            return layer.feature.properties.description;
        }).addTo(map);
});


texts:
Here is my problem:

I have 72 points, and each one of those points falls within multiple 1,000 foot buffers zones. I am trying to find out the distance from the point that falls within a buffer to the centroid of that buffer for each point

I have performed an intersect between the buffer zones and the 72 points so I know every buffer zone a point falls into. there are 441 instances a point intersects a buffer, and I did a summarize count for each point Name and joined it to the intersect FC. I also Did a select by location and there are 371 buffer zones that intersect the points.
so 441 intersected instances for points, and 371 buffer zones (Different points, in the same buffer problem)

What is confusing me is the relationship between the two. I have used the generate a near table using the centroids of the 371 bufferzones to the 72 points. But my output was 371...

My input for the near table is the buffer centroids, because i need to specify 1000 foot radius, and my near features are the 72 points.

Should i try a spatial join, or the near tool? I do not think I am understanding the cardinality relationship and am getting really confused!


texts: How can I access to elements in dir(some_class) of PyQGIS without a dictionary in my code?

texts:
I'm developing a QGIS plugin to search class methods in the different classes of PyQGIS. I used three widgets: 2 objects of type QLineEdit (for classes and class methods) and one QTextBrowser (for results). The snipped code is below:

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

        text_search_class = self.dlg.lineEdit.text()
        text_search_line = self.dlg.lineEdit2.text()

        dict = {'QgsVectorLayer' : dir(QgsVectorLayer)
                'QgsRasterLayer' : dir(QgsRasterLayer),
                'QLineEdit'      : dir(QLineEdit)}

        if ( text_search_class in dict.keys() ) == True:

            idx = dict.keys().index(text_search_class)

            elements = getPat2(text_search_line, dict.values()[idx])

            n = len(elements)
            message = str(n) + " elements of '" + text_search_line + "' in " + text_search_class + "\n\n"

            for i in range(n - 1):
                message += elements[i] + ', '

            if n != 0:
                message += elements[n - 1]

            txtBox = self.dlg.textFeedback
            txtBox.setText(message)
        else:
            message = "The chosen class does not exist"
            txtBox = self.dlg.textFeedback
            txtBox.setText(message)

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

My issue is that I had to use a dictionary to get the list of methods from dir(class) (in my code I only use QgsVectorLayer, QgsRasterLayer and QLineEdit; but they are more than 1200) because, for example, the true list is for dir(QgsVectorLayer); not for dir('QgsVectorLayer') when I don't use the dictionary. My question is how can I access to elements in dir(some_class) of PyQGIS without a dictionary.

The next pictures show the execution of the plugin.

Without any text to search:

Searching by pending, set y max, respectively, in QgsVectorLayer, QgsRasterLayer and QLineEdit:


texts: Only run r.neighbors if cell meets criteria

texts:
This is my first time using GRASS to work with Rasters, so please excuse my lack of knowledge on the subject.

I want to run the GRASS r.neighbors function on cells that meet a specific criteria, and ignore running the function that do not meet that criteria.  In addition, I still want to use the values that do not meet the criteria in the neighborhood calculations.

For example, I have a raster with integer values, and I want cells with a value of 1, 2, and 3 to run the r.neighbors function, but not values of 4, and 5.  When the function gets to cells with values of 1, 2, or 3, r.neighbors should run, and include all cells within the neighborhood (even ones with values 4, and 5).  When cells of 4, and 5 are encountered, I simply want to do nothing and move to the next cell.

Here is a very similar Knowledge Base article from Esri that does this, but with NoData cells.  I need to do it using GRASS.

Looking at the documentation for r.neighbors, I do not see a clear way to approach this.  I do not believe I can simply loop through the raster cells and run the r.neighbors function since the output is a new raster each time it run.

If that is the case, then perhaps I can reverse engineer the r.neighbors function within a conditional?  I just have no idea how r.neighbors determines it's neighborhood.

How does r.neighbors walk through the raster collecting cell values?

If so, then how does it do this?
Ultimately, this is what I want to know the most!

Would I be better off trying to do this outside of GRASS?

If so, what are your recommendations?

Right now, I am just stuck on where to go.

I am most interested in learning how (systematically) r.neighbors collects the neighborhood values.  What functions, methods, etc. does GRASS use to read specific cell values within a) a certain number of cells OR b) a specific distance in n direction of a given cell?  I believe knowing this will help me the most going forward.


texts: Preparing success rate diagram in IDRISI?

texts:
I am looking to produce 'Success Rate Curve' of my Landslide Susceptibility Zonation Map' earlier prepared in IDRISI Selva 17.0 edition.

Is there any way to produce the following diagram in the software which is required to illustrate overall accuracy of the produced product?

I have already collected the landslide locations in my study area (points) that are required for the accuracy assessment.

Is there a tool and procedure that could help me to derive the below diagram for the intended purpose?


texts: MapInfo SQL: Selecting all columns from one table, some cols from second table?

texts:
I'm fairly adept with the SQL Select in MapInfo, but I'm running into something that's got me a bit stumped.

I've got data in two tables that have a few columns in common.  I want to join the tables
and export them to a CSV, but I don't want to duplicate those columns.  Unfortunately, something like this doesn't work:

SELECT table1.*, table2.A, table2.B, table2,C
  From table1, table2
  Where table1.match = table2.match
  Into table_merged`

Is there a way to accomplish this?  If it helps, table2 will always have the same number of columns and the first five columns are present in table1.


texts:
This may be a long shot, but I have been given some WinBUGs code to run a model with a Leroux prior. I'm interested in 'fixing' the precisions for Leroux prior and the intercept term in this model. However, I'm not very familiar with how it's specified in WinBUGs.

Here's the code (the comments are my own):

model{
    for (i in 1:N){
#Likelihood
   O[i]~dpois(mu[i])
   p.sig[i]<-step(s[i])
   log(mu[i])<-log(E[i])+log(theta[i])
#s is the CH, v is the UH?
   log(theta[i])<-alpha+s[i]+v[i]
   s[i]~dnorm(S[i],tau[i])
   v[i]~dnorm(0,tau.v)
#I belive inv.delta is the precision parameter for the CH term?
   tau[i]<-1/(inv.delta*(1-lam+lam*num[i]))

S[i]<-(lam/(1-lam+lam*num[i]))*sum(Ws[cum[i]+1:cum[i+1]])
  }

for (k in 1:sumNumNeigh){
    Ws[k]<-s[adj[k]]
    }

#Modify these first two terms re: fixed taus?
inv.delta~dgamma(2,1)
tau.v~dgamma(2,1)
alpha~dflat()
lam~dunif(0,1)
}


texts:
I'm trying to perform a union on a common field after merging two adjacent shapefiles.  The shapefiles end up with at least one thin sliver of space between them. When I attempt a union I get the following orphaned hole error:

  Error in createPolygonsComment(p) :    rgeos_PolyCreateComment: orphaned hole, cannot find containing polygon for hole at index 17

I've uploaded a reproducible example to Dropbox at this link.

Here is the code to recreate the problem:

#loading required packages
require(sp)
require(rgdal)
require(maptools)
require(rgeos)

#load example data, set "dsn=" to your working directory or specify the path
example <- readOGR(dsn=".",layer="ReproducibleExample")

#Attempting a UnionSpatialPolygons based on the COUNTY field
example.df <- as(example, "data.frame")
countycol <- example.df$COUNTY
example.diss <- unionSpatialPolygons(example, countycol)

Returns:

  Error in createPolygonsComment(p) : rgeos_PolyCreateComment: orphaned
  hole, cannot find containing polygon for hole at index 17

Trying the fix proposed here and here:

slot(example, "polygons") <- lapply(slot(example, "polygons"), checkPolygonsHoles)

This returns the same error that comes from the union attempt but with different index number:

  rgeos_PolyCreateComment: orphaned hole, cannot find containing polygon
  for hole at index 30

Trying the fix proposed in Roger Bivand's helpful tutorial

fix <- slot(example, "polygons")
fixa <- lapply(fix, checkPolygonsHoles)

Returns same error at index 30 as above.

Others have raised this problem here and here, and while the solutions posited above appear to work for some cases, other cases are not resolved. One user used QGIS to address the problem, and the other had 2 of 3 items fixed, but no resolution for the final one.

It appears that people continue to have problems despite this code working from time to time. Has anybody found a solution within R?

I've performed "repair geometry" tool in ArcGIS, and it corrected the problem, but it seems like there should be a fix in R.


texts: Calculating well densities in selected counties using ArcPy?

texts:
I am trying to calculate:

total numbers of wells that fall into each county in a shapefile, and update the county table with the total count.
calculate the well density (how many wells there are per area unit, and update the table with the values obtained)

This is what I have so far but I have to set up the where_clause (the where clause should be set up to select the county that the cursor is on).

How should I sep up the where_clause to select the county and similarly select the wells that intersect on that county where the cursor is on?

import arcpy

WellsPath = "C:/Lesson5_Data/Wells.shp"
COpath = "C:/Lesson5_Data/COUNTIES.shp"

# Create a feature class for the wells

arcpy.MakeFeatureLayer_management (wellspath, "wells_lyr")
arcpy.MakeFeatureLayer_management (COpath, "county_lyr")

# Set up the field list to be used by the update cursor
fieldlist = "COUNTY"

countyname = "'ADAMS'"
where_clause = "COUNTY = " +  countyname
print where_clause

with arcpy.da.UpdateCursor(COpath, fieldlist) as countycursor:
    for row in countycursor:
        print row[0]
        countyCount =   int(arcpy.GetCount_management("county_lyr").getOutput(0))
        print "Counties selected: " + str(countyCount)
        arcpy.SelectLayerByLocation_management("wells_lyr", "INTERSECT", "county_lyr", "", "NEW_SELECTION")

I'm new to Python and I have no clue how to do this.


texts: Transforming layout page units to map units using ArcObjects?

texts:
I am trying to build an add-in that will create a polygon from the current map extent. This is not a problem in Data View where I can easily get the envelope of an iMxDocument:iActiveView in data view.  I need to do the same in Layout view, preferably without switching back and forth between layout and data views.

When in Layout the iActiveView:Extent:Envelope returns an envelope coordinates of the map position with respect to the layout. (position of the map frame on paper so to speak)  How do I transform these into actual map coordinates?  I tried using iDisplayTransoformation:ToMapPoint but the input needs to be a screen point and the coordinates I have are of the map frame with respect to layout, not screen coordinates.

In other words i need to transform page units to map units whereas iDisplayTransformation will transform only screen nits to map units or screen units to page units.


texts: Extract by Mask, Retain all bands (time) of a multidimensional raster dataset

texts:
I have a multidimensional crf dataset covering a grid of temperature data over time. My aim is to use extract by mask with a shapefile area that I'm interested in as a mask and retain the multidimensionality of the input raster i.e. get multiple bands over time.
When using code along the following example however, I lose the multidimensionality. What can I do to make sure all bands are retained but extracted to the right shapefile area?
# Description: Extracts the cells of a raster that correspond with the areas defined by a mask.

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/example/data"

# Set local variables
inRaster = "TempRaster"
inMaskData = "mask.shp"

# Execute ExtractByMask
TempExtract = ExtractByMask(inRaster, inMaskData)

# Save the output
TempExtract.save("C:/example/output/TempExtract")


texts: Add Layer from Database or Datatable to Basemap using Esri.ArcGISRuntime in C#

texts: How can I add/create Layer using Datatable or Database Query in C#.net instead adding through Uri using Esri.ArcGISRuntime sdk?


texts:
I have a local OSM server that cached osm.pbf.

How can I add data from this server to ArcMap like a base map layer?

OSM was made by instr: https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04


texts: What is this "brown spot" in Google maps?

texts: I was in Google maps today and noticed near Baltimore, US where the river is, there's a huge brown spot. Is this due to all of the waste? If so, will this keep going all the way into the ocean?


texts:
I have created several projects for several different clients. Each project has OS maps, shapefile layers from Government Bodies, Shapefile layers created, AutoCAD dxf loaded in (in various manners).

Is there a programme out there that I can load all my layers into (whilst maintaining their properties), keep all the original files on my computer. Send a link to a client that allows them to open the project, turn on and off various layers, interrogate the data (as in simple information tool), measure distance, and print maps, but not be able to edit the layers or save data.

I have worked of a GIS browser with various different government agencies but never had to create one.

Is there one that is a free, easy to use, and easy to learn by the clients?

I would like to be able to load all the files from QGIS 1.8.0 to this service whilst maintaining their properties, however if this is not possible I can do it over again.


texts: Geoserver and SLD - continuous zooming of points?

texts:
I'm working with sld files and geoserver and I faced a problem about zooming in points at certain scale.

Is it possible to zoom in a point layer so that points get bigger continuously like polygons on a typical polygon layer?

Later I will have other layer on which this point layer will be put. The other layer includes grid. Points should stay same size as the grid cells all the way when zooming in and out. The default setting seems to be that points get smaller when zoomed in. I have found those Min and MaxScale settings but I would not like to set some certain size to the points.


texts: What is QGIS equivalent of Boundary Clean tool of ArcGIS?

texts: I am trying to find a tool in the Grass/Saga toolbox which is equivalent to http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/boundary-clean.htm


texts:
I'm having some problems with Neo4j Spatial and OSM.
https://stackoverflow.com/questions/31523109/how-to-run-neo4j-with-osm-and-neo4jspatial

I'm considering using QGIS + Neo4j is that possible?

Any suggestions?


texts: Change Version Option Grayed out in ArcGIS Pro

texts:
I am experimenting with versioning data from an SDE database in ArcGIS Pro. I able able to create a new version, no problems, but when I go to change the version in the Data Source tab on the Contents Pane by right clicking on the SDE source it is all grayed out, not allowing me to click anything. See figure. I can only work and make edits using the Default version, not my new personal version.

Note, I can work on this ArcGIS Pro created version of the SDE in ArcMap without any issues. Only happening in Pro. I have, somewhat, done this before and did not have the issue.

Any ideas?


texts: Can I overlay a CartoDB visualisation on Bing Maps base?

texts:
If I am using Bing Maps as my base map, can i overlay a CartoDB visualisation (that I created earlier) on top of it? If so how do I go about doing that? The example on the cartodb site only refers to LeafLet Maps but when I try "cartodb.createLayer" with Bing Maps as my base map, it throws an error:

  "Cartodb.js can't guess the map type"

Not sure what I am missing. I am using the Bing Maps' JavaScript library and wondering if CartoDB even supports Bing Maps.


texts: Leaflet Sidebar: Show specific sidebar content after clicking a location

texts:
Similar question to this one but I don't have enough knowledge to apply it to my case.

I have a Mapbox GL JS map (based on Leaflet) to which I added a Leaflet Sidebar V1. The sidebar content is made up of html using several levels of tabs like so:

        <button class="tablinks" onclick="openNation(event, 'NAT1')">Japan</button>

                Tokyo

Description of Tokyo.

I have a whole structure of Nations and Cities. With the sidebar open, you first click on a country, which will display the list of its cities. You click on a city in the list, and the description will display, all of that in the sidebar.

What I want to do is to display the relevant description (and mark the relevant Nation and City as active) when you click on a city on the map.

I already have some functions associated with clicking on a city like so:

map.on('click', function (e) {
    // Query all the rendered points in the view
    var features = map.queryRenderedFeatures(e.point, { layers: ['locations'] });
    if (features.length) {
        var clickedPoint = features[0];
        // Fly to the point
        flyToCity(clickedPoint);
          }
        });

Initially this code was taken from a tutorial which also included this:

       // 2. Close all other popups and display popup for clicked store
        createPopUp(clickedPoint);
        // 3. Highlight listing in sidebar (and remove highlight for all other listings)
            var activeItem = document.getElementsByClassName('active');
            if (activeItem[0]) {
              activeItem[0].classList.remove('active');
            }
            // Find the index of the store.features that corresponds to the clickedPoint that fired the event listener
            var selectedFeature = clickedPoint.properties.name;

            for (var i = 0; i < cities.features.length; i++) {
              if (cities.features[i].properties.name === selectedFeature) {
                selectedFeatureIndex = i;
              }
            }
            // Select the correct list item using the found index and add the active class
            var listing = document.getElementById('listing-' + selectedFeatureIndex);
            listing.classList.add('active');
            // Shift view to selected item in sidebar
            listing.scrollIntoView(true);

I am not using the popup or the sidebar that this code is for since I've created my own Leaflet Sidebar V1, but I guess I could probably take inspiration from the code. However, I don't know enough to figure how to designate and set the leaflet sidebar content from a javascript function.

I'm attaching a screenshot for illustration purposes.


texts: Technical Features of server to hold Quantum GIS, GeoServer and GeoNetwork

texts:
I work at my company as Project Assistance and we think of migrating of ArcGIS to another open source program similar to ArcGIS like Quantum GIS, GeoServer and GeoNetwork and I need to know the technical characteristics of a server to do this and buy one. These tools let me to publish maps, to process maps, I guess. I want to know which are technical specifications that a server needs to support the job of these packages (QGIS, GeoServer and GeoNetwork) for example, recommended memory for 40 or 50 users working with maps to they don't have any problem with their jobs, about storage space of 40 terabytes or more, etc.

I want for 40 or 50 users publishing maps, processing maps, sharing data, availability in disk such as mirror, storage space for maps 40 or more terabytes, memory I don't know, how many do you suggest me? of which depends on the size of the maps?

I am not restricted in budget, the important is that server was high performance and it was dedicated and centralized all maps, actually everybody makes his map and it's a problem.

It's for a project to national level for disasters, earthquakes, etc.

I'm sorry for my writing in English. I speak Spanish.

I'm new and I can't answer my post until tomorrow so I edit my first post.

On http://es.wikipedia.org/wiki/OpenStreetMap says:

"El conjunto de servidores consta de un servidor de base de datos de gran rendimiento, un servidor de aplicaciones para el sitio web, tres servidores de aplicaciones para la API y un servidor destinado al renderizado del mapa"

Do I also need an application server and another application server for rendering map?

application server (GeoServer?)
application server for rendering map (Geonetwork?)
application server for API ?????? for example, what application?

That is I don't know. "renderizado del mapa"


texts: Create chainage points from hatch in ArcGIS

texts:
I have routes representing road centrelines created my geodatabase. I have hatched these features with point symbols and lables every 100m as shown below:

I would like to create a point feature class that replicates the hatch. That is, points every 100m along my routes with attributes containing route id and distance.

Is there a way that I can convert the hatch to points, retaining the attributes
OR a tool that I can use create the point features with the attributes?


texts:
I think Folium uses EPSG3857 by default, but I have a custom .prj file that I need to use. Is there a way to load that in? I'm not reading in the projection file at all right now.

This is my current code:

gdf = gpd.read_file('test.shp')
# gdf_wgs84 = gdf.to_crs({'init': 'epsg:4326'})
gj = json.loads(gdf.to_json())
m = folium.Map(location=[36.6, -119.6], zoom_start=9, tiles=basemap)
folium.GeoJson(gj, style_function=lambda feature: {
    # 'fillColor': feature['properties']['RGBA'],
    # 'color' : feature['properties']['RGBA'],
    'weight' : 1,
    'fillOpacity' : 0,
}).add_to(m)

folium.LayerControl().add_to(m)

# Save map
m.save(save_name("name", ".html"))


texts: Converting polygon to numpy array for CNN using Python

texts:
I need to create the current data set for CNN.
So I want to convert the number entering a section of a certain area into a numpy array.
For example, at the point where the geohash code is precision 6, ["wydm6e", "wydm6g", "wydm6d", "wydm6f"]
I want to take the points with precision 7 ["wydm6d","wydm6e"...] and convert them to a numpy array.
Then, the shape of 16 * 8 based on precision 7 will come out.
Currently raw data has a point and a value
The final goal is to combine the values of each region and transform it into a shape of 16 * 8.
Converting to matplotlib and getting the shape was successful, but the shape doesn't come out what I want because of the value of polygon.


texts: How to know which satellite took the image?

texts:
I am having trouble finding which satellite took the images I have.
Most are from digital globe.

I read through the metadata and the .imd file.
I found date and time but not the name of the satellite. Where can I find this information?


texts: Why does QGIS 1.8.0 crash when I try to set up CRS on Win XP?

texts:
I have a problem with my qgis 1.8.0. When I click on any button that set CRS or try to set the coordinates on the fly, qgis crash.  I try to uninstall the program and re-install it again using standalone.exe and the osgeo4w-setup installer but the problem persist.
My OS is windows XP ice.

Thank you, I hope to not have to format PC!


texts: Rotated Labels not Respecting Feature Weights in Maplex?

texts:
When setting labels to rotate based on a field, annotation will overlap other features even if the weight is set to 1000.

Does anyone know if there is a way to force it to follow both the rotation value and the feature weight?  E

ven if the label engine had to increase the offset or shift the label to the other side of the feature or resize the labels within a set range to sqeeze it in?

Open to any ideas or tools/scripts that can get this done.

Using ArcMap 9.3 & 10 at the ArcInfo license level with Maplex currently.


texts:
Are there limitations how many layers there should be in a geopackage?
It is advantageous to allocate layers into groups to several gqkg, instead of only one gqkg. (I work with approx. 50 layers.)


texts:
I'm a newbie in GIS technology and need some help in loading a rainfall radar raster data into PostGIS. The raster image is shown here:

What I need is to store in the database the radar reflectivity values. I supose that a previous image processing is needed, in order to extract the background and get an image with only the reflectivity pixels represented by colors. No problem with this, I can easily convert it.  It uses a polar stereographic projection and I know the coordinates of the image center.

At this point, I'm wondering which is the best way to achieve this. A quick look up in google points me to use the raster2pgsql process.

My questions are:

1) Is really raster2pgsql the best tool for my purposes?

2) Could you give me some help in how to use raster2pgsql to achieve this?

3) Is there any easy way to check the projection of the image? I mean, is there any tool in which i can easily charge the image as a layer and try to match it to a projection to verify that the image projection is the expected?

Thanks in advance.


texts: CRS information not recognized when geopackage is loaded

texts:
I am starting to transition from .shp to geopackage data format in QGIS. There are many benefits to the format that give it an advantage over shapefile for many of my projects. However, I am having a recurring issue. When ever I load a previously saved geopackage file into QGIS, the program does not recognize the CRS and defaults it to that of the project. I then have to go into the properties and change the CRS to the appropriate system. I have tried updating the metadata for the layer but this does not help. What can I do to ensure that CRS information is included with the geopackage?

Geopackaging process- To create a geopackage I use the Export tool found when one right clicks on a layer in the QGIS "Layers" panel. I then select Geopackage as the file type and set the CRS for the saved file. The source files are generally in CSV or .shp or .tab(Mapinfo). The issue seems to occur regardless of the file type.


texts:
I am editing a layer in QGIS with severe polygon overlaps. Is there a way to delete the underlapping portions (i.e. the invisible parts) using QGIS?

If I import the layer into GRASS using the GRASS-plugin, I can get a very useful layer which contains the overlaps (polygons_2), but if I use the difference geoprocessing tool to slice the overlaps from the original file, it naturally cuts away the overlap as well as the underlap, leaving holes instead of overlaps. I have also tried the v.clean functions in grass, but the overlaps are really too big to use snapping without distorting the data.


texts: FME Proccess to merge two CSV files not working

texts:
I am trying to merge two datasets of golfcourse data with almost similar information. my end goal is to have all  the data into one csv file that have merged information from both csv files. I have tried using feature merger but it does not merge my attributes or columns together based on name or address field as a key.

Can someone take a look at the picture below and see if i am using the transformers right or any other way for me to combine these data sets into one having no duplicates of rows and fields.


texts: No response data from GeoServer when using EPSG::4326 projection

texts:
So I have a Zurich vector (.mbtile) data set I would like to render in a browser using GeoServer.  I was able to use geocache to serve the data in the EPSG::900913 projection using the following source endpoint:
http://ww.xxx.yyy.zzz:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=cite:building&STYLE=&TILEMATRIX=EPSG:900913{z}&TILEMATRIXSET=EPSG:900913&FORMAT=application/vnd.mapbox-vector-tile&TILECOL={x}&TILEROW={y}

When I re-configured the GeoServer layer for EPSG::4326, it returns 200 when hitting the tiles in Geocache, but no actual response data shows up.  The native projection of the .mbtile file is EPSG::3857, and I am force-declaring it to EPSG::4326.  Both bounding boxes are -180 -90 180 90, and I deleted the associated gridsets for the layer and re-added only EPSG::4326.
But still, no joy.
What am I doing wrong?


texts: problem with running raster calculator in grassgis

texts:
When I was trying to do NDVI with grassGIS I faced a problem. I cannot run the raster calculation. When I looked to the command console I see that

  (Sat Feb 21 12:41:58 2015)
  r.mapcalc ddes = ( LC81260522015031LGN00_B5@Tonlesap -
  LC81260522015031LGN00_B4@Tonlesap ) / (
  LC81260522015031LGN00_B5@Tonlesap + LC81260522015031LGN00_B4@Tonlesap
  ) (Sat Feb 21 12:42:10 2015) Command finished (12 sec)
  Traceback (most recent call last):   File
  "/usr/lib/grass64/etc/wxpython/gui_core/goutput.py", line 874, in
  OnCmdDone

  event.onDone(cmd = event.cmd, returncode = event.returncode)   File
  "/usr/lib/grass64/etc/wxpython/modules/mcalc_builder.py", line 499, in
  OnDone

  if not mapTree.GetMap().GetListOfLayers(l_name = name): AttributeError
  : 'NoneType' object has no attribute 'GetMap'

Can you please tell me the reason I face this problem?`


texts:
I have a map service enabled in my server and have kml and wms as well as mapping and feature access capabilities turned on.
I can view the wms in qgis, I can veiw the kml in google earth. However when I add the map as an operational layer to my config.xml in my sample application, I get no errors, the other basemap layers come up fine, and the operational layers show up in my widget (with my layer checked on), BUT it doesn't show up.
I have changed my map service document to be the same coordinate system as the layer I am trying to show. The data is coming from postgresql db as an sde service.
Any help would be great

More info:  I still have this problem. I have tried to add services that use different cs. I have reprojected my data to be the same as the basemap service in the flex sample app. I have tried to use a config.xml that only contained my service (and changed the xy extent to match. Still I can see it as wms and kml but not as a mapservice.


texts: Name of Round road in Center of Amritsar, India?

texts:
New Info

I just found out this area used to be a wall with 12 gates. Portions of the wall are still there. Still researching name of roads, or portions of the road, such as Bazaar Rd on South-West part

Original Question

I wish to paint an Illustrated Map of Amritsar, India, and I am perplexed because I cannot find name of this round road surrounding the center of Amritsar, India

I found a map of Amristar from 1849, but for the life of me, I do not know what this round road is.

Surely, there must be an accurate map somewhere that explains this!!!


texts: Plotting with QGIS, blank positions result in errors

texts:
I tried to use the delimited text layers, then I found something wrong. Several plots are out of bound. Then I checked the original data and decoded data. It seems when one part of a single data is missing, the decode process makes a mistake.

For example, the data should look like this in the original part.

However, here's the corresponding decoded version in the QGIS. It seems because one colomuns are missing, the compiler uses the coming columns to make up the blank. I don't want to see this, how should I deal with this? I'm kind of a QGIS Noob :(


texts: Generating random coordinates in multipolygon in Python?

texts:
How to generate random points in multi-polygon using geojson in python ?
thus far I found a class in JavaScript named :

randomPointsOnPolygon(numberOfPoints, polygon)

but I need to use something like that in python ,
my code is like

import json
import geojson

with open('my_city_boundaries.geojson') as f:
    data = json.load(f)

for feature in data['features']:
    if feature['properties']["name:en"] == state_name:
         # I need to generate some coordinates within that state

I tried shapely like this and it didnt work . it doesnt recognize Points attribute

import shapely import Point
import json
import geojson
from osgeo import ogr

def generate_random(number, polygon):
    list_of_points = []
    minx, miny, maxx, maxy = env[0], env[2], env[1], env[3]
    counter = 0
    while counter < number:
        pnt = Point(random.uniform(minx, maxx), random.uniform(miny, maxy))
        if polygon.contains(pnt):
            list_of_points.append(pnt)
            counter += 1
    return list_of_points

with open('ir_states_boundaries_coordinates.geojson') as f:
    data = json.load(f)
print("\n\nName your state from this list\n\n")
for feature in data['features']:  # print a list of valid state names
    print(feature['properties']['name:en'])
state_name = raw_input("\n")
for feature in data['features']:
    if feature['properties']["name:en"] == state_name:
        geom = feature['geometry']
        geom = json.dumps(geom)
        polygon = ogr.CreateGeometryFromJson(geom)
        env = polygon.GetEnvelope()
        result = generate_random(10, polygon)
print result


texts:
I am trying to create a line style for a multiline geometry. I am hoping to create a linetype which looks like the following

The Points are not an issue, its the line/lines entering and exiting at the nodes. I was looking to use the Geometry Generator to solve the issue, by creating a buffer, based on the midpoint of each section of the multiline geometry, less the length of the start line and end line and using dissolve to create the line.

The dataset is a PostGIS vector dataset, I cant duplicate or break the lines into individual lines.


texts: Using ArcGIS to quantify sink volume in glacier bed ("sink" and "fill" tools)

texts:
I am trying to identify sinks/overdeepenings in glacier beds and quantify their volume.

If you take a look at my data (https://drive.google.com/drive/folders/1ERFdsqDGLH1a_FbxwawE_gPm0Au0Q9vT?usp=sharing), you can somewhat make out the overdeepenings in the bedrock below.

I want to quantify these overdeepenings regarding their extent and volume. I've tried using the hydrological tools of the Spatial Analyst, but I'm stuck. I have so far:

created a flow direction raster
identified sinks using the "sink" tool.

However, the "sink" tool only gives me a raster with small dots all over, seemingly without the original cell values. How can I get the overdeepenings as a whole? I've read that the "fill" tool might be useful, but how do I proceed?


texts: Creating script tool for definition query using user input

texts:
I have a map document with about 10 layers that I would like to create a query definition script tool to use that takes a user input as a parameter and then executes the tool. The script looks like this:

import arcpy

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
field = 'Circuit'
#INPUT CIRCUIT USING THIS FORMAT: 'DC430'
value =
queryStr = str(field) + "=" + str(value)

for lyr in arcpy.mapping.ListLayers(mxd, "", df):
    if lyr.supports("DEFINITIONQUERY"):
        lyr.definitionQuery = queryStr
arcpy.RefreshActiveView()
del mxd

I can't figure out how to configure the script tool to use the value variable as a user input that then gets used in the definition query. Is this possible?


texts:
I have spatial table in PostgreSQL 9.2 / postgis 2.0 that I have to extract some information from it. But my query is hopelessly slow. How could I make use of spatial index to improve the performance of my query?

Query: The query is to find the temperature value of a point when
coordinate of the point in WGS84 system is (30.424, -1.66) and the data is for 2002-01-09.

with B as
(select array_366
from pixelbased3
order by st_distance(((st_GeomFromText('POINT(30.424 -1.66)', 4326))), pix_centroid)
limit 1)

Any other suggestion to improve my query performance is appreciated. I have a column of points (geometry data type and more than 100000 records) and an array of temperatures for each day throughout the year for every point. I'm computing the nearest point in the table to the point in the query and after locating the the corresponding array, I'm computing the corresponding day and temperature. Table pixelbased3 looks like this:

+-----+------------+
| ID  |pix_centroid|
+-----+------------+
| 100 |0101000020  |
| 101 |00000B7E93  |
| 102 |49413098D0  |
| 103 |0000B7E930  |
+-----+------------+

pix_centroid is Well Known Text (WKT) and its type is (point) geometry. I couldn't copy the whole WKT since it is too long. Combination of st_distance and st_GeomFromText computes the distance of given point (30.424 -1.66) in WGS84 lat lon system from pix_centroid records. BTW, I have more than 100000 records and I imagine this makes it slow to find the distance from each.


texts: GeoJSON file content not display properly in Leaflet

texts:
I am new to Leaflet. Am facing one issue when try to display GeoJSON file in Leaflet.

Issue:

Actually some GeoJSON file only am facing this problem.  In my knowledge coordinates are in different format so that am facing this issue.

Please find below sample feature code: coordinates are in high values like [ 352.90679825050762, 891.44899536185403 ] so that it is not projecting properly.  So can anyone explain how to convert/change the coordinates (working coordinates for Leaflet) like [ -2.978663816550748, 56.459992535783947 ]?

{ "type": "Feature", "properties": { "Layer": "ANNO-HATCH-ELEV", "SubClasses": "AcDbEntity:AcDbHatch", "ExtendedEntity": "     5      2", "Linetype": "ByBlock", "EntityHandle": "A3475", "Text": "ANSI32" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 352.90679825050762, 891.44899536185403 ], [ 352.90679825050762, 895.32399536185403 ], [ 343.90679825050762, 895.32399536185403 ], [ 343.90679825050762, 883.2927453618795 ], [ 352.90679825049301, 883.2927453618795 ], [ 352.90679825050762, 891.44899536185403 ] ] ] } }


texts: Why ST_SRID cause Geoserver generated SQL query to run about 500x slower?

texts:
When investigating why Geoserver was so slow to render my WMS tiles from a POSTGIS database I found that the following Geoserver generated SQL query run almost 500x faster when remplacing the ST_SRID("geom") function by its actual value 4326.

SELECT "id",encode(ST_AsBinary(ST_Force_2D("geom")),'base64') as "geom" FROM "my_table" WHERE  "geom" && ST_GeomFromText('POLYGON ((-73.29392552375793 45.63803979207905, -73.29392552375793 45.63901497630168, -73.29253077507019 45.63901497630168, -73.29253077507019 45.63803979207905, -73.29392552375793 45.63803979207905))', ST_SRID("geom"))

Is there anything I can do in Geoserver settings or anywhere else to counter that issue?

I'm running POSTGIS 2.1.0 with Postgresql 9.3 on Windows Server 2008 with Geoserver 2.4.1.

*UPDATE: *
Running an EXPLAIN on the queries show me that using ST_SRID force POSTGIS to do a seq scan instead of an index scan... that explain the slow response time but I'm still looking for a solution to this issue...

Thanks a lot

Etienne


texts:
I am writing a program to access the shapefile with attributes with Japanese characteristics, and I want to use setSubsetString(SQL inquiry).

When the SQL inquiry contains the Japanese characters, It does not work well.
Such as " year=2004 AND 事故類型=その他" in this case, I do not know how to solve this problem.


texts: Merge overlapping polygons (same shapefile) in ArcGIS without losing polygon area?

texts:
How can I merge overlapping polygons (same shapefile) in ArcGIS 10.3 without losing polygon area, i.e. the total area of the new, merged polygon should equal the area of all individual polygons combined.

The individual polygons I want to merge are different parts of the same city - Berlin pre-WWII. I want to calculate the area of the city at that time. The city is spread over several old map sheets, which I had to georectify before digitising the city boundaries as polygons. Because of the age of the maps, the map sheets slightly overlap after being georectified, which means that the individual polygons that make up the city overlap as well. How can I merge these polygons into one polygon of the whole city without losing area?


texts: Selecting LiDAR return point type in LiDAR dataset with ArcPy?

texts:
I am trying to create a Digital Earth Model (DEM) using ArcPy under ArcGIS Pro 2, but I am running into some problems.

I can generate a DEM within ArcGIS Pro by selecting only the ground points under LAS files in the LAS dataset properties, but when I try to run the same code within ArcPy, it generates a DEM using all the points.

Any ideas how you select the return point type in ArcPy?

Here is the code that I have used.

arcpy.conversion.LasDatasetToRaster(lasd, "Test_arcpy_dem", "ELEVATION", "BINNING AVERAGE LINEAR", "FLOAT", "CELLSIZE", 10, 1)

As I said, this generates two different outputs, depending if I am in ArcGIS Pro or not.


texts: Lat/Long WFS GetFeature query - ArcGIS verses GeoServer geospatial data servers

texts:
We could be querying a GeoServer or ArcGIS server for WFS features (v1.1.0).  However I'm finding that GeoServer takes the envelope bounds in LONG/LAT and ArcGIS takes them in LAT/LONG.  The use of srsName="EPSG:..." doesn't seem to have any affect on the input coordinates.

Is this a known situation and is there any reliable solution to cater for this? I see a GeoServer ows:keyword for GeoServer but ArcGIS doesn't have anything like this.  I think this would be unreliable.  They each have different endpoints (wfs verses WFSServer) though this too is unreliable.

This is a significant issue though I can't see anyone else has had this problem so I feel I must be missing something obvious. Or no one else is trying to hit more than one type of geospatial data servers.

Is this a known problem?

For example.

GeoServer server - http://geossdi.dmp.wa.gov.au:80/services/wfs

POST -

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature service="WFS" version="1.1.0"
                xmlns:gsml="urn:cgi:xmlns:CGI:GeoSciML:2.0"
                xmlns:ogc="http://www.opengis.net/ogc"
                xmlns:wfs="http://www.opengis.net/wfs"
                xmlns:ows="http://www.opengis.net/ows"
                xmlns:gml="http://www.opengis.net/gml"
                xmlns:er="urn:cgi:xmlns:GGIC:EarthResource:1.1"
                maxFeatures="200"                resultType="results">
<wfs:Query typeName="gsml:Borehole">
    <ogc:Filter>
        <ogc:BBOX>
            <ogc:PropertyName>gsml:collarLocation/gsml:BoreholeCollar/gsml:location</ogc:PropertyName>
            <gml:Envelope srsName="EPSG:4326"><gml:lowerCorner>37.0 -55.0 </gml:lowerCorner><gml:upperCorner>229.0 12.0 </gml:upperCorner></gml:Envelope>
        </ogc:BBOX>
    </ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

ArcGIS server - http://www.ga.gov.au/gis/services/topography/National_Onshore_Gas_Pipelines/MapServer/WFSServer?

Post -

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature service="WFS" version="1.1.0"
                xmlns:gsml="urn:cgi:xmlns:CGI:GeoSciML:2.0"
                xmlns:ogc="http://www.opengis.net/ogc"
                xmlns:wfs="http://www.opengis.net/wfs"
                xmlns:ows="http://www.opengis.net/ows"
                xmlns:gml="http://www.opengis.net/gml"
                xmlns:er="urn:cgi:xmlns:GGIC:EarthResource:1.1"
                maxFeatures="200"                resultType="results">
    <wfs:Query typeName="topography_National_Onshore_Gas_Pipelines:Gas_Pipelines">
        <ogc:Filter>
            <ogc:BBOX>
                <ogc:PropertyName>SHAPE</ogc:PropertyName>
                <gml:Envelope><gml:lowerCorner>-55.0 37.0</gml:lowerCorner><gml:upperCorner>12.0 229.0</gml:upperCorner></gml:Envelope>
            </ogc:BBOX>
        </ogc:Filter>
    </wfs:Query>
</wfs:GetFeature>


texts: QGIS changing map options distance units

texts: I want to change the map distance units option in QGIS from metres to centimetres.  I am currently using projection British National Grid EPSG 27700.  I would like the print composer to print a map out on the scale 1cm:5000cm.  Also how accurate is this projection relating to actual distance measured on the ground?  To the nearest metre (as EPSG 27700 projection is in metres?)?  Would there always be some margin of error in QGIS as it is open source software?


texts: Polygons not showing in Google Fusion Table map

texts: I have a KML of Brazilian states that renders correctly in Google Earth. However, when I load the KML in Fusion Tables two of the states will not show up. The original data was in shapefile format and was simplified and converted to KML in QGIS. Are there limits to the number of vertices on Fusion Table?


texts:
I see that map tips in QGIS are set in the Display Panel in Layer Properties. However, I can't get the map tips to actually display on the map when I hover over a feature with the Touch zoom and pan tool. I have tried in both 2.14 and 2.18.

I'm sure that I'm missing something simple here, like, perhaps a checkbox to actually turn on the map tips? Or use another pointer?


texts: Problem with cql_filter condition in OpenLayers 3

texts:
In openlayers-3 I am using the below code to update my WMS layers with
cql_filter condition based on user selection:

filterstring = "intersects(geom," + geomInwkt + ")";

wmsLayer.getSource().updateParams({'cql_filter': filterstring});

This code is working fine as long as my filterstring value is small but whenever I am passing a long string to cql_filter, I am not getting a response from Geoserver.

How to solve this issue ?


texts: Dynamically Plot Markers Based on Zoom Level

texts:
I am new to the forum and to OpenLayers. I did a search of this forum and looked at some examples, but I could not quite figure out the answer to my question - please forgive me if I have overlooked a pre-existing answer.

My goal is to plot a large number (tens to hundreds of thousands) of markers on a map. For performance reasons, I would like to be able to send the boundaries of the current view to my external database, query the database for the points within those boundaries, and then construct a KML file to send back to OpenLayers to display on the map. This seems to me to be pretty similar to what is done when OpenLayers determines which tiles to display, and I was wondering if anybody could point me to where I might start looking in order to implement this.

Note: I would like to adopt the above approach due to performance issues I encountered while testing a similar idea with the Google Maps API - managing that many points in the browser's memory seemed to be very slow.

Thank you for any suggestions you may have, I very much appreciate the help!

-Rob


texts:
I'm trying to apply the OS QML (Full Colour) styles to OS Vector Map District shapefiles in QGIS 2.18.0 . Mostly, it works OK sometimes but I am having problems styling the roads.

Roads are styled using a number of different layers as shown in the guidance image provided by OS.

Some road layers are styled by categories ('Fill' layers) and some layers (the 'Casing' layers) are styled using rules. Initially, none of the road layers display, and I believe this is because the qml file is based on an attribute called 'featureCode' and the equivalent map attribute is called 'FEATCODE'.

For the categorised layers this is easily fixed by selecting the 'FEATCODE' as the column in the Layer Styling tab. But this is not easily fixed for rule-based styling.

I have looked at a number of ways to rectify this:

Edit the map attribute table name to match the qml file (but this is
not allowed as 'featureCode' is too long to be an attribute name)
Edit the rules once applied in QGIS, changing 'featureCode' to
'FEATCODE' in the Layer styling tab for each occurence in each rule
(this is time-consuming and has to be repeated for each rule and for
each layer)
Edit the qml file, changing 'featureCode' to 'FEATCODE'
(I have confirmed this works but again is a bit time    consuming).

My question is, am I missing some obvious way of mapping the qml attribute name to the shapefile attribute name without having to do lots of editing? This seems a pretty fundamental problem with these files (I downloaded both shapefile and QML file at the same time and have double checked they are for the same data set - Vector Map District) - unless I have overlooked something. The same issue is likely to affect a number of the other layers as well.


texts: Configuring SFCGAL to PostGIS Db in Windows

texts:
I have installed a PostgreSQL 9.3.5 64-bit on a Windows Server 2012 machine and added Postgis 2.1.3 extension.

I need to use the ST_StraightSkeleton function and after some search on the web I found that I need to install sfcgal extension.

Everything I have read on the web about how to install sfcgal or add the postgis_sfcgal extension is explained for linux. I haven't found anything about how to make it work in windows....

CREATE EXTENSION postgis_sfcgal does not work.

I also found this solution but I can't find sfcgal.sql file anywhere on the web. I donwloaded the sfcgal package and it is not even in there.


texts: ArcGIS Pro crashes when running "create scene layer package" without CRS transformation

texts:
I have a 3D scene file that I need to save as a scene layer package to use it in ArcGIS Online. My portal does not allowing uploading it as a web scene directly. The tool "create scene layer package" works when I transform the CRS of the file. However, this mustn't be transformed, as the file is already in the correct CRS. When I enter the current CRS, and thus opt not to change the CRS, the tool always crashes before finishing, with the "arcgis encountered a serious crash" window. Any possible work-around?

EDIT: it seems that the tool simply does not support Amersfoort (RD New) CRS, because projecting other layers to this CRS in the create scene layer package tool makes ArcGIS crash as well!


texts:
I'm a beginner with remote sensing and have the task of creating a land use/land cover map of a region in India from IRS imagery. I've never performed an image classification before, although I do have some pretty solid experience working with raster data in ArcMap.

While I've done a lot of reading on image classification (supervised and unsupervised), I'm still a little lost on where exactly to begin and what software would be the best to use (I do know that ArcMap has an image classification toolbar).

If someone could point me in the right direction on how to get started on this, or lead me to any good resources it would be a massive help!


texts: Using virtual or temporary geometry with PostGIS and pgRouting

texts:
I am attempting to find the shortest/fastest routes from GPS point to GPS point as described in this post: Create closest point on multilinestring to use in shortest_path()

I have seen many solutions like the ones presented to that question, where the answer is to create "virtual" points or to create points in a temp table, then run pgRouting against the original data and the virtual data.

How is this accomplished? I can't seem to find any examples of people using virtual points like they are pitched in the linked question's answers.


texts: How to extract topographical data from a profile drawing

texts:
I have what seems to be an uncommon problem: I have dozens of raster files containing profile drawings (x,z or y,z) and a raster map that shows their (x,y) extents. I want to be able to extract the topographical information from the profile drawings as vector data with an elevation attribute.
I'm currently using QGIS 3.16 because that's what I'm most comfortable with, but I also have a license for ArcGIS 10.7 (Desktop, not Pro) and am open to switching. My OS is Windows 10 Home.
Here's a mock example. I have the following profile drawing

whose extents are given by the thick dotted line of the following (georeferenced) map

At the very least, I want to create a vector layer with 14 points (4 for layer 'B', 4 for 'C', 6 for 'D'). Each point should have an elevation attribute and a layer_name attribute.
For the example image shown above, it wouldn't be hard to do this manually (e.g., calculate the location of every point myself, put the coordinates in a csv file, and create the vector data from csv). However, this would be extremely tedious and error-prone with my dozens of real-world profile drawings, and I would prefer to develop a workflow that allows me to trace the raster image directly.
If you are wondering why on earth I would want to do this at all, it's because I'm working with legacy archaeological data and am trying to create 3D models so I can model the volumes of soil moved to create an ancient structure. Profile drawings are often the only way to get elevation data from old archaeological publications.


texts:
Why does the myMenu control not respond to a click?

    var map = L.map('map').setView([51.505, -0.09], 13);
    L.tileLayer('https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png', {
        maxZoom: 18, id: 'examples.map-i86knfo3' }).addTo(map);

    var myMenu = L.control({position: 'topleft'});
    myMenu.onAdd = function (map) {
        this._div = L.DomUtil.create('div', 'myMenu');
        this.update();
        return this._div;
        };

    myMenu.update = function () {
        this._div.innerHTML = "<h2>&equiv;</h2>" ;
        };

    L.DomEvent.on(myMenu, "click", function (e) {
        alert(50);
        L.DomEvent.stop(e);
        } )

    myMenu.addTo(map);


texts: GeoJSON layer will not display anything in OpenLayers 3?

texts:
I have been trying to load some point data from geojson into openlayers 3. Eventually I would like to load the features from a url with the data, But I cannot get a single point to show from a hardcoded object.

Do I need to inform openlayers 3 about epsg:27700 in some way?
Or what am I missing.

Loading the same layer from a WMS seems to work fine, but I would like to get a WFS to work as well.

var geojson = {
"type":"FeatureCollection",
"totalFeatures":1,
"features":[
    {
        "type":"Feature",
        "id":"schools",
        "geometry":{
            "type":"Point",
            "coordinates":[315850.99712308607,176054.0042378275]
        },
        "geometry_name":"geometry",
        "properties":{
            "ID":1,"Name":"High School","POINT_X":315850.997098,"POINT_Y":176054.004321
        }
    }
],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::27700"}}}

var layer = new ol.layer.Vector({
title: 'Schools',
source: new ol.source.Vector({
    features: (new ol.format.GeoJSON()).readFeatures(geojson, { dataProjection: 'EPSG:27700', featureProjection: 'EPSG:3286' })
}),
style: new ol.style.Style({
    image: new ol.style.Circle({
        radius: 10,
        fill: new ol.style.Fill({color: 'rgba(255, 0, 0, 0.1)'}),
        stroke: new ol.style.Stroke({color: 'red', width: 1})
    })
})

});


texts: Export/Import Shp file records to sqlite table

texts:
I am new to python and ArcPy. I need to transfer all the records of a single shapefile to a table created in sqlite3 without the geometry.

So far I was only able to retrieve the records using SearchCursor. Somehow, I am not able to create a relation between the shp file and sqlite tabe so that I can transfer the data directly. I tried using InsertCursor, but of no use. I am basically confused on approaches to transfer the data.


texts: Remove and reload raster layer from previously created QgsRasterLayer object

texts:
I have created a QgsRasterLayer object using:

lyr=QgsRasterLayer(url,'lyr_name')

and the layer is displayed by:

QgsProject.instance().addMapLayer(lyr)

Now when this layer is removed through:

QgsProject.instance().removeMapLayer(lyr)

I am unable to reload it on the interface. I get below error:

RuntimeError: wrapped C/C++ object of type QgsRasterLayer has been deleted

From what I understand the refrenced object of lyr is deleted.
I need a workaround for this so that I can load and unload lyr multiple times. Since the layer object is created dynamically for so recreating it is not an option.


texts: Query nodes and attributes of parent ways

texts:
Does the Overpass API provide a way to query a list of nodes and some attributes of their parent ways, and return the data in CSV format?

For example, the following will give me all motorway junctions:

[out:csv(ref, name, ::lat, ::lon)];
// gather results
(
  // query part for: “highway=milestone”
  node["highway"="motorway_junction"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

Is there a way to query the ref=* tag of the roads of which the node is a member?


texts: Start multiple processes with one action

texts:
I am trying to start multiple processes with a single action in QGIS.

With Windows commands it is not hard, see here:

https://stackoverflow.com/questions/13719174/how-to-execute-multiple-commands-in-a-single-line

But a simple try inside Qgis like this

calc.exe | notepad.exe

Does not work and only calc.exe is started.

Neither of the following options works.

generic, python, mac, windows, unix, open.


texts: Spatial Join Ouput Attributes Differ Based on Input FC or SHP

texts:
I have a point dataset and a polyline dataset that I am running a spatial join on.  I noticed that if I run the spatial join with the point FC, the ouput differs from if I run it with a point shapefile.  It seems that if the tool finds a spatial match but an attribute is Null, it will retrieve attributes from another point that also has the spatial match.  This results in 'mixed' attributes from two different points in the ouput.  The 'Join Operation' was set to ONE_TO_ONE.  I am using ArcGIS Desktop 10.4.1.

Is the tool designed this way?  It seems incorrect considering I set the 'Join Operation' to ONE_TO_ONE and it's pulling attributes from two different join features


texts: Representing population variables in a map

texts: Could some one advise me in some ways (or popular ways) of representing population variables in a map? For population variables I refer to: distribution of age among the population, people with elementary school, etc..


texts: SQL to get points within a certain distance

texts:
I am new to using spatial data types in sql server. I have managed to create a column of Approx 50,0000 geometry points (from x,y data) and would like to find out which (count number of) points are within a radius  of 50m from another point.

I have read a ton of blog posts and advice pages and think that I need to do this by creating a polygon layer of circles of radius 50m from each point, create a spatial index on the polygon layer and then do a count of all points in each polygon. The problem is that I can't work out how to this using my point data to create the new polygon layer.

The columns of data I have are 'ref','x', 'y', 'geompointloc'

I would also also be interested to know if this is the most efficient way to complete this task
Thanks


texts: ArcGIS API for JavaScript - access data inside analysing widget (interpolatePoints)

texts:
My code so far (JSFiddle)

I want to analyse weather data. I am trying to create a Webmap Application to do so. The App should be based on the JavaScript API 3.18 provided by ArcGIS online. Implemented should be an analysing widget provided by the JavaScript API with the functionality of interpolatePoints

I am not able to load the data into widget. I am using a featureLayer which i am able to visualize on the map as a layer. But I am not able to connect the widget with the datas inside the layer.

Some other details:

I am working on 'localhost'.

My code:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Analysis</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.18/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css">
<style>
    html,
    body,
    #border-container {
        height: 100%;
        margin: 0;
    }

    .esriAnalysis .esriAnalysisCloseIcon {
        display: none;
    }
</style>
<script src="https://js.arcgis.com/3.18/"></script>
<script>
    require([
        "dojo/ready", "dojo/parser", "esri/urlUtils","esri/Color", "esri/symbols/SimpleMarkerSymbol", "esri/renderers/SimpleRenderer",
        "esri/map", "esri/layers/FeatureLayer", "esri/dijit/analysis/InterpolatePoints",
        "dijit/layout/BorderContainer", "dijit/layout/ContentPane"
    ], function(ready, parser, urlUtils, Color, SimpleMarkerSymbol, SimpleRenderer, Map, FeatureLayer, InterpolatePoints) {
        ready(function() {
            parser.parse();

            var map = new Map("map", {
                center: [13, 55],
                zoom: 6,
                basemap: "dark-gray"
            });

            var pointLayer = new FeatureLayer("http://services.arcgis.com/01Gk9ODQDPg4NrOx/arcgis/rest/services/WU_Data/FeatureServer/0");

            map.addLayers(pointLayer);

            var marker = new SimpleMarkerSymbol({
                "color": [238, 69, 0, 125],
                "style": "solid",
                "size": 8,
                "outline": {
                    "color": [255, 255, 255, 125],
                    "width": 0.5
                }
            });
            var rendererA = new SimpleRenderer(marker);
            pointLayer.setRenderer(rendererA);
            map.addLayer(pointLayer);

            var analysisTool;

            analysisTool = new InterpolatePoints({
                inputLayer: pointLayer,
                portalUrl: "http://analysis.arcgis.com/arcgis/rest/services/tasks/GPServer",
                map: map,
            }, "toolPane");

        });
    });
</script>


texts: IFeatureClass.Search throws error "0x80041599 The number of points is less than required for feature"

texts:
I am creating a buffered geometry around a point feature in order to search for other nearby features. I use the TopologicalOperator to create my buffered geometry. I am attempting to search a feature class when a ComException is thrown telling me that 'the number of points is less than required for feature'. I am unsure whether it is referring to the geometry I am searching with, which I have verified is a polygon with 129 points, or to a feature in the feature class that I am searching within. I have run an ArcObject routine to try and rid the various features classes of features with invalid geometries, but this error persists.

The data's SR is WGS84 with a XY resolution of .000000001. The MXD's projection is Web Mercator Auxiliary Sphere. I am buffering my points by 10 feet. The code works and buffer size work fine in the dev environment but is failing in the test environment.

Spatial Indexes on Search FCs

FC1
1.133126
0.000000
0.000000

FC2
0.310968
0.000000
0.000000

FC3
0.193221
0.000000
0.000000

Snippits of source below. Note that GeoUtil has several methods that will pull values off the ServerContext.

Create Buffered Geometry

private IGeometry GetBufferedGeometry(IFeature feature, int bufferFeet, GeodatabaseUtil geoUtil)
{
    // Convert shape to Map's spatial reference
    var geometry = feature.ShapeCopy;
    geometry.Project(geoUtil.GetMapSpatialReference());

    // Convert buffer feet to Map's distance units
    IUnitConverter converter = new UnitConverterClass();
    var bufferUnits = converter.ConvertUnits(bufferFeet, esriUnits.esriFeet, geoUtil.GetMapDistanceUnits());

    // Buffer shape
    var topoOp = geometry as ITopologicalOperator;
    var bufferedGeometry = topoOp.Buffer(bufferUnits);

    // Project buffered shape back to dataset projection
    bufferedGeometry.Project(feature.Shape.SpatialReference);
    return bufferedGeometry;
}

Search for features

// Create buffered filter
var spatialFilter = geoUtil.NewSpatialFilter();
spatialFilter.Geometry = GetBufferedGeometry(feature, searchBuffer, geoUtil);
spatialFilter.SpatialRel = info.SpatialRelationship;

// Search for features within filter
var featureCursor = searchClass.Search(spatialFilter, true);
var foundFeature = featureCursor.NextFeature();
while (foundFeature != null)