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
0
votes
1 answer

How to create a list of unique values, extracted from a column within a spatial polygons data frame?

Attempting to create a list of unique values, extracted from a column within a spatial polygons data frame object. The unique function only works with vectors... For example, if SPDF had a column name of "trees" with 5 records "birch", "birch",…
dwiz
  • 410
  • 3
  • 16
0
votes
1 answer

Shapefiles are nested tmap object

I got a shapefile from the The Italian National Institute of Statistics (CAMERA_PLURI_2017.shp within this zipfile here: https://www.istat.it/storage/COLLEGI_ELETTORALI_2017.zip) I try to read the shp file itself. A number of maps appear be be…
MCS
  • 1,071
  • 9
  • 23
0
votes
0 answers

How to troubleshoot mislabeling of provinces in my shapefile in r?

I have a shapefile of the Philippines that has all the correct labels of each provinces. After removing some of the provinces I won't be using, aggregating the data into a single data frame, and then attaching my covariates to the shapefile I run…
Emma
  • 31
  • 1
  • 4
0
votes
1 answer

How to extract NetCDF data frame by region using a polygon shapefile

I'am trying to extract the variable "swh_ku" from multiple NetCDF files together with their corresponding latitude and longitude values into csv files using a polygon shapefile or it's extent. I'm working with Jason-1 global altimetry swath data but…
Edwinward
  • 13
  • 1
  • 4
0
votes
1 answer

How to construct a spatial adjacency matrix in R

I am new to using shapefiles in R and I was wondering if you can help me get a better understanding. I need to create a spatial adjacency matrix W so that I can build a spatial model. W is an n x n matrix where n is the number of area polygons. The…
Outlier
  • 417
  • 2
  • 10
0
votes
0 answers

Convert data frame to polygon

I tried converting my data frame into polygon using the code from previous post but I got an error message. Please I need assistance on how to fix this. Thanks. Below is my code: County MEDIAN_V latitude longitude RACE DRAG AGIP AGIP2 AGIP3 …
mymymine
  • 49
  • 7
0
votes
0 answers

How to calculate the total area of multi vectors/shapefiles/polygons in each 1°×1° grid by python?

I try to calculate the total area of the multi vectors in each grid, then each grid will have a only number to represent the shapefiles distribution in the gird. How to spilt the vectors which is across line and then calculate area of the left part…
lemon
  • 181
  • 1
  • 4
0
votes
1 answer

How to calculate area of polygons from a large shapefile

Summary: I'm trying to calculate the area of a large number of polygons in R. I've read a few posts about how I might do this (Example #1 & Example #2) but the problem I'm having is that my shapefile is too large (1.7gb) to import. Given I can't…
Wilze
  • 53
  • 5
0
votes
1 answer

Python: Overlaying shapefile with np.array data

I have a shapefile of the United states, and I have an m x n array of Cartesian data that represents temperature at each pixel. I am able to load in the shapefile and plot it: import shapefile as shp import matplotlib.pyplot as plt sf =…
WX_M
  • 458
  • 4
  • 20
0
votes
1 answer

Create Equally spaced coordinates on a California State map created with basemap

I have created a California state map with Basemap python library and this shapefile. Code is below from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt fig, ax = plt.subplots(figsize=(20,20)) map =…
Kartikeya Sharma
  • 1,335
  • 1
  • 10
  • 22
0
votes
0 answers

Creating dataframe by latitude/longitude comparison between shapefiles

I have two shapefiles/dataframes (I can easily convert between types). One contains coordinates that form a boundary line and one contains coordinates for a set of points representing houses. They both have columns containing long and lat with…
Julia
  • 31
  • 3
0
votes
1 answer

How can I compare two feature classes in arc gis using python

I have two large shapefiles and want to find the differences. the tools within arc wont let me return a shapefile( Feature class). Is here some python code which can help me with this. just tried feature through…
0
votes
0 answers

GeoSeries object interpreted as NoneType when .bounds method called

I am trying to load a shapefile into a Geopandas object and then call the total_bounds method to identify the extent of the shapefile. I have loaded the shapefile into a Geopandas object and am able to plot it using the .plot method. I am able to…
0
votes
0 answers

How do I combine a raster dataframe with a shapefile to create a map of species richness?

I want to plot the raster plot/dataframe on top of the shapefile but I keep getting various errors depending on how I write the code. I've tried using a + with the finished objects, landmap+critmapped, I've tried adding the codes together and…
TJeff
  • 29
  • 8
0
votes
1 answer

GeoPandas - GeoData not overlapping Shapefile map

I'm trying to map some lat/long data transformed into shapely.geometry.Point objects from a geopandas.GeoDataFrame onto a UK shapefile downloaded from here. Upon extraction there are 3 .shp files and the problem below occurs with each of them.…
shanlodh
  • 1,015
  • 2
  • 11
  • 30
1 2 3
99
100