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)

29
votes
11answers
8k views

Identifying Coordinate System of Shapefile when Unknown?

I have a Shapefile but its 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
4k 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 ...
21
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
36k 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 ...
17
votes
12answers
11k 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
5k 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. ...
18
votes
6answers
7k 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 ...
17
votes
9answers
7k 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 ...
20
votes
3answers
4k views

Simple thematic mapping of shapefile using Python?

I wish to visualize geographical data in Python, without using ArcGIS/ArcPy, and make a map. On the internet I found how to make a thematic map using Python: Here is some code that I tried: ...
19
votes
2answers
6k 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
20k 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?
58
votes
19answers
44k 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?
36
votes
21answers
37k 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 ...
5
votes
3answers
6k 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?
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.
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 ...
25
votes
4answers
11k 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' - ...
8
votes
7answers
8k 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 ...
7
votes
2answers
573 views

Reordering polygon shapefile permanently?

I've written a script which produces a polygon shapefile 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 the ...
20
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 ...
24
votes
8answers
11k 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
13k 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 ...
4
votes
4answers
5k views

Postcode Shape Files for the UK

I am trying to find the shape files for postcode sector and districts in the UK. Specifically inside London. I know I can go and pay for these but I only really need to use them once. I want to ...
6
votes
1answer
3k 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 ...
7
votes
2answers
322 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 ...
13
votes
4answers
1k 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
16k 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 ...
9
votes
2answers
4k views

How can I get a shapefile from a postgis query?

My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that?
9
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.
6
votes
1answer
3k views

GIS, R and shapefiles

I have some data that encodes locations in certain countries, such as the US and China, that I would like to map. The data includes location name in Latin, extended Latin and other scripts (Japanese, ...
6
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?
3
votes
1answer
7k 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 ...
3
votes
3answers
841 views

How to transfer data from spreadsheet into 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 ...
6
votes
8answers
4k views

Splitting shapefile into separate shapefiles for each feature?

I have a polyline shapefile with about 20 kinds of roads. I would like to know how can I create automatically a vector file for each one. I can use ArcGIS for Desktop, QGIS (or GDAL separately).
4
votes
1answer
388 views

need help to automatize report generation

i have shapefile that contains a lot of parcels "parcel has like fields (n° parcelle,proprietaire, cin) see picture : and i want for all parcels to generate this plan : take a parcel and ...
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
321 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
1answer
317 views

keep the same field headers after joining a table to a shape file in QGIS

I noticed that after joining a table to a shape file the headers of each fields in the table used for the join are changed by QGIS and they are attributed to a different name. For instance, i had a ...
1
vote
3answers
493 views

Can I have two kinds of point geometry in a shapefile or I should create multipoint shapefiles?

Following my previous question, can I have a mixture of two kinds of geometry in a shapefile of type point. Just like I have about shapefiles of type polygon or I should always create a shapefile of ...
1
vote
2answers
583 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 ...
29
votes
7answers
8k 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
1k 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 ...
13
votes
4answers
284 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 - ...
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 ...
7
votes
1answer
947 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
401 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 ...
11
votes
3answers
704 views

Which data format typically displays fastest in 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 ...
5
votes
1answer
10k 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 ...