Questions tagged [shapefile]

A vector data storage format for storing the location, shape, and attributes of geographic features. Often referred to as 'an ESRI shapefile', as ESRI developed it.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

Mask xarray dataset using a shapefile

I have an xarray dataset of some satellite data and I'd like to mask it using a shapefile. I have previously been doing this using a combination of PIL, numpy and gdal but it would be cleaner to do ...
1
vote
1answer
160 views

Finding percent landcover types with points or polylines using ArcMap

I am using ArcMap 10.1. I had an orthophoto of an old study site. I traced two polygon shapefiles from this photo- one of "fields" and one of "forest". I made a point shapefile of the sampling points, ...
0
votes
1answer
28 views

Clipping a data set using a shapefile

I am using the OREGONSTATE_PRISM_Norm81m data set on Google Earth Engine and I am trying to clip the data to only Washington State. I uploaded a shapefile from the Washington Department of Natural ...
0
votes
0answers
23 views

Clip global data by polygon using rioxarray fails (off by 180 longitude)

I want to extract CMIP6 climate data within polygons defined by a selection of the Large Marine Ecosystems of the world. The data(CMIP6) are found in ranges from 0 to 360 degrees longitude, while my ...
4
votes
2answers
125 views

Mean of polygons area within another polygon layer

I have the following layers : Sectors (polygons limited by the black lines) Houses (polygons in light blue) I have created the area attribute in the Houses table. I have also created an attribute ...
0
votes
0answers
19 views

Error in trying to use OGR Python API to create an MBtile file from a shapefile

I have been trying to use the OGR Python API to convert this shapefile into an Mapbox Vector tile format and have ran into this error. Traceback (most recent call last): File "C:/path_to_script", ...
2
votes
4answers
979 views

Looking for Shapefile of Island Names

A lot of Island nations, like Japan and Indonesia, have many islands within the same country. Other islands, like Borneo are part of multiple countries. I am looking for a shapefile that gives the ...
5
votes
2answers
2k views

Creating missing .shx file?

I am using ArcGIS Desktop to view one shapefile. Only a select number of features are being displayed. The same number are showing in the attribute table even though the database file (.dbf) has a ...
0
votes
0answers
19 views

ogr2ogr conversion between from shapefile to MBtiles not working as intended

I am trying to convert a shapefile to MBTiles format using ogr2ogr and have been running this script in the OSGEO4W command line ogr2ogr -f MBTILES -dsco MINZOOM=10 -dsco MAXZOOM target.mbtiles C:\...
4
votes
2answers
2k views

Reading a shapefile as an array using Python?

I am trying to read a shapefile as an array with Python but I keep getting the same error: Warning 1: Failed to find field ID on layer shapefile_maido_tipe, skipping. ERROR 4: `temp.tif' not ...
0
votes
0answers
15 views

How to use fiona to directly write to a zip file

Is there a way to directly create a new .zip file that contains shapefile data using fiona? The minimal working example below works as is to produce the shapefile contents in the test/ directory. I ...
1
vote
1answer
26 views

Gdal ogr2ogr update a PostGIS table without breaking views and relations

Context I'm trying to update a PostgreSQL+PostGIS table from an ESRI Shapefile using the ogr2ogr too from gdal. The Shapefile is being updated from external sources on a regular basis. I don't want ...
0
votes
0answers
21 views

How to clip a raster using rasterio without lose resolution

I'm using rasterio to clip a large Tiff image using a shapefile, generating one raster for each feature. However, the output resolution is low(96 dpi) and I would like to obtain a better resolution. ...
0
votes
1answer
45 views

QGIS - Imported shapefile CRS is listed as OSGB but being projected as WGS 84

I have imported a shapefile containing land use data for the UK. The layer says that its' coordinate system is EPSG:2770 OSGB 1936, however, when I display the image over a basemap it becomes obvious ...
13
votes
3answers
42k views

Check if a point falls within a multipolygon with Python

I have tried several examples of code using libraries such as shapefile, fiona, and ogr to attempt to check whether a point (x, y) falls within the boundaries of a multipolygon created with ArcMap (...
0
votes
2answers
24 views

Using writeOGR on a list of SpatialPolygons

This question has been asked before, but I find the answer confusing since there are no reproducible examples that link the question and the answer, and the answer doesn't actually use the writeOGR ...
1
vote
0answers
24 views

PyQGIS 3 Single user shapefile editing for network drive [closed]

I have a project saved on a shared network drive, with a group of people working on it. I need a PyQGIS solution to prevent multiple users from editing the same shapefile. That is, once one of the ...
2
votes
2answers
4k views

Converting raster tif to point shapefile using Python?

I've been working on a data that is in .tif raster format. I need to convert that into a points shapefile (.shp) to proceed. I went through GDAL in Python but there's only gdal.Polygonize(). So how do ...
0
votes
0answers
14 views

Assign matrix values to raster when values do not align with raster rectangle? R

I'm trying to create a raster of distance to a single line feature (a 25 m contour line derived from an elevation raster). Since I want to run this in a loop and I have a ~15 million cells, I ...
1
vote
2answers
72 views

Selecting specific rows and column from a shapefile using Fiona and Shapely

I am new to using PyCharm, but I am trying to cut out 4 rows from a county shapefile from that 4 rows specify the columns or attributes to also be extracted and output the result as a new shapefile....
0
votes
1answer
146 views

Plot shapefile with islands with matplotlib

I am trying to plot a city shapefile with matplotlib's plt.plot()-function. However, within the closed areas I occasionally have small "islands" which lie within the city but not part of it. Therefore ...
0
votes
2answers
10k views

Latest shapefiles of Indian states

I need shapefiles of Indian states that of 2011 which has almost 671 districts of India. Can anyone please help me?
2
votes
0answers
48 views

Geopandas shows points outside of buffer geometry even though inside

I have some ship trajectories and I want to know which point of the trajectory is inside the port(=buffer) and which points are outside. The following picture shows my Geopandas Dataframe with the ...
1
vote
1answer
3k views

Combine multiple shapefiles python

I'm pretty new to working with shapesfiles. I'm trying to create a spatial index of addresses in NYC. I completed it using an rtree but have only done it for Manhattan. To complete the other counties ...
0
votes
0answers
19 views

Import a shapefile into PostgreSQL using npgsql (.NET)

I want to import a shapefile (.shp) into a PostgreSQL database through a .NET application. I plan to use npgsql but I am unable to figure out how to import a shapefile using this library. PostgreSQL ...
-1
votes
0answers
43 views

Save shapefile after R analysis [closed]

I'm doing a spatial join analysis. That follows the following steps: Open the points file, change the projection of the shp and then leave it as a data frame; Open the polygon file, leave it as a ...
-2
votes
0answers
23 views

Recent shapefile of Indian states and Union territories (2020) [closed]

Can anyone please share the new shapefile of India with all states and union territories in 2020?
2
votes
3answers
48 views

ModelBuilder adds numerous file extensions to outputs as it runs?

Using ArcMap 10.3 I am trying to create a model that will take all the shapefiles in a folder and convert them to KML files. I first create an inline variable for the shapefiles in the folder, then ...
1
vote
0answers
23 views

Trying to fuse 4 local authorities (polygons) as one [closed]

I am trying to extract 4 polygons (LA) from a country shapefile, combine them together as one. However, I ended up extracting those specific 4 polygons I was looking as a shapefile, but was unable to ...
0
votes
1answer
542 views

Edit a shapefile with Leaflet.pm

I am new to Leaflet but so far so good. I managed to add the plugins I needed and they work. Except the shapefile editing. I am using leaflet.pm to draw, snap, cut polygons (only polygons). I also ...
1
vote
1answer
25 views

GeoPandas gdf.geometry.buffer for spatial join

In that part of the code I'm creating geodataframes (only point features) out of two CSV files. I want to merge all points from the two dataframes within a range of 150m. Therefore I create a buffer ...
2
votes
1answer
104 views

Selecting nearby polygons in QGIS?

I am working with QGIS and I have two different polygons, one with municipalities and another with conservation units (from Brazil). I need find out which Conservation units falls within 50 km from ...
0
votes
0answers
19 views

QGIS 3.12: Importing shape (point) to PostGIS database as points without Z values

Currently I am importing vector layers (points) to a PostGIS database via QGIS 3.12. Everything works great expect for one part: after the import is complete all my points have a Z value (which is ...
1
vote
0answers
23 views

Shapefile calculation error: 'list' object cannot be coerced to type 'integer'

I'm trying to identify which of two regions within a shapefile specific spatial points lie. To this I used this code. This worked well but I ended with a lot of NAs because my 1/3 of my points are ...
1
vote
0answers
19 views

Identifying NYC neighborhoods using zip codes?

I have a dataset that contains zip codes. I want to figure out the name of the associated NYC neighborhood. For example, I have zip code 10021 and I want to know 10021 is located in Upper East Side. ...
1
vote
1answer
35 views

Is point on land (Natural Earth shapefile)

I am attempting to use the second option in Check if a point falls within a multipolygon with Python to check if a given point is on land or water. The shape file is from Natural Earth: https://www....
3
votes
2answers
95 views

Adding shapefiles to ArcGIS Pro that only contain xxxx characters

I have a vast number of shapefiles downloaded for Forest Management Unit data and I only want to add the ones that contain the characters "epso" to my map (without having to scroll through hundreds of ...
0
votes
1answer
48 views

Shapefile in leaflet shifted North 0.25°

I have the following problem: I render a bunch of weather maps as PNG overlays with grads and then reproject them from EPSG:4326 to EPSG:3857 to display them in leaflet as follows: gdal_translate -...
-1
votes
0answers
29 views

Empty shapefile output

My shapfile out put is blank. Does anyone see any reason for a blank output? import arcpy from arcpy import env from arcpy.sa import * import os import subprocess path = "R:\\Sentinel-1\\kevf\\" ...
10
votes
5answers
7k views

update one shapefile attribute table with values from another dbf table

I try to explain here what I am trying to do: I have one shapefile and one independent dbf table with the same fields. In the dbf table all the fields are populated but in the shapefile attribute ...
2
votes
2answers
2k views

OpenLayers: Copy shape layer in a vector layer

I have a web-gis application based on OpenLayers and GeoServer. I need to modify a shape layer. I'm able to show the shape using the OpenLayers.Layer.WMS method. In fact I published the shape in ...
-1
votes
0answers
19 views

Need shapefile for irrigation network of Pakistan

Need shapefile for irrigation network of Pakistan (main canal, branch, major minor distributary or water course level) for my research. Kindly anyone share. Or please share can we directly command ...
11
votes
8answers
15k views

Seeking Free Opensource Shapefile Writer for .NET

I am looking for a well documented, Open Source Library that can create and write to a shapefile from .NET. I need lower lever access i.e. I should be able to write feature by feature. I have ...
1
vote
2answers
311 views

Seeking library that reads/writes shapefiles to use with .net core 2.2?

Previously I used to use Easy Gis .net. Now we have a .netcore 2.2 project and I need to read/write Shapefiles. I have googled for 2 hours and I didn't find anything. I also tried to use dotspatial ...
2
votes
2answers
44 views

Measuring perimeter and area of QGIS polygons and middle point coordinates

I have >1000 shapefile polygons on a QGIS project that I need to find the perimeter and area of. They're located on a world map, and I can't seem to get the geometry outputs for the measurements in ...
6
votes
3answers
3k views

Finding all distinct values from single column of an attribute table with GDAL

I am working with GDAL and modify ESRI shapefiles with it. I am searching a possibility how to find all distince values from a single column of an attribute table with GDAL (Python). In SQL it would ...
1
vote
2answers
267 views

ArcGIS messing with feature geometry in Editing mode

I am currently working on project, where I need to digitise a geomorphological map. I am working in ArcMap 10.5.1. I have an issue with creating new features. When I am digitising an object from the ...
2
votes
2answers
43 views

Create prj-file for shapefile in QGIS 3?

When you load in QGIS a shapefile without a PRJ file, you can set the coordinate system, but no PRJ file is created. This older question: How to obtain .prj files in QGIS? has an answer saying menu ...
0
votes
0answers
16 views

Why are there duplicate geometries in U.S. census shapefiles?

I have been writing a Python program to analyze the contents of shapefiles from the 2010 U.S. census, and I came across some odd duplication that I cannot explain. For example, in the 2010 shapefile ...
-2
votes
0answers
23 views

Fanout of shapefile selections

I have a list of traffic lights in .shp with unique IDs . My task is to select crashes that occur 50m - before and after an installation date of these traffic lights. Also separate the selections into ...

1
2 3 4 5
88