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
17
votes
1answer
9k 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 ...
9
votes
7answers
59k views

Joining Excel table to shapefile in ArcMap?

I have a shapefile of lower layer super output areas (LSOA) for England and Wales and I have a spreadsheet of the indices of deprivation for each of the LSOA's in England. I want to join 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 ...
5
votes
1answer
1k views

Automating plan report generation using ArcGIS Desktop? [closed]

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 generate ...
42
votes
3answers
36k 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?
29
votes
2answers
44k views

Adding shapefiles to PostGIS database

I was able to create a Postgresql database and then I executed, createlang plpgsql geospecies psql -d geospecies -f postgis.sql psql -d geospecies -f spatial_ref_sys.sql So now can I directly import ...
21
votes
2answers
14k views

Instantiating spatial polygon without using a shapefile 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 ...
24
votes
4answers
30k views

What is the difference between Coverage, Shapefiles and Geodatabases in ArcGIS?

I was wondering about the difference in spatial data storage methodology used by Coverages, Shapefiles and Geodatabases in ArcGIS. Coverage was the initial format, followed by Shape Files and now ...
17
votes
4answers
40k views

How do I load a .dbf file into QGIS?

I want to use QGIS to extract lat/lng data from the vertices of polygons. There are about 400 polygons, each with maybe 200 vertices. I am having trouble with step one, getting the data into QGIS. ...
20
votes
6answers
14k views

How to improve rendering performance of a 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 that it is classified as a landbase for a whole district. Everytime I view the file in ...
23
votes
1answer
18k views

Merging adjacent polygons in shapefile that has been split at tile boundaries?

I'm currently using building data from the Ordnance Survey Vectormap District and I've noticed that a lot of building polygons are split in 2 because of the way the OS split up the shapefile. This is ...
57
votes
3answers
60k views

Renaming attributes/fields in shapefile attribute table using QGIS?

I would like to rename some fields in my attribute table: Like rename XRF_N3in something else. It seems quite a easy issue but I don't find any information about how can I do that... I've QGIS 1.8 in ...
16
votes
8answers
39k views

Seeking shapefile of city boundaries in 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.
11
votes
1answer
841 views

Batch load multiple shapefiles to Postgis

According to the shp2pgsql help, the options drop, append, create and prepare are mutually exclusive. So, if I want to create a table from a shape and then append multiple other shapefiles, I do ...
20
votes
3answers
15k views

Shapefile loader in pgAdmin 4

Recently I have updated my postgresql version. I have also upgraded pgAdmin from 3 to 4. But I was unable to load shapefile. I didn't find any plugin called shapefile loader. How can I get the ...
17
votes
4answers
11k views

Getting list of distinct values from shapefile field using QGIS?

I have a shapefile whose features I can filter by specifying a where clause in the query dialogue. F.x. I have a field named 'city_name' and by stating 'city_name = "London"' in the where clause only ...
12
votes
1answer
16k views

Reprojecting raster from lat/lon to UTM in R?

i have to turn it into a UTM in order to make the buffer functional. wets<-readOGR(dsn=".",layer="shapefile") r.raster <- raster() extent(r.raster) <- extent(wets) res(r.raster) <- 100 ...
10
votes
9answers
10k 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. ...
5
votes
1answer
743 views

Making a 3D map with shapefiles, lidar and aerial image data

I want to try to make a simple 3D map for a small area (10 square miles) with some housing, some roads and some vegetation on it. My geodata is as follows: shapes with houses/roads/vegetation. ...
11
votes
2answers
5k views

Join a CSV file to shapefile using gdal/ogr?

I have a shapefile with several attributes, for example YEAR, COUNTY, and AREA. I also have a CSV file with more fields that I want in the shapefile, such as POPULATION. Both the shapefile and the CSV ...
9
votes
5answers
18k views

Adding file name to attribute field using Calculate Field?

Does anybody know how to add the shapefile name to a field in the file's attribute table? I've found a description: 'You have to use inline variable in CalculateField like %Name% in expresssion ...
10
votes
1answer
3k views

Polygon creation (Clockwise rotation or not) [duplicate]

According to "ESRI Shapefile Technical Description An ESRI White Paper—July 1998", Vertices for a single, ringed polygon are, therefore,always in clockwise order. Otherwise,"Dirty" polygons occur when ...
7
votes
2answers
1k 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 ...
6
votes
2answers
5k views

Merge shapefiles using ogr2ogr and retrieve the attributes of both

I have two shapefiles that I want merge (overlay/intersect) having in the destination the attributes of the two sources file. ogr2ogr file_merged.shp tl_2010_us_uac10_conus_albersUA.shp ogr2ogr -...
6
votes
2answers
9k views

Is there a way to export the style, along with a shapefile, to a kml in QGIS?

I see there were plugins in the past that may have done this such as qgis2kml and qgis2google, but they no longer exist.
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, ...
4
votes
1answer
784 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. ...
3
votes
2answers
605 views

Is there a way to download and edit an OSM file in QGIS?

I am working with OSM maps in QGIS. I am looking for a way to extract a shapefile of roads, or buildings, from OSM so I will be able to edit them.
0
votes
1answer
182 views

Improving our spatial data by calculating “Close to Coastline”, “Close to Park”, “Close to Stadium” etc [closed]

A quick background for context is maybe helpful for this. Essentially we have "vacation rentals" and I would like to add additional data to them automatically. We create booking websites for ...
13
votes
3answers
5k views

Inverting Polygons using QGIS?

I have a Shapefile with Polygon features representing the world's land areas (continents, islands). Is it possible to invert these, and get a geometry that represents the world's oceans and seas? ...
11
votes
2answers
1k views

Are mixed geometry types allowed in shapefiles?

Does the shapefile support mixed geometry types (ie. point and polygon all in the same file)?
6
votes
2answers
4k views

Keep the same field headers after joining a table to a shapefile in QGIS

I noticed that after joining a table to a shapefile 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 ...
3
votes
1answer
806 views

Clipping polygon precisely to raster (extent) using GDAL?

I need to clip a vector layer to the extent of a raster. It has to be very precise that's why I would not want to draw a polygon myself (and clip the two polygons). There seem to be some ways to clip ...
2
votes
1answer
704 views

Clipping LAS data with multiple shapefiles

I am looking for a method to clip with multiple shapefiles (139 shapefiles polygon) a lidar.las file. I'm using the software Fusion, as described in: How to clip LAS data using shapefile polygons ...
1
vote
1answer
3k views

How to rasterize a vector dataset in R?

I would like to compare vector vs raster data. So i try to fix a problem using both ways. I made it in vector first : coastline<-readShapeSpatial("shp") wets<-readShapeSpatial("shp") wetb<-...
0
votes
1answer
337 views

organizing attribute table: multiple sets of variables per point

I would like to have hints on the best way to organize my dataset (I am working with ArcGIS 10.1, advanced license). I would like to build a points layer, each point being a weather station in the ...
67
votes
7answers
3k views

Are there any attempts to replace the shapefile? [closed]

Recently I've been spending a lot of time converting perfectly good field names like "Percent of citizens age 25 and over with a bachelor's degree or higher" into things like "edbchogtr" to meet the ...
37
votes
10answers
30k 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?
26
votes
2answers
22k 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 ...
10
votes
7answers
48k views

Seeking Free Shapefile of European Countries?

I do not seem to be able to find a free shapefile of the European countries. This is the kind of map I am looking to populate with my own data using ESRI ArcGIS: The Eurostat website only seems to ...
14
votes
2answers
27k views

Choosing the correct value for proj4string for shapefile reading in R?

I am having a shapefile of polygons and another CSV file which contains a list of points as (Lat, Lng) pairs.. I want to check for each (lat, lng) pair from the CSV file which polygon does it fall ...
16
votes
4answers
4k 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 ...
12
votes
3answers
15k views

How to get shapefile of river from OpenStreetMap?

I don't want to download 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 map ...
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.
12
votes
1answer
11k views

Import a shapefile to postgis with ogr2ogr gives: Unable to open datasource

I want to use ogr2ogr in order to import a shapefile in a postgis database. I have successfully installed ogr2ogr and I run from the pgsql the following command: ogr2ogr -f "PostgreSQL" PG:"host=...
12
votes
6answers
33k views

Plot shapefile with matplotlib

I am trying to read a shapefile and plot it using matplotlib. Here is the code: import matplotlib.pyplot as plt import shapefile shpFilePath = "D:\test.shp" listx=[] listy=[] test = shapefile....
20
votes
7answers
3k views

Alternatives to Shapefiles as open-source, cross platform dataset types [closed]

I am working on software that is very ESRI oriented, but a future version will likely not be using ESRI software. It uses Shapefiles and Geodatabases. I'm planning on getting all of my data to ...
19
votes
2answers
14k views

API documentation for Gdal/Ogr with C#

I want to assign projection to shapefile in my web C# application, for this i am using Gdal/OGR/OSR C# bindings and add osr_csharp.dll and ogr_csharp.dll references. But i am facing some difficulty ...
13
votes
10answers
60k views

Where can I find Canadian postal code geometries?

Where can I find the shapefiles for Canadian postal codes?
10
votes
4answers
6k views

Renaming Shapefiles in QGIS?

I have a huge list of layers in a project that are named in a foreign language. I want to translate and add the English title to the name. When I right click on a layer and choose Properties -> ...