Skip to main content

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.

0 votes
0 answers
36 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, ...
awray's user avatar
  • 15
-1 votes
0 answers
20 views

`colorNumeric()`: ! Wasn't able to determine range of domain

I am trying to read a shapefile and assign colors using leaflet colorNumeric() to variable V4 which are numeric but discontinuous. It has values 1 to 16 and then 74 to 95 with some missing values in ...
vp_050's user avatar
  • 508
0 votes
0 answers
11 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", &...
Richi D'ercole's user avatar
0 votes
0 answers
14 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], ...
kolrocket's user avatar
2 votes
1 answer
54 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 ...
SkiFlyer's user avatar
1 vote
1 answer
38 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" ...
user25722924's user avatar
0 votes
0 answers
16 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 ...
user824624's user avatar
  • 7,755
1 vote
1 answer
38 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 ...
user824624's user avatar
  • 7,755
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 ...
Xudong's user avatar
  • 515
0 votes
1 answer
50 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 ...
MapQuestioner's user avatar
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/...
lala345's user avatar
  • 125
2 votes
1 answer
49 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 ...
Marine Régis's user avatar
-1 votes
1 answer
19 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 ...
MUHAMMAD ABDULLAH's user avatar
0 votes
1 answer
53 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 ...
cheese7729's user avatar
0 votes
1 answer
54 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 ...
g3nkoVMAESTRO's user avatar

15 30 50 per page
1
2 3 4 5
137