Skip to main content

All Questions

1,095 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11 votes
0 answers
1k views

What is the convergence threshold for ArcGIS Iso Cluster?

The ArcGIS tool Iso Cluster Unsupervised Classification does not seem to have any documentation on the convergence threshold used in the tool. To compare, Erdas Imagine has all of the necessary ...
Aaron's user avatar
  • 51.8k
8 votes
0 answers
470 views

OGR failing to unpack polygons and respective holes from shapefile

I'm trying to unpack shapefiles in Python (v3.7.4) using the GDAL-OGR library (v2.3.3). Each shapefile has only one feature containing multiple polygons with holes. They cannot be produced differently....
Thaine Herman Assumpção's user avatar
7 votes
0 answers
5k views

When does a QGIS .qix spatial index of a shapefile need to be re-created?

I understand the basics of spatial indexes but would like to understand when exactly a spatial index would need to be re-created or updated? The reason I ask is because when a folder was moved to a ...
AWGIS's user avatar
  • 3,282
7 votes
0 answers
2k views

What is the best way to display a large shapefile (with polygons) as a layer on a leaflet map?

I have a leaflet map of the UK with around ~2000 points total points and a bit of metadata loading for each point with two side-panels showing the metadata. These points are drawn from several tables ...
Jeremy Kidwell's user avatar
6 votes
0 answers
1k views

How to select points with point ids from external list

I have a point shp and list of point IDs in CSV file which match with point IDs in the shape. Points in SHP have location while points in the external file don´t. How can I select points in the shp ...
vsjbrc's user avatar
  • 61
6 votes
0 answers
2k views

QGIS: Release file lock on file used in a processing algorithm at the end of script

I am using runalg (qgis:joinattributesbylocation) on two QgsVectorLayer objects. At the end of my script I'm trying to delete all the files created during the script. I can delete everything except ...
David M.'s user avatar
6 votes
0 answers
1k views

How to set Vertical Coordinate system when creating a 3D shapefile?

I'm working with GDAL v1.11 and am seeing the vertical CS stripped when exporting a 3D shapefile (from oracle spatial). This is the command I'm running: ogr2ogr -f "ESRI Shapefile" B_POINT.shp (...
Russell's user avatar
  • 61
5 votes
0 answers
260 views

(QGIS 3.20) Adding features while spatial index is created makes them disappear

I am encountering a weird behaviour in QGIS 3.20 on Windows. Steps to reproduce: Create an empty project Create a SHP layer. Add a few features. Save the changes to disk At this point everything is ...
peauc's user avatar
  • 51
5 votes
0 answers
462 views

ogr2ogr creates too many columns with LEFT JOIN

I am creating a GeoPackage using several shapefiles using ogr2ogr (GDAL 2.2.4): ogr2ogr -f GPKG /path/to/out.gpkg -append -nln out -a_srs EPSG:4326 /path/to/in1.shp ogr2ogr -f GPKG /path/to/out.gpkg -...
vdavid's user avatar
  • 308
4 votes
0 answers
873 views

Reading zipped shapefile from URL directly into QGIS

I need to request a shapefile from an OpenTripPlanner Server and read the file directly into QGIS without saving the file to a disk. Background and requirements: Users system wont be able to write ...
MrXsquared's user avatar
  • 35.6k
4 votes
0 answers
271 views

Spatial regression: general nesting spatial model using splm package in R

I have a shapefile of panel data (multiple years of observations for each polygon). I am estimating fixed effects spatial regression models with this data. I used one year of this data to generate a ...
C. Ashley's user avatar
  • 405
4 votes
0 answers
283 views

Inconsistently getting "Input shapes do not overlap raster", CRS appear to match

Masking topographic raster data by a shapefile (bedrock geology polygon). Following this guide I do this: with fiona.open("geology.shp", "r") as shapefile: geology_mask = [...
joanmarie's user avatar
4 votes
0 answers
594 views

What happens if you set QGIS as the default program to open a *.SHP file?

In the screenshots of shapefiles in this question, Accessing downloaded shapefiles/attribute data?, you can see that the .shp files have the QGIS logo as its icon. I think this means that on that ...
csk's user avatar
  • 25.1k
4 votes
0 answers
379 views

How to increase Compression Memory for ECW Opacity Builder

I am attempting to build opacity within an ECW file using ECW_Opacity_Builder.exe from APOLLO Essential Utilities 2014, which has worked flawlessly many times before. When attempting to build opacity ...
Michael Stimson's user avatar
4 votes
0 answers
756 views

How to remove black pixels in Landsat image

Does anyone know how I can remove these black pixels around the edge of this Landsat image? They appeared when I layer-stacked the bands in ERDAS IMAGINE - they were not there in the separate band ...
Simba06's user avatar
  • 861
4 votes
0 answers
526 views

Import Large Shapefile to Postgres

I'm trying to import a large dataset to Postgres, of about 600MB, that sits on a remote AWS server. But I get the following error Not enough memory to allocate requested memory (nRecords=26923892). ...
tvieira's user avatar
  • 331
4 votes
2 answers
2k views

Searching for UN regions/sub-regions shapefile

for a visualisation project I need the boundaries of the UN regions as defined here : http://unstats.un.org/unsd/methods/m49/m49regin.htm That's 21 polygons for the sub-regions. I have been looking ...
fatz's user avatar
  • 149
4 votes
0 answers
2k views

How to build .vrt of shapefiles?

I've a huge number of shapefiles and I would like to create a VRT as I do with gdalbuilvrt for raster. I find here https://github.com/dwtkns/gdal-cheat-sheet that it should be possible and the format ...
Wraf's user avatar
  • 539
4 votes
0 answers
1k views

How to clip a big shapefile from another shapefile's extent

I am working on mangroves in Sundarbans (Bangladesh / India), using Landsat pictures. I need to equalize them in reflectance, before classification, for the evolution of the biomass in this region. I ...
Post. T.'s user avatar
4 votes
0 answers
1k views

Creating Shapefile spatial index programmatically in .NET?

I am creating a shapefile programmatically using DotSpatial using the following example syntax / pseudo code FeatureSet features = new FeatureSet(DotSpatial.Topology.FeatureType.Polygon); features....
AlexC's user avatar
  • 141
4 votes
0 answers
1k views

Open shapefile in ArcGIS Runtime WPF SDK as Graphics/Feature layer

I Googled and followed this tutorial and figured out how to import Shape files and Rasters into Runtime. However, it seems most of the functionality uses a FeatureLayer/GraphicLayer instead an ...
Kev84's user avatar
  • 860
4 votes
0 answers
2k views

Ogr2ogr: Unable to open datasource problem

I downloaded the Precints shapefile from the City of Boston's data hub, and I'm trying import it into SQLServer (I'm running the Express verson). I've already created the database in the SQLServer (...
Dan's user avatar
  • 41
4 votes
1 answer
2k views

Counting and rasterizing polygon overlaps in QGIS?

I have a large number of polygons that are overlapping. I'd like to create a heat map and plan on using raster calculation to do this. My plan: to give each polygon a raster value of 1, and adding ...
jpmaniac87's user avatar
3 votes
1 answer
86 views

How can we tell how similar two countries look on a map?

Suppose I have these 2 maps: I can represent these two maps in matrix form: map1 <- matrix( c("R", "R", "R", "R", "R", "R", "R&...
farrow90's user avatar
3 votes
1 answer
120 views

How do I dodge overlapping line/polygon layers so that each is visible in QGIS?

I have 3 separate polygon layers that often overlap (image below). How do I change the symbology in QGIS to have them parallel to one another and not overlapping? (as shown in the second image below).
jabber95's user avatar
3 votes
0 answers
644 views

How can I get GADM level 0 (countries) shapefiles?

When downloading GADM data from their website (https://gadm.org), It is highly suggested to download it country by country. I would need the whole world at once with only level 0 geometries. The ...
Mastiff's user avatar
  • 139
3 votes
0 answers
219 views

Create new grid based on another grid (shapefile) in QGIS

I have an shapefile of the historic grid Messtischblatt which is a CRS formerly used in Germany for the topographic map at a scale of 1:25,000. The CRS is OGC:CRS84 - WGS 84 (CRS84) I want to further ...
Mike's user avatar
  • 31
3 votes
0 answers
177 views

How to properly convert from WKT to euclidean 3d points?

I am not a geoscientist (I do computer graphics), however I am trying to render some geospatial data encoded as a WKT file. I have a POLYGON with 2 coordinates per point, which seems to be ...
Makogan's user avatar
  • 131
3 votes
0 answers
658 views

Editing shapefile adding fields with values with pyshp

I'm trying to add some fields to a shapefile using pyshp. The code I have to far is: import shapefile # Read in our existing shapefile r = shapefile.Reader(r"C:\...\Edit_SHP\TracksLines.shp"...
user179413's user avatar
3 votes
1 answer
271 views

How do I append a shapefile to PostGIS table with multiple geometry fields using ogr2ogr?

I am having an issue when trying to append shapefile data to an existing table in my PostGIS database using ogr2ogr. The existing table has multiple geometry fields. When I append the shapefile the ...
Helen's user avatar
  • 31
3 votes
0 answers
301 views

Plotting the albedo using Python

import glob import numpy as np import pandas import os import rasterio import geopandas as gpd import matplotlib.pyplot as plt def get_image_stats_only(img_array): raw_stats_dictionary = {'mean':...
Hanxi's user avatar
  • 51
3 votes
0 answers
261 views

Reducing points but maintaining attributes from original shapefile

I have a shapefile with points but there are a lot of points and I want to reduce the amount. I have tried "Points thinning" which automatically reduces the amount of points but it loses all ...
Mary's user avatar
  • 31
3 votes
2 answers
1k views

Geodataframe to PostGIS or shapefile

I have a GeoDatFrame df : df.geometry.name >>>'geometry' df.loc[:, 'geometry'] >>> Identifiant 0 MULTIPOLYGON (((2.827 42.691, 2.828 42.691, 2.... 1 MULTIPOLYGON (((2....
Basile's user avatar
  • 617
3 votes
0 answers
82 views

Difference in raster pixels between Windows x86 and Windows x64

I have a huge problem and I can not find a reason for it. I have two PCa, one in my house and the other in my workplace. The first one is an old notebook with Windows x86 and the other is Windows x64. ...
Pablo Sanhueza 's user avatar
3 votes
1 answer
940 views

Extract point cloud data from shapefile with Python

I am trying to plot profiles from LAS data. So my first step is to extract the data using a shapefile. I found this piece of code on the laspy website and thought I could use it to do this : def ...
User18981898198119's user avatar
3 votes
0 answers
812 views

QGIS 3.4.6 Cannot create fields in new shapefiles

Running 3.4.6 on Windows 10. Until today I have had no problems creating new shapefiles and fields. Now when I create a new shapefile everything in the new dialog box works as usual when I create ...
Robert Bryan's user avatar
3 votes
1 answer
275 views

Merge hole between shapes into any neighbouring shape to remove it?

I have a shapefile that I made by from 2 distinct shapefiles (I am using QGIS). The issue is that they don't overlap precisely so I have holes like the following: I tried the vertex editing tool but ...
Koo's user avatar
  • 63
3 votes
0 answers
153 views

QGIS – Edits to shapefile attribute table won't save special characters

I'm working in QGIS with a Government of Canada shapefile of all 338 federal electoral districts. The encoding is UTF-8. In the attribute table, all of the em dashes ("—") that should appear in the ...
mcsoma's user avatar
  • 31
3 votes
0 answers
95 views

Shapefile polygon operation efficiency

I would like to make a graph from a shapefile, where edges would express spatial relations between polygons according to DE-9IM For that, I use fiona + shapely My code is working but it is extremely ...
Chopin's user avatar
  • 143
3 votes
0 answers
458 views

ogr SetPrecision doesn't work

I'm creating a shapefile with a field type of real, but I want to lower the standard precision from 15 decimal places to 10, here is my code: dst_filename = "Polygonized.shp" drv = ogr....
Francis's user avatar
  • 967
3 votes
1 answer
508 views

Unicode problems while writing selected features to a new shapefile with Fiona

I have a shapefile with a large number of geographic features (marine protected areas). I'm trying to read through all of the areas in the shapefile, select those that fit a certain criterion, and ...
Matt NK's user avatar
  • 31
3 votes
0 answers
1k views

"DBF file can not be opened" error using shp2pgsql

I am trying to import a shapefile using shp2pgsql. I wrote this command: shp2pgsql -I -s 2154 -W "LATIN1" W:\IGN\BDPARCELLAIRE-RGF93-LB93-MAJ2013-V4\BDPV_1-2_SHP_LAMB93_D01\COMMUNE.shp CADASTRE....
maneva's user avatar
  • 31
3 votes
0 answers
82 views

Given a line find whether another line is along side, N,E,S,W or not

I have a shapefile representing roads (Black) and I need to know whether another line object (Red) is to the side of it. Including the orientation between them, to define whether the Red line lies to ...
nashm999's user avatar
  • 327
3 votes
0 answers
2k views

Draw shapefile over PNG image in R

I have a satellite image as a PNG with known coordinates (bottom, left, top, right). I want to draw a shapefile on it (the limits of a county) in R. My first thought was to convert the PNG (it's read ...
Rodrigo's user avatar
  • 784
3 votes
0 answers
241 views

GeoJSON files using too much memory?

I have about/more than 400 GeoJSON layer files in my QGIS project. When I checked the task manager memory, it displays qgis.bin.exe *32 using about 1,334,000 of CPU memory. I had another version ...
JAT86's user avatar
  • 952
3 votes
0 answers
185 views

Join CSV to shapefile failing when in saved map document in QGIS

I am trying to join a CSV file to a shapefile by matching on attributes. Here is the minimal workflow: Import shapefile in blank document. Save attributes of shapefile to CSV. 2.5 eventually, I ...
Chris's user avatar
  • 31
3 votes
0 answers
223 views

Enabling an Edit on Shapefile in QGIS only with a password?

I´m customizing some tasks in QGIS 2.14 using Python. I am managing these edits in different layers (always shapefile layers, not database). In one of them I want the users to enter a password ...
pacuga's user avatar
  • 103
3 votes
0 answers
82 views

QGIS - Layer missing polygons after pointsfile transformation

I'm using pointsfile transformation in QGIS for the georeferentiation of my layers. After the transformation the result some times has polygons missing like here: Why is this happening? How do I ...
dari1495's user avatar
3 votes
0 answers
544 views

Loading components of shapefile in QGIS?

I have a zipped shapefile with all components in place. It has a .shp file, a .dbf file and a .shx file.Projection file (.prj) and .sbn and .sbx files are also in place. I have tried loading the ...
Aseem Awad's user avatar
3 votes
0 answers
273 views

Extracting cells from raster by attribute in ERDAS Imagine

I have a raster file that gives me the slope of all the hills and mountains in an area in degrees (0-90) and I need to extract all the cells which are >= 45 with an operator in the model builder. I ...
Tye's user avatar
  • 113

1
2 3 4 5
22