Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
0 votes
1 answer
73 views

Compute Jaccard Index for two similar but not equal shapefiles in R [closed]

I have two distinct shapefiles that have a high degree of overlap, but aren't the same. I want to make a comparison and one of the things I would like to generate is the Jaccard Index of regions ...
BLP92's user avatar
  • 345
Best practices
2 votes
8 replies
167 views

Intersecting very large shape files with thousands of multi-polygons

I have several multi-polygons shape files (the data is here https://habitats.oceanplus.org/, I don't have a way to provide direct downloads). These shapefiles are anywhere between 200Mb to 1Gb and ...
Herman Toothrot's user avatar
0 votes
2 answers
152 views

Split .gpx tracks file by polygon and calculate the time and distance in each polygon

I have many .gpx track files where people made one track but covered distance in multiple treatment areas (within different polygons). I have a shapefile for each polygon and individual .gpx files. I ...
Amanda Goldberg's user avatar
0 votes
1 answer
92 views

Implementation of MultiPolygonZMField in GeoDjango/django

I have an .shp file and the ogrinfo resulted as follow # ogrinfo -so AnalysisV1.shp AnalysisV1 INFO: Open of `AnalysisV1.shp' using driver `ESRI Shapefile' successful. Layer name: AnalysisV1 ...
HQM's user avatar
  • 586
3 votes
1 answer
106 views

Unable to zoom or hover map using nested subplot()

My interactive dashboard where multiple Plotly objects including maps are displayed using nested subplot() in R: library(digest) library(sf) library(jsonlite) library(plotly) library(ggplot2) library(...
User_NAHRUB's user avatar
1 vote
1 answer
58 views

ggplot Bathymetric shapefile plotting in a single colour

I have a bathymetric shapefile structured as below. str(Ab_bath) Classes ‘sf’ and 'data.frame': 126 obs. of 13 variables: $ CLRRGB : chr "2844D9FF" "2651DCFF" "215DDEFF&...
mikejwilliamson's user avatar
0 votes
1 answer
56 views

'Unknown geometry type' error with shp2pgsql

I use las2tin to generate tin(in .shp format) for a las. las2tin64.exe -i input.las -o tin.shp Then I use shp2pgsql to create a sql with this shape file: shp2pgsql -s 4326 tin.shp temp_table > tin....
Mandroid's user avatar
  • 7,768
0 votes
1 answer
81 views

It is possible in Oracle Apex 24.2 to build something to download/export a table that has SDO_GEOMETRY in shapefile format?

I have tables in Oracle that contain spatial data using the SDO_GEOMETRY data type. I would like to create a button inside APEX that allows users to download a zipped shapefile export of this data. ...
Danilo Silva's user avatar
1 vote
1 answer
114 views

Apply a Pacific-centered projection and add coordinates to a ggOceanMaps basemap

I want to plot satellite tracking data. I previously did this by manually importing the country outlines and satellite data without using ggOceanMaps: However, I would like to use the basemap() ...
Australmat's user avatar
0 votes
1 answer
142 views

R Convert a list of polygons into a shapefile, where each polygon is a feature of the shapefile

I'm trying to convert this list of polygons, named all_buffers, into a shapefile. I'd like each polygon to be its own feature in the shapefile. Everything I've tried has only exported one single ...
Hailey's user avatar
  • 31
0 votes
3 answers
133 views

Efficient handling of shapefiles with many polygons in R: simplification and merging

I have two shapefiles: one represents the counties in the United States, and the other represents the census divisions in Canada. I’d like to combine the two. To do this, I used the sf::st_union ...
Marine's user avatar
  • 199
1 vote
1 answer
50 views

Output on the map leaflet js big data from .shp-file

I have a shp file with big data-polygon that needs to be displayed on a leaflet map. First, I tried to convert .shp to geoJson. The data was displayed, but the load on the client device was very high -...
KordDEM's user avatar
  • 209
2 votes
1 answer
203 views

How to extract data from leaflet-generated pages

Is it possible to scrape the polygon data from this interactive map in R? 🔗 https://fogocruzado.org.br/mapadosgruposarmados The map shows territories controlled by armed groups across different years....
Maria Mittelbach's user avatar
0 votes
1 answer
57 views

Can I use a custom topoJSON file with Filled Map in free Power BI?

I'm building a map dashboard in Power BI Desktop and want to visualize custom regions using a topoJSON file (converted from a shapefile). I'm using the Filled Map visual.Tutorials suggest this is ...
ChengguiS.'s user avatar
0 votes
1 answer
67 views

How export z values with shape file

I have successfully created a filled contour map with UTM data from a numpy array and exported to a shape file, but the shape file only has polygons with no other data. The partial code is: #Convert ...
Rathpr's user avatar
  • 3
0 votes
0 answers
21 views

Is there a way to save all Geotags for specific tags from Flickr as a Shapefile?

I created a code with Jupyter Notebook to download all geotags from Flickr pictures with specific tags. The code works but when I open the shapefile in ArcGIS, there are like 400,000 points, which ...
PcPrincipal's user avatar
0 votes
0 answers
40 views

ESRI Shapefile for US

I have been looking for an ESRI Shapefile for the United States (including Alaska and Hawaii) with state boundaries but with Alaska and Hawaii tucked underneath Texas and neither of them looking ...
Chris's user avatar
  • 33
0 votes
0 answers
69 views

Is there any way to export Shapefile from leafletjs map?

For example, this page: https://opendatabot.ua/l/7422785500:01:002:0916?from=search The map on this website is built using Leaflet.js, and it displays the area boundaries. Is there a way to extract or ...
alxndr_k's user avatar
2 votes
1 answer
96 views

How to draw a shapefile with ggpolar [closed]

I want to use ggpolar to plot a polar projection map of raster data, but the outermost pixels tend to obscure the land boundaries. Therefore, I want to add a local shapefile, but I failed to draw it ...
Ruijie Wang's user avatar
0 votes
0 answers
49 views

How to add a shapefile/GeoJSON boundary to a map in Leaflet?

This would appear to be the most basic and trivial thing, except that I can't find out how to do it. I have a shapefile which contains the boundaries of all electorates in my state (this is in ...
Alasdair's user avatar
  • 1,414
-1 votes
1 answer
47 views

How to convert ESRI shapefile into .csv with the following fields

I am trying to convert the data shown here into a .csv that contains these following fields The current script I have takes in the .shp using geopandas and outputs it as a csv. However, the normal ...
parzival's user avatar
0 votes
0 answers
61 views

Connecting multiple components into a single interconnected network

I’m working with an sf file containing a road network, where each row represents a road segment. My goal is to create a fully connected network, so I tried building the network using the sf_network ...
sawu's user avatar
  • 1
0 votes
0 answers
61 views

Map size problem in plot window when plotting the world map

I have a problem with the map size in the plot window. The data I am using can be downloaded from this USGS Terrestrial Ecosystems of the World link. Here is the code: library(sf) library(ggplot2) ...
xine li's user avatar
0 votes
1 answer
45 views

Extracting common polygons into a new shape file

I have two shape files from a survey conducted through different time-frames: file_1 (with 40 polygons) and file_2 (with 280 polygons). Each vector in these files are allotted a unique id and are ...
rekha's user avatar
  • 7
1 vote
1 answer
548 views

geopandas.read_file of a shapefile gives error if crs parameter is specified

All, I use ESRI World Countries Generalized shape file, that is available here using GeoPandas shp_file =gpd.read_file('World_Countries/World_Countries_Generalized.shp') print(shp_file.crs) The CRS I ...
Kernel's user avatar
  • 725
0 votes
0 answers
49 views

error when doing lm test for spatial autocorrelation in error terms

Below is an image of the data for some variables in pdata.frame format. The panel is for 166 municipalities in RN for 4 years, generating a total of 664 observations.Can I make the panel available on ...
Alex Gois's user avatar
1 vote
1 answer
47 views

How do I make alterations to this shapefile in python with geopandas or cartopy?

How do I add light grey state lines, change the background to white, and change certain areas to certain colors? This is from the EPA Level2 ecoregion map. I'd like to color each ecoregion a separate ...
Tanner S Johnson's user avatar
0 votes
0 answers
27 views

create kernel density raster where locations are duplicated (a lot!)

I have a dataset identifying locations of individuals at stationary receivers. So, I have many, many duplicated locations (multiple locations at one receiver over multiple days). I am trying to run a ...
vermicellion's user avatar
1 vote
1 answer
73 views

Error saving a tess object as shapefile in R with sf::st_write

I'm using the spatstat package to create a hexagonal tessellation over a specified area and count points within each hexagon. After that, I want to save the tessellation as a shapefile for use in GIS. ...
Pablo Flores Oñat's user avatar
2 votes
1 answer
1k views

Geopandas fails reading geojson

I'm trying to read a geojson I created using these steps import geopandas as gpd vec_data = gpd.read_file("map.shp") vec_data.head() vec_data['LPIS_name'].unique() sel_crop = vec_data[...
sylar_80's user avatar
  • 375
0 votes
1 answer
69 views

combine different shapefile feature classes based on their names and geometry

I have a shapefile which contains various feature classes I'm able to read I improved my code thanks to the suggestions of @Pieter import geopandas as gpd from shapely import box from shapely.geometry....
sylar_80's user avatar
  • 375
0 votes
0 answers
122 views

Is there a better and effective way to convert a large raster file into a vector point?

The idea is to convert some raster files (39 fire occurrences) into vector points (.shp), allowing the use of the extract() function in the terra package to relate the occurrence points to another ...
Talles's user avatar
  • 1
1 vote
1 answer
117 views

Features lost after removing Z and M dimensions from shapefile

I am using this roadway functional classification data from the Open Data DC. When I load the shapefile and run the following code: ## Read roads shapefile DC_Roads <- read_sf('data/...
TransitHarmony's user avatar
0 votes
0 answers
74 views

How to correct erroneous CRS in the function coord_sf() in ggplot after merging shapefiles together to zoom into a specific region in R

Issue I have three shapefiles that exhibit our study area and contain the "EPSG - 4326". After researching, the exact EPSG for our study area is "3355 with transformation: 15846" ...
Alice Hobbs's user avatar
  • 1,247
1 vote
1 answer
2k views

How to use the function read_sf() in the sf package to read a shape file when it works in QGIS in R

I have a shape file called gadm41_EGY_1.shp, which I have successfully been using to do analysis in QGIS, and I want to read it into R using the function read_sf() in the sf package. I want to do a ...
Alice Hobbs's user avatar
  • 1,247
0 votes
2 answers
157 views

How can I split state shapefiles in R?

I have the shapefiles of US states that I downloaded from the United States Census Bureau. Here is a link for the 2024 data as an example. I'm working on a map in tableau and need to split a few of ...
Nicole Divers's user avatar
0 votes
1 answer
133 views

How to find the appropriate CRS for shapefile with strange extent in QGIS

I have a shapefile that I need to import. It has an extent as follows: 6070755.0197066366672516,2191083.7598814815282822 : 6213671.7394500551745296,2236821.9991134637966752 The layer does not have a ...
Kate's user avatar
  • 61
0 votes
1 answer
83 views

How to make a simple edit of a field value using pyshp

I'd like to change the values in a shapefile (dbf file only, not any of the geometry). That would seem to be most common usage of pyshp to me, yet I am mystified as to how to code it. Imagine I start ...
Rob M's user avatar
  • 1
0 votes
2 answers
221 views

What is the proper way to repair/recreate the .shx of an ESRI Shapefile using gdal?

I can recreate the missing .shx file by using the gdal command ogr2ogr and specifing the config "--config SHAPE_RESTORE_SHX YES". But, although it recreates the .shx file it gives me an ...
ASRodrigo's user avatar
  • 331
0 votes
0 answers
52 views

how to add shapefile (basin boundary) to tiff file (iran map) in python

I have Iran's rainfall zoning map in TIF format and I get the output using the following code. But the border of the basins is not clear. how to add shapefile (basin boundary) to tiff file (iran map) ...
mahyar's user avatar
  • 1
1 vote
1 answer
61 views

boxplot two rasters and one shapefile

The code works with one raster and one shapefile. I tried to expand the code to use stack() for the two rasterfiles (present and future climate, paired boxplots), because extract(r,v) is available for ...
Sibylle Stöckli's user avatar
0 votes
1 answer
50 views

message in shapefile with st_read

I am working on Rmakdown, but when I make the pdf it prints messages that I cannot delete. Reading layer `ine_barrios_mvd_nbi85' from data source `C:\Users\54427965\Desktop\Hom Barrios y Secc\BARRIOS\...
Belen Rios's user avatar
0 votes
1 answer
99 views

boxplot of raster and shapefile

This example code works library(raster) library(sp) library(rgdal) library(ggplot2) # Create some sample raster data raster_file <- raster(ncol=36, nrow=18) raster_file[] <- 1:ncell(raster_file)...
Sibylle Stöckli's user avatar
0 votes
1 answer
144 views

netCDF file without crs/Clipping to the shape file with projected shape file

Issues Encountered: The NetCDF file has rotated grid coordinates (rlon, rlat), which adds complexity to aligning it with the shapefile. When I try to clip the NetCDF data with the shapefile, I receive ...
Hundesa Siraj Mohammed's user avatar
-2 votes
1 answer
120 views

Unable to import mbtiles generated with MapTiler in Mapbox studio

I’m trying to import a tileset generated from a QGIS vector shapefile processed by MapTiler in Mapbox. I tried generating compressed and uncompressed mbtiles with a size of 512px, the resulting files ...
user26674333's user avatar
0 votes
1 answer
137 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
  • 19
3 votes
1 answer
257 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
158 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
1 vote
1 answer
257 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
  • 8,168
0 votes
1 answer
223 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

1
2 3 4 5
41