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.

571 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
756 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
956 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
241 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 ...
4
votes
0answers
318 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 ...
4
votes
0answers
307 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
812 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
244 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
930 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
756 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
974 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
1answer
52 views

Finding sum of points values within distance from paths

I'm willing to plot public transport data for a university project, and I'm currently trying to find out roughly how many people live with a reasonable distance from a set of bus routes. I have my ...
3
votes
0answers
36 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
67 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
92 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
67 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
450 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
108 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
102 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
67 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
362 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
380 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
414 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
1answer
248 views

Keep attribute data while converting XML file to shapefile in QGIS?

I want a map of particular area in shapefile format from Google Earth. I created a map using polygon method and save it as KML file format, but when I convert it from ".xml" to "shapefile" format ...
3
votes
0answers
270 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
399 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
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
898 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
140 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
177 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
362 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
133 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
370 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
660 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
234 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
284 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
246 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
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
868 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
634 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
144 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

Reducing number of polygons in a shapefile to increase the render speed for R Leaflet?

I'm trying to increase the speed of my R Leaflet map by reducing the size of the polygons. I found a great solution on stack exchange here, but for some reason, I get the following error when I try ...
2
votes
0answers
43 views

QGIS degrees - meters

I have point data in GDA2020. shapefile *.prj file says units are meters. when I load the data in QGIS the layer units are degrees nd the buffer tool is always degrees. I have searched for every ...
2
votes
0answers
37 views

Difference in area of polygon and excised raster layer

I'm using QGIS 3.8. I have dowloaded GLOBCOVER 2009 raster land cover map and ecoregions shapefile. Polygon of ecoregions are used for mask to cut raster file. On new layer r.report was performed to ...
2
votes
0answers
37 views

Saga GIS Snap Points to Lines tool doesn't produce required results

I have two sets of data that I'm using. Points extracted from a .csv file and a road network from an ESRI .shp file (both of which I've included here: https://send.firefox.com/download/...
2
votes
1answer
38 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 ...