Questions tagged [shapefile]

A vector data storage format for storing the location, shape, and attributes of geographic features. Often referred to as 'an ESRI shapefile', as ESRI developed it.

644 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
41 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....
5
votes
0answers
366 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 ...
5
votes
0answers
990 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 ...
5
votes
0answers
386 views

What's the fastest way to convert large csvs to point shapefile

I'm working in QGIS, and my current method to change csvs to shapefiles is to import them to QGIS, right click and save as shapefile. For large CSVs (over 100 million rows) it can take quite some time ...
5
votes
0answers
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 (...
4
votes
0answers
400 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 ...
4
votes
0answers
944 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 ...
4
votes
0answers
278 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). ...
4
votes
0answers
990 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 ...
4
votes
0answers
817 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....
4
votes
0answers
990 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 ...
4
votes
0answers
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 (...
4
votes
1answer
1k 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 ...
3
votes
0answers
41 views

Geopandas shows points outside of buffer geometry, even though they are in

I have some ship trajectories and I want to know which point of the trajectory is inside the port(=buffer) and which points are outside. The following picture shows my Geopandas Dataframe with the ...
3
votes
0answers
64 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. ...
3
votes
0answers
82 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 ...
3
votes
0answers
72 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 ...
3
votes
3answers
6k views

Export shapefiles in QGIS to import to ArcMap

I have one question regarding export shapefiles from QGIS to import after to ArcMap 10.6. I export the shapefiles as Save data/ESRI shapefile. After when I try to upload in ArcMap this shapefile, I ...
3
votes
1answer
1k views

Creating fishnet using Python?

I am trying to create a fishnet of x by x miles for all USA, same as this basically: http://www.giscourse.com/creating-a-fishnet-grid-using-arcgis-10/ However, I want to do this with python. My ...
3
votes
0answers
2k views

Create custom color map for multiple GeoPandas plots to share same scale

My objective is to create a 2x2 figure where each cell in each grid is on the same color scale. Currently, I haven't found a compound plot option in GeoPandas that allows me to plot one GeoDataFrame ...
3
votes
0answers
96 views

Extracting information from netcdf file

I started using QGIS yesterday since ArcGIS refuses to work, and I have my difficulties with it. In short, I want to extract the information on GCP from this netCDF file, so that I can perform geo-...
3
votes
0answers
71 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 ...
3
votes
0answers
494 views

Querying with Large FeatureCollection in Google Earth Engine using Python?

I am trying to process a Tanzania shapefile downloaded from GADM Global Administrative Areas. # im -> {Image} ee.Image({...}) # self.geom_coll -> {FeatureCollection} ee....
3
votes
0answers
119 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 ...
3
votes
0answers
112 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 ...
3
votes
0answers
68 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 ...
3
votes
0answers
411 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 ...
3
votes
0answers
409 views

QGIS Error Loading Shapefile with Database Manager

I am a new QGIS user and have downloaded version 2.18.2 onto my PC (Windows 10). I'm trying to import a shapefile (using Database Manager) into a spatialite database that I created. However, I keep ...
3
votes
0answers
469 views

ogr2ogr{gdalUtils} correct syntax to set Ground Control Points for vector georeferencing

I would like to know correct syntax of R {gdalUtils} package (version 2.0.1.7) to georeference Shapefiles using corner points as GCPs. (These Shapefiles have y=height and x=width information, without ...
3
votes
0answers
298 views

Raster flipping latitude or not showing shapefile on basemap

I am trying to save a 2D numpy array as a raster, and then split the raster using shapefiles. When I create the raster, I either have the problem of the latitude being flipped upside down, or that the ...
3
votes
0answers
440 views

Insert shapefile features into PostgreSQL database using java EE (pragmatically)

I am working with PostgreSQL 9.4 and Java EE. I want to insert shapefile or layer's features into PostgreSQL, is there any solution so I can insert the whole shapefile into the database? OS is Windows ...
3
votes
0answers
1k views

Change default “save as” folder QGIS

I would like to change the default path for saving layers ("save as" in the main layers panel). Now the default is C:\Program Files\QGIS Lyon\bin (in which I even don't have the rights to save ...
3
votes
0answers
89 views

Is possible to create a shapefile with a specific encoding using ArcObjects?

I have the code to create a shapefile programmatically, something like this 28310 - Create a new empty shapefile programmatically moreover I am able to put the data from a layer in it. It works ...
3
votes
0answers
1k views

Showing dimensions on polygons in QGIS?

I have a shapefile that contains all of the property parcel lines in King County, WA. We are currently displaying this data through mapbox on our site with no issues. We would like to be able to show (...
3
votes
0answers
1k 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 ...
3
votes
0answers
141 views

QGIS algorithms do not work on copies of shapefiles?

I'm using QGIS 2.6.0. I'm trying to run various algorithms such as "SAGA/Shapes-points/remove duplicates" & "SAGA/Shapes-Grid/Add grid values to points" through the sextant toolbox. When I run ...
3
votes
0answers
183 views

Lining attributes up with features when creating shapefile using PyShp?

I used the Python Module Pyshp to select particular census blocks from the Census's shapefiles and package these into a single shapefile. However when I add this data into ArcMap and right click to ...
3
votes
0answers
371 views

What is the area that OGR extracts from the (geometry) shp files for polygons?

The ESRI July 1998 technical documentation for polygon shapefiles at page 10 makes no mention of either area measures or length measures (apart from byte/record-layout matters). Yet OGR enables me to ...
3
votes
0answers
138 views

Merge shapefiles to one tool not working?

When using the data management tool "Merge shapefiles to one" in QGIS why is it copying one of my shapefiles instead of merging the two together as it should?
3
votes
0answers
399 views

Memory layer or QgsVectorFileWriter Error?

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)...
3
votes
0answers
682 views

How can you calculate the union/merge two polygons with ogr2ogr?

I want to calculate the union/merge two overlapping polygons using ogr2ogr (as I have 300+ to do). I want the output to be the same as you would get if you used the 'Merge shapefiles to one' command ...
3
votes
0answers
239 views

R - how to create a pre-determined number of identical square polygons to use for a choropleth map?

I am trying to plot crime data density (again!) over a city map, say of NY. As a well known problem there are plenty of examples on this (http://www.obscureanalytics.com/2012/12/07/visualizing-...
3
votes
0answers
95 views

PostGIS does not export shortest path to Shapefile

I am trying to draw a bunch of lines overlaying the globe map in a WGS84 projection. To this effect I have created a PostGIS DB with a table that has one column containing linestring data. My problem ...
3
votes
0answers
319 views

MSHP file from SAGA tough to delete

After running a SAGA line dissolve process in QGIS, an MSHP file is created (amongst other things). Fine by me, though I'm not sure what it's used for (metadata in XML format?). Problem is that it can'...
3
votes
1answer
252 views

Join .csv file and .shp of georeferenced points

I have georeferenced a map and saved a selection of some points on the map. These points are cities of departure and arrival and I want to join the .shp with a and excel .csv with the information of ...
3
votes
0answers
468 views

How to convert shapefile to mapinfo file preserving special characters?

I have to convert a bunch of shapefiles to mapinfo files on a machine without a MapInfo license, so I am using ogr2ogr to perform this task. The problem is that when opening the mapinfo files in ...
3
votes
0answers
637 views

How to overlay geographic data from multiple sources?

Being a newbie to GIS, I am trying to create a map using shapefiles and addresses found online, as an exercise. The steps are below: I downloaded a shapefile of Connecticut from the following link (...
3
votes
1answer
172 views

Convert shp to kml in ArcMap but it is not placed correctly in Googleearth

I have a shp polygon in GGRS87/Greek Grid. I want to display the polygons on googleearth. I use "layer to kml" tool in ArcMap. However when I open the kml in googleearth the polygons are not aligned ...
2
votes
1answer
28 views

QGIS geometry generator to SLD

In QGIS I'm using the geometry generator to visualize a point shape file as a line with the simple code: And then I'm doing a graduated styling according to the burial value of those points: So ...
2
votes
0answers
30 views

imageCollection of all polygons in a shapefile

I have a shapefile, consisting of 408 polygons. I want to either read images corresponding to all polygons, or iterate through them. However, it seems my code does not work. In order to test EE ...

1 2 3 4 5 13