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 (2)

5
votes
4answers
18k views

Reading Shapefile using C#? [closed]

I am new to ArcGIS and trying a few things.. I'm trying to read shape file(which is supply as an input) using c# and I want to generate a .pdf file which contains underlying metadata information ...
6
votes
1answer
122 views

How do I optimise performance on a local QGIS + PostGIS installation?

I'm learning how to manage a local PostGIS (ver 2.1) database, with spatial indexing enabled on the shapefiles that I've imported (using the PostGIS Shapefile Import/Export Manager). I have imported a ...
1
vote
2answers
634 views

ogr2ogr - extracting S-57 layers

I'm trying to extract the layer DEPARE from an S-57 datafile and convert it into a shapefile. I'm using ogr2ogr from OpenGeo Suite 4.5 (GDAL 1.11.1) on Windows 7 64 bit. The problem is that when I ...
3
votes
2answers
2k views

ArcMap “Could not open the specified file”

Has anyone ever encountered this message? I am getting this when I try to open certain shapefiles. I am working on a problem that generates shapefiles from spreadsheets using ThinkGeo's .NET tools. ...
0
votes
1answer
4k views

Converting .lyr to .shp in ArcMap?

Does anyone know how to convert a .lyr to .shp format in ArcMap 10.2? I had a look at different forums on the internet and most people suggest that it works by right clicking on the layer in the TOC ...
7
votes
2answers
3k views

what is the best way to programmatically convert between WKT and Proj4 string?

some shapefiles have a .prj file associated with it. and the .prj file contains the projection info of the shapefile in the format of WKT. Sometimes I need to convert WKT to proj4 string, and ...
1
vote
1answer
19 views

Ordnance survey boundary line .shp files?

I would like to make a shapefile of Great Britain's counties. I have downloaded the boundary-line data from ordnance survey: The unzipped file appears to contain two file types: .lyr and .qml. How ...
1
vote
1answer
51 views

Clipping raster objects in PostGIS

I'm trying to cutting a raster object (from a PostGIS table) using a shapefile with reference, extracting raster data from a polygon area. My objective to work with the clipping raster into R. I'm ...
4
votes
1answer
65 views

Rename field QgsField is not valid

In pyQGIS i tried this code (contains also debug prints): def joinLayers(inputlayer, layer, index_field, name = "JOINED", dataProvider = "ESRI Shapefile"): a = [] b = [] outpath = ...
3
votes
1answer
53 views

How is the record count of a multipoint shapefile dbf file determined?

I'm writing a program to create a multipoint shapefile (.shp .shx .dbf), and I'm not sure how the format of the .dbf file should look. The .dbf starts off with a record header, followed by field ...
43
votes
7answers
20k 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 ...
25
votes
4answers
5k 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 ...
2
votes
1answer
97 views

Coordinates are not aligning

The two shapefiles (shp) are not aligning like they should (note the img). The layer and the two shp files have all the same coordinates - NAD_1983_StatePlane_North_Dakota_North_FIPS_3301_Feet The ...
0
votes
2answers
45 views

Latitude / Longitude Polygon from New Zealand Geodatabase or Shapefile?

I have access to ESRI Geodatabase and Shapefile: http://www.stats.govt.nz/browse_for_stats/Maps_and_geography/Geographic-areas/digital-boundary-files.aspx. What I need is to somehow get the polygons ...
1
vote
1answer
247 views

Points of LinearRing do not form a closed linestring - one point intersection

I'm trying to index geojson data using elasticsearch. There is some kind of polygons that causing an error: "Points of LinearRing do not form a closed linestring". Looks like it happens because ...
3
votes
3answers
95 views

Using ArcPy to identify Shapefiles instead of os.walk() via *.shp file extension?

I am trying to write a script that identifies all Shapefiles within my folder structure and write a list of the .shp files with their full path file name to a newly created .txt file. I was able to ...
0
votes
2answers
6k views

How to convert AutoCAD file to Shapefile for map from ArcGIS API 3.2 for JavaScript?

I have an AutoCAD file that I want to convert to Shapfile to appear in a map by API for JavaScript in .net. What do I do?
4
votes
1answer
60 views

How to automate joining SQL Server non-spatial database tables to ArcGIS shapefile

I have dozens of SQL Server non-spatial database tables. These are common tables, the column types are: nvarchar, int and float. I try to use Arcpy to automate joining these database tables to ...
7
votes
3answers
428 views

Pythonic alternative to Feature to Point (no advanced license)

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 ...
6
votes
4answers
4k views

Where can I find a shapefile for the coastline of North America?

I am looking for a shapefile representing the coastlines of North America, such as something like this: http://www.diva-gis.org/gdata Does anyone have any suggestions?
5
votes
1answer
132 views

How to replace a shapefile name in a directory using Python QGIS?

How to replace name or delete .shp file from directory using Python QGIS ? import os import processing input = "//input.shp" output = "//output_100.shp" interval = 100 ...
1
vote
2answers
79 views

How to add attribute table to new shapefile using OGR?

i have made a new shapefile from the original shapefile , and now i want to copy the attribute table from the original shapefile to the new select shapefile , but i don't know how to do that? import ...
2
votes
0answers
89 views

Has anyone implemented the leaflet.shapefile plugin?

I'm trying to implement the leaflet.shapefile plugin to enable a user to upload a zipped shapefile and overlay it on my webmapping site as can be done in the demo version of the site. ...
3
votes
3answers
954 views

Sites with recreational shapefiles for United States?

Do you know of any sites that I could find some recreational shapefiles? An example would be shapefiles of golf courses, ski resorts, or maybe baseball fields in the United States?
3
votes
2answers
53 views

Converting OpenStreetMap (OSM) file to shapefile?

I am trying to convert an ".osm" file to a shapefile. I want to display roads mainly. I am using qgis (on Debian Linux) .. EDIT (as recommended): O.k, here is the problem ... I want to create a ...
0
votes
1answer
30 views

Shapefile location change repair. HResult E_FAIL

I'm working on a ArcMap plugin using ArcObjects that will change the location of a shapefile that is broken. However, I'm getting HResult Error E_Fail whenever I try opening the feataure class. This ...
1
vote
1answer
47 views

Select points situated on zero degree slope

I need to choose points from SHP file, which are positioned on raster cells with 0 degree slope. Creating a slope raster from DME is not a problem, but I don’t know how to write a script that chooses ...
1
vote
0answers
38 views

converting shp to fileGDB with ogr2ogr changes geometry type?

I'm converting a shapefile to file geodatabase with GDAL 1.11.3 and the ESRI FileGDB driver. ogrinfo on the .shp gives: $ ogrinfo NED1_Index.shp INFO: Open of `NED1_Index.shp' using driver `ESRI ...
1
vote
1answer
238 views

Arcpy CreateUniqueName usage: keep original input names

This is a continuation of the question I asked here: At this point I'm really just trying to get everything in one place and keep the original shapefile basename. I'll tackle merging like-named ...
2
votes
1answer
76 views

How can I export a shapefile from PostGIS with a GeoJSON query?

I tried to export a shapefile from my PostGIS installation using pgsql2shp as follow pgsql2shp -f tiles.shp -h <host> -u <user> -P <pass> <database> "SELECT id, the_geom FROM ...
3
votes
1answer
800 views

How to use pgsql2shp when PostGIS extensions installed in a separate schema as geometry

I have the PostGIS extension (postgis functions and spatial_ref_sys table) added to a specific schema called postgis. I'm wanting to run the pgsql2shp utility with a select query on geometries stored ...
2
votes
1answer
57 views

Generating Shapefiles from PostGIS as a Plugin

I used to generate shapefile from PostgreSQL database that is installed with PostGIS tables as templates (geometry_columns and spatial_ref_sys) Shapefiles generated just fine using the following ...
1
vote
0answers
150 views

PGSQL2SHP Commnad switch column type

I work with Postgis. I have table CREATE TABLE centerline ( gid serial NOT NULL, l_from integer, l_to integer, r_add_pre character varying(15), r_to integer ... } Export this table with ...
7
votes
1answer
966 views

Error when using pgsql2shp

I try to export geographical data from a postgis database to a shapefile with pgsql2shp. Normally this works fine, but now I receive the following error. Preparing table for user query... Done. ...
0
votes
0answers
17 views

How to handle Multiple Shapefiles to provide map tile server?

I have Nearly 60 shape file represent different regions. I use Mapnik + node js to render tiles by applying same stylesheet.xml for all shape files. Questions: 1)Is there any other way to effciently ...
0
votes
1answer
26 views

How to define the name of the table in shp2pgsql

I use shp2pgsql to append a shape file to an existing table. How can I define the table where I want to append the shapefile in PostGIS? This is the command I execute with Python: command = ...
0
votes
2answers
461 views

Preserving attributes during kml2shp conversion in ArcGIS for Desktop?

Looked online and found the two links below on preserving attributes when doing a kml2shp conversion. Thinking there might be a newer better way of accomplishing this using ArcGIS 10.1 for Desktop? ...
0
votes
2answers
155 views

Latest shapefiles of Indian states

I need shapefiles of Indian states that of 2011 which has almost 671 districts of India. Can anyone please help me?
4
votes
3answers
1k views

Convert KML to shapefile without losing attribute data

So I want to convert KML files to SHP shapefiles to load it onto PostGIS. Currently I'm using ogr2ogr to do the conversion for me, but it wipes out all the attribute data. How do i preserve this ...
7
votes
5answers
549 views

From .shp to .kml to .shp Without Losing Attributes

I've converted a shapefile with attributes to a .kml for a client. The .kml and attributes were then edited within google earth. I received the updated .kml and now I need to get it back to .shp. ...
1
vote
1answer
46 views

Field values round off while exporting XY data to a shapefile

I am trying to export a excel sheet to a shapefile where I am performing the below shown steps: Step 1: I right clicked on the excel sheet which I wanted to export into a shapefile and selected ...
7
votes
2answers
134 views

Where can I find Historical GIS datasets?

I've been looking for a while for Historical GIS datasets. In a lot of places (also in answers here at StackExchange), people are referring to a great dataset at ThinkQuest, which contains shapefiles ...
2
votes
1answer
97 views

Extracting land cover data (in percent) from shapefile in QGIS?

I have two shapefiles, one containing stream catchment areas, the other information on land cover classes. The problem: I need to know how many percent of the catchment area is covered by forest, ...
1
vote
8answers
8k views

Finding shapefiles of pipeline data?

Does anyone know where I can get or find shapefiles for pipelines (USA location)? Preferably free as I've never done pipelines before and I'm meeting a client next week that is doing pipeline work. ...
0
votes
2answers
1k views

How to show .shp file on Mapview(ArcGIS Android SDK 2.0.0)

I'm using ArcGIS Android SDK for first time. I have worked on a sample project and am able to get a World map using this.. map = (MapView) findViewById(R.id.map); map.addLayer(new ...
0
votes
1answer
632 views

Example using sharpmap in mvc asp.net

I am wanting to open shapefile files in a ASP.NET MVC application, was researching and found sharpmap but have not found examples of how to implement the MVC. Does anyone have any examples to help me ...
0
votes
1answer
37 views

Mexican states SHP without coastline?

Is there a shapefile anywhere showing Mexican boundaries (national & state) that are NOT clipped to the coastline? Either polygons showing the maritime boundary, or polylines showing only the land ...
6
votes
3answers
1k 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 ...
4
votes
2answers
133 views

Editing the DBF for a shapefile is yielding totally different results in R and QGIS, but the attribute tables are identical

I'm having kind of a peculiar issue that I'm hoping someone can shed some light on. I'm actually creating my map in R, but I'm using QGIS as a tool to check my mapping process (R newb here). So let's ...
0
votes
2answers
36 views

Filling field with different names using ArcGIS Desktop?

I have a shapefile with a field called "Name". The name field contains many hundred columns of City, Lake, River, County. I want to add a value in another field for each of the entries in "Name". ...