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.

learn more… | top users | synonyms (1)

27
votes
11answers
7k views

Best practices for identifying the unknown coordinate system of a Shapefile

I got a Shapefile but it's coordinate system is unknown and there is no .prj file. How I can identify it now? Are there any tools that could help?
7
votes
3answers
3k views

How to include variable in where clause of arcpy.Select_analysis?

I am trying to loop through a shapefile, selecting each feature in turn and copying it to a temporary shapefile to by included in a union analysis. I'm using a cursor to find the ID name for each ...
20
votes
4answers
3k views

Bulk load multiple shapefiles into PostGIS

I've got over a hundred data layers in shapefile format that I want to upload into a PostGIS database. They are all in the same projection, but represent different data layers so they do not have the ...
23
votes
10answers
33k views

How to convert MapInfo TAB and/or MIF to SHP using free tools or ArcGIS for Desktop core product?

How do I convert MapInfo TAB and/or MIF files to SHP using only free tools or ArcGIS itself? I've not had much luck trying to do this in the past and I don't want to have to shell out for the ArcGIS ...
16
votes
12answers
10k views

Shapefiles to Text

How can I convert a shape file (GIS) to text? or, How can I extract the information in a shape file?
6
votes
7answers
4k views

ogr2ogr convert all shapefiles in a directory

I have a directory with several shapefiles. How can convert all these shapefiles to MapInfo with ogr2ogr. I know how I can convert one file. And I can make a batch script writing a line for each file. ...
15
votes
9answers
6k views

How can I convert an excel file with x, y columns to a shapefile?

How can I convert an excel file with x, y columns to a point shapefile? There are some somewhat optional requirements in addition to the correct creation of a shapefile: Column types (as per ...
17
votes
2answers
5k views

How to convert .shp into .gpx using QGIS?

I'm newbie using QGIS. I would like to convert .shp into .gpx. So, using Qgis, I open my shapefile and I tried to "save as" gpx but it gives an OGR error: creation of field ObjectId failed (OGR ...
20
votes
2answers
17k views

How to calculate polygon areas in QGIS?

Hi I would like to simply calculate areas of a area-shape file in square meters or in acres (ha). I didn't find that functionality in the vector tools. Could anyone here help me with that?
56
votes
19answers
41k views

How to convert between KML and Esri's shapefile (SHP) format?

My users are sending me point data that were digitized using GoogleEarth. How can I convert their KML to a shapefile?
5
votes
3answers
5k 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?
34
votes
21answers
33k views

Are there any free administrative boundaries available as shapefiles?

After learning about the US Census's TIGERLines datasets I'm addicted to GIS :) I've working with the following layers, from the USA data Country boundaries State boundaries County boundaries City ...
17
votes
2answers
3k views

Visualize shapefile in Python

I was searching the internet to see if it is possible to visualize geographical data in Python, without always opening ArcGIS and make a map (because I have a lot of scripts that uses arcpy). On the ...
14
votes
4answers
6k views

How to add an attribute field to an existing Shapefile via Python

I have a Python script that adds an attribute field to a Shapefile if doesn't exist. This is easy to do with ArcGIS (graphically or via Python), but I'm looking for something that doesn't depend on ...
22
votes
4answers
10k views

Which character encoding is used by the DBF file in shapefiles?

Which character-encoding is used by the dbf-file in Shape-files? It seems it is handled different, based on the program and the local encoding-settings of the machine. Which encoding is 'right' - ...
6
votes
3answers
2k views

How to read Greek fonts (ISO-8859-7) in shapefile attributes within QGIS 1.8.0?

I'd like to ask whether there is a way to read greek fonts in a shapefile's attribute table within QGIS 1.8.0.
18
votes
6answers
6k views

How to convert image of map into vector format?

What is the best way of converting a gif of a map into a vector format, such as a shapefile? The only relevant parts that I am interested in are the outline of the island so I realize some manual ...
24
votes
8answers
10k views

Open Source Tool capable of reading Esri File Geodatabase (.gdb)?

I have an ESRI File Geodatabase (.gdb) file that I would like to convert to shapefile (or any other non-proprietary format). Are there any Open Source tools to do so?
9
votes
3answers
11k views

How to convert .shp to .csv including attributes AND geometry?

I have a .shp file with 60k+ entries, all of which are polygons with corresponding attributes (acreage totals, landowner names, tax ID #s, etc.). What I ultimately need is a .csv file with all of ...
8
votes
8answers
7k views

Corrupt shapefile. How to fix

I have a shapefile I was working on (ArcGIS 9.3) get corrupted somehow and it gives me the error "Number of shapes does not match the number of table records.". What I would want is to recover this ...
6
votes
1answer
2k views

Using the python shape library: pyshp - how to convert .csv file to .shp

I am trying to understand how I can use the csv module in python to open a csv file in the same folder as the python script, and then create a shapefile using the shapefile module pyshp. The csv file ...
12
votes
4answers
960 views

Python module to delete SHP features (without Desktop GIS installed)

I have a piece of software (not Arc) that runs nightly on a non-production machine which updates shapefile features from an external database. Periodically I would like to delete all of the features ...
17
votes
10answers
14k views

Best way to add Attribute data to a shape file

Hei GISers!! Thanks for your help with my previous question. My apology if this may be too simple a question for this site, but I am still learning the various aspects of GIS. Now that I can ...
13
votes
6answers
2k views

How to improve rendering performance of very large shapefile?

I have a polygon shapefile that has a 100MB .dbf and 500MB .shp file component. The reason it is so large is it is a landbase classification for a whole district. Everytime I am viewing the file in ...
4
votes
4answers
4k views

How to change the order of features in a shapefile?

I have a shapefile and I want to change the order of the features. Is that possible using ArcMap?
8
votes
3answers
7k views

How to create a shapefile in ArcGIS 10 using arcpy?

How can I create a shapefile using Python in ArcGIS 10? I have lat & long. From this I need Python code which will create a shapefile and display it in ArcGIS 10. Thanks.
3
votes
1answer
6k views

How to import shape file into SQL Server 2008 R2 using only SQL scripts?

I am trying to import some shape files into SQL Server 2008 R2. I found this useful tool called Shape2SQL however I am not sure how I can import shape file directly using only SQL scripts as this is ...
6
votes
2answers
507 views

reorder a polygon shape file (not sort)

I've written a script which produces a polygon shape file of the extents of all the thousands of rasters in our library. I want to organise the FID so that the files with the largest extents are on ...
4
votes
3answers
795 views

How can i transfer data from a spreadsheet into a shapefile?

I am looking at Deprivation in the UK and there is some good data in the form of spreadsheets on this website http://www.communities.gov.uk/publications/corporate/statistics/indices2010 I would like ...
19
votes
4answers
4k views

How to bypass 10 character limit of field name in ShapeFiles?

I'm exporting geometry with attached text attributes from oracle database to esri shapefile format (.shp) with Java and Geotools library. Attribute columns in our database have names with more than ...
6
votes
2answers
217 views

Where did the polygons go after projecting a map in QGIS?

I'm fairly new at GIS know-how, but I've run into a problem with a projection of a world map. I have a shapefile of all countries I downloaded from Natural Earth. After projecting it into a ...
3
votes
1answer
2k views

How do you open shapefiles with ogr2ogr

I'm following along the D3 tutorial, and on this line: ogr2ogr \ -f GeoJSON \ -where "adm0_a3 IN ('GBR', 'IRL')" \ subunits.json \ ne_10m_admin_0_map_subunits.shp run into the following ...
2
votes
1answer
269 views

QGIS rounds up the coordinates to six decimals when saving layer changes

I have the problem that when I create a new point (in a point layer) or a new line (in a line layer of course) and I save the changes to the layer (so NOT the project save) then QGIS rounds up the ...
1
vote
2answers
544 views

Why does ESRI make me store my DBF doubles as strings?

As far as I can tell I have to store all numeric values in a shapefile's associated DBF file as strings (yes, the N type is essentially a string). Can anyone confirm that ESRI does not support the use ...
28
votes
9answers
6k views

Whether to use File Geodatabase (*.gdb), Personal Geodatabase (*.mdb) or shapefiles?

I am a bit confused on the topic of geodatabases. Previously, I have used geodatabases as an easy way to keep all files together rather than having dozens of shapefiles all over the place. And it's ...
14
votes
6answers
981 views

Creating simple image from vector data

Can anyone suggest a quick (and preferably open source) way to create an image from a shapefile. For example, I have a shapefile containing parcel boundaries, I want to create a png file depicting ...
18
votes
3answers
3k views

How to easily edit attribute data using Regular Expressions?

I am writing a tutorial for MSc students that uses QGIS. One of the tasks requires the attribute data to be modified (see pdf draft of tutorial here if interested ). The question is how to get them ...
12
votes
4answers
261 views

Are long lines in shapefiles to be considered geodesics or straight lines in the 2D latlong space?

Is there a definition on how lines connect vertices in the shapefile format? In the simplest case, imagine a line with only 2 points, from 40,-118 to 40,-112 - that's somewhere random in the US - ...
7
votes
1answer
756 views

Removing rows in shapefile in R

I've imported a shapefile into R, and joined it to a table. My shapefile contains all the census ids, while my table only contains selected census ids. I'm now trying delete all the rows didn't get a ...
13
votes
5answers
390 views

What in-depth spatial database systems tutorials exist?

Is there a good tutorial that explains in depth the internals of a GIS and a spatial database system such as PostGIS with examples and without any background assumption? I'm specifically looking for ...
10
votes
3answers
632 views

Which data format typically displays fastest? (ArcMap)

My organization is working on an application running on ArcGIS Engine. Previous versions of the application used primarily Shapefiles for displaying roads, parcels, buildings, etc. Since I was taught ...
9
votes
1answer
2k views

Instantiating spatial polygon without using a shape file in R

So, the usual way we read a shapefile in R is via the maptools package, like this: sfdata <- readShapeSpatial("/path/to/my/shapefile.shp", proj4string=CRS("+proj=longlat")) However, I have a use ...
12
votes
3answers
417 views

How can I represent distance using the dashes or markers of a vector line?

I am a very basic user and dont know the lingo to get to the gist of my question so some background might help. Ive volunteered to create a pre-incident planning system for my rural fire department. ...
9
votes
3answers
3k views

Divide a complex shape file into a grid

I have a decently detailed shapefile with polygon/multipolygon features (the file is about 500mb). It's actually a shapefile of the entire world, with the features representing coastlines. I need to ...
5
votes
1answer
9k views

QGIS - Change unit of measure from degrees to meters

I am running QGIS 1.7.0 on windows, and I donwloaded a shapefile of census block group boundaries from TIGER. This file appears to be in the WGS 84 coordinate system, and when I open it in QGIS the ...
5
votes
3answers
2k 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 ...
22
votes
6answers
924 views

“Oddities” in the Shapefile technical specification

I've been writing a shapefile parsing library, and have encountered a couple of design decisions in the specification that I don't immediately understand. I'm hoping there's a wizened old ESRI ...
9
votes
7answers
7k views

Where can I find a shapefile of city boundaries in the US?

Where can I find a shapefile that contains boundaries for the major cities in the United States? I have tried the census website but could not find anything.
8
votes
3answers
6k views

How to get all the lat/long coords that define a shapefile

I have a Shapefile with several shapes inside it. Using MapWindow I have been able to determine that the shape I need is the one with shapeId 19. As you can probably tell I have very little ...
8
votes
4answers
25k views

How to open the Shape files and extract the data from these files?

We are in need of US highway data. We found it for Florida at the state GIS website . We downloaded the data for Florida highway intersections from here (this is a zip file) . We do not know how to ...