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

Error with function fortify of ggplot2

I am trying to convert a spatial object into a data.frame using the function fortify from the package ggplot2. But I am getting an error. For example, following the exact same code used in Hadley Wickhan's plotting polygon shapefiles example, I type…
6
votes
2 answers

Using Shapefile data to determine neighborhood for a longitude/latitude

I'm trying to determine the neighborhood for a location, based on Zillow's freely published Shapefile data. I don't really know anything about the Shapefile format, and am having some trouble finding tutorials online -- but I basically want to take…
Kunal
  • 155
  • 1
  • 5
6
votes
1 answer

Displaying shape file or and OSM file in android as a map

I want to implement a Indoor Navigation application in android. My first task is to display the map in android. I have created the indoor map in both shape file and OSM file format. • I created the shape file using QGIS. • I created the OSM file…
direndd
  • 642
  • 2
  • 16
  • 47
6
votes
3 answers

How to export WKT from a Shapefile in c#?

I have a Shapefile that contains several thousand polygons. I need to read from this file in C# and output a list of WKT formatted strings. I looked at DotSpatial and the "CatFood" ESRI Shapefile Reader. I can get either to load the shapefile just…
Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
6
votes
1 answer

I want to create a countour map from x, y and z and clip the data with the shapefile using ggplot

I have a data set with Eastings, Northings and Age. I want to plot the age for my data set. The dataset is upload in the following loation: https://www.dropbox.com/s/zmtxluhwuupb9iv/age%20at%202100.csv The code I used to create the simple graph and…
Jd Baba
  • 5,948
  • 18
  • 62
  • 96
6
votes
1 answer

How to Convert SVG to SHP (Shape File) format?

I am trying to convert the SVG File to SHP (Shape File format) and then get it imported into GeoServer. Is there any convertor available OR is there any mediating format in which I can get it converted and finally get it in SHP format? I already…
user1517745
  • 71
  • 1
  • 1
  • 4
5
votes
1 answer

Plotting Thematic Maps in R Using Shapefiles and Data Files from DIfferent Sources

Given a shapefile, how do I shape and use a data file in order to be able to plot thematic maps using identifiers that correspond to shape regions in the shapefile? #Download English Government Office Network Regions (GOR)…
psychemedia
  • 5,690
  • 7
  • 52
  • 84
5
votes
1 answer

How to pick up the information for the nearest associated polygon to points using R?

I'm figuring out how to do a Intersection (Spatial Join) between point and polygons from shapefiles. My idea is to get the closest points and those points that match completely inside the polygons. In ARGIS there's a function for match option named…
José Bustos
  • 159
  • 1
  • 7
5
votes
0 answers

Write Shapefile to AWS S3 with geopandas in Glue Python Shell

I have read shapefile in a zip format from my S3 bucket successfully through geopandas, but I get error when trying to output the same geodataframe as a shapefile to the same S3 bucket. The code below is how I read the zip file, and it works…
Yan-Ru
  • 51
  • 2
5
votes
2 answers

Merging a Shapefile and a dataframe

I am working in R with a regular dataframe (df) and a shapefile (map2), the share a common column called CD116FP. df has 103552 lines while map2 has 444 .I am loading the shapefile in the following way: map2 <-…
5
votes
1 answer

Geodjango: how to load .shp file and convert to geojson with the right CRS?

I have multiple shapefiles (.shp) with their auxiliary files that I want to display on a Leaflet map. The shapefiles use different coordinate reference systems (CRS) and I struggle to grasp the most straightforward and reliable way to show things on…
user1162541
5
votes
2 answers

How to find centroids of multi-polygons using sf library

I have a shapefile of multipolygons and I want to find the centroid of each multipolygon, but instead I am getting the centroid of the whole shapefile. I converted my csv file into a shapefile (see this question Converting CSV file to shapefile -…
Alan20
  • 281
  • 1
  • 12
5
votes
3 answers

How to set ylim and xlim in plot raster in R

I'm making a raster data ploting in R, when I adjust to the area I'm working on, R displays the ylim that doesn't want to be cut off. I tried: # set lon lat ylim=c(-4,2) xlim=c(118,126) plot(pm10_mean,xlim=xlim, ylim=ylim) plot(shp,…
ExHunter
  • 307
  • 4
  • 11
5
votes
1 answer

linewidth based on shapefile attribute for geopandas, python

I would like to plot a shapefile using geopandas. I would like to have the thickness of the lines in accordance with an attribute in the shapefile. I am using the following command for that: shp_sub.plot(column='Case1_2', cmap='BuGn', figsize=(5,5),…
ShGh
  • 67
  • 1
  • 5
5
votes
2 answers

GeoJson features coordinates are in meters not in [lng, lat]. How to display in google map?

Eg: [360590, 555610] - [lng, lat] in meters from google map api - GeoJson data { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "MultiPolygon", "coordinates": [ …
Shivam
  • 161
  • 9