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.

Filter by
Sorted by
Tagged with
8
votes
3answers
4k views

Mapping between OGR and Python data types?

I'm writing a shapefile using OGR in python, creating fields on-the-fly from a python data source. Creation of a new field requires an OGR data type, is there a mapping between OGR and python data ...
8
votes
4answers
4k views

What is the cause of 'tearing' of polygons (artifacts) using R, ggplot and geom_polygon?

Thanks to the answer given in this question I have been able to subset and draw a map of electoral divisions in part of the UK, in this case Pembrokeshire. The resulting data frame is large and ...
8
votes
5answers
3k views

Problem loading OS OpenData multipoint shapefile into PostGIS

I am trying to load the OS OpenData Strategi shapefile dataset into a PostGIS database. I have had no problems with the polyline and polygon shapefiles, but I am unable to get the point shapefiles to ...
8
votes
1answer
2k views

Add layer to existing geopackage not working in QGIS?

My organisation uses mainly ArcGIS and we have a need to share data with contractors. I recently introduced QGIS (because one of our application uses WKT to import geospatial data and QGIS makes the ...
8
votes
2answers
650 views

Computing dominant area in polygon using ArcGIS Desktop?

First, I have a shapefile consisting of square grids and each grid has an ID. Second, I have a shapefile consisting of different zones (with IDs). A grid ID in the first shapefile can contain many ...
8
votes
3answers
5k views

2010 Census Tiger County shp file with defined coastal land area

I am looking for a 2010 Census Tiger Shape file that hugs the coastline and doesn't include the ocean in county boundaries. I have a pre 2010 file that did this and I can't seem to find a 2010 ...
8
votes
2answers
334 views

Exploding polygons and adding consistent space/buffer between groups using QGIS?

I have a set of shapefiles grouped by regional area in Western Australia. What I want to do for visual purposes is add a consistent amount of space between each region. What's the best way to do this? ...
8
votes
1answer
614 views

How to merge two shapefiles with partial difference in QGIS?

As illustrated below, a copy of the same shapefile was given to two persons who edited them partially by changing the attributes of different features. I would like to know how to merge the two ...
8
votes
3answers
21k views

How to display a Shapefile on a browser? -offline-

Plot points on a Shapefile like this: https://github.com/gka/pyshpgeocode and then convert it to HTML and display it on a browser? Is this practical method to display the map on a browser? Any cons ...
8
votes
1answer
600 views

Split up shapefile into little shapefiles

I have a very large shapefile (all the roads in RI). I need to split it up into chunks so that I can process the file with multiple worker threads in Python. So far I have created a grid in QGIS that ...
8
votes
2answers
3k views

Batch Convert Folder of Shapefiles to KML / KMZ

I am looking to convert a folder with multiple shapefiles (over 100) to KML/KMZ files. I am sure I can build a model in ArcGIS to do this conversion but I am unsure on the iteration I should use. I ...
8
votes
3answers
19k views

Finding municipal-level administrative boundary data for India? [duplicate]

Does anyone know how to find a shapefile with boundaries of Indian municipalities? I have tehsil boundaries as for year 2001, but I would like boundaries of municipalities and, ideally, also ...
8
votes
2answers
5k views

better way to duplicate a layer using ogr in python?

I'm splitting a large shapefile into many smaller ones using ogr. I'd like to just copy all of the field and layer config information from the original. Here's how I'm doing it now: src = ogr.Open('...
8
votes
2answers
1k views

Splitting polygons with line grid in QGIS?

I have a polygon vector layer and a line vector layer in a form of grid (they are both in the .shp format). I need to split polygons by these lines. I tried digitizing tools but the problem is that ...
8
votes
2answers
8k views

Geopandas Polygon to matplotlib patches Polygon conversion

Unfortunately geopandas plotting is extremely slow and takes a lot of resources, hence I would like to use instead matplotlib for plotting. When I use pure Fiona to open and read the shapefile I ...
8
votes
3answers
15k views

Join CSV file to shapefile

I wanted to join a CSV file to a shapefile. When I identified a field to facilitate the join, e.g., map <- spChFIDs(map, as.character(map$ID)) it returned Error in spChFIDs(SP, x) : lengths ...
8
votes
2answers
2k views

Simple way to detect/select border polygons of a shapefile

I am looking for a simple way to detect/select border polygons of a shapefile. Border polygons are here polygons that are not completely surrounded by other polygons i.e. polygons located at the ...
8
votes
1answer
4k views

How to convert Shapefile geometries to WKB using OGR?

I got the geometry of a feature of the shapefile, and i want to save that geometry in the postgis (in WKB formats like it happens when we import shapefiles using shp2pgsql and psql commands). How do I ...
8
votes
2answers
158 views

Identify this state outline file

Some time back, I came across a site that was offering sets of US state outlines that were intended to be attractive/artistic rather than geographically accurate. I only have this copy of the outline ...
8
votes
2answers
751 views

Seeking Historical GIS datasets?

I've been looking for a while for Historical GIS datasets. In a lot of places (also in answers here at Stack Exchange), people are referring to a great dataset at ThinkQuest, which contains shapefiles ...
8
votes
3answers
4k views

Adding a GIS feature to existing database entry with QGIS

I've built a database with postgreSQL with tables, which include geometry columns. When I add some data to my non-geometry columns, I can see them in QGIS when I connect to my database using postgis. ...
8
votes
3answers
17k views

How to convert coverage (.adf) to shapefile?

Is there any tool or software except ArcGIS which I can use for converting coverage (.adf) files to shapefiles?
8
votes
1answer
1k views

Choosing Python 3 libraries for GIS analysis? [closed]

I am trying to do some spatial data analysis in Python 3 now, and I was wondering what the best libraries are for GIS in Python 3. The Fiona library was developed with Python 3.3 but the Python 3+ ...
8
votes
1answer
6k views

How to Export a Shapefile as KML Using R

All, I have exported an ESRI shapefile (polygon) to KML using R, but the resulting layer shows only the outer extent of the polygon. How can I fill in the area with a color? Any help is greatly ...
8
votes
1answer
297 views

Is there a difference between projecting shapefiles then rasterizing & rasterizing shapefiles then projecting?

I currently have a project where I rasterize shapefiles into simple presence/absence (1 & 0) rasters and then add each one to a running total to create a total richness raster at the end. The ...
8
votes
1answer
5k views

Remove certain polygon from SpatialPolygonDataFrame

I am using R maptools library to parse the shapefile into a list of polygons. The function readShapeSpatial shp <- readShapeSpatial("<path to my shapefile>") gives me a ...
8
votes
1answer
3k views

Shapefile Polygon does not display in QGIS

I am attempting to import a Shapefile into QGIS. When I import it, the boundary is shown on the list, but when I try to view it in the mapping area, it does not show up. I can get it to show the ...
8
votes
1answer
200 views

The longest straight line (L) within a polygon and the longest perpendicular line (T) to L

I'm mapping elongated glaciological features within QGIS 2.18.22 and I need to measure the longest straight line (L) and the longest perpendicular line (T) to L (as illustrated in the picture) within ...
8
votes
1answer
349 views

PostGIS Multipolygon when converted to shapefile doesn't match the source geometry

I am trying to convert a MULTIPOLYGON record from PostGIS (v2.2.2) to the shapefile via QGIS (v2.18.9), but the source geometry and the resulting shapefile do not match as displayed on the images ...
8
votes
1answer
2k views

Issues Accessing ESRI File Geodatabase within Quantum GIS Desktop

I am trying to access ESRI file gdb from Quantum GIS. I am on Windows 7, 64-bit. I have found many useful threads on how to set up this functionality within Quantum GIS. The method I went for is ...
7
votes
9answers
32k views

Creating shapefile from file with coordinates

How can I make a shapefile of an CSV file with coordinates?
7
votes
4answers
14k views

Tool for converting .shp file to .tab file?

I am searching for any free tool which can convert ShapeFile (.shp) to MapInfo (.tab) file.
7
votes
6answers
31k views

Converting File Geodatabase feature classes to shapefiles in ArcGIS Desktop?

How can I convert a File Geodatabase feature class into a shapefile? I found the help for ArcGIS Desktop 10.1 and it tells me: On the main menu, click Customize > Toolbars > Production Mapping ...
7
votes
4answers
937 views

Performing Feature to Point (no advanced license) using ArcPy?

I have a set of polygons I have calculated the centroids of, but am having trouble finding a way to output these values to a point shapefile. I dabbled with arcpy.MakeXYEvents_management, but it only ...
7
votes
4answers
6k views

Convert Polygon Feature Centroid to Points using Python

I would like to convert some polygon based shp files that have several polygon features into points for each feature that would essentially represent the centriod of each polygon feature. I know in ...
7
votes
8answers
24k views

How to display ESRI shapefile in Android [closed]

It's the first time I work with Android and ESRI shapefiles. I tried to find but could not find any tutorials to display ESRI shapefile in Android. Somebody can help me about this?
7
votes
2answers
6k views

ogr2ogr srs options: where is the well known definition determined?

In the ogr2ogr documentation it says that when using -a_srs srs_def: Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT ...
7
votes
2answers
2k views

Control the colors of a shapefile

I have a Shapefile with road data. Sometimes the roads are blue, sometimes they are green. I didn't used to mind, but now I'm tiling everything so I need to control the colors. I'm loading it with ...
7
votes
1answer
19k views

Copy single feature into another feature class

I do a lot of editing, in this case areas. Sometimes I add an area to one shapefile, only to realise a bit later that it should have been in another. Is there an easy way of copying only that ...
7
votes
4answers
7k views

Export to a Shapefile and maintain Domain Coded Values

I maintain a complex parcel fabric that uses coded value domains for a few fields. These are short integer fields with values from 1 - 6. These values represent say 1:Integrated Registered Survey Plan,...
7
votes
4answers
37k views

Cutting one Shapefile with another? [closed]

I have one ESRI Shapefile as a map with many objects in it. I have another ESRI Shapefile only with borders in it. This shapefile is bigger in size (covering a bigger area) with many border lines. ...
7
votes
4answers
2k views

Hiding specific points in shapefile layer

I am using QGIS 2.18.2 on a Macbook Pro running OS X 10.10.5. I created a layer of only 8 points from a wildlife survey. A few points have become less relevant, so I want to hide them from the ...
7
votes
3answers
2k views

Seeking urban area shapefiles for France, Germany and Belgium?

I'm trying to make a map like this for the Low Countries/Rhineland, where I basically show how spread out all the urban areas would be there if the urban areas had similar densities to American urban ...
7
votes
5answers
16k views

Importing data from Excel and maintaining the time format

I am trying to import a file from Excel which is a GPS data set of consecutive points at 15 minute intervals. When I import the file and save it as a shapefile the time column is not read properly and ...
7
votes
3answers
340 views

How to check if parcel is located by golf course

Is there any simple way for me to run millions of parcels through some type of script to see if a shape file parcel is on a golf course? For example if I have a layer that has all the golf courses and ...
7
votes
1answer
6k views

How do I edit shapefile attribute tables so they all have the same information?

I am trying to merge several pipeline shapefiles using GEOMERGE but it cannot complete the function because they have different column definitions. So I need to edit the attribute tables so that ...
7
votes
5answers
11k views

I am struggling to convert .dwg to .shp, ideas?

Any ideas as to how can I convert dwg to shp? I tried Kosmo and gvSIG. gvSIG kind of worked but it seems like I lost information.. in addition everything was converted into lines, no polygons. I can ...
7
votes
1answer
1k views

Cleaning large Shapefile using v.clean in order to dissolve features?

I'm having real problems cleaning up and reducing the size of a Shapefile which is published by the UK's Environment Agency. It shows the extents of the LiDAR open data they publish: each polygon is ...
7
votes
5answers
5k views

What is hierarchy (object model) of features in ArcGIS?

I'm new to GIS. My understanding of shapefiles is that they are (contain?) featureclasses, that contain features (points, polylines, polygons). Is there a clear hierarchy for these files. Would the ...
7
votes
1answer
3k views

Generate rectangular fishnet or vector (grid cells) shapefile in R?

I would like to create a polygon of 20 x 10 degree graticules from 180, -180 to 90, -90 degrees. To do this in QGIS, I followed: Vector creation tools > Create grid [Grid extent: -180, 180, -90, 90]...