All Questions

23,999 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
23
votes
0answers
728 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 ...
20
votes
0answers
2k 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 ...
12
votes
0answers
642 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, ...
11
votes
0answers
273 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 ...
11
votes
0answers
475 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 ...
9
votes
0answers
292 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
1answer
376 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 ...
8
votes
0answers
90 views

Is there a way to create quadrilaterals buffers around polygons in QGIS?

For a little map project of mine, I need to create quadrilaterals around a polygon feature based on the bisected angles of the vertices of that feature. Here is an example: Is it possible to automate ...
8
votes
0answers
122 views

QGIS Print Layout - Rotation of Grid Coordinates to match map rotation

I have a layout in QGIS where 3 map views are rotated to 35 deg. The grids automatically rotate to match the maps rotation, however the labels do not. Does anyone know a way to make the coordinate ...
8
votes
1answer
330 views

Splitting lines/creating vertex at intersection using PyQGIS?

I am looking for an easy way or function to split 2 previously selected line features (generate vertex) at intersecting points (or touching points). See the following picture: I am developing a ...
8
votes
1answer
324 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
129 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 ...
8
votes
0answers
302 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 ...
8
votes
0answers
365 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
3answers
4k views

Login to USGS Earth Explorer and download Landsat imagery with Python

I want to login to the USGS Earth Explorer website at http://earthexplorer.usgs.gov/ with Python and download imagery from the Landsat Archive collection just by giving it username,password,path/row (...
8
votes
0answers
184 views

Open QGIS project files in exclusive mode / alert if project file already in use

I have QGIS-Project-Files saved to a network drive and was wondering if it is possible to warn users that a project file is already opened by an other user to prevent concurrent editing of the same ...
8
votes
0answers
233 views

Defining partial or complete overlap with QgsSpatialIndex

I'm working on adding some functionality to a QGIS plugin. It currently uses a QgsSpatialIndex to efficiently compute whether the features of a vector layer intersect (potentially millions) of ...
8
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 '...
8
votes
0answers
903 views

How to digitize in stream mode in QGIS, using a tablet?

How to digitize in stream mode in Qgis, using a wacom cintiq tablet? freehand it's no use. i need something like MNDR stream digitizing extension for arcview 3.x, which allows continuous tracing, ...
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
208 views

Accessing watershed boundary for lakes in R

I have had success accessing unique database IDs and polygons for various lakes in the US. I'm now looking to get polygons for the watersheds associated with these lakes, but have stumbled a bit. ...
7
votes
0answers
179 views

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 ...
7
votes
0answers
157 views

Working with QGIS 3 with styles stored in spatialite database

I am working in QGIS 3.4 with a geopackage file (SQLite database) containing orography information (points, lines and polygons). In QGIS, I have defined by hand a style for every layer in geopackage (...
7
votes
0answers
101 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 ...
7
votes
0answers
147 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 ...
7
votes
1answer
895 views

Editing Layout-Items after loading a QPT-Template in QGIS 3 with Python

I am facing a problem with the new Layout API while implementing a plugin for QGIS 3. Starting point is a layout template in qpt-Format, which contains different elements like (attribute) tables, map, ...
7
votes
0answers
244 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
200 views

ESRI Runtime Geodatabase Shape storage

Does anyone out there know the geometry storage encoding for ESRI's Runtime Geodatabase (.sqlite) format? aka mobile geodatabase. There are 'GDB_ tables', 'st_ tables', 'RTREE indexes' and other ...
7
votes
1answer
506 views

Display pictures stored as bytea in postgresql column in qgis

does someone knows a possibility to visualize in a bytea column saved photos of a postgresql database in qgis? I would like to store pictures directly into the database, not just the link/ url.
7
votes
0answers
856 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

How do I export a 16-bit image from QGIS?

Could someone explain how to export from QGIS a 16bit image. I have imported data and coloured it as I want, but need to export it as a 16bit image, as 8bit is giving a terracing effect.I believe I ...
7
votes
1answer
111 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 ...
7
votes
1answer
2k views

Clipping raster brick object in R

I have MODIS NDVI TIFF files for a year I want to first clip it with a irregular polygon (not by its extent only) of my study area and save it as a multi band raster in TIFF format The TIFF image are ...
7
votes
0answers
802 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 ...
7
votes
2answers
4k views

C# implementation of concave hull / alpha shapes

I'm looking for a C# implementation of the Concave hull (alpha shapes) algorithm. I already found several Java, Python and C++ implementation but no C# version. The other implementation are quite ...
7
votes
0answers
587 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
1answer
345 views

Opening MOD17A3 in ENVI so it is properly georeferenced?

I am using ENVI 5.1 on Windows 8. I am trying to open a MOD17A3 (MODIS Net Primary Productivity standard product - L4) .hdf file which I downloaded from the USGS website. I am still a beginner at ENVI,...
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 ...
7
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 ...
7
votes
0answers
986 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
1answer
86 views

Merge/join only the lines which are snapped to vertices in QGIS

I have polygons drawn with AutoCAD as Mline (Multiline type) which are rendered in QGIS as 8 segments for each feature. An example of one selected feature is shown in the picture below: I want to ...
6
votes
0answers
229 views

QGIS projects in PostgreSQL (pyQGIS - saving proj to DB)

I'm currently working on some code to automate the creation of a QGIS project from tables in a PostgreSQL DB. For info I'm working in QGIS 3.4. I'm almost there, but I'm stuck on one thing How do I ...
6
votes
0answers
152 views

Using Layer Parameter variables in Field Calculator within QGIS Model?

If I define a Vector Layer as an input parameter to a QGIS model, then the parameter name is exposed as a variable in a Field Calculator within the model, however I am unable to use this variable as I ...
6
votes
0answers
178 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. ...
6
votes
1answer
217 views

Spatialite KNN view in QGIS

My task is to calculate the average ground survey level for each tree in my dataset, using the 3 closest survey points (optionally within a 3m radius of the tree). I want to write this in a Spatial ...
6
votes
0answers
154 views

Position of vehicles relative to lead vehicle

I have a set of vehicles (think railway) that are in a (semi)fixed formation. I know the lead vehicle and I know the GPS coordinates of the lead vehicle at any given time. Sometimes, I can rely on the ...
6
votes
0answers
364 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
248 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
386 views

Adding layer using QgsMapLayerRegistry within thread PyQGIS Plugin

I am developing Python QGIS plugin, where I am opening two threads in run function with one thread performing calculation while second thread is printing value looping and when first thread is ...

15 30 50 per page