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.
shapefile
2,040
questions
0
votes
0
answers
5
views
Country borders are shifted in relation to fillings - Basemap python
I am trying to do a colored map on python using BaseMap with a Shapefile but I have small shifts between borders and countries. Anyone would happen to know how I can fix this ? I would like to color ...
0
votes
1
answer
72
views
Subset a shapefile by lat/long
I have a shapefile from this site that I am working with. I'd like to only plot the a) 30 fathom layer, and b) this layer on latitudes above 34.4. I've been able to subset only the 30 fathom layer, ...
0
votes
0
answers
15
views
Converting output of cf_xarray to an xarray Dataset with "lat", "lon", "time" dimensions
You can find below the code I have used to convert a shapefile to an xarray dataset using cf_xarray library. What I want to achieve now is having an xarray Dataset with dimensions "lat", &...
0
votes
0
answers
15
views
Transforming an (lat,lon) extent in GOES-16 projection with Python/cartopy/GDAL?
I have a WGS84 shapefile, which I'm trying to get its extent, firstly with its projection:
gdf = gpd.read_file("/content/buffer.shp")
bounds = row.geometry.bounds
extent = [bounds[0], ...
2
votes
1
answer
65
views
R and ggplot with st_crop: map cropping does not work as wanted
I am trying to plot only a part of the world map, limited by a square with limits lon (-30, 90) and lat (30, 82). When I try to crop the map with sf_crop, it does not return the desired square when ...
1
vote
1
answer
40
views
How do I fix the hexagon distortion when plotting a 2D hexbin map of US in r?
I was trying to make a 2D hexbin map of the US in R and I followed this guide:
https://r-graph-gallery.com/328-hexbin-map-of-the-usa.html
Context: I was only able to find a couple "how to's" ...
0
votes
0
answers
18
views
Error: no layers found when parsing zipped shp file in shpjs
I am working with vue3 to load a zipped shp file from a sample dataset found in the repository, https://github.com/calvinmetcalf/shapefile-js/blob/gh-pages/files/counties5.zip
The shp library used is ...
1
vote
1
answer
44
views
Error: Can't find end of central directory : is this a zip file ? when parsing a shp file
I am working with vue3 to load a shp file.
the shp library used is https://github.com/calvinmetcalf/shapefile-js. shpjs 's version is "^5.0.1".
here is the code
<el-upload
...
0
votes
0
answers
14
views
Proper way to save networks as a shapefile after 3.0?
It seems the networkx depreciated the nx.write_shpafter the version of 3.0. So what is the most write way write a networkx graph to shapefile?
For my case, my node names are the coordinates of the ...
0
votes
1
answer
53
views
Incorrect Result From st_difference
I am trying to generate a set of rings around a set of points in the sf package, and have run into an issue where for some reason st_difference returns the whole first geometry despite the two inputs ...
0
votes
0
answers
31
views
Merging shapefile with data file with coordinates
I have a shapefile 'shp' with boundaries, and I have a data .csv file with coordinates and some values. I want to join the df to shp, so that each coordinate/observation would be in the correct zone/...
2
votes
1
answer
51
views
Sampling random points in R with both raster and shapefile constraints
I am trying to sample random points according to 2 conditions:
in non-NA cells of a raster
inside the polygons of a shapefile
I tested the terra::spatSample() function, but I can't meet the second ...
-1
votes
1
answer
20
views
How can I handle or correct shapefile coordinates that exceed valid latitude and longitude ranges? How do softwares like QGIS project invalid ones?
I am working on making a shapefile data parser and there are some shapefiles that when I upload to QGIS and GEE work perfectly fine but my parser says its invalid because the latitude and longitude ...
0
votes
1
answer
56
views
Cropping a global shapefile just to Europe on R
I am using a shapefile to map ice extent, but I only want it focused on Europe. This is the entire shapefile plotted:
I've tried using a bounding box and clipping the shapefile, but neither of these ...
0
votes
1
answer
57
views
Plotly Choropleth Map not displaying GeoJSON Data Correctly - Possible Geometry or Mapping Issue
I'm quite new to choropleth_mapbox() and I don't know where the problem is in my script. I would like to display the average spot market energy prices in individual bidding zones. Ultimately, I would ...