All Questions

16
votes
0answers
436 views

SNAP vs. GDAL vs. Orfeo - image rescale, histogram cut

I work with a Sentinel-2 .jp2 image (red band, 10950 x 10950 pixels). My aim is to reach the same result what SNAP does with a Python script. See the SNAP method and parameters: So this is my ...
15
votes
0answers
1k views

Leaflet v1 plugin: layer control for ungrouped, grouped, and nested-grouped layers

I need a Leaflet plugin which extends L.Control.Layers. I have the following requirements: works with Leaflet 1.x handles ungrouped layers alongside grouped ones handles nested layer groups does not ...
13
votes
0answers
298 views

Showing startup-messages on QGIS splashscreen

During the startup of QGIS there are status messages shown in the lower part of the splashscreen like "restoring loaded plugins". I am using a startup.py from which I would like to inform the user ...
10
votes
0answers
554 views

Parsing file format for attributes in Raster Product Format (RPF) maps and imagery?

I'm trying to implement an open-source NITF reader (using only java, no external libraries such as GDAL or NITRO), and its mostly going OK. However I'm having trouble understanding the RPF extensions, ...
9
votes
0answers
334 views

Alter Minimum Bounding Box Algorithm

I'm trying to create an algorithm similar to minimum bounding box (though it may end up looking nothing like it). In this case the angle will be passed as a parameter and given the angle I need the ...
9
votes
0answers
284 views

Executing bidirectional dijkstra on TIFF image?

Can anyone indicate an example of how to do this? Link, tutorial etc... I started a discussion here about how to load a TIFF image like a graph nicely answered by @sehe. But, in this post the image is ...
9
votes
0answers
186 views

Matching segments of different lengths

I'm trying to match small segments with a larger segment they are the most probably related to: relatively close, similar bearing, and facing each other. Here is a typical example of the data I have: ...
9
votes
0answers
240 views

Cannot Open VRT of Sentinel2 image created by AutoCreateWarpedVRT

I am trying to create a warped VirtualRaster of a Sentinel2 image. Here the Python code I tried: from osgeo import gdal, osr srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:32632') gdal....
9
votes
0answers
813 views

How can I merge adjacent polygons and return all (adjacent and not adjacent) as Multipolygon?

I have a postgres database with administrative boundaries and their geometry. Each of those boundaries have an ident number. What I want to achieve: First I want to select all rows which are ...
9
votes
0answers
641 views

How do I simplify the straight sections of (multi)Linestring in PostgreSQL/PostGIS leaving the curved sections untouched

I have (multi)linestrings containing upwards of 5000 points and I want to perform two simplifications possibly using Ramer Douglas Peucker or alternative methods in PostGIS The (multi)linestrings ...
8
votes
0answers
126 views

QGIS versions yielding different results on $area calculations?

When grading an exam, I discovered that QGIS 3.2 and 3.4 produce different values on computing $area over polygons. I experimented using $area and area($geometry) to check the differences between ...
7
votes
0answers
177 views

Missing roads from OpenStreetMap data with osmosis

I am currently trying to extract road networks from OpenStreetMap dumps downloaded on Geofabrik. I am using the following osmosis (version 0.45) command to extract roads: osmosis \ --rbf input.osm....
7
votes
0answers
188 views

Multithreaded DB connection for QGIS plugin

I am using QGIS 2.18.21 and PostgreSQL 9.6. on a Windows 8 machine. I am trying to do processing of a certain database task in the background, and I want the user to be able to continue to work in ...
7
votes
0answers
92 views

Does PostGIS ConcaveHull exclude points/polygons in some cases, and buffer outward in others?

In trying to generate concave bounding polygons using PostGIS ConcaveHull, I am seeing what I think is strange behavior. When running with a 0.99 tolerance, the resulting polygon shrinks tight as ...
7
votes
0answers
589 views

Rasterio does not execute the rasterize function

Rasterio's features.rasterize() function is not working as expected. I have two files: OpenStreetMap shapefile with land usages Raster (.tif) with satellite imagery Goal: Create a raster file from ...
7
votes
0answers
220 views

Is it possible to open MapGIS files ( .WL, .WP & .WT ) in QGIS or other GIS?

We received some files from clients located in China created in a program called MapGIS. I was wondering if anybody knows how to make QGIS or any other GIS program, excluding MapGIS, open these files? ...
7
votes
0answers
952 views

Extract TopoJSON directly from PostGIS

I have a simple "region" table: id (TEXT), name (TEXT), geom (MULTIPOLYGON). Here's the query I can use to extract a GeoJSON FeatureCollection: SELECT row_to_json(fc) FROM ( SELECT '...
7
votes
0answers
512 views

Steiner tree problem: Optimal routes for Fibre planning on road network

I am trying to solve a large optimization problem where I have a set of nodes on a road network that need to be connected using fibre using the shortest possible amount of fibre. The problem is a ...
7
votes
0answers
4k views

Downloadable, Open Source, IP GeoLocation database

I have an open source project I need a similarly open source IP GeoLocation database for. i.e. IP address to country (and ideally city). Ideally with a license that allows redistribution. This is a ...
7
votes
0answers
1k views

How to force geometry type in mixed geometry WFS layer in QGIS?

I have an external WFS source serving mixed geometry types - in other words, I have no control of the source. When adding the layer QGIS sets the geometry type to line and thus I am unable to style ...
7
votes
0answers
361 views

Accessing existing instance of QGIS from stand-alone python script

For my own data analysis pipeline, I am running a split screen setup with iPython notebooks on one side, generating variables from source data, pushing them to a CSV file which QGIS then reads/joins ...
7
votes
0answers
1k views

Evaluating map projection scale error

This is related to a previous question I posted. I am trying to quantitatively evaluate scale distortion associated with choosing different projection center, center azimuth, and scale factor values ...
6
votes
0answers
125 views

Processing post-execution script hook to clear scratch layers?

I've been cobbling together some Processing scripts for QGIS 2.18 (I'm not a fan of QGIS 3 scripts), and I keep running into one particular problem: my script creates a lot of scratch layers and they ...
6
votes
0answers
59 views

Coarse Woody Debris extraction

I created very high dense point cloud of some forest plots using terrestrial laser scanner. Then removed points above 1.3 meter to see the coarse woody debris (Fallen dead trees). Attached is the ...
6
votes
0answers
282 views

PostGIS issue with ST_Clip?

I'm trying to clip a raster using a polygon but I end up with a result that doesn't seem right and where some raster pixels are outside the polygon used for the clip. See image below where polygon is ...
6
votes
0answers
635 views

Landsat level-2 data comparison

I'm doing a temporal analysis of NDVI and temperature over 17 years, necessitating data from Landsat 5,7, & 8. I'm interested in using level-2 Landsat data available from https://espa.cr.usgs.gov/...
6
votes
0answers
80 views

Show Symbol (e.g. City-Marker) only when an associated label can be displayed

I'm building a map for a certain region with many cities to be displayed. Some of the smaller cities should only be displayed if they don't overlay bigger cities. While the labels of the smaller ...
6
votes
0answers
222 views

Different results from GDAL raster attribute table command on mac and windows

I am trying to get the raster attribute table of the following file: Shift_cult_past_current_prediction_20160107_gr1DD.tif available here: https://www.dropbox.com/s/fmomfpro3j6dmz8/...
6
votes
0answers
523 views

Gdal and module import error when creating an .exe application with pyinstaller

I’ve been struggling since three days in a row to create a windows executable application from my python application. I have managed to get results but I’m not at all satisfied with the workarounds I ...
6
votes
0answers
167 views

QgsSpatialIndex partial or complete overlap

I'm working on adding some functonality to a QGIS plugin. It currently uses a QgsSpatialIndex to efficiently compute whether the features of a vector layer intersect (potentially millions) of ...
6
votes
0answers
5k views

Queen vs Rook neighborhood

Queen and rook neighborhoods are two common ways to calculate statistics for a focal cell. They are also known an Moore and (von) Neumann neighborhoods. I think a "bishop version", i.e. from lower ...
6
votes
0answers
687 views

Efficiently calculate distance between raster patch edges

I have a binary raster which I've classified into patches using raster::clump. I now want to efficiently calculate the edge-to-edge, i.e. minimum, pairwise distance between patches. I am currently ...
6
votes
0answers
2k views

How to prevent cross-world lines in ggplot world map?

I'm having issues displaying 'great circles' paths and polygons in ggmap, an extension of ggplot2. Please enter the following code to replicate my issues: https://gist.github.com/Robinlovelace/...
6
votes
0answers
2k views

Rasterize shapefile using another raster's size and resultion

Rasterizing a vector (shp) I face the following problem: I want my output file (the rasterized vector) to have the same resolution and dimensions as an existing raster. If I understand the interface ...
6
votes
0answers
865 views

Constructing a Voronoi diagram using a complicated travel time metric

I have in my possession four sets of shapefiles: 1. Locations (points), around 1000 2. Roads (lines), each road has a speed attribute 3. Terrain (polygons), each zone also has a speed attribute 4. ...
6
votes
0answers
1k views

Uploading raster format(*.tif) to postgis through raster2pgsql

I'm new to postgis and raster file format. i currently working on netcdf files and i want to import it into postgis through curl command line tool but its failed for me.so i jump on to GDAL v1.9.2 ...
6
votes
0answers
148 views

Is IGraphicTracker leaking memory?

It seems that when geometries are removed from an IGraphicTracker instance, the geometries remain in memory until IAoInitialize.Shutdown() is called. I have tried removing the geometries by calling ...
5
votes
0answers
56 views

Clipping rasters to mask layer QGIS 2.18, 3.4, 3.6 not working

Having a problem clipping a singleband GEOTIFF of Canadian land uses to a vector Quebec provincial boundary. When I do Raster -> Extraction -> Clip by mask layer, the program processes endlessly. I ...
5
votes
0answers
96 views

Authorizing a user logged in via ArcGIS Online/Javascript in a Python server

So, let's say I have this application built via WebAppBuilder, the user is already logged in via a ArcgisOnline organization, but I have a separate python server that does some custom geoprocessing ...
5
votes
0answers
53 views

Cumulative value/cost along shortest distance roads in QGIS

I have a road network linking multiple (ca 1830) agricultural production regions to several ports (ca 12). (lines in the pic below are roads, small black dots centroids for producing regions and ...
5
votes
0answers
53 views

Offline editing slides the attribute data over one column and ads an “fid” column

My QGIS 3.4 Madeira project is attached to a PostGIS database (Azure) and looks good. It contains two layers, one with points and one with polylines. Each item in the Pointz layer has about ten ...
5
votes
0answers
74 views

Old .qml style (vector-polygons) from QGIS 2.18 in QGIS 3.4

I have a .qml polygon style file created with QGIS 2.18. It works to import until Version 3.2 without problem. But in 3.4 the style is loaded, but not applied/visualized. The Polygons dissappear ...
5
votes
0answers
43 views

Shp2pgsql encoding issue / error. Special latin /utf characters (áéíóú) are wrong

I am not able to load accented vowels coming from a Shapefile, to a PostGis geodatabase. This is my information: Operative System: Windows 10. PostgreSql Database: postgresql-10.5-2-windows-x64.exe. ...
5
votes
0answers
133 views

Unattended QGIS updates with OSGeo4W

I would like to do an unattended update of my QGIS install every night using windows task scheduler. Is it possible to automatically update all installed packages with the OSGeo4W-Installer without ...
5
votes
0answers
166 views

Drawing geometrical shapes with dimensions using ArcGIS API for JavaScript?

I have to draw the geometrical shapes with their dimensions and show it with that shape. As in below images, I want to show the length and width of the rectangle, the radius of the circle and the ...
5
votes
0answers
179 views

Using WFST in Leaflet: can not move/delete features

I write a Leaflet app which makes use of two plugins Leaflet.Draw and Leaflet.WFST. The first allows to create/edit/delete features, the second saves changes to my PostGIS database hosted by GeoServer....
5
votes
0answers
172 views

GDAL grid Not recognizing csv as having geometry

NON-DUPLICATE EDIT: This question is not a duplicate because I have tried the solution presented as the answer to the "original" question and it did not work. See results below. I am attempting to ...
5
votes
0answers
591 views

Error running r.thin in QGIS

I get the following error when running r.thin: Traceback (most recent call last): File "C:/PROGRA~4/QGIS3/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 395, in ...
5
votes
0answers
300 views

Calculating average pixel value for each band across multiple raster layers?

I have a set of raster files that are essentially data sets of precipitation across a region. I have multiple raster files that are the outputs of different climate models. Each pixel in the raster ...
5
votes
0answers
551 views

Join attributes by location very slow on QGIS 3.0

"Join attributes by location" is very slow on QGIS 3.0. I have tried it with a CSV file and also with a shapefile (point layer) and a grid (made of polygons). On QGIS3.0 it takes about 3 hours to ...

15 30 50 per page