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
104
votes
16answers
64k 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 can I identify it now?
51
votes
3answers
64k views

Reprojecting vector layer in QGIS

I have a series of layers of lines (shapefiles) in My Project. The CRS of some are different and to merge them they all must have same CRS. When I use Processing > Toolbox > Qgis_algorithims >...
103
votes
7answers
247k views

Calculating polygon areas in shapefile using QGIS

How do I calculate areas of an area shapefile in square meters (m²) or in acres (ha)? I didn't find that functionality in the Vector Tools.
9
votes
2answers
1k 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 ...
42
votes
5answers
76k views

Splitting shapefile into separate files for each feature using QGIS or SAGA [closed]

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 am aware of how to do it using ArcGIS Desktop - see ...
104
votes
5answers
239k views

Merging multiple vector layers to one layer using QGIS

I've imported several shapefiles which where exported from a Mapinfo .tab. Several .tab-files are imported resulting in 20+ layers. Afterwards I want to export it to GeoJSON; but I'm reluctant to ...
55
votes
5answers
65k views

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

Which character-encoding is used by the dbf-file in shapefiles? It seems it is handled different, based on the program and the local encoding-settings of the machine. Which encoding is 'right' - ...
23
votes
4answers
110k views

Changing projection of shapefile in QGIS

How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the ...
22
votes
2answers
37k views

Adding shapefile or feature class as layer in ArcMap using ArcPy

I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with Python, and I keep needing a way to add a shapefile to the current map. (And then do stuff to it, but that's ...
27
votes
8answers
22k views

Using ogr2ogr to convert all shapefiles in 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 ...
10
votes
5answers
15k views

Clipping LAS data using shapefile polygons and open source software?

I am trying to clip or filter lidar files (.las, .xyz) using a shapefile that contains multiple polygons. Is there open source software that can do this spatial operation? My .las files are enormous,...
112
votes
23answers
133k views

Converting between KML and shapefile (SHP) format

My users are sending me point data that were digitized using Google Earth. How can I convert their KML to a shapefile and vice versa?
33
votes
4answers
11k 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 ...
39
votes
5answers
63k views

How to write Shapely geometries to shapefiles?

Can someone demonstrate a simple way to write geometry data-structures from shapely into shapefiles? I am particularly interested in polygons with holes and linestrings. It would also be beneficial to ...
39
votes
15answers
112k views

Converting 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 ...
33
votes
12answers
57k views

Converting shapefiles to text (ASCII) files? [duplicate]

How can I convert a shapefile (GIS) to text, or, how can I extract the information in a shapefile?
46
votes
4answers
50k views

Joining non-spatial CSV file to spatial data (shapefile) using QGIS

I have a CSV file which has postcode data in a field, but it is non-spatial e.g. no Easting and Northing. I have a shapefile with postcode in a field and some additional data. I want to join the ...
10
votes
7answers
22k views

Fixing corrupt shapefile?

I have a shapefile that I was working on in ArcGIS Desktop 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 ...
18
votes
2answers
14k views

Computing parameters for QGIS Affine Transformation

I have a vector floorplan (DXF) that I've added to a blank project in QGIS using the Dxf2Shp Plugin. I've been reading tutorials and StackExchange threads, but I can't seem to find out how to "...
19
votes
3answers
73k views

Check if a point falls within a multipolygon with Python

I have tried several examples of code using libraries such as shapefile, fiona, and ogr to attempt to check whether a point (x, y) falls within the boundaries of a multipolygon created with ArcMap (...
16
votes
2answers
4k views

Ortho Projection produces artifacts

I`m trying to create a sphere-like view using qgis and the "world from space"-projection http://spatialreference.org/ref/sr-org/6980/ (essentialy an ortho-projection). ArcGIS wraps the shapes ...
35
votes
5answers
45k views

Converting .shp into .gpx using QGIS

I would like to convert .shp into .gpx. Using GIS, I open my shapefile and I tried to "save as" gpx but it gives an OGR error: creation of field ObjectId failed (OGR error: Field of name '...
11
votes
3answers
6k views

How to set a default value for attributes in shapefiles in QGIS?

In QGIS 2.14.6 I would like to define a default value for an attribute in a shapefile (or spatialite layer as well) which is applied if the user doesn't explicitely sets the value. Is there a way to ...
6
votes
1answer
3k views

Storing datetime values in Shapefiles using QGIS?

I have a shapefile with date in a string field. I create a new field with date type and use the calculator to make the conversion. But the result only provide the date part, the time part is removed. ...
31
votes
3answers
39k views

How to encode shapefiles from LATIN1 to UTF-8?

Is there a way to encode shapefiles from LATIN1 to UTF-8?
26
votes
5answers
27k views

Using ogr2ogr to convert GML to shapefile in Python?

I am trying to convert a GML to an ESRI shapefile using ogr2ogr utility in a python script. I have successfully installed the GDAL/OGR package via osgeo but I am now struggling to find/understand ...
26
votes
9answers
19k 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 Excel's ...
15
votes
2answers
68k views

Changing unit of measure from degrees to meters in QGIS?

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

Intersect Shapefiles using Shapely

What I'd like to try and do is intersect some point buffers with census tracts, maintain their ID's and the tracts attributes. I found a sample from http://www.macwright.org/2012/10/31/gis-with-...
43
votes
7answers
38k views

Choosing File Geodatabase (*.gdb), Personal Geodatabase (*.mdb) or shapefile format?

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 is easier when finally exporting all the relevant data ...
50
votes
5answers
40k views

Is there an automatic function in QGIS to package all files in a project for transferability?

In my project, I use a lot of geodata from different directories. Now I want to give the QGIS project to a colleague (eg on a CD). Is it possible to copy the shapes from different directories ...
28
votes
3answers
91k views

Cropping Shapefiles in QGIS?

I need to clip a large and very detailed shapefile in QGIS showing environmental data similar to a temperature map. Is there something like the very simple crop tool like in Adobe Photoshop where ...
20
votes
7answers
23k views

Changing order of features in shapefile

I have a shapefile and I want to change the order of the features. Is that possible? I want to sort the features in the shapefile because I'm embedding this shapefile in a mobile app. The app will ...
12
votes
2answers
3k views

Losing polygons after projecting map in QGIS

I'm fairly new at GIS, 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 orthographic as ...
7
votes
1answer
2k views

Creating parallel line in ArcGIS Pro using ArcPy?

I want to create offset/parallel lines for my centre lines (over 12000 polylines) in different distance for each class number(i have numbers in column) and with the same line direction as centre line. ...
38
votes
4answers
29k 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: ...
47
votes
2answers
57k views

Understanding difference between Polygon and Multipolygon for shapefiles in QGIS?

Creating Scratch layer gives me a choice between Polygon and Multipolygon, so I started wondering how should I make use of them. Reading a new book "Mastering QGIS" (through this answer by Joseph to ...
37
votes
10answers
70k views

Adding Attribute data to shapefile?

I can display a shapefile in openlayers but I need to add some attribute data. I can open the dbf file in excel but there is no save as option in excel to the updated file as a dbf. What is the ...
22
votes
1answer
15k views

Selecting features by attributes using ogr2ogr?

I am writing a shapefile after some processing; however, in the final step I need to do some selection by attributes from the the shapefile. I am using the command in a shell with the aim of using it ...
8
votes
3answers
11k 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.
53
votes
5answers
39k views

Bypassing 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 ...
5
votes
3answers
5k views

Joining table field with shapefile using PyQGIS

The following is currently unsuccessful at fulfilling a table field join to a point shapefile in QGIS. All instances of the join object will print the proper values, and no error is flagged when ...
16
votes
1answer
38k views

Resizing shapefile features proportionally in QGIS

In QGIS (1.8.0-Lisboa) on Windows (OSGeo4W Install), how would you resize a feature proportionally? The only way I've found to do this is by hand using either the Freehand Editing (0.2.6) plugin or ...
3
votes
2answers
289 views

Moving a shapefile point 500 m west

I am a novice to arcgis 10 so please forgive my ignorance.I have this 2000 survey points shapefile and I was told to , I guess is dislocate, generate new survey points, each new should be 500m west ...
1
vote
1answer
1k views

Reverse gdal_rasterize (-i option) does not work

When I use: gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 255 -burn 255 polygon.shp tiff.tiff I get a new tiff with a white hole in it with the shape of the polygon shp. However, when I use the ...
27
votes
2answers
52k views

Extracting intersection areas in R

I have two polygons. One contains fields(X,Y,Z) and the other contains soil types (A,B,C,D). I want to know what area of every field contains which type of soil. I tried the following: library(rgdal)...
25
votes
5answers
28k views

Adding attribute field to existing Shapefile via Python without ArcGIS

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 ...
12
votes
3answers
21k views

Getting shapefile of river from OpenStreetMap?

I do not want to download the whole map of an area. I just want rivers and other waterbodies present in an area in shapefiles so that I can use them in QGIS. I tried geofabrik but it is giving whole ...
25
votes
4answers
51k views

Converting shapefiles to GeoJSON

I'm trying to convert shapefiles from the State of Texas Senate Districts website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/...
24
votes
3answers
26k views

Order of polygon vertices in general GIS: clockwise or counterclockwise [closed]

Two days ago I asked a question about the internal storing order for the vertices of a polygon in ESRI shapefiles. That question was answered (Are polygons stored clockwise or counterclockwise in a ...

1
2 3 4 5
16