Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

4
votes
0answers
160 views

When does a 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 ...
4
votes
0answers
658 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 ...
4
votes
0answers
715 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
895 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
891 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
720 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
968 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
1k 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 (...
3
votes
0answers
62 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
0answers
88 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
66 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
403 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
97 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
62 views

Publishing shapefile in Geoserver

I started to use GeoServer, I uploaded shapefile and I want to publish it but I don't want to show all of the "Feature Type Details". For example, I want to publish only geometry. I know it's possible ...
3
votes
0answers
91 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
65 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
312 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
278 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 ...
3
votes
0answers
252 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 ...
3
votes
0answers
348 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
359 views

Getting latitude and longitude of vertices/corner points of polygon/building from online maps such as OpenStreetMap?

I have tried using JOSM(Java OpenStreetMap) and QGIS for directly getting latitude and longitude of vertices/corner points of polygon/building but I am unable to get. Is there any way to get?
3
votes
0answers
394 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
2k views

Clip shapefile with shapefile

There are two shapefiles. One is a compilation of municipalities on the coast with borders extending into ocean. The second shapefile is a coastal border. I'm trying to clip the municipality ...
3
votes
0answers
240 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
354 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
223 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). ...
3
votes
0answers
83 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
794 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
918 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
139 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
175 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
357 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
2k views

How To Bulk Export Shapefiles Into Microsoft SQL Server using QGIS or PostGIS

Hey all thanks so much in advance for your help I have been researching this issue for a while. I have found two popularly suggested ways to preform this task: ogr2ogr - just take a shapefile and use ...
3
votes
0answers
132 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
364 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
645 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
739 views

Convert a classification image to aggregated polygon in shapefile using gdal/python

My goal is convert a 2D numpy array to shapefile. The matrix results from a classification, so the numbers have a meaning. I solved my problem, but the solution is somehow involuted and complicated. ...
3
votes
0answers
231 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
94 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
266 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
0answers
456 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
825 views

ogr2ogr failed to reproject shapefile error exceeds limits

I cannot get correct transformation from WGS84 to the Hungarian EOV EPSG:23700 (Hungarian Datum 72) using ogr2ogr. I am using ogr2ogr from the fwtools shell. I have a shapefile in GCS WGS84 (epsg ...
3
votes
0answers
631 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 (...
2
votes
0answers
38 views

Shapefile lines disappear, but data remains

I'm working in QGIS 3.4 on a line type shapefile layer with +/-5000 records. I made an edit to the start/end nodes of a couple of lines to move them to a point node from another layer; then when I ...
2
votes
0answers
49 views

PostgreSQL/PostGIS: Adding attributes to a table that I can use to query with

Currently I have a PostGIS database that is taking in shapefiles. However, these shapefiles are converted into tables when they are imported into the database. Each shapefile deals with a farm name, ...
2
votes
0answers
54 views

Using field calculator on shapefile converted from DWG in ArcGIS Desktop?

I am using ArcGIS Desktop 10.3. A third party convert complex autocad drawing (dwg) to shapefile for us. I got from them a zip folder with 1 to 16 Shapefile (depending of the original dwg data), all ...
2
votes
0answers
92 views

How to speed up 'intersection' tool for big amount of data?

I can't figure out how to work with a large dataset. The problem is: I want to know how many points (over 700 000 adresses) are within a polygon layer (it's made out of 5 layers, train noise)(they are ...
2
votes
0answers
30 views

Selecting weights while transferring from shapefile to network

I have a shapefile representing roads (LineStrings) and I need to transfer it to a networkx type (with the lengths as weights) so I can do some network analysis. I have used the s2g library to do so ...
2
votes
0answers
49 views

Dragging one shapefile into QGIS creates three layers?

I am using QGIS 3.0.1. Everytime I drag in a shapefile (actually, *.shp, .shx and .dbf) I get three layers, that seem to differ just in symbology color. This happens with both shapefiles I get from ...
2
votes
0answers
42 views

Exporting shapefiles with symbology using ArcGIS Pro for use in ArcGIS Runtime

I have a set of shapefiles with elevation values in its attribute. In ArcGIS Pro, I have placed these shapefiles into a Scene as a 3D layer. Then I have added extrusion, and the shapefiles are ...