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
9
votes
3answers
19k 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
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 ...
3
votes
2answers
4k views

Changing shapefile longitude from -180 - 180 to 0 - 360?

I have a shapefile of world countries, with longitude between -180° and 180°. How can I change the shapefile (eg. with ogr2ogr) for having longitude between 0 and 360°. Following OSGEO/Trac ...
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?
7
votes
2answers
2k views

Clip raster by shapefile in parts?

I am trying to write .sh script command to clip raster by polygonal shapefile. Shapefile have name field with unique name of polygon feature. On the output must be rasters with name of polygons in ...
5
votes
1answer
18k views

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

I am trying to import some shapefiles into SQL Server 2008 R2. I found this useful tool called Shape2SQL however I am not sure how I can import shapefile directly using only SQL scripts as this is ...
3
votes
1answer
720 views

nx_spatial does not read all shapefile features

I have a polyline shapefile for a road network. The roads are split at every intersection (node), e.g. if two roads intersect at one point, then they are split into four links(edges). So using the ...
5
votes
2answers
15k views

Convert shapely polygon coordinates

I am trying to work with a shapefile using shapely, fiona and python. The original coordinate system is in latitude and longitude that I am trying to convert to state plane system. So I want an ...
3
votes
2answers
3k views

How to find out the co-ordinate system using .prj file

I'm very new to GIS concepts. Is there a way or procedure of finding out whether the co-ordinate system is in UTM, latitude/longitude or in stateplane using .prj file? My .prj file contains the ...
17
votes
4answers
4k views

Is starting names with numbers a bad data naming convention?

My company uses ArcGIS and has a project and data file naming standards in place and (for the most part) followed. Something that has always bothered me about he naming standards is that it mandates ...
14
votes
2answers
7k views

Is there a standard for the specification of .prj files?

We use shape files for data exchange. I've looked at the .prj files: different programs produce different prj files. Is there a standard how the parameters must be specified in a prj file? AFAIK the ...
8
votes
8answers
36k views

Exporting to DXF file from QGIS?

Is it possible to export labels based on Shapefile attributes into a DXF file? I use QGIS 1.7.4. I've been reading a CSV file and view it as a Shape Layer. With the help of attributes from the File ...
8
votes
2answers
4k 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('...
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,...
6
votes
2answers
16k views

Specifying precision and scale of new field using ArcPy?

I'm wanting to create a field with a maximum of 1 decimal place and then calculate a value into it: (I know that all my values are < 10) arcpy.AddField_management('C:/shapefile.shp', 'myField', "...
9
votes
1answer
18k views

How to re-project shapefiles?

I wanted to re-project a QGIS project, but there is no such option. When searching for an answer I see ogr2ogr suggested for this task, by re-projecting each vector layer (shapefile in this example). ...
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 ...
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.
6
votes
4answers
2k views

Deleting Shapefiles using QGIS?

In the Browser it's not possible to delete Shapefiles. In ArcMap you can delete Shapefiles easily within the Catalog. How can I delete Shapefiles in QGIS without minimizing the QGIS-Window, ...
5
votes
1answer
407 views

Fitting known size polygons into irregular polygons using ArcGIS Desktop?

I have a task that sounds simple, but I just can't get through the last step. I need to find suitable areas where wind farms that have a size of 500x150 meters, could be placed. The restrictions are ...
5
votes
1answer
996 views

Can ogr2ogr “reverse clip” (or “clip out” or “erase” or “difference”) one shapefile from another?

Is there a means in ogr2ogr to "clip out" one shapefile from another? I know ogr2ogr -clipsrc B.shp out.shp A.shp will remove any part of A.shp that is NOT in B.shp. Is there an ogr2ogr command to ...
4
votes
3answers
2k 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 ...
3
votes
1answer
961 views

Most efficient way to batch clip in FME?

I have one large shapefile and 100 smaller shapefiles that are smaller areas within the large shapefile. Using the Clipper transformer, I want to clip the large shapefile using each of the smaller ...
2
votes
2answers
1k 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 ...
2
votes
2answers
8k views

Looping through list of shapefiles to rename them using ArcPy?

I am trying to upgrade a simple script to list all shapefiles in a folder and if necessary in any folders within and then loop through the list of shapefiles and rename them. import arcpy # Set ...
1
vote
1answer
2k views

How to create a 3D shapefile from a raster?

I´m trying to make a 3D shapefile from a raster feature but not working. Tried already to run the command in OSGeo4W but nothing happen. I'm using the Qgis 1.8.0 Lisboa. The purpose is to get a final ...
11
votes
3answers
13k views

Counting points in shapefile within polygons of another shapefile using ArcGIS Desktop?

I'm creating a map with two shapefiles: A polygon of counties Points of cities I used the function Intersect to group the cities in each county. I'm trying to get the number of cities in each ...
10
votes
3answers
3k views

Polygon shapefile with null values?

Does anyone know where I can find a sample shapefile that has null entries in it (preferably a polygon shapefile)? I'm not sure how to create one with null entries.
6
votes
3answers
6k views

Generating shapefile containing UTM grid (graticule)?

I'm looking for a shapefile containing an 1000m or 2000m UTM grid ("graticule"). All I was about to find on the web is a 10000m UTM grid (here: http://en.giswiki.net/wiki/UTM) and I am aware that a ...
4
votes
1answer
4k views

Getting error when clipping shapefile to shapefile using ogr2ogr?

I want to clip a shapefile to a shapefile. The input shapefile is a 1 m vector grid generated in QGIS. The tile I'm clipping to is just a simple polygon (the geometry is contained within the 1 m ...
4
votes
3answers
12k views

UK coastline shapefile?

I'm looking for a shapefile for the coastline of the UK. I'm guessing the Ordnance Survey 'geo-portal' is the best place to get this, but whenever I go to the Ordnance Survey site I get the shakes. (...
3
votes
2answers
7k views

Selecting features of vector layers based on another vector layer using QGIS?

I am using QGIS 2.12.2. I am using three vector layers (point, polyline and polygon shapefiles) of the region of interest. Any advice in making the selections from one dataset based on the other ...
3
votes
2answers
2k views

Converting from shapefile or raster formats to LAS? [closed]

I am looking for a solution to convert either from ESRI shapefile format to LAS or from a common raster format to LAS. I have access to following software: ArcGIS 10.2 for Desktop (arcinfo with ...
2
votes
3answers
3k views

Storing two kinds of point geometry in shapefile or creating multipoint shapefiles? [closed]

Following How many interior and exterior rings can a polygon have in a standard ArcGIS shapefile?, can I have a mixture of two kinds of geometry in a shapefile of type point. Just like I have about ...
1
vote
1answer
1k views

Version problems with Geotools CSV2SHP example

I'm trying to use the CSV2SHP tutorial. I spent some time trying to get it to run but using v10.x of Geotools causes the shapefile to be output with no geometries. For instance if I open it in QGIS, ...
1
vote
2answers
2k views

Vertical lines in a polygon shapefile

I am working with a GIS problem using a single input of a polygon shapefile. Consider an irregular polygon. I want to draw vertical lines across the extent of the polygon at equal spacing. How I ...
1
vote
1answer
2k views

How to have a nullable field included in a shapefile using the Geotools library?

I am trying to add a new field to a shapefile and need it to store null values. But by using SimpleFeatureTypeBuilder from the Geotools library and then using the Add command, it is not giving the ...
1
vote
2answers
785 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 ...
35
votes
5answers
7k views

Advantages of using spatialite over shapefile? [closed]

I found spatialite more useful than shapefiles as it does not have the limitations of shapefile and it is also portable. Many people here use shapefiles to exchange data and even the experts do not ...
14
votes
6answers
2k 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 ...
30
votes
3answers
17k 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 ...
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 ...
22
votes
3answers
20k views

Selecting feature types when using ogr2ogr to convert to shapefile?

Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types. When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
18
votes
2answers
23k views

Convert a spatial polygon object to data frame using R

My goal is to modify an existing shapefile by merging certain polygons. After importing the shapefile and using the UnionSpatialPolygons command, I get the polygon outline that I want. However, this ...
13
votes
4answers
642 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 - ...
12
votes
3answers
25k views

Extract Raster from Raster using Polygon shapefile in R

I am new to R and using the raster package. I have a problem extracting polygons from an existing raster file. If I use extract(raster, poly_shape) function on the raster it always creates a list ...
11
votes
3answers
7k views

Divide a complex shapefile 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 ...
17
votes
3answers
14k views

How to create a GeoJSON that works with D3?

I'm simply trying to convert a .shp file to a geoJSON format using: ogr2ogr -f geoJSON output.json input.shp After executing the command nothing seems to be wrong. Here's an excerpt from the output....
17
votes
9answers
7k views

how to overlay shapefile and raster?

I have a shapefile with polygons. And I have a global raster file. I want to overlay the shapefile's polygons onto the raster grid and calculate the mean raster value for each polygon. How can I do ...
17
votes
4answers
25k views

Exporting shapefile to PostGIS database in QGIS [closed]

How do I export a vector shapefile to PostGIS database? I am asking what format I have to export it.