texts: File organization for sharing ArcGIS python code

texts:
What is the best organizational structure for sharing ArcGIS python code and geoprocessing tools? Or even, are sharing code and sharing tools separate questions?
Esri has a Methods for distributing tools structure, published for Arcgis 9.3 and 10.0:

However in other places people are saying things like Also do avoid distributing your code the way its done in Arc Scripts or Code Galleries in favour of the native python Distutils. Esri doesn't seem to have a corresponding distributing tools article for 10.1 (ref), lending some weight to the counter-argument.
What says GIS.se?
Update: though perhaps too late, but the nub of this question is more about
best practices for file and folder structure before the tools-used-for-sharing (arcgis online, google drive, dropbox, github, bitbucket, etc.) come into play.


texts: How to add remote GeoJSON data to a Leaflet map as a new layer?

texts:
I seem to be having a problem parsing the GeoJson and adding the layer to a Leaflet map.

var terrain = L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}', {
    id: 'terrain-layer',
    attribution: 'Tiles &copy; Esri &mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC',
    maxZoom: 16
  });

var unitsurl = 'https://maps.huntscore.com/geoserver/wms?service=wfs&version=1.0.0&request=getfeature&typename=colorado:BigGameGMUBoundaries12092014&CQL_FILTER=GMUID=84&outputFormat=text/javascript&format_options=callback:getJson&SRSname=EPSG:4326';

var unitsGeoJson = new L.GeoJSON();

$.ajax({
    jsonp: false,
    url : unitsurl,
    type: 'GET',
    dataType : 'jsonp',
    jsonpCallback: 'getJson',
    success: function(data) {
        console.log(data);
        unitsGeoJson.addData(data);
        map.fitBounds(unitsGeoJson.getBounds());
    }
});

/* initialize the map */
var map = L.map('map', {
  center: [39.0646,-105.3272],
  zoom: 7,
  minZoom: 6,
  scrollWheelZoom: false,
  layers: [terrain, unitsGeoJson]
});

/* add layers control */
var baseMaps = {
  "Terrain": terrain
};

var overlayMaps = {
  "Unit": unitsGeoJson
};

/* load layers */
setTimeout(function () {
  L.control.layers(baseMaps, overlayMaps).addTo(map);
}, 3000);


texts: Zonal identification and statistics in ArcGIS

texts:
I hate to ask a poor question like this one, but I have literally spent 3 hours in a task that would have taken a few minutes in MATLAB or R.

Input : a floating point raster map, ranging from 0 to 2 (say).

Desired output: a polygon shapefile, where each polygon defines areas where inputRaster > 1. The shapefile table should hold some statistics (say mean and standard deviation) about each polygon.

I have tried and chained dozens of tools, tried creating a model, but now I am back here asking for help. Mostly because I think it should not be that difficult, and so probably I am missing something.


texts: Working in projected coordinates rather than lat/long inLeaflet

texts:
I'm using proj4js to use the utm33N coordinate system. Leaflet works with latlong, is there anyway for it to work in the projected system, so I can for instance set the centre location based on easting/northing rather than lat long.

So, working in projected coordinates,
I would like to plot a polygon using projected coordinates, here are two examples:

    //To plot a polygon

    //latlng
    var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];

    //easting/northing
    var latlngs = [
       [580990.0059351522, 4275268.990746303],
       [580999.0179947406, 4275268.937262271],
       [580999.031365749, 4275260.032170748],
       [580990.0059351522, 4275260.045541757]
     ]
    var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);

and I can't seem to zoom in closer than 50m (on the scale bar), I need the zoom level to be unrestricted.

My code


texts: Disabling Google Maps zooming animation effect

texts:
I am using OpenLayers mapping library in my application. I have integrated Google map V3 & added other several WMS overlays, Vector layers etc. Every thing working fine. But I am facing big problem in Google map's zooming animation effect.
While zooming to any location, for few seconds all the vector features goes to some other positions. once the zooming finished all features restoring to the original positions.
See the below images.

while zooming from zoom level 10 to 11. Showing wrong positions.

This is zoom level 11. After the Google map's zoom effects map shows correct positions of all planes.

If I use our own map then there is no problem but we can't avoid Google map!!.
I searched any Google map's options. But no luck, there is no option to disable the zooming animation effect in Google map V3.


texts: How to create a raster from csv points file

texts:
I have a CSV points file, with NDVI values.
My goal is to create a GeoTiff with 10 meters pixel, where each pixel value is calculated as the mean of points values in this square.

I read the CSV with Pandas and convert it to a geodataframe with GeoPandas.

How can build an empty raster and fill it with mean of NDVI value ?
Maybe with GDAL?

Here is my code:

import sys, os, math, csv
import pandas as pd
import geopandas as gpd
from shapely.geometry import Point

csv_file = (sys.argv[1]) # Path fichier csv

os.chdir = os.path.dirname(csv_file)
csv_name = os.path.basename(csv_file)
print(os.chdir, '-->', csv_name)

pixel = 10 # Taille du pixel en mètre

# CSV parcellaire en GeoDataFrame
csv_df = pd.read_csv(csv_file, header = 0) # Lecture du CSV
csv_gdf = gpd.GeoDataFrame(csv_df) # Conversion en GeoDataFrame

csv_gdf['geometry'] = 'geom' # Création de la colonne geometry

for i, row in csv_gdf.iterrows():
    csv_gdf.geometry[i] = Point([(csv_gdf.X[i], csv_gdf.Y[i])]) # Remplissage de la geometry avec les points de coords X-Y

#Résolution du raster
xmin, ymin, xmax, ymax = csv_gdf.total_bounds # coordonées de la bounding box du csv

xres = math.ceil((xmax - xmin) / pixel)
yres = math.ceil((ymax - ymin) / pixel)


texts:
I am using the lidR package in R to manage my ALS data. I was having problems generating DTMs on the edge files of my catalog because the tool lidR::grid_terrain() was doing some interpolation between points that define the boundary of the point cloud. I attach an image presenting the error:

I came up with what I think is just a small fix for my case but maybe is helpfull for a small analysis:
las <- readLAS(file)
#projection(las) <- CRS("+init=epsg:REF") #In case it lacks projection

dtm <- grid_terrain(las, res = 1, tin())

p <- raster::rasterToPolygons(lidR::grid_density(las)*0+1, dissolve = TRUE) #To create a mask
m <- raster::mask(raster::crop(dtm, raster::extent(p)),p) #To mask the DTM

The result is a DTM perfectly masked to where there are points.

I was wondering if there is another method for big areas as I am afraid of this could take a long time to process al the files in a catalog.


texts: Are there any 3D GIS which exploit consumer level 3D HDTVs?

texts:
My company is moving into a new building and we will be purchasing a 65" or greater HDTV for the conference room.
I am interested to know if there are "3D" GIS applications which currently exploit consumer level "3D HDTVs"?  That is, is there any reason to consider one?!  I do a fair amount of "3D" subsurface GIS/EVS.

ArcGIS has "Stereo Mode" which supports shutter glasses and red/blue anglyphs.
Also found this informative but outdated paper:
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2772849/

Thank you.


texts: How can I fix DLL loadfailed with Polygonize in QGIS 1.8?

texts:
Possible Duplicate:
  Qgis polygonize problem - DLL load fail

I'm getting the following error message when I try to use the polygonize tool in QGIS 1.8 (windows 7):

Traceback (most recent call last):
File "C:\PROGRA~2\Quantum GIS Lisboa\bin\gdal_polygonize.py", line 34, in
import gdal, ogr, osr
File "C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\gdal.py", line 2, in
from osgeo.gdal import deprecation_warn
File "C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\osgeo\__init__.py", line 21, in
_gdal = swig_import_helper()
File "C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\osgeo\__init__.py", line 17, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: No se encontró el proceso especificado.

I can perform this operation with the same raster file on QGIS 1.7 on this very same computer. (This is for a class I'm giving and all the students have installed 1.8).


texts: Earth Engine get dates from imageCollection

texts:
I try to get all acquisition dates of my ImageCollection in Google Earth Engine Code Editor.

var begin = ee.Date.fromYMD(2017,1,1,'Europe/Berlin');
var end = ee.Date.fromYMD(2018,1,1,'Europe/Berlin');
var orbnr = ee.Number(15);

//Load S1 ImageCollection and filter by Location and Date
var s1_collection = ee.ImageCollection('COPERNICUS/S1_GRD')
  .filterDate(begin,end);

//Filter S1 IC by OrbitNr.
var s1_collection_f = s1_collection
  .filter(ee.Filter.eq('relativeOrbitNumber_stop',orbnr));

//Get Dates with ee.image.date() while mapping over the ImageCollection
var get_date = function(image) {
  var dates = ee.List(image.date())
  return s1_dates.add(dates)};

s1_collection_f.map(get_date);

Last 4 lines of code seems to be wrong. Do i write the function the right way? First time i try to write my own function in javascript....
Do i have to assign a empty list bevore i call s1_dates.add(dates) ? When how can i assign a empty list. Or is it better to use a 1D array instead?


texts:
I have a kind of "vector catalog" in a GPKG. It's different rectangles with an attribute called "name of the layer".
In the same GPKG, I have all the different layers.
I'm trying to build an action in my vector catalog, so when I click on the rectangle I want, it loads the corresponding layer in QGIS.
I found some questions about loading raster, but I wasn't able to do something like that for vectors.
Is it possible?


texts: Publish geoprocessing service on AWS ArcGIS Server

texts:
I'm planning to use the following stack on Amazon AWS:
- Esri ArcGIS Enterprise 10.5 on Ubuntu with Postgresql (Dec 2016)

Can be found on this link:
https://aws.amazon.com/marketplace/pp/B01N5HOYPC?qid=1484816439886&sr=0-7&ref_=srh_res_product_title

After enabling ArcGIS Server Enterprise and PostGIS with SDE, will I be able to publish an ArcPy geoprocessing service into the ArcGIS Server?

Will I be able to run ArcPy commands using the PostGIS data?

Actually, my goal is to have a RESTful api in ArcGIS Server with Python and ArcPy backend to manipulate the spatial data.

If this is not possible, what else could I do only using AWS?


texts:
I have a raster map which shows a place near Olympic dam,Australia. On the top and right border it has some Northing and Easting values 58550E & 35400N I really dont know how to locate this place. Any idea?

I have tried it in Google earth,arcmap,Qgis platform's default conversion options but not found exact location.
I tried few websites like
http://www.ga.gov.au/geodesy/datums/redfearn_grid_to_geo.jsp
but couldn't get result

X = 58450E
  Y =  35400N

Update: I have found that 5 numbers in grid denotes last 5 digits of xy coordinates,So I have to some values for xy as prefix. I tried adding some values and got some result.But I don't feel it is an exact result.Still looking for answer...


texts: Problem installing QGIS 3.12 on Linux KDE neon

texts:
I tried to install both versions QGIS 3.10.x and QGIS 3.12 on KDE neon from the https://qgis.org/ubuntu and https://qgis.org/ubuntu-ltr repositories but without success (unlike in Ubuntu 18.04 and linux Mint 19.3 ).
I have the following output in konsole Terminal Emulator:

andrea@andrea-Z390:~$ sudo apt-get install qgis python3-qgis qgis-plugin-grass
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 2
Starting 2 pkgProblemResolver with broken count: 2
Investigating (0) qgis:amd64 < none -> 1:3.12.0+28bionic @un puN Ib >
Broken qgis:amd64 Depends on qgis-providers:amd64 < none | 1:3.12.0+28bionic @un uH > (= 1:3.12.0+28bionic)
  Considering qgis-providers:amd64 0 as a solution to qgis:amd64 10000
  Re-Instated qgis-providers-common:amd64
    Reinst Failed early because of qtbase-abi-5-9-5:amd64
Investigating (0) python3-qgis:amd64 < none -> 1:3.12.0+28bionic @un puN Ib >
Broken python3-qgis:amd64 Depends on qgis-providers:amd64 < none | 1:3.12.0+28bionic @un uH > (= 1:3.12.0+28bionic)
  Considering qgis-providers:amd64 0 as a solution to python3-qgis:amd64 10000
Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-qgis : Depends: qgis-providers (= 1:3.12.0+28bionic) but it is not going to be installed
 qgis : Depends: qgis-providers (= 1:3.12.0+28bionic) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

How can i solve this problem?


texts: Create a synthesis map ( e.g. climatic vulnerability) in QGIS

texts:
My final goal is to create a synthesis map of climatic vulnerabilities composed by different thematic variable with different weights.

I would like to ask for support for the following issues:

For each thematic map  I am creating a vector map with different classes. How to convert this vector map to a raster map, keeping the classification?
The second step would be to calculate a raster map as result of a weighted sum of the thematic maps previously generated. How can I do this in QGIS?


texts:
Working with ArcGIS Pro 2.2, I have to create a 3D polyline from array of XYZ coordinates.

When I try this code snippet :

array = arcpy.Array([arcpy.Point(0, 0, 0),arcpy.Point(0, 100, -1000)])
polyline = arcpy.Polyline(array, has_z=True)

I get an error saying that has_z is read-only:

AttributeError: DescribeGeometry: Read-only attribute has_z

From the docs it really does not seem so.

When  I try not to specify the has_z parameter:

array = arcpy.Array([arcpy.Point(0, 0, 0),arcpy.Point(0, 100, -1000)])
polyline = arcpy.Polyline(array)

I receive no errors but the Polyline defaults to hasz=False as it has to.

Doing polyline.firstPoint confirms this:

<Point (0.0, 0.0, #, #)>

Is there another legit way to do it?

It seems wrong to me that has_z parameter is read-only.


texts:
My issue is that I am getting an error statement that states the following:

     row[0] = row[2] / row[1] * 100
     TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

Here is the script I'm using to run the operation

#variables
 fieldname1 = "acres2"
 fieldname2 = "ac_std2"
 fieldtype = "DOUBLE"
 where_clause_calc = """"acres2" IS NOT NULL"""

#newfields

 arcpy.AddField_management(fc, fieldname1, fieldtype)
 arcpy.AddField_management(fc, fieldname2, fieldtype)

#float
 with arcpy.da.UpdateCursor(fc, ["StatedAcre", "acres2"]) as cursor:
    for row in cursor:
        try:
            row[1] = float(row[0])
            cursor.updateRow(row)
        except:
            row[1] = -999
            cursor.updateRow(row)

 del cursor

 #calculate
 with arcpy.da.UpdateCursor(fc, ["ac_std2","acres2","Area"], where_clause_calc) as cursor:
    for row in cursor:
        if row[1] > 0.00:
            if row[1] < row[2]:
                row[0] = row[1] / row[2] * 100
                cursor.updateRow(row)
            else:
                row[0] = row[2] / row[1] * 100
                cursor.updateRow(row)

        else:
            row[0] = -999

 del row
 del cursor

When I create both fields being used to calculate, I set the field type to DOUBLE. When I open the table in ArcMap the field properties reflect this. What's especially odd is that the updates are performed for about 1/4 of the rows in the table. My questions are why is this error occurring while both field types are DOUBLE, and what can I do to fix this issue?


texts: different data range of raster file in mapserver and qgis

texts:
a NetCDF file with only one band with a data range from [0,1.1]. IDV & QGIS identifies it correctly, however gdalinfo finds the data range [1,26505]. Or could it be possible that gdalinfo is right and IDV & QGIS is wrong?
The result is that I cannot apply the style definition from QGIS to the Mapfile. Maybe this belongs to the different value than raster statistics question?

This is the gdalinfo output:

Band 1 Block=4321x1 Type=Int16, ColorInterp=Undefined
Min=1.000 Max=26505.000
  Minimum=1.000, Maximum=26505.000, Mean=21777.898, StdDev=7918.130
  NoData Value=-32767
  Offset: -3.81481368094683e-05,   Scale:3.81481368094683e-05
  Metadata:
    _CoordinateAxes=time_counter latitude longitude
    _FillValue=-32767
    add_offset=-3.814813680946827e-05
    cell_methods=area: mean where frac
    long_name=Fraction
    NETCDF_DIM_time_counter=561132
    NETCDF_VARNAME=frac
    scale_factor=3.814813680946827e-05
    standard_name=area_fraction
    STATISTICS_MAXIMUM=26505
    STATISTICS_MEAN=21777.897721542
    STATISTICS_MINIMUM=1
    STATISTICS_STDDEV=7918.1303044189
    unit_long=Fraction
    units=1

UPDATE:
the wgrib_get_data tool also says that the data range is between 0 and 1. So it seems that there GDAL is working wrong here.

  -64.917  -47.250 1.6586303711e-01
  -64.917  -47.167 1.2612915039e-01
  -64.917  -47.083 8.5937500000e-02
  -64.917  -47.000 3.7475585938e-02
  -64.917  -46.917 7.9650878906e-03
  -64.917  -46.833 3.7536621094e-03
  -64.917  -46.750 2.7160644531e-03
  -64.917  -46.667 1.5563964844e-03
  -64.917  -46.583 1.1596679688e-03
  -64.917  -46.500 4.2724609375e-04
  -64.917  -46.417 0.0000000000e+00
  -64.917  -46.333 0.0000000000e+00
  -64.917   52.167 0.0000000000e+00


texts: Is there a way to search for highway mile markers on an existing mapping system and find the lat and lon?


texts: Is there a way to make hover windows larger? The CartoDB editor gives the option to make the windows larger on click, but not the hover windows.


texts: Postgres/Postgis doesn't work after update

texts:
I work on OpenSUSE 12.1 and after today's upgrade (2012 NOV 14) Postgres and Postgis doesn't work. If I login to Postgres server by PgAdmin, get the message: translated from polish
"ERROR: can't acces to file "$libdir/postgis-2.0".Theres no file or directory"

When I want create spatial extension by typing
"  psql -d sulo1 -c "CREATE EXTENSION postgis;"  " than I get :
cannot open control extension "/usr/share/postgresql91/extension/postgis.control": no file and folder

Have to configure my postgis for a new upgrades?


texts: Calculate percentage overlap of 2 sets of polygons in R

texts:
I have a map of NC counties. I have overlayed two circles, representing the coverage area of two radio transmitters in the state:

### Make transmitters df
rm(list = ls())
library(tidyverse)
library(sf)

transmitters <-
  data.frame(
    ID = 1:2,
    longitude = c(-80.631974, -77.808488),
    latitude = c(35.838583, 35.526252),
    radius = c(50, 100))

### Turn transmitters df into an sf object
tr_wgs <-
  st_as_sf(transmitters,
           coords = c("longitude", "latitude"),
           crs = 4326,
           dim = "XY")

### Set units (a projection that preserves area in NC)
tr_wgs <-
  st_transform(tr_wgs,
               "+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD27 +units=km")

### Create a buffer (not sure of the original km measurements, so right now it is just making a 100km buffer)
tr_buff <-
  st_buffer(tr_wgs, c(transmitters$radius))

### Read North Carolina (and coerce to be same projection as tr_buff)
nc <-
  st_read(system.file("shape/nc.shp", package="sf")) %>%
  st_transform(., "+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD27 +units=km")

### Plot
ggplot() +
  geom_sf(data = nc) +
  geom_sf(data = tr_buff)

What I now want to calculate is: what percentage of each of the 100 counties is covered by the circle. I have tried the following:

intersect_pct <- st_intersection(nc, tr_buff)

But this just gives me the intersection areas. How do I get a "proportion covered" variable attached to each county in the nc dataframe?


texts: What is the principle of pooling in ArcGIS Server?

texts:
If I understand correctly, pooling an AGS Service means that when a client connects to a service, an instance is created and an ArcSOC process is executed. Setting minimum to 0 thus doesn't start the service until a call is made to the server to start the service. The first call is therefore a bit slower due to the service having to first start. What I am not sure about though, is the parameter "maximum" number of services. Default is min-1 and max-2.
But what if I raised the maximum number to 24?
Would that mean that I could create up to 24 ArcSOC Processes on my server which could in theory produce bottlenecks?
Lately I have been experiencing service crashes with raster services, i.e. either MapServices which serve rasters or Imageservices. I have 32GB Ram on a windows 10 machine and around 100 Services running constantly with standard pooling (min:1 Max:2).
If my CPU and RAM usage is generally not higher than 50% can I assume everything is running fine?


texts: QGIS Add Raster Values to Points Turns up Null Values

texts:
I'm trying to add raster values to points with QGIS 3.2. When the command runs the result is a column with null values. I also tried the same thing with the Point Sampling Tool with the same result. Both my vector point layer and my raster underlying layer are in the same CRS: NAD 5070.

Any ideas on what I might be missing?


texts:
I have a vertical image with size (W,H).
I have info about the coordinates in decimals of the the upper left and bottom right (Lat1,Lng1,Lat2,Lng2).
I have the Ground Sample Distance (GSD) of the image in (pixel/m).
I want to know the coordinates of a pixel (x,y) in the image.

What is the best approach to do this?

The images I pretend to use are like this:


texts: Using ArcPy to select polygons one by one and export them?

texts:
I want to select polygons in a (double field type) and export them, and I keep getting this error:

  ExecuteError: ERROR 000358: Invalid expression "dobule" = '1'
  Failed to execute (Select).

This is my code

outws = r'F:\Documentos\ArcGIS\Default.gdb'
shp = r'F:\Documentos\ArcGIS\ensayo'
campos = 'dobule'
y= "_"+str(int(row[0]))
         out_fc = os.path.join(outws, y)
         where_clause =  """"{}" = '{}'""".format(campos,arcpy.AddFieldDelimiters(shp, row[0]))
         arcpy.Select_analysis(shp, out_fc, where_clause)


texts: Loading non-spatial tables from geopackage into ArcGIS Pro

texts:
I have a geopackage comprising spatial and nonsapatial tables. I would like to be able to load all of the tables into an ArcGIS Pro 2.6 project, however, when I connect to the geopackage I'm only able to load the spatial tables. Likewise, iterating through the geopackage using:
gpkg = "test.gpkg"

walk = arcpy.da.Walk(gpkg)

for path, names, filenames in walk:
    for fname in filenames:
        d = arcpy.Describe(os.path.join(path, fname))
        print(fname, d.dataType)

returns only the spatial tables.
Is there anyway to make non-spatial tables visible within ArcGIS Pro?


texts: Will QGIS run on the latest MacOSX Catalina?

texts:
I'm a lecturer at the University if the Highlands and Islands. We want to buy a MacBook Pro in the department (School of Adventure Studies), primarily to run QGIS. however, it is likely to come with the new MacOS Catalina.

Will the latest release of QGIS run on MacOS Catalina. I tried to find that info on the QGIS website but couldn't find any specific references to the new Mac OSX.


texts:
I tried to play with the tutorial from Planet.com but it looks like I cannot assign the download link (active) to vsicurl driver, as the tutorial said. I tried the gdalinfo and get the error related to SSL cert. Has anyone solved this issue?

C:\Users\lan>gdalinfo /vsicurl/https://api.planet.com/data/v1/download?token=eyJ
hbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhQlQ1dmY1clo0Q1M3RFlKY0FYd1ZyUEJUUX
lTT2hHaTVrc3dYREN5Y3dEUUpUS1VzY2FJczI5Mjkya1NsajQzd0JlSDlGeXNLZXlFaWcyRFlpbHBEdz
09IiwiaXRlbV90eXBlX2lkIjoiUFNTY2VuZTRCYW5kIiwidG9rZW5fdHlwZSI6InR5cGVkLWl0ZW0iLC
JleHAiOjE1Mzk5MjY0MzksIml0ZW1faWQiOiIyMDE4MTAxNl8yMTQ1NDNfMTAyZSIsImFzc2V0X3R5cG
UiOiJhbmFseXRpYyJ9.BiqYstlQkh3jKUIKkAPozMn7MYqUIuO_CoBEmuKLrAZNuBQZKHNZIiskhP-ha
1kedzYRKrywwr-UR16BW68gUw
ERROR 11: CURL error: SSL certificate problem: unable to get local issuer certif
icate
gdalinfo failed - unable to open '/vsicurl/https://api.planet.com/data/v1/downlo
ad?token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhQlQ1dmY1clo0Q1M3RFlKY0
FYd1ZyUEJUUXlTT2hHaTVrc3dYREN5Y3dEUUpUS1VzY2FJczI5Mjkya1NsajQzd0JlSDlGeXNLZXlFaW
cyRFlpbHBEdz09IiwiaXRlbV90eXBlX2lkIjoiUFNTY2VuZTRCYW5kIiwidG9rZW5fdHlwZSI6InR5cG
VkLWl0ZW0iLCJleHAiOjE1Mzk5MjY0MzksIml0ZW1faWQiOiIyMDE4MTAxNl8yMTQ1NDNfMTAyZSIsIm
Fzc2V0X3R5cGUiOiJhbmFseXRpYyJ9.BiqYstlQkh3jKUIKkAPozMn7MYqUIuO_CoBEmuKLrAZNuBQZK
HNZIiskhP-ha1kedzYRKrywwr-UR16BW68gUw'.


texts: Generating a tile cache based on external SLD

texts: I have a web service that generates an SLD for a layer that varies based on an attribute of the underlying data.  These SLDs don't change, it is just that there are several of them per layer.  I would like a tile cache of at least the first few levels of the pyramid, but GeoWebCache seems to only support this for different styles.  Is there a way to build these caches and have them use the SLD parameter to separate the responses?


texts:
Is there any control on BBOX to clip the coordinates before sending request to the GeoServer.

The allowed coordinates are [-90, 90, -180,180]. The issue is when ZoomIN/out the BBox calculating the boundaries and sending the request to Geoserver, but when the coordiates are not falling in the allowed range the DB(Mongo) is throwing error.

Ideally, this should be solved at MongoDB plubin but seems the defect is not at fixed.

Looking for an option to do this at openlayers by clipping the coordinates if it falling above or below in the allowed range. So, if we get the control on bbox while page load,zoomin, zoomout and panning then we can do something.

 this.wmsSource = new ImageWMS({
      url: 'http://localhost/geoserver/mongoworkspace/wms',
      params:
      {
        'LAYERS': 'mongoworkspace:sample11',
        'FORMAT': 'image/png8',
        'TILED': false
      },
      serverType: 'geoserver',
      visible: true
    });

  this.wmsLayer = new ImageLayer({
      source: this.wmsSource
      //extent: [-90, -180, 90, 180],
    });

    this.projection = new Projection({
      code: 'EPSG:4326',
      units: 'degrees',
      axisOrientation: 'neu'
    });

    this.view = new OlView({
      center: [0, 0],
      zoom: 1,
      extent: [-90, -180, 90, 180],
      projection: this.projection
    });

    this.map = new Map({
      layers: [
        this.wmsLayer
      ],
      target: 'map',
      view: this.view
    });


texts:
I want to know the shape, that is the height and width of an ee.Image, how can i get that?

I have been looking through the documentation to see if there is a function for that, but I could not find, I have tried to get the value of the edges of my  geometry, which is a rectangle, and then calculate it's amplitude in x and y, but I get a very small result, which does not make sense.


texts: "ERROR: invalid input syntax for integer" importing data from Spatialite into PostGIS through DB Manager

texts:
I am trying to import data from Spatialite into PostGIS through drag and drop in DB Manager but all I received was an error:

Feature write errors:
Creation error for features from #1 to #202. Provider errors was:
PostGIS error while adding features: ERROR:  invalid input syntax for integer: ""

Is there any way to fix this?
Thanks.


texts: Moving (translating and scaling) a polygon in a shapefile

texts:
Updated Question:

I have an ESRI shapefile of the US, with Alaska, Hawaii, etc, broken down by county.

I'm extracting the polygons (each representing a county) from the shapefile, and then displaying those points in a Java application, using the Swing 2D API.

This works fine, however, I'd like to 'move' Alaska, Hawaii, Guam, etc.
One option is to do this in Java.

Before I do that though, I'm wondering if it's possible to select, scale, and move, shapes in QGIS. I have found that there are several ways to select shapes: http://centigonknowledge.com/tutorial/editing-shapefiles/

However, I don't see a way to scale and move these shapes. I was thinking that there might be some way to do this as that tool seems to allow the creating of maps from scratch, and therefore might be expected to have this functionality.

Clearly for existing maps it makes no sense, and breaks all sorts of projection rules, I'm sure.


texts: Building OSMBright for imposm returns python json error

texts:
I'm trying to execute "./make.py" as part of the OSMBright.xml generation (following this document: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/ , but for imposm instead of osm2pgsql).

I changed config["importer"] to imposm in configure.py. Executing "./configure.py" is running fine. Then I try to execute "./make.py" and gets this error:

[root@myserver osm-bright-master]# ./make.py
Traceback (most recent call last):
  File "./make.py", line 128, in <module>
    build()
  File "./make.py", line 41, in build
    template = loads(templatefile.read())
  File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.6/json/decoder.py", line 336, in raw_decode
    obj, end = self._scanner.iterscan(s, **kw).next()
  File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib64/python2.6/json/decoder.py", line 183, in JSONObject
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib64/python2.6/json/decoder.py", line 217, in JSONArray
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib64/python2.6/json/decoder.py", line 183, in JSONObject
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib64/python2.6/json/decoder.py", line 198, in JSONObject
    raise ValueError(errmsg("Expecting property name", s, end - 1))
ValueError: Expecting property name: line 555 column 7 (char 26783)

Any idea what could be wrong?


texts: Arcpy ChangePrivileges_management not working

texts:
I was trying to revoke access for a user using Python script, but it does not seem to work.
I mean the script runs successfully without any error, but does not what it's intended to...

Here're the steps I follow:

I am connecting with the schema owner, and revoking access for another user, say 'B' for a particular dataset [Python]
The script runs OK...without any error (exits with code 0)
Connect with user B to chk if it's worked...and NO, I can see the data still

Any idea why its happening?
I've tried with exclusive lock; and ArcCatalog...even then the same result.


texts:
I've been struggling to get map filters to work on my Leaflet map. I've got minimal JavaScript or Leaflet knowledge so where I have got to now has been a struggle. I'm essentially trying to do the following
https://jsfiddle.net/chrisjenner/jq1emofz/
I have tried to replicate this but without any joy. I'm sure it's fairly simple but with limited knowledge, I haven't been able to fix it. My version of the above can be found below where I am trying to filter a layer by a Boolean field. Carp and Tench are species and my sample dataset is for lakes. I want to be able to filter by these.
https://jsfiddle.net/chrisjenner/02crteao/64/
Below is my code

      <input type="checkbox" class="carp" name="1" value="1" checked="true">
      Carp

      <input type="checkbox" class="tench" name="1" value="1" checked="true">
      Tench

    const lakes = L.geoJSON(lakes_data, {
  style: function(feature) {
    return {
      color: feature.properties.color
    };
  }
  },
  {filter: (feature) => {
    const isCarpChecked = checkboxStates.carp.includes(feature.properties.carp)
    const isTenchChecked = checkboxStates.tench.includes(feature.properties.tench)
    return isCarpChecked && isTenchChecked //only true if both are true
  }
}).bindPopup(function(layer) {
  return layer.feature.properties.name;
}).addTo(map);

function updateCheckboxStates() {
  checkboxStates = {
    carp: [],
    tench: []
  }

for (let input of document.querySelectorAll('input')) {
    if (input.checked) {
      switch (input.className) {
        case 'carp':
          checkboxStates.carp.push(input.value);
          break
        case 'tench':
          checkboxStates.tench.push(input.value);
          break
      }
    }
  }
}

for (let input of document.querySelectorAll('input')) {
   input.onchange = (e) => {
    lakes.clearLayers()
    updateCheckboxStates()
    lakes.addData(lakes_data)
  }
}

updateCheckboxStates()
lakes.addData(lakes_data)


texts: Raster Tile Merge Performance of PostGIS 2.0

texts:
I'm attempting to intersect Australian Census boundary polygons with the 1" SRTM DEM (10.5bn points across Australia), and output the result as a single raster image on the fly.

The DEM is stored in Postgres 9.2 x64 (with PostGIS 2.0) as 600x600 tiles with no overlap (i.e it's a mosaic)

I've hit the known performance issue in PostGIS 2.0 using ST_Union to merge the intersecting full and partial raster tiles into a single record.

For example: intersecting a 2,500 sq km polygon takes < 0.5s, which is excellent. But merging the resulting 18 rows into a single raster takes ~2 minutes.

Is there any other function in PostGIS 2.0 to allow for tiles to be merged without having to do any comparison between the overlapping pixels (which don't exist here as it's a mosaiced dataset)?

Notes:

Plan B is to use gdal_merge in Python, but I'd prefer to keep this in
the database for operational reasons.
I've tried "ST_FasterUnion", thanks to this excellent post by
Pierre Racine, but haven't experienced a significant improvement in
performance
I'm aware of ST_Union performance improvements coming in PostGIS 2.1,
but don't have a spare dev environment to deploy and test.
Postgres has already been optimised for my machine and has plenty of
RAM and buffers to utilise.


texts: Like the ModelBuilder of ArcGIS Desktop to run simultaneous geoprocessing tools, is there any model builder available in QGIS?


texts: How does Mapnik Map Similar Features to Images

texts:
General Problem

I want to be able to select all nodes inside of a bounding box that have similar properties. A good example would be: Map features that represent vegetaion. In other words: Basically everything a map renderer usually displays in green (trees/woods/forests/...).

Specific Problem

OpenStreetMap data is my primary data source. OpenStreeMap manages a wiki page about vegetation which lists various tages OSM users usually use to tag vegetation. Using the Overpass API I was able to select most of the vegetation that appears green on the OSM web site but unfortunately not everything. The problems are inappropriately tagged map features.

Since most users on OSM primarily look whether their added/edited nodes look correctly in OSM, my idea was to extract the specific mapping used for OSM from the Mapnik renderer source repository. There must be some information which maps OSM tags to the Mapnik model which eventually results in green areas. I had a quick look in plugins/input/osm/ but was unable to find something.

Question

Where is the bit of code and the respective data that decides that OSM tags like wood=mixed , landuse=forest and so forth are eventually displayed as green area (with little dark green  trees)?

Alternatively: Do you have any other ideas to extract all vegetation that the OSM web site renders greenish?

Disclaimer

I'm not familiar with the OSM architecture nor the Mapnik source code, therefore my question might seem silly. So if you only know a little more than me, I'd be very happy if you could point me out the bits of code/data that'd help me :-). Thanks!


texts: QGIS layer export to KML limited to 2 fields

texts:
I'm successfully exporting my layer to KML using the Right click > Export > Save Features As.. window. I then check the 13 fields I want to export, and proceed without problem. But when I import this KML file in Google My Maps, the data table only contains 3 fields (Name, Description and 1 of the fields I checked).

Is there a way to work around this limitation?


texts:
I have this label expression within a function that works great. I want to turn the color to white.

lblClass.expression = '"{}" + [OBJECTID] +  "{}"'.format("<FNT size = '10'>","</FNT>")

this the RGB colors for white...

<CLR red='255' green='255' blue='255'>

I am unsure on how to format this together


texts: Creating own map and using it in offline WPF Application?

texts:
I need to create my parcel's map, I got high resolution photo from the sky and i want to georeference it and add few features like routes and buildings. Then I need to use it in WPF applicion where I would click on the buildnig and dispaly information about them, also trace a route.

This application has to be offline, so can you recommend any App to create a map and compatible API for .NET?

I'm newbie in GIS.


texts: Memory layer or QgsVectorFileWriter Error?

texts:
Currently this excerpt of code will not save to file (as it is supposed to).

The memory layer is visible and editable.  Yet even when manually saving the layer, any priorly added features (geometries) are non-present.

The variables 'FileDirectory._destination' and 'GetMaps._TOPOcrs' are proper as confirmed via the print command.

It should be noted, that the error prompt for the FileWriter indeed reads an error with the value '1'.

Any clues?

try:
    self.estabLocal()
except ValueError:
    iface.messageBar().pushMessage("Error", "Please select a central folder location to save your model to!", level=QgsMessageBar.CRITICAL, duration=3)
    return
try:
    self.estabCRS()
except ValueError:
    iface.messageBar().pushMessage("Error", "Please select a topographic map for your simulation!", level=QgsMessageBar.CRITICAL, duration=3)
    return
pointstress = QgsVectorLayer("Point?crs=" + GetMaps._TOPOcrs + "&field=Well:string(3)&field=Discharge:string(6)&index=yes", "Points" , "memory")
pr = pointstress.dataProvider()
QgsMapLayerRegistry.instance().addMapLayers([pointstress])
PointStressFeat = FindDirectory._destination+"Points.shp"
writer = QgsVectorFileWriter(PointStressFeat, "CP1250", pr.fields(), QGis.WKBPoint, pr.crs(), "ESRI Shapefile" )
if writer.hasError() != QgsVectorFileWriter.NoError:
    print "Error when creating shapefile: ", writer.hasError()
iface.setActiveLayer(pointstress)
pointstress.startEditing()
iface.actionAddFeature().trigger()


texts: 'OutofMemoryException' whilst data trasnfer

texts:
I have a process in which data is transferred from PGDB to SDE GDB, recently I have encountered error - 'OutofMemoryException' and the process stops. I have noticed this error while trying to transfer line features in bulk (process works fine with the same amount of data in point or polygon).
Once this error is encountered, I am unable to open source PDGB, trying to open it gives an error - "Failed to connect to database.
            An underlying database error occurred.
            System Resources Exceeded."
New session of ArcMap allows to open PGDB but data transfer will still not proceed.

The transfer happens here to a feature class inside a versioned feature class inside a feature dataset, which also has a geometric network in it.

Version used here is ArcGIS 9.3.1 SP2 (GDB is also upgraded) with SQL SERVER 2008R2.


texts: after truncating a table in postgres, why does qgis lose track of updates/features?

texts:
I'm running a python script which drip-feeds data slowly into a postgres database with postgis extension. I'm using autocommit, and committing one row at a time. Horrendously slow, but I need to do it this way for a good reason :)

Once I add a postgres layer, QGIS seems to poll the database every so often and the number of features increases. This is great, and gives me visual feedback that my script is working.

If I stop my script, TRUNCATE the table using pgAdminIII and restart my script, QGIS correctly clears the display (it notices that there are no features). However, it doesn't seem to track subsequent changes to the database, and the feature count sticks at the number of rows there were, rather than 0. I need to add the postgres layer again, which can take a while.

Is this a bug, a feature, or am I doing something wrong?

(Environment: QGIS 2.12.1 Pisa, Postgres 9.3.10, PostGIS 2.1.2, Ubuntu Tahr 32 bit)

Update

It seems that once the number of features exceeds the number of features in the database before I truncated the database, QGIS starts tracking changes again.


texts: Increase resolution of GPS track (roads)

texts:
I've got a group of fairly low-resolution GPS tracks which follow a bunch of roads.

I am trying to increase the number of points. I tried passing through a Catmull, but that resulted in large curves which left the road surface.

I've also tried iterating through the points and just picking out the middle distance between two, but that isn't ideal.

The points were exported from http://openrouteservice.org/


texts:
Is it possible to connect a libreoffice database to qgis?
I developed a database for our exploration points and would like to connect it directly to QGIS instead of exporting to csv.


texts: How to create a map of only one state in QGIS?

texts:
This is a very simple question but a Google search did not provide an answer.

Basically suppose you have a map of the U.S. with states and county layers, as well as other layers like roads, etc.

I want to work with a map of only one state, with all layers (e.g. counties, roads, etc)  in that state.

I remember in ArcGIS it had something to do with taking an intersection, not sure how it works in QGIS.


texts:
I have a CSV file with 2 columns with coordinates for the A side and 2 columns for the B side.
I have several identifiers in other columns if needed.

I want to connect these with a line between A and B side. Approx 5500 rows.
Column AE identifier
BC & BD used for A side
BE & BF used for B side

Data example:

Longitude Latitude  Expr1_Longitud Expr_1_Latitude
1295791.166 6469378.367 1292369 6474768
1295791.166 6469378.367 1296158 6470702


texts:
I have a shapefile of United States counties.  Suppose I am interested in all counties in Georgia that border North Carolina and all counties in North Carolina that border Georgia.  And, in particular, I'm interested in knowing which Georgia counties border which North Carolina counties.  For example, suppose Rabun County, Georgia is along this border.  I want to know which is the county that borders Rabun in North Carolina.

My ultimate goal is as follows:
I believe that Rabun, Georgia borders both Clay, North Carolina and Macon, North Carolina.  I would like to then create two files.  One would be the line segment of the border segment between Rabun and Clay.  The other would be the line segment of the border between Rabun and Macon.  I know line segments can be isolated between two bordering geographic units by using intersect.  For example, if I were to intersect Rabun and Clay as two separate files, I would isolate the line segment that is their shared border.

I would like to repeat this procedure for every other pair of counties along the Georgia and North Carolina (in addition to other borders, which is why I would like to streamline the process).

Are there hints for streamlining this process?  I know how to do it by brute force, but I realize it can take awhile or be inaccurate.  I was just wondering if there is a more efficient way to do this.

I juse ArcMap and ArcGIS 10.1.

Thank you!


texts: Relate first point and last point of polyline to point feature(s)

texts:
I am working on a small script using ArcMap10/arcpy to generate a upstream-downstream uniqueid for a polyline feature class using point id's that fall on the starting point and ending point of a line.

For example, if pt with an id of DEIRS00120 is located at the starting point of a line and if a pt with an id of DEIRS00125 is located at the end point of the line, I would like to assign the line the uniqueid of DEIRS00120-DEIRS00125.

My problem is that I need some ideas on how to accomplish this.

Here's what I thought would work:
1. Generate a python dictionary using the point id's as a value and the XY location as key:
{'123456.765,827393.613737': 'DEIRS00120' }
2: Generate another python dictionary containing the  XY Start Point location of the polyline as a key and the objectid as a field: {'123456.765,827393.613737': 1} Do the same for the XY End Point.
3: Call the ids of the points using the start and end location of the line.

What flubbed this thinking up is that if line branches, the start points (or end points) are the same at the branch and cannot be used as a python key.

Any ideas on how I could accomplish this?

Thanks


texts: Collect external geojson from user and pass to L.GeoJSON.AJAX()

texts:
I am aware that I can use leafet ajax to add an external geojson to a leaflet map like such...

var geojsonLayer = new L.GeoJSON.AJAX('c:/data/map/sample.geojson');
geojsonLayer.addTo(map);

How instead can I collect the external geojson path from the user and pass to the L.GeoJSON.AJAX() argument?

I can use <input  type="file"/> (or similar) to collect path from user. But how do I extend so that the user supplies the path such that L.GeoJSON.AJAX('../some/path/provided/by/user/geojson.geojson')

Working codepen.

EDIT: Working Solution

HTML

    <input id="upload" type="file"/>

    &nbsp;&nbsp;Import Geojson

CSS

#upload_link{
    text-decoration:none;
}
#upload{
    display:none
}

JS

$(function(){
$("#upload_link").on('click', function(e){
    e.preventDefault();
    $("#upload:hidden").trigger('click');
});
});

document.getElementById('upload').addEventListener("change", function (evt) {
  var file = evt.target.files[0], // Read first file for this example.
      reader = new FileReader();

  reader.onload = function (e) {
    var fileText = e.target.result,
        fileData = JSON.parse(fileText),
        group = L.geoJson(fileData).addTo(map);

    map.fitBounds(group.getBounds());
  }

  reader.readAsText(file);
});


texts: Why is my map zoomed in so ragged compared to what I actually drawed in QGIS

texts:
So overall my map looks the same like what I draw in QGIS. The issue is that when I zoom in, in that case 54x then you can see ragged lines.

QGIS

Browser

That is not what I need. I need high details also by zooming in. So how can I improve that.

One thing I could do is simplyfying the topojson file. But that's not a solution because I need that high quality lines because my map is often used by zooming in.

Also I could smooth the lines a bit. But already tested and still looking bad.

So how can I also by zooming in show max details. How can I tell QGIS to give more details. Or is it something of the projection? I'm using this projection: +proj=eqc +a=190493.11 +lat_ts=0 +lon_0=0 +rf=800 +units=m +no_defs. But I don't think that I can change it without loosing all right?


texts: Delete coordinates --> point still visible

texts:
I used a 'batch geocode' to create coordinates. After that I exported excel --> csv --> shp. All went well. some coordinates are wrong though. after deleting them from the attribute table, the points are still visible on the canvas. even when I tried to select/delete the points from the canvas in QGIS.

I know it has something to do with updating geometry, but I can't find the right information online.


texts:
I am trying to understand Esri example of reconciling and post with C#.
Could someone give me some hints or point me in the right direction.
The reconcile and post in Arcmap toolbox has edit version and target version as optional. Is a variable in this code related to a sde connection?

public void ReconcileandPost(IVersion editVersion, IVersion targetVersion)
{
   IMultiuserWorkspaceEdit muWorkspaceEdit = (IMultiuserWorkspaceEdit)editVersion;
   IWorkspaceEdit workspaceEdit = (IWorkspaceEdit2)editVersion;
   IVersionEdit4 versionEdit = (IVersionEdit4)workspaceEdit;

   if (muWorkspaceEdit.SupportsMultiuserEditSessionMode(esriMultiuserEditSessionMode.esriMESMVersioned))
   {
       muWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned);
               //Reconcile with the target version.
               bool conflicts = versionEdit.Reconcile4(targetVersion.VersionName, true, false, false, false);
               if (conflicts) MessageBox.Show(" Conflicts Detected ");
               else MessageBox.Show(" No Conflicts Detected ");
           workspaceEdit.StartEditOperation();
               //Post to the target version.
               if (versionEdit.CanPost()) versionEdit.Post(targetVersion.VersionName);
           workspaceEdit.StopEditOperation();
        workspaceEdit.StopEditing(true);
   }
}


texts: GDAL_CALC works but I get a python error at the end of each process that prevents automation

texts:
Python 3.4.1,
GDAL 1.11.0,
OSGEO4W,
Windows 7,
OSGEO4W Windows Shell

All 64-bit

(ArcGIS is installed as well 10.2 with Python 2.7)

So gdal_translate works fine.

gdal_calc provides perfect outputs but at the end of each process I get the error below. This is a problem as I cannot automate anything due to this pop up error. I hit close and the error goes away, the output file is 100% perfect but then the next gdal_calc line gives me the same error.

This is a sample line of code that gives the error (almost all my gdal_calc commands give the error but not gdal_translate).

gdal_calc.py -A 2000025-2000032.s0481pfv50-sst-16b.hdf.tiff_C.tiff -B C:\temp\QUAL\2000025-2000032.m0481pfv50-qual.hdf.tiffBINARY.tiff  --outfile=A25_32_SSTQUAL4.tiff --calc="A*B"

and this is the error. As I say the process actually works and will continue when I close the error box. After the word DONE appears the error pops up, I close the window and then the next line of code runs, then the error pops up again and so on.

Additional Error message generated

> Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: python.EXE
  Application Version:  0.0.0.0
  Application Timestamp:    5193f3af
  Fault Module Name:    ntdll.dll
  Fault Module Version: 6.1.7601.18247
  Fault Module Timestamp:   521eaf24
  Exception Code:   c0000005
  Exception Offset: 0000000000053290
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:    1033
  Additional Information 1: 8c64
  Additional Information 2: 8c64dfac0942d27b36722f7434c64847
  Additional Information 3: e156
  Additional Information 4: e156d5603c95b65c33088aa70929b4be


texts: Removing layers with zero features from QGIS

texts:
I have more than 100 layers loaded in map canvas. Some layers don't have any feature. I would like to delete all layer with zero feature count.

Is it possible to get a script which can delete all these layers?


texts: How to force PostGIS to use a specific GDAL version in Mac?

texts:
I am using PostGIS 2.5.4 on PostgreSQL 12.4 under macOS 10.13 environment.
Although GDAL version 2.4 is already installed in "/Library/Frameworks/GDAL.framework/Versions", the query
select PostGIS_GDAL_Version();

returns
"GDAL 2.0.1, released 2015/09/15 GDAL_DATA not found"

How can I point PostGIS to the proper version of GDAL? And, incidentally, should the "GDAL_DATA not found" message be fixed and how?


texts: How to extract road images from the Google Map Street View?

texts:
As a beginner with the programming (python), I am looking for the most functional way to extract many road images from the Google Map Street View. I need to make a datasets of road surface images like below:

Can I find any open source code for that or I have to write it from scratch by myself which probably could be very challenging :)


texts: How to set layer transparency QGIS C++ API 2.14?

texts:
I want to set transparency for already loaded layer by taking it from canvas

QgsVectorLayer *myLayer = mpMapcanvas.layer(0);
myLayer.setLayerTransparency(50);
myLayer.triggerRepaint();

but get an error

  invalid conversion from ‘QgsMapLayer*’ to ‘QgsVectorLayer*'

At the same time similat code at python console works great. What I'm doing wrong? Or are there any methods to convert QgsMapLayer into QgsVectorLayer?


texts: What are the coordinates on my rectangle of the closest point to a polygon in R?

texts:
I have a non-overlapping extent rectangle and a sample lake polygon. I can measure the distance from the rectangle to the polygon but I want to know which point on the rectangle is the closest to the polygon (i.e. the coordinates of that closest point on the rectangle).

library("raster")
library("rgeos")

# extent rectangle
rect <- as(extent(956328.8, 1036613, 825238.9, 936911.5), "SpatialPolygons")

# lake polygon
x <- c(1199999, 1080000, 1093067, 1090190, 1087977, 1070419, 1180419)
y <- c(957803.6,937803.6, 894366.9, 872153.9, 853703.0, 825353.6, 805353.6)
poly.lake <- SpatialPolygons(list(Polygons(list(Polygon(data.frame(x,y))), ID = 1)))

# measure distance
rect.dist <- gDistance(rect, poly.lake)

# get coordinates of closest point...?


texts: Interpolate line between 2 lines in ArcGIS

texts:
I have 2 lines, A and B as picture. Line A has value Z 60.79m and line B has value Z 58.75m. I want to interpolate line C which is between line A-B and has the value Z between the value Z of line A and B (60.79 to 58.75). To make it simple, I choose the value Z of line C is 60m.

How can I solve this in ArcGIS 10.4.1?


texts: Creating map book series with blank pages between maps using ArcMap?

texts:
I am looking to create a series of maps each one highlighting the camping pitch. I would like to put the number of the pitch highlighted on either page before or after to allow duplex printing of map on one side and pitch number on the other side.

Is this possible using ArcMap with or without python?

See image of camping pitches:


texts: Serving a GeoTIFF as ImageWMS in OpenLayers resizing issue

texts:
I'm sure I missed a step which is leading to this issue of reprojecting/resizing my imageWMS layer. I started with netCDF that wasn't georeferenced so I gdal_translated it to a GeoTIFF and then applied:

gdal_translate -of GTiff -ot Float32 -sds -a_srs "+proj=longlat +ellps=WGS84"

And zoomed in:

My OpenLayers layer:

new ol.layer.Image({
                      opacity: .5,
                      source: new ol.source.ImageWMS({
                        url: "/cgi-bin/mapserv.exe?map=\\ms4w\\apps\\tinyows\\myDemo\\WMS.map&layer=CHLLLL&mode=map",
                        params: {'LAYERS': 'CHLLLL'},
                        serverType: 'mapserver',
                        ratio: 1,
                        projection: 'EPSG:4326'
                      })
                    });

Mapfile:

LAYER
  NAME "CHLLLL"
  DATA ".\output_1.tif"
  #EXTENT "0 0 8640 4320" //causes no show
  TYPE RASTER
  PROJECTION
    "init=epsg:4326"
  END
  STATUS ON
END

And my gdalinfo on my TIFF file:

gdalinfo output_1.tif
Driver: GTiff/GeoTIFF
Files: output_1.tif
Size is 8640, 4320
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["unknown",
        SPHEROID["WGS84",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 4320.0)
Upper Right ( 8640.0,    0.0)
Lower Right ( 8640.0, 4320.0)
Center      ( 4320.0, 2160.0)
Band 1 Block=8640x1 Type=Float32, ColorInterp=Gray

I've tried various extents to no luck so I think it's over my head at this point.


texts:
I’m programming a module for ArcMap (ArcGIS 9.3) in Visual Basic (Visual studio 2005) realizing ITool interface. My task is to link it to ArcMap to reflect an icon on the Tools toolbar. The problem is the procedure of registration itself: ArcMap doesn’t see my module. Also it’s important to say that if the interface ICommand was realized in my module then there won’t be any problems with the registration in ArcMap. But I need interface ITool, so I have such type of problems.

More particularly, I have an instruction of performing the procedure of registration modules in ArcMap like this:

Create a new ActiveX dll Visual Basic project.
In the VB project, add reference to ESRI SystemUI, ESRI Framework, ESRI ArcMapUI Libraries.
Paste this code into a class module.In the Resource Editor in VB, add a bitmap and give it an Id of 101.
Also add a cursor and give it an Id of 102.
Compile the project to create the dll.
In the Customize dialog in ArcMap, click Add from file and navigate to the dll you just created.
The custom tool will be added to ArcMap.
In the Commands panel of the Customize dialog, select MyCustomTools in the Categories list. In the Commands list, select MyTool and drag it to a toolbar.
Test the tool.

So, step 6 is the main difficulty.


texts: Multiplying raster by scalar in ArcGIS Pro?

texts:
I am using
https://pro.arcgis.com/en/pro-app/help/data/imagery/arithmetic-function.htm
and https://pro.arcgis.com/en/pro-app/help/data/imagery/calculator-function.htm

I am getting error messages with zero feedback. Just "Failed to apply calculator"

The raster is projecting fine on my map, and I can multiply / subtract it with itself just fine in the arithmetic, but calculator never works.

We have tried:

single raster input, calculations like "value * 2"
same raster in both inputs

We're using a tif, does that matter?


texts: Automation of object selection to be printed in data driven page?

texts:
Is it possible to have the central object of each DDP to be automatically selected in order to be visually enhanced?

The part of segment being the main cartographic object within the page, should have another visual properties than the upstream or downstream parts.


texts: Microsoft Visual C++ Crash when building qgis 1.8.0 Windows 7 64bit

texts:
I have a problem building the source of qgis1.8.0 in Windows 7 64bit.
i am trying to follow this instructions in this page:
http://hub.qgis.org/wiki/17/Building_QGIS_from_Source?version=2#Building-on-Windows
the dependencys are all installed succesfully and the generation of qgis1.8.0.sln is succesful too.
but in the release solution configuration build,  always Microsoft Visual C++ crash without problem report.

Anybody know how to fix the problem with  Microsoft Visual C++?


texts: QGIS geometry insert on ArcGIS sde table gives st_geometry error

texts:
I have created an enterprise geodatabase with ArcGIS 10.5 in a PostgreSQL 9.5 database. And I set the PostGIS template to my database. So when I create a feature class in database, I can add this layer in QGIS and I can see the data.
But when I add the data in QGIS layer that comes from database and save, it gives an error like this:

Could not commit changes to layer mypoints

Errors:ERROR: 1 feature(s) not added.

Provider Errors:
       PostGIS error while adding features: ERROR: column "shape"
is of type geometry but expression is of type st_geometry
  LINE 1: ...sde"."mypoints"("shape","objectid","name") VALUES (st_geomfro...
                                          ^
HINT: You will need to rewrite or cast the expression.

My database keywords setted ad PG_GEOMETRY like this:

##PG_GEOMETRY
GEOMETRY_STORAGE    "PG_GEOMETRY"
UI_TEXT             "User Interface text description for POSTGIS geometry storage"
END

How can I solve this problem?


texts:
I want to create a web gis application (Leaflet/GeoServer). I need to add a functionality of search in a WMS layer.

I managed it up to know to display properties when the user clicks on the map. For this I build a URL like the following if a user click on the map:

GEOSERVER/wms
?service=WMS
&request=GetFeatureInfo
&version=1.1.1
&layers=Teslayer
&styles=
&format=image%2Fpng
&transparent=true&titel=Titel
&properties=%5Bobject%20Object%5D
&info_format=application%2Fjson
&width=1299&height=482
&srs=EPSG%3A25833
&bbox=341657.46954%2C5836931.83426%2C390499.418786%2C5858188.59064
&query_layers= Teslayer
&X=585&Y=270

As result I get something like this what I show formattted in a popup on the map.

{
    "type": "FeatureCollection",
    "features": [{
            "type": "Feature",
            "id": "38256",
            "geometry": {
                "type": "Polygon",
                "coordinates": [[[363732.531, 5846236], ...]]
            },
            "geometry_name": "shape",
            "properties": {
                "id": "AL650005OGOC",
                "id_hash": "4556ae4b8bc2eb20835f72147516",
                "area": 11959.645203521419,
                "fln": 13,
                "flnname": test,
                "arz": false,
                "rbv": null,
                "zfm": null,
                "obkx": 363729.941,
                "obky": 5846330.941,
                "zde": "1000-01-01",
                "gkz_lan": "12",
                "gkz_rbz": "0",
                "gkz_krs": "65",
                "gkz_gem": "165",
                "gkz_gmt": null,
            }
        }],
    "totalFeatures": "unknown",
    "numberReturned": 1,
    "timeStamp": "2019-11-27T09:59:00.073Z",
    "crs": {
        "type": "name",
        "properties": {
            "name": "urn:ogc:def:crs:EPSG::25833"
        }
    }
}

The next step is now to make it possible to search on this WMS Layer.
My plan is to offer the user a dropdown where he can first choose between all the values of the flnname property. If he has made a choice, he should be shown all the places on the map where flnname is assigned to the selected value.

So far I have tested this plugin: https://github.com/stefanocudini/leaflet-search. If I understand that correctly, a search with this plugin is only possible if markers with Leaflet are positioned on a layer. A search in a WMS layer is not possible.

The problem is that I want this functionality using WMS or JavaScript. PHP is not installed.

PostGIS is installed. This would be a possibility. But so far I have no experience with PostGIS.

How is this be possible using WMS?


texts: Same Raster but different min/max in ArcMAP and QGIS

texts:
since I am abandoning windows to stay only with Linux, I started learning how to use QGIS. So far so good. However, trying to reproduce a python script from Arcpy to PyQGIS I noticed something. When I import the exactly same image in both software applications (ArcMap and QGIS), the min and max are totally different (see below). And that happens to every single image.

.

Did that happen to anyone already?

This may be a dumb question, but I have no clue of what is going on.


texts: Calling ModelBuilder model from Python script using ArcPy

texts:
I updated the code in the script below per suggestion. I receive the same results as described in my original post, here...
I have a very simple Modelbuilder model (ArcGIS Pro, v2.6) that has a parameter for user input asking how many input feature classes to include (in a later model). I want the user to be able to input a number between 1-4 (AuxNum). If the user input value is 1 then a specific model runs, if the user input is 2 then a different model runs, and so on. Prior to the chosen model running, the user needs to be able to input parameter values prior to the model running. I want the python code to open the second model in the Geoprocessing window to allow the user to input parameters.
Here is the layout of the first user input model.

In the DecideAuxLayer tool in the above model layout, I have the following Python code, (spoiler alert!! I'm not a coder).

Toolbox is PreProcesses.tbx

Model names are Aux1, Aux2, Aux3, Aux4

Models and python script are inside PreProcesses.tbx

Toolbox, models, and .py are all located in C:\Temp

import arcpy
arcpy.AddToolbox("C:/Temp/PreProcesses.tbx")
AuxNum = arcpy.GetParameterAsText(0)
if (AuxNum is 1):
    arcpy.Aux1_PreProcesses()
elif (AuxNum is 2):
    arcpy.Aux2_PreProcesses()

Issue: when I run the Python script the model does not open in the Geoprocessing window. The model completes with no errors or warnings and shows that the input value is 1. That's it. Here is a screenshot of the results of the script model.


texts: Feature search in ArcGIS online using custom geocoder, works but the results are limited, how do i get more results?

texts:
So i have Geocoder hosted as a service on my Server, i then added it to AGOL via the utility services (Add Geocoder) now it allows me to do feature serach using the service and it works great expect it only returns 4 results. So i am stuck. How can i get it to return more then 4 results?

I tried add and chaning the maxlocation in the REST endpoint but that didnt seem to help anything.

Thoughts?


texts: Building footprint polygon simplification / generalisation

texts:
I'm looking for implementations of polygon simplification algorithms that preserve topology and overall rectilinearity. The input data is building footprints which often have squarish protrusions and often a predominantly rectilinear shape. A good implementation is Simplify Building in ArcGIS:
http://pro.arcgis.com/en/pro-app/tool-reference/cartography/simplify-building.htm

However, that version does not preserve topology of adjacent buildings. A topology preserving version was apparently in "Coverage Toolbox" but this appears to rely on the now deprecated ArcInfo Workstation.

Are there any other implementations worth checking out?

FOSS is preferred but not essential.

Note I am not looking for typical polyline simplifications (Douglas-Peuker, Vivasalingham and their variants, there are tons of useful ones in FME) as these are not really applicable to rectilinear building footprints (they weed out vertices and are for more applicable for linear natural or road features)./

Seeking Generalisation Strategies for Building Outlines in PostGIS? suggests:

Geocarto - but that doesn't appear to maintain topology
ETGeoWizards - can't find a polygon / building simplify there


texts: Why does one part of GML -> KML conversion not work on Google Maps?

texts:
I have a client who wants to visualise cancer incidence and mortality rates by local/unitary authority across Great Britain. I've used Ordnance Survey data to get the boundaries of the authorities in GML format and saved all of them as one large GML file. I used QGIS to convert the data to KML format. I have the data in Fusion Tables now and it all looks great except for one blatant gap in the coverage.

When I look at the KML data for the missing local authority, it hasn't imported at all (ie the cell is empty). I've tried re-uploading the geometry (and re-downloading and re-converting) and Fusion Tables is definitely rejecting it as KML. I've read somewhere that Fusion Tables can mess around with your geometry somewhat, so I uploaded the KML file and pointed Google Maps directly at it and that didn't work either (I don't know how good a test that is).

I don't know that I originally created a valid GML file (I don't know the standard) but they seemed to import ok to QGIS and the final result looks great apart from this one place. The area is visible in QGIS when I load the GML file, so I don't know if QGIS is producing invalid KML, or mayble Google Maps/Fusion Tables have limitations?

I've downloaded the OS Open data pointed to by @nhopton, loaded the appropriate layer into QGIS (Layer -> Add vector layer), saved it as KML (Layer -> Save as) and uploaded it to Fusion Tables. (Note that I didn't explicitly do anything with the CRS). Generally it's worked well (and importantly the particular area that had failed with my first method worked with this, so I have the missing geometry!). However, there's a number of missing areas again. And in this case, there's much less that I've done to the data myself, so it's not so easy to assume I've just messed up the data. Any ideas why my final results look like this?


texts: QGIS problem with unavailable layers when opening a project

texts:
I have a .qgz project file that I'm sharing with a colleague, the layers are mostly shapefiles stored on our local network server.  I can open and work with the project with no problems at all, but when she opens the project, she gets the "Handle unavailable layers" window with "Localized" Datasource files...  We're using absolute paths in the project, and she can browse to the files (or open the project and change datasource), but what does "localized" mean and why is it only happen to her, and not when I open the project?
We're both using 3.16.


texts: Creating Heatmap from attribute value of point features in ArcGIS for Desktop?

texts:
I've run through tutorial from ArcGIS on how to create a heat map using Spatial Analysis.

Based on the example, point features are scattered around the map and we need do the following to generate heat map.

Run Project Data -> Aggregate Data -> Collect Events -> Run "Hotspot Analysis" ->  Run "Spatial Analysis"

Is it possible to generate a heat map if I don't have point features that are scattered around the map but instead I have point features that have an attribute value that represent "Number of point" around this point features?

For example: I have 5 locations.

In the first scenario, I will have

5 points feature around area #1
20 points feature around area #2
40 points feature around area #3
30 points feature around area #4
10 points feature around area #5

While for second scenario, I will have

Point feature 1, attribute value: 5
Point feature 2, attribute value: 20
Point feature 3, attribute value: 40
Point feature 4, attribute value: 30
Point feature 5, attribute value: 10


texts: Georeferencer plugin will not load in QGIS

texts:
I have downloaded and installed QGIS. I would like to georeference an image using the core georeference plugin. When loading it no toolbar appears and the 'update', 'reinstall' etc boxes in plugin menu are also greyed out.

Any clues?


texts: Trying to use an integer in a WHERE clause

texts:
I'm trying to use an integer value in a WHERE clause (looking at an integer field).

expression = "'SERVICE' = 'Service' "
expression = expression + 'AND '
expression = expression + "'GPS_TIME_TOTAL' > " + "%d" % 10
arcpy.SelectLayerByAttribute_management(outServFCView,"NEW_SELECTION",expression)

This code (using the %d) gives me 'ExecuteError: ERROR 000358: Invalid expression'

When I use %s and '', it runs OK but doesn't give me any records because it's looking into a integer field to find a string.

'SERVICE' = 'Service' AND 'GPS_TIME_TOTAL' > '10'

Any ideas?


texts: Open Source solutions for building a Traffic Management System

texts:
I am trying to set an Open Source alternative to proprietry ITS (Intelligent Transportation Systems) The goal is to build a Traffic Management System for a middle size city center. Main requirements are:

Visualization of road network (especially junctions) on the city map
Managing traffic lights, cameras and other equipment on roads
Reporting real time data from sensors, cameras (big data ?)
Also a traffic simulation tool is required. I couldn't find an open source alternative to it because 2D and 3D simulation is needed.

Can you advice me the best FOSS4G components to build up a system like this?


texts: I have a world imagery layer that I want to clip to a single county. I would just save as a JPEG and edit using other software, but this uses a lot of processing power if I want a high resolution. I would like to clip the image before exporting to JPEG. Is this possible?


texts: Applying specific styling to GeoJSON layer in Leaflet.js

texts:
I am new to Leaflet.js and I would like to apply specific styling to the Geojson layer>
This is my code so far:
# geojson data
var geojson = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              78.25218200683594,
              17.169658620146077
            ],
            [
              78.24806213378905,
              17.124385992430643
            ],
            [
              78.3270263671875,
              17.128323180676293
            ],
            [
              78.32771301269531,
              17.17097070556175
            ],
            [
              78.25218200683594,
              17.169658620146077
            ]
          ]
        ]
      }
    }
  ]
}

# map id
map = map_d9d7d7866ebf4532b5adbeac7253c85f

test = "test"

L.geoJson(geojson, {
onEachFeature: function(feature,layer) {
layer.bindTooltip(test);
}
}).addTo(map);

# styling options
var exteriorStyle = {
    "stroke": "blue",
    "stroke-width": 3,
    "stroke-opacity": 0.7,
    "fill": "#494949",
    "fill-opacity": 0
};

# map geojson layer with styling
var exteriorMaskLayer = L.geoJson(geojson, {style: exteriorStyle}).addTo(map);

However, when I run it, I get the following:

Desired Result:

I would like this result as specified in the styling:
What am I doing wrong here?


texts: I'm very new to QGIS. I try to open satellite images about night lights. When I open the images in TIFFf format with QGIS 3.12, only a black image opens. Thumbnail as it looks. I adjust the symbology settings as much as I do in the picture, but it still does not happen. What should I do?


texts: How do I find the unique id of a layer in ArcGIS Online

texts:
Perhaps I am confused but I want to use a shared layer from my ArcGIS Online account in a Web AppBuilder script similar to this:

 const view = new MapView({
    container: "viewDiv",
    map: new WebMap({
      portalItem: { // autocasts as new PortalItem
        id: "372b7caa8fe340b0a6300df93ef18a7e"
      },
      layers: [
        new FeatureLayer({
          portalItem: { // autocasts as new PortalItem
            id: "6012738cd1c74582a5f98ea30ae9876f"
          },
          labelingInfo: [labelClass],
          renderer: {
            type: "simple", // autocasts as new SimpleRenderer()
            symbol: {
              type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
              color: "rgba(0,100,0,0.6)",
              size: 3,
              outline: {
                color: [0, 0, 0, 0.1],
                width: 0.5
              }
            }
          }
        })
      ]
    }),
    center: [-116.9250, 34.2501],
    zoom: 14
  });

Essentially I want to utilize either the portalItem id or add it using the arcGIS online url for the layer like this:

 var transportationLayer = new TileLayer({
            url: "https://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer",
            id: "streets",
            visibility: false
        });

How do I do this? When I go to my layer in ArcGIS online, I do not see the id or a url I can use.


texts:
I followed the steps in this article http://linfiniti.com/2011/06/using-qtcreator-with-qgis/ to compile QGIS on Ubuntu 12.04 64bit with Qt Creator.

I got the latest source for master with git.

I get the following error:

make[2]: No rule to make target '/usr/lib/libQtXml.so', needed by 'output/lib/libqgis_core.so.1.9.90'.  Stop.

make[1]:  [src/core/CMakeFiles/qgis_core.dir/all] Error 2
make:  [all] Error 2

11:30:10: The process "/usr/bin/make" exited with code 2.
Error while building project qgis1.9.90 (target: Desktop)
When executing build step 'Make'

Looks like it can't find the libQtXml.so file. On my machine it's residing under:

/usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.1 and
/usr/lib/i386-linux-gnu/libQtXml.so.4.8

How do I tell cmake where to look in one of these directories?


texts: How to calculate shortest distance from start to end of river?

texts: How can I calculate the straight distance from the start to the end point of a river (red line in image)? I don't know how to do this automatically.


texts: QGIS ->ArcGIS Server configuration possible?

texts:
Is it possible to connect a QGIS Desktop 1.8.0 to an ArcGIS Server 10.0 ? and of course publish services on it?.

The configuration would be like this Quantum GIS-> ArcGIS Server 10.0 on Amazon EC2+ POstgreSQL (+PostGIS)-> web app.

Is it possible to create a configuration like this? Do you think I could use it for networking?


texts: How to perform subset in Sentinel 1 slc data for PSInSAR processing?

texts:
I want to process sentinel 1 slc dataset for PSInSAR analysis.Currently, I am working on SNAP software and following this article

1: https://www.researchgate.net/publication/326655316_ESA_SNAP_-_StaMPS_Integrated_Processing_for_Sentinel-1_Persistent_Scatterer_Interferometry.  and I have made a graph for batch processing.

How to do subset for my AOI in this process


texts: OpenJUMP Coordinate Transformation Plugin - where to find it in latest version

texts:
Recently I noticed a note by OpenJUMP dev team: "Integration of Coordinate Transformation PlugIn in OpenJUMP core", which is great.

I could confirm that Coordinate Transformation menu, which was under Plugin of OpenJUMP Snapshot 20170923-r5505-PLUS, is not seen in 20171019-r5513-PLUS anymore.

r5505-PLUS

r5513-PLUS

So it is definitely moved to somewhere. Now I am searching for this function in the latest 20171019-r5513-PLUS (or CORE).


texts: QGIS Categorized Style: Rearranging values so that it doesn't go 57,58,59,6,60,61

texts:
I have a a column of data that I'm trying to display in the Categorized Style but when QGIS orders the values it ranks them, for example, 57, 58, 59, 6, 60, 61, 62....

Is there a way to rank them in the correct order?

I'm using a Colour ramp and so the colour for number 6 is as dark as numbers 59 and 60, when it should be much lighter.


texts: I have a EDN subscription, but I just can't find where I can download ArcGIS 9.3.1 software (specifically the ArcGIS desktop and the SDK?


texts: Plot Multiple Series from Related Table in One Chart

texts:
I'm trying to figure out how to plot multiple line series/charts in one chart in a popup window from attributes in a related table using the Javascript API. It seems like the only way to create a chart from a related table is using the esri PopupTemplate. I have successfully created two separate charts in the popup, but I want to plot them in the same chart for comparison. Can I use dojox.charting and an info window with related tables? I couldn't get something like "graphic.attributes.relationships/0/field" to work. That seems like the route I need to take to create the chart I want, but I am not finding any information regarding related tables.

I'm plotting average monthly minimum and maximum temperatures (related table) for weather observation stations. This is the look I'm going for (red line for average maximum temperature, blue line for average minimum temperature):


texts: Cannot select polygon from shapefile in QGIS?

texts:
I am working currently on a small-scale map using among other sources Natural Earth shapefiles (NE).

For an unknown reason, one of the polygons created by me on the basis of the fragments of NE coastline and administrative border can not be selected with Select tool and merged with other features. It can be selected through the Attribute Table but after merging it disappears completely (instead of being added to other territories of Dutch East India [the map depicts the 1905 situation]).

I checked validity of both lines that were used to create the polygon and the polygon itself. The validator does not show any errors, neither there are any error messages in the log windows (as it was the case in Cannot select polygon using QGIS). I suspect something may be wrong with the polygon but I cannot figure out what exactly is wrong. The shapefiles in question are temporarily uploaded to GitHub. I do not use spatial index, the set of shapefiles contains only the following files: .cpg, .dbf, .prj, .qpj, .shp, and .shx

Using QGIS 3.4.2-Madeira under Ubuntu 16.04


texts: Finding elevation of points using PyQGIS?

texts:
Which function and library do I use to find elevation of a set of points from shapefile in Python QGIS?

I have point shapefile and DEM with me.


texts:
I would like to ask you, if is available funcionality like "Table Manager" for QGIS 1.7.x?
I need to move fields in attribute table and then save changes.

I don't see "Table Manager" or something like that in available plugins.


texts: Viewshed over Multiple DEM Models Possible?

texts:
I finally got the viewshed working correctly over one DEM model. However, I am wondering is it possible to do the viewshed over multiple DEMs? E.g. A Multiple County Viewshed based off one point.

The dataset source does not allow downloads over 2gb. So I'm forced to download each county separately. I think a vaguely remember a way to combine rasters. If that is possible, which tool do I use ?


texts: Labelling using Python Parser in ArcGIS Desktop?

texts:
I have limited expertise with Python.

I need to create labels based on groups of attributes.  I've figured out a clumsy way to accomplish this but it involves 20 different annotation classes / SQL queries / label expressions, and I really hope there is a way to accomplish this more elegantly and efficiently, ideally with just 1 label expression.

My input data (which cannot be altered) is a feature class with 3 relevant fields (which I've made generic here).

Codelist - numeric codes
Attribute1 - an attribute
Attribute2 - a second attribute

Codelist contains 100 numbers.  Groups of these numbers require one label - for example codes 1,3,35,7,8 would get the label "Christmas, Attribute1, Attribute2" on 3 separate lines.  Codes 2,9,34,100,54,22 would get the label "Easter, Attribute 1, Attribute2" on 3 separate lines.  Etc etc.

I can't figure out how to use an SQL-like 'if [CODELIST] in (1,3,35,7,8):' statement in the Python label expression builder.

Is it possible?

Am I approaching this the right way or is my first effort using multiple annotation classes and SQL queries the best way to do this after all?


texts: Forcing ArcGIS for Desktop to generate color pallettes for display of GeoTiffs in FAIMS Mobile App?

texts:
The FAIMS Mobile App 1 displays a black pane instead of a well rendered geotiff when I try to import files directly from ArcGIS 10.1 instead of processing them through gdal and grass.

Running gdalinfo, the major difference between pre and post processing with GRASS is the presence of:

Band 1 Block=256x256 Type=UInt16, ColorInterp=Palette
  Color Table (RGB with 65536 entries)
    0: 5,5,5,255
    1: 5,5,5,255

...

  65534: 0,0,0,255
  65535: 0,0,0,255

The ArcGIS produced Geotiffs by our resident mapping person do not have this, unfortunately.

I know a limitation of the Nutiteq rendering engine the app uses requires either this color palette or the kind of tiff that shows up normally when viewed with a normal image viewer.

Our normal prep methodology is kind of painful, and I'm wondering if there isn't a simpler solution.

Is there a way to force ArcGIS to generate a geoTIFF that:

Is in the required projection for display (EPSG:3857),
equivalent to -co TILED=YES (I know tiled means many different things, so this is the tiled of gdalwarp)
And has a written colour pallette for the UInt16 that it needs?

1Fair disclosure, I'm one of the FAIMS project leads.


texts:
I am trying to install LAStools for QGIS3.4. I installed the plugin, downloaded LAStools and also wine. But if I try to run it for lasview, this is the error I get:

Processing algorithm…
Algorithm 'lasview' starting…
Input parameters:
{ 'ADDITIONAL_OPTIONS' : '', 'COLORING' : 0, 'GUI' : False, 'INPUT_LASLAZ' : '/Users/makju4245/Downloads/LM_Lidar_Clip.laz', 'POINTS' : 5000000, 'SIZE' : 0, 'VERBOSE' : False }

LAStools command line
/Users/makju4245/Downloads/LAStools/bin/lasview -i "/Users/makju4245/Downloads/LM_Lidar_Clip.laz" -points 5000000
LAStools console output
/bin/sh: /Users/makju4245/Downloads/LAStools/bin/lasview: No such file or directory

Execution completed in 0.05 seconds
Results:
{'': None}

Loading resulting layers
Algorithm 'lasview' finished

Even though I have folder called: /Users/makju4245/Downloads/LAStools/bin. In this folder, I find lasview.exe and lasview_README.txt.


texts: Problem getting the arcpy mapping module to export a layout view map

texts:
I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen this post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image.

Even more maddening is that I've added different text elements to both the data frame view and the layout view so that I can verify which is being exported. Even with the map.activeView = 'PAGE_LAYOUT', the exported image has the data frame view text element (see below). However, when I print the text of the element using print text_elm.text, it properly prints the layout view text.

Can anyone see anything wrong with my code? Thanks!

import os,arcpy
imagesDir = r'--\images'
gridsDir = r'--\grids'
mxd = r'--\map\template.mxd'
img_height_px = 800
img_width_px = 600
img_res_dpi = 300

arcpy.env.workspace = gridsDir

# add difference raster to mxd and export as png
map = arcpy.mapping.MapDocument( mxd )
map.activeView = 'PAGE_LAYOUT'
#arcpy.RefreshActiveView()

df = arcpy.mapping.ListDataFrames(map)[0]
for r in arcpy.ListRasters():
    year = r.split('_')[1]
    mo = r.split('_')[2]

    # automatically add new layers to legend
    legend = arcpy.mapping.ListLayoutElements(map, 'LEGEND_ELEMENT')[0]
    legend.autoAdd = True  # newly added layers will be automatically added to the legend
    legend.elementHeight = 4
    legend.elementWidth = 4

    # add layer
    print 'Exporting layer:', os.path.join( imagesDir,'dif-%s-%s.png' % (year,mo) )
    new_lyr = arcpy.mapping.Layer( os.path.join(gridsDir,r) )
    arcpy.mapping.AddLayer(df, new_lyr, 'BOTTOM')

    # update symbology of new layer using source layer in the map
    temp_lyr = arcpy.mapping.ListLayers(map,'temp_lyr',df)[0]       # find template layer
    temp_lyr.visible = False                                        # hide template layer
    arcpy.mapping.UpdateLayer(df,new_lyr,temp_lyr,True)             # update symbology of new layer using template layer

    # export map layout view
    arcpy.mapping.ExportToPNG(map, os.path.join( imagesDir,'dif-%s-%s.png' % (year,mo) ),df )

del map
print 'operation complete.'

Expected output:

Actual output:

Text element printed:


texts: I am converting a GPX file to shapefile using OGR in Python. After converting it to .shp the time field only show 'date' and it excludes the time part. What could be problem in converting.


texts: How to count rows of interest from a field in an attribute table using arcpy.da.Cursor?

texts:
How to count the number of records from a field 'COVER' that is neither 'woods' and neither 'orchards'?

fileName = 'C:/gispy/data/ch17/parkCopy3.shp'
fields = ['COVER', 'FID']

count = 0 .

try:

with arcpy.da.UpdateCursor(fileName, fields) as cursor:
    for row in cursor:
        if row[0] != 'woods' or row[0] != 'orchards':
            count = row[0].count
            cursor.updateRow(row)

    del cursor
print 'Number of records with other cover types:{0}'.format(count)

except:


texts: Creating symbol for "great wall of china" in QGIS?

texts:
I wanted to create a symbol like this (see screenshots below(first and second: white circle)), the shape of these symbols are different, some of them are a straight line, some of them are curved. How do I do it?

Screenshot 1

Screenshot 2 (See white circle)

How can I reduce the space between line and rectangle?


texts: Can USGS High Resolution Orthoimagery be viewed online?

texts: I found the USGS EarthExplorer where one can download their High Resolution Orthoimagery. This imagery can also be previewed in the EarthExplorer once a particular tile is found, but I wonder if there is a place online where the whole United States can be viewed at once (possibly the latest and highest resolution images).


texts: Road infrastructure efficiency measurement

texts: Is there any tool/script that shows the goodness of road infrastructure. For example, if you want to compare which of the two cities road network is better.


texts: Accuracy of planimetric geometry vs. ellipsoidal model

texts:
I'm examining the two geospatial options for IBM's DB2 database. In particular I am interested in the accuracy between these two options and whether it's worth it (the more accurate representation isn't free).

The thing I am most concerned about is someone doing a query (e.g. looking for a point or other geometry within a polygon) and the database incorrectly returning an empty resultset. My use case is a catalogue indexed by several means (temporal, geospatial and XML) and entries can be anywhere on the globe.

IBM states (PDF link) that:

  Spatial Extender treats the Earth as a flat map. It uses
  planimetric (flat-plane) geometry, which means that it approximates
  the round surface of the Earth by projecting it onto a flat plane.
  This projection causes distortions, which can vary across the extent
  of the data, but the distortions generally increase toward the edges
  of the projected region…Spatial Extender is best used for local and
  regional data sets that are well represented in projected coordinates,
  and for applications where location accuracy is not important.

The other option is:

  Geodetic Extender treats the Earth as a globe. It uses a latitude
  and longitude coordinate system on an ellipsoidal Earth model.
  Geometric operations are precise, regardless of location…Geodetic
  Extender is best used for global data sets and applications that cover
  large areas on the Earth, where a single map projection cannot provide
  the accuracy required by the application.

If I was using something like WGS84 in the Spatial Extender geospatial implementation, can anyone give me a ballpark figure of the worst-case accuracy errors I might encounter when compared to using the Geodetic Extender? Is there a formula or process for working it out for anywhere on the globe for a given map projection?

Additional information: "When to use DB2 Geodetic Data Management Feature and when to use DB2 Spatial Extender".


texts:
I'm writing a QGIS plugin and I need to create a table with some attributes that, in a second moment, I'll load in a SpatiaLite database.

The table is created as a memory layer, but as I said, it is just a attribute table, so the features don't have any geometric requirements.

I'm not able to create a memory layer without geometry. Is there a way to do that?

From the cookbook it seems it is not possible to create a geometryless memory layer.

I thought it was possible to set the geometry after the layer creation using a combination of QgsGeometry and from Wkb with  a specific option activated.

But I'have not been able to do that.

Someone has some suggestions?


texts: How To Display ST_AsMVT tiles in Leaflet

texts:
I have a large polygon dataset in PostGIS I would like to display in Leaflet map.  I understand st_asmvt() query will return mapbox vector tiles.  I can successfully query the data in postgis but I dont know how to display the results as vector tile layer in leaflet.

Research has lead me to think I should use the leafletvectorgrid plugin. Which allows me to display pbf data. How do I construct this url to render the results of my query?

\\my best guess for a local pbf tile url
var pbfTileUrl = "https://localhost/tiles/{z}/{x}/{y}.vector.pbf?";
var pbfTileLayer = L.vectorGrid.protobuf(pbfTileUrl);

The query below returns bytea result.

SELECT ST_AsMVT(q, 'small_areas', 4096, 'geom')
FROM (
  SELECT ogc_fid, edname, small_area,
    ST_AsMvtGeom(
      wkb_geometry,
      --xmin, ymin, xmax, ymax, srid
      --_northEast: o.LatLng {lat: 51.900647154116314, lng: -8.291244506835938}
      --_southWest: o.LatLng {lat: 51.89217277879109, lng: -8.625640869140625}`
      ST_MakeEnvelope(-8.625640,51.892172,-8.291244,51.900647, 4326 )
    ) AS geom
  FROM small_areas
  WHERE wkb_geometry && ST_MakeEnvelope(-8.625640,51.892172,-8.291244,51.900647, 4326 )
  AND ST_Intersects(wkb_geometry, ST_MakeEnvelope(-8.625640,51.892172,-8.291244,51.900647, 4326 ))
) AS q;

How do I pass these results to leaflet?


texts: Aggregate polygons from one table in PostGIS by proximity, area and date

texts:
I'm looking for guidance on a pgSQL query to dissolve polygons in PostGIS that are within 200 m of each other, have the same creation date and are above a threshold area.
I am trying
SELECT
  ST_Union(ST_Buffer(geom, 100)) as bffrd,
  ST_Union(geom) as parcelgeom, "Date",
  STRING_AGG("name",',') AS namez,
  STRING_AGG("Desc",',') AS Descz
FROM mapz.polygons
WHERE ST_Area(geom) >'20000'
GROUP BY "Date" ;

However this query does what it says and aggregates the polygons by date, not being restricted to adjacent polygons. So I am getting a multipolygon feature with polygons very distant from the target which have erroneously been included.
For the most part, the polygons of interest do not overlap. All the training guides I have seen discuss joins between tables, whereas all these polygons are in the one table. Also, the resulting polygons should retain their same size, I am not trying to increase their size, only select and aggregate them into multipolygons based them on the buffer.
I think I am seeking how to include ST_Buffer(geom, 100) in the Group By but that won't run as a query for me.


texts: ArcGIS 10.4 Installation Error- Error 1325 is not a valid short file name

texts:
I am planning to do fresh install of ArcGIS 10.4.1 on win 10 machine and i am keep getting same error 1325- is not a valid short name.
Also i saw the solution in other post (Avoiding Error 1325 EsriPyFldr not valid short file name when uninstalling ArcGIS for Desktop?)
 suggesting to remove ESRI from below location but  in my registry this not exists HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ESRI so that option is not working for me.

Also I made changes to registry HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders and  I reset the data to %USERPROFILE%\My Pictures but still no luck.

Any other solution to try please?


texts: Repair topology before pgrouting / No results of pgrouting

texts: My goal is to calculate lots of distances along the streets. I followed http://workshop.pgrouting.org/ tutorial except that I used osm2po instead of osm2pgrouting to import osm file. The only problem I'm facing now are gaps in results - Dijkstra algorithm seems to fail in finding the route between two nodes of the network in 10% of cases. It simply returns nothing, empty table. I suppose the problem is with the map, that it's not "routable enough" (I can't imagine any other reason). Did anyone have the same situation? Do you know how to fix it?


texts: ESRI ArcGIS Javascript API - any 2.9 beta examples available?

texts: I found the arcgis 2.9 beta at http://servicesbeta.esri.com/jsapi/arcgis/2.9 but cannot find any beta samples.  Are they available?


texts: Getting points inside selected feature in ArcGIS Desktop?

texts:
I have incorporated district map of India and excel table contents(which consist latitude, longitude and fire data)using add data feature in ArcGIS Desktop.

I have attached the picture below to show what I got after this.
Then I selected 1 district (It is India's map, blocks which you can see are representing different districts). It can be seen in the picture attached as a polygon : outer lining is of sea-green colour.

How do I get all the data points that lie inside the selected district in a table format?

When I am selecting that particular district, I can only get information about the few points and is time consuming.


texts: Exporting NetCDF layers as individual rasters?

texts:
I have a NetCDF (CRU diurnal temperature data) for each year and month from 1901 to the 2016.

I would like to export individual rasters for a selection of the year and month options.

I would like to have rasters for 01/16/1982 to 12/16/2014. The band dimension is the variable "time" which is organized as above (01/16/1982). Each layer follows the same format except for February which is 02/15/YEAR.

I am not sure how to script this. I've seen other examples for getting only months for a certain year but never a time variable formatted they way mine is or for creating rasters that span multiple years.

Right now the dataset is global in coverage but I would only like a subset of African countries (I have a boundary shapefile).

Is there a way to loop through all the months of temperature data, extract the portion I want and export as new raster?

I've make the NetCDF, it is now called dtr_layer.


texts: How to select and copy a group of polygons in QGIS?

texts:
I'm new to QGIS. I opened a few shapefiles that cover Europe. Now I want to select a smaller area and if possible copy the polygons in this area so I can work with a smaller set. How should I do this in QGIS?

I started to choose "toogle to editing", then I choosed the  "node tool" and started to make rectangle. But then I get a popup (see screenshot below) telling me to set a "tolerance".

I looked in (as suggested in the popup) "Settings" > "Project properties" > "General", but couldn't find and any tolerance value here.

From the User Guide (version 1.7.0) in chapter 4.5.1 it was suggested that I should change the tolerance in "Settings" > "Options" > "Digitizing" and I changed from 0.00000 to 1.00000. It was also suggested to edit "Settings" > "Snapping options" so I changed the tolerance to the same value there.

Now I tried with the "Node tool" again, but I got the same popup and couldn't select any polygons.

How can I select an area of polygons in QGIS? that I later can copy to a new project in QGIS to get a smaller set to work with.