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
5
votes
3 answers

Creating a shape file from a bounding box coordinates list

There is already few existing questions about this topic, but I unfortunately did not find something that could fix my problem. I have a point Lat, Long coordinate i.e. Lat= 10 and Long = 10. I want to create a shape file of a 0.5 degree bounding…
steve
  • 511
  • 1
  • 9
  • 33
5
votes
1 answer

Reading Unzipped Shapefiles stored in AWS S3 from AWS EMR Cluster using PySpark in Jupyter Notebook

I'm completely new to AWS EMR and apache spark. I'm trying to assign GeoID's to residential properties using shapefiles. I'm not able to read the shapefiles from my s3 bucket. Please help me in understanding what is going on as I couldn't find any…
5
votes
1 answer

Overlaying ggmap , geom_polygon(shape file) on ggplot2

I have a shape file, and I want to post it on top of a google map with ggplot, but posting via geom_polygon(ggplot2) shows lines that do not make sense my code: ######## the shape file…
João Machado
  • 325
  • 1
  • 2
  • 9
5
votes
1 answer

Colour shapefile using multiple attributes

library(raster) admin <- getData('GADM', country='FRA', level=2) set.seed(123) id <- data.frame(ID_2 = admin@data$ID_2, day1 = sample(1:20,96,replace = T), day2 = sample(50:80,96,replace = T), …
89_Simple
  • 3,393
  • 3
  • 39
  • 94
5
votes
1 answer

Filling shapefile polygons with a color in matplotlib

I am searching way to fill polygons of a shapefile based on a value. So far from basemap tutorial (http://basemaptutorial.readthedocs.io/en/latest/shapefile.html) i 've found how to fill the polygons with a specific color. import matplotlib.pyplot…
5
votes
1 answer

Create a grid inside a shapefile

I am trying to crate a grid inside a shapefile, something like this. However, I am unable to generate such grid. I was wondering if anyone has an idea on how to accomplish this. Here is my code - WWWL.Shape<- readOGR("E:/Juan Arango",…
Perro
  • 348
  • 5
  • 14
5
votes
3 answers

How to use python to lookup information at specific latitude/longitude in a ESRI shapefile?

I have a ESRI shapefile (from here: http://pubs.usgs.gov/ds/425/). I looking to use python to lookup information from the shape file (surficial material in this case) at a given latitude/longitude. What is the best way to go about solving this…
arkottke
  • 547
  • 6
  • 14
5
votes
2 answers

Specifying desired crs format of Geopandas object

I use geopandas's to_file() method to read a shapefile into a geopandas object. The shapefile has a valid .prj file with a ESRI WKT style projection information: PROJCS["Slovenia_1996_Slovene_National_Grid",GEOGCS["GCS_Slovenia…
Marjan Moderc
  • 2,747
  • 23
  • 44
5
votes
1 answer

Merging Two SpatialPolygonsDataFrame Objects

Using the shapefile available here I am trying two merge the polygons of Sudan and South Sudan, so that I get the borders of Sudan in 2010. My code to make the shapefile available in R is library(rgdal) africa <- readOGR(dsn = "Data/Shapes",…
Martin Schmelzer
  • 23,283
  • 6
  • 73
  • 98
5
votes
2 answers

How to index geojson file in elasticsearch?

I am trying to store spatial data in the form of geojson,csv files and shape files into elasticsearch USING PYTHON.I am new to elasticsearch and even after following the documentation i am not able to successfully index it. Any help would be…
intern
  • 61
  • 1
  • 6
5
votes
2 answers

ESRI's shapefile to Matlab

I am looking for a function to read/write points, lines and polygons from ESRI's shapefile format (as used in Arcview) for use in Matlab
Elpezmuerto
  • 5,391
  • 20
  • 65
  • 79
5
votes
2 answers

How do I split/divide polyline shapefiles into equally-length-smaller segments?

I have a polyline shapefile, which represents part of an urban road network. My shapefile contains several line/street segments (in my case 58). By using R-cran, I would like to further divide the polyline segments into smaller parts having equal…
MGV
  • 71
  • 1
  • 5
5
votes
2 answers

Overlaying shapefiles or raster over interactive maps

I'm using R, and I want to overlay some raster data (e.g. a temperature map from a model) over an interactive map which allows panning and zooming. Ideally, I'd like to overlay over Google Maps or OpenStreetMaps. The input data can be in shapefiles,…
AF7
  • 3,160
  • 28
  • 63
5
votes
5 answers

How can I convert an excel spreadsheet (.xls) to a shapefile programmatically?

I have an excel spreadsheet I want to convert to an ESRI shapefile programmatically. It contains X and Y coordinates in two columns, as well as a variety of attribute data in other columns. The spreadsheet is in excel 97 format (i.e. not .xlsx). I…
fmark
  • 57,259
  • 27
  • 100
  • 107
5
votes
6 answers

How can I get Proj4 details from the shapefile's .prj file?

I am using mapdotnet services for our gis application to load the shapefiles, and this mapdotnet service wants the proj4 details. I'm getting them from spatialreference.org, but for this projection the proj4 details are blank. How can I get the…
Tushar Maru
  • 3,347
  • 10
  • 34
  • 53