Questions tagged [shapefile]

The Esri shapefile or simply a shapefile is a popular geospatial vector data format for geographic information systems (GIS) software. Questions about shapefiles are best asked on the GIS Stack Exchange.

For questions about shapefiles it is recommended that you research/ask at the GIS Stack Exchange.

Excerpt from Wikipedia:

The Esri Shapefile or simply a shapefile is a popular geospatial vector data format for geographic information systems software. It is developed and regulated by Esri as a (mostly) open specification for data interoperability among Esri and other software products.

Shapefiles spatially describe geometries: points, polylines, and polygons. Each item may also have attributes that describe the items.

A "shapefile" is actually a set of several files. Three individual files are mandatory to store the core data that comprises a shapefile: .shp, .shx, .dbf

1985 questions
4
votes
3 answers

plot shapefile in python

I have a couple shape files that I want to plot some scatterplot data on top of that. Does anyone have a way to load a shape file then plot it? I've followed a couple of tutorials, but have not been successful so far. The shape file, I am trying…
user1253952
  • 1,577
  • 8
  • 22
  • 34
4
votes
2 answers

shapefile to neural network in R

I need to convert a shapefile (ESRI) of roads type SpatialLinesDataFrame in a neural network in R. I do not know how to remove nodes or vertices of the shape. Determine the length of each edge between nodes. With these parameters I can create the…
4
votes
4 answers

OpenLayer + OpenStreetMap + Custom ShapeFile

I started in the mapping. I would like to view a map of France with a layer on top that would be personalized. I already have the custom layer with shapefile format. I do not know at all if I have to create an OpenStreetMap server or if I can use…
Bob
  • 1,011
  • 3
  • 12
  • 28
4
votes
2 answers

Displaying vector files in QT using GDAL/OGR

I am writing an application to load vector maps/shape files using gdal/ogr and display them onto a gui designed using Qt. I am new to dealing with vector files, I am not able to decide how to render them on GUI. Few approaches that come to my mind…
akshay202
  • 586
  • 1
  • 5
  • 23
4
votes
1 answer

How can I plot shapefile loaded through fastshp in ggplot2?

I stumbled upon fastshp library and according to description (and my quick cursory tests) it really does offer improvements in time of reading large shapefiles compared to three other methods. I'm using read.shp function to load exemplary dataset…
radek
  • 7,240
  • 8
  • 58
  • 83
3
votes
2 answers

How can I add shape file (.shp) in php and use that shape file data in php file?

I have to develop one project in php and in that I have to include shape file and that shape file needs to be converted in to kml file. I know how to convert shape file into kml file but I don't know how to take/import shape file into php…
Arpi Patel
  • 775
  • 4
  • 10
  • 23
3
votes
2 answers

Shapefile dBase Data (naturalearthdata.com)

I'm researching using natural earth for a software project, so I pulled down a sample data file and had a peek into its dBase file, namely ne_50m_admin_0_countries.dbf Here is a sample row from said file: ScaleRank = 1 LabelRank = 1 FeatureCla…
fieldtensor
  • 3,972
  • 4
  • 27
  • 43
3
votes
1 answer

R: Calculating the Distance Between Two Geographical Points

I am interested in learning how to work with Road Network Files in R. For example, I would be interested in finding out the driving distance between the following two (Canadian) addresses: CN Tower: 290 Bremner Blvd, Toronto, ON M5V 3L9 Toronto…
stats_noob
  • 5,401
  • 4
  • 27
  • 83
3
votes
1 answer

How to read Shapefile's prj file?

I'm reading the shp file using NetTopologySuite.IO.ShapefileDataReader, but believe I also need to process the prj file. Is there an api to read the prj file? (The prj file is mentioned here: https://en.wikipedia.org/wiki/Shapefile) I've tried…
Alex B
  • 33
  • 4
3
votes
2 answers

postgis shape file import problems

Hi I'm trying to import a shape file from http://www.nyc.gov/html/dcp/html/bytes/bytesarchive.shtml into a postgis database. the above files creates MULTIPOLYGONS when i import using shp2pgsql. then i'm trying to simply determine if lat/long…
David Chan
  • 7,347
  • 1
  • 28
  • 49
3
votes
1 answer

Intersection keeping non-intersecting polygons in sf - R

I'm looking to intersect 2 spatial layers, keeping all the non-intersecting features as well. My first layer is the SA2 from NSW, Australia, which look like enter image description here My second layer is the Areas of Regional Koala Significance…
3
votes
1 answer

Computing the surface area of a variable in a shapefile in r

My shapefile represent a continent. It has many polygons (because of several layers). I would like to compute the surface area/squarekm for different variables and have the results in a column i.e: Total squarekm per country (NAME variable): It…
Myr TH
  • 175
  • 1
  • 9
3
votes
1 answer

Generating random locations along the outer border of a .shp polygon using R

I am able to generate random points within the polygons using the package sp, however I am interested in generating points along the outline of the polygon. For example, if I have a shapefile of a lake I can use spsample(lake,n=10,type="random") to…
mchen
  • 31
  • 1
3
votes
1 answer

Plot shapefiles with geometry point and line on a single plot in python

I have 3 shapefiles that I want to layer/ superimpose on top of each other, so all the plots can be viewed on a single map. I have bus stops, bus routes, and a zone map in each of the shapefiles. When attempting to plot the route on the zone, the…
cyrus24
  • 353
  • 3
  • 9
3
votes
3 answers

Is there a way I can get World shapefiles without the countries included?

I'm totally new to shapefiles so I might be missing something obvious but. I'm trying to get the following shapefiles A Global shapefile that only has the world boundaries Every continent shapefile that only has the continent boundaries and no…
E_K
  • 2,159
  • 23
  • 39