All Questions

18
votes
0answers
517 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 ...
18
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 ...
14
votes
0answers
406 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 feature from which I would like to inform ...
11
votes
0answers
435 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 ...
11
votes
0answers
583 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, ...
10
votes
0answers
679 views

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 ...
9
votes
0answers
254 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
396 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 ...
8
votes
0answers
225 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....
8
votes
0answers
314 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 ...
8
votes
0answers
1k views

Evaluating map projection scale error

This is related to a previous question How to determine projection parameters when customizing a projection I posted. I am trying to quantitatively evaluate scale distortion associated with choosing ...
7
votes
0answers
137 views

When using QGIS join by location, how does QGIS determine the first located feature option?

I have used QGIS process 'join attributes by location' in one of the models I have built and I have now been asked to explain in detail exactly how the model is determining the results. I am using it ...
7
votes
0answers
75 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 ...
7
votes
0answers
335 views

Developing QGIS Python plugins using Jupyter?

Is it possible to run PYQGIS commands using Jupyter notebook and, if so, is there any documentation to develop QGIS plugins using Jupyter?
7
votes
0answers
215 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
102 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
176 views

Computing the horizon profile given a DEM in python

Can anybody orient me towards an open source python script that computes the 360° horizon profile (azi + elevation of highest topography in eye sight) from a single point (x,y,z) on Earth (account for ...
7
votes
0answers
568 views

Using QField with Multi-User Access also Offline?

I got 10-20 QGIS-Users which edit all one Project online and offline. Sometimes they do it at the same time. Until now we only used QGisDesktop with a PostGis Database stored in QGIS Cloud(50MB ...
7
votes
0answers
717 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/...
7
votes
0answers
2k views

Creating vector tiles from OpenStreetMap?

I need to understand the process of creating Mapbox Vector Tiles from OSM data in some detail -- in particular I need to fiddle with cutting out a lot of data (esp. buildings) to keep the final vector ...
7
votes
0answers
1k 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
532 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
5k 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 ...
6
votes
0answers
99 views
+100

QGIS can't load geometryless WFS tables published with QGIS Server

I created a QGIS 3.6 project on Windows Server 2016 x64 with two PostGIS layers: Layer A: Points Layer B: Datatable (No geometries) and configured QGIS Server options on the project like this: Now ...
6
votes
0answers
64 views

QGIS: beautiful HTML/Javascript terrain profiles won't show in Atlas print

I managed to automate the creation of terrain profiles, using the beautiful "Highcharts" Javascript framework. The data source of the profiles is stored in an attribute called "elev_data" of my ...
6
votes
0answers
56 views

Calculate volume of space defined by multiple overlapping 3D polygons

I have thousands of 3D polygons scattered in space but they mostly overlap with many of their neighbors in big extent. Is there any way how to compute volume they define effectively? I would love ...
6
votes
0answers
132 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
187 views

How do I select the longest connected lines from PostGIS ST_ApproximateMedialAxis?

I used PostGIS ST_ApproximateMedialAxis to transform polygons representing mountain ranges into a series of lines. Now, I'd like to select only the "longest" line segment for each group, so that I ...
6
votes
0answers
222 views

Point cluster symbology for different categories without overlapping symbols

I'm trying to visualize crimes based on if the crime happened during day or night time. I've tried using the point displacement tool but I'm not satisfied with the results because the readability for ...
6
votes
0answers
315 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
195 views

GDAL contour line generation at DEM edges

In a Python application I use gdal.ContourGenerate() to generate contour lines (GDAL version 1.11.4 and 2.2.1) from DTED tiles. DTED tiles overlap at the top and the right with neighboring tiles. ...
6
votes
0answers
137 views

When moving a feature in QGIS, is there a way to nudge it rather than use the mouse?

I need to move a lot of features (polygons) in QGIS to fit a newly Georeferenced scanned map that is slightly asymmetrically distorted. This is fine as it is just to provide a print copy. I end up ...
6
votes
0answers
204 views

Packing squares polygons in a raster grid

In the green area of the raster I have to fit as many square polygons as possible, of three different sizes: 3x3 cell size 2x2 cell size 1x1 cell size With the fact that the approach should be ...
6
votes
0answers
259 views

How to remove overlapping features by percentage?

I have geometry records of type MultiLineStringZM and I am trying to INSERT new records that overlap some of the records currently in the table. If they were type MultiPolygon I could use ST_Area() as ...
6
votes
0answers
273 views

MapScript with Python 3

I am trying to build raster summarizing features into a GeoDjango webmap, and would like to use the django-raster and django-wms packages to do so. I believe that I have them set up correctly, but am ...
6
votes
0answers
390 views

What are the considerations for choosing between WKT and WKB geometries?

There are many questions & answers here addressing how to convert between WKT and WKB geometries, and about the specifications or implementation details. But what are the considerations for ...
6
votes
0answers
366 views

PostGIS (Postgres 9.6) - order bounding box query results by date (large table)

I'm querying database entries using a bounding box with ST_MakeEnvelope and intersecting that with a coordinates column (type GEOMETRY), consisting of simple POINT(lng, lat) entries. I've created a ...
6
votes
0answers
84 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
575 views

PostGIS: Storing large gridded time series

I'm trying to store a large raster timeseries on PostGIS-2.2 / PostgreSQL 9.5. The data comes as a collection of HDF-EOS (basically HDF4) files. Each file contains 24 bands, representing hourly ...
6
votes
0answers
229 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
556 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
180 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
722 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 resolution

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
508 views

PostGIS: How to distinguish overlapping routes (i.e., LineStrings) based on their direction?

I have a set of routes which are represented by LineStrings in my PostGIS database. These routes represent journeys that people make. I want to come up with routes that (a) overlap, and (b) have the ...
6
votes
0answers
806 views

How to load the layer style from Postgresql with Python?

I would like to write a python macro that upon opening my QGIS project file will reload the default style for each layer from the postgres 'layer_style' table. I have had a look at the documentation ...
6
votes
0answers
894 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
153 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 ...

15 30 50 per page