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
1 vote
0 answers
36 views

Finding and removing overlaps in a shapefile using PostgreSQL

I was wondering if it's possible to remove any overlapping areas that occurs in a column based on a sample of the table for the shapefile with 2 important columns: Shape area Geom I'm trying to find ...
user avatar
  • 11
0 votes
0 answers
31 views

Holes closing near extent boarder

I have a shapefile that looks like this: the yellow polygone is a sqare of full extent size (not separate polygons) with class 0. Polygons of other colors have another classes (1, 2). If to look ...
1 vote
0 answers
46 views

Shapefile field precision change python

I have a shapefile where some columns from the attribute table of this shapefile have "Double" datatype with precision 15 (see below) How can I change it to have precision 2 using Python? ...
user avatar
1 vote
0 answers
37 views

Loading shapefile data into L.shapefile says nodebuffer is not supported by this platform

I am having a shapefile that is converted to a Base64 string. I am converting it to a file and then trying to convert to arrayBuffer using 'FileReader' to fit the data to match (L.shapefile) https://...
user avatar
0 votes
1 answer
22 views

'union' between spatial polygons and spatial points in R

I have a gridded map shapefile with grid identifier cells (gid). dput(head(grid)) structure(list(gid = c("183253", "183254", "183255", "183256", "183258&...
user avatar
  • 31
0 votes
2 answers
36 views

Seeking Italy building shapefile

I'm looking for a buildings layer shapefile for Italy but the one I can find for free here looks incomplete in comparison to when I do a sense check against Google Earth: https://mapcruzin.com/free-...
user avatar
  • 11
0 votes
1 answer
32 views

Split TIFF and shapefile into smaller parts [closed]

I have a large TIFF file (14 GB), and along with it, I have a shapefile, covering parts of the TIFF in different shapes I want to basically just split the TIFF into smaller squares, while also ...
user avatar
0 votes
1 answer
32 views

Opening shapefile in ArcGIS Desktop

I have the following files: file.cpg, file.dbf, file.prf, file.sbn, file.sbx, file.shp, file.shp.xml, file.shx How do I open this in ArcGIS Pro which is looking for a file with extension .aprx or ....
user avatar
1 vote
1 answer
26 views

Artificially extend a DEM to clip it

I have a DEM that is slightly too short for one of my shapefiles. I would like to extend the DEM to the North so it covers entirely the shapefile, and then clip the DEM to the extent of the shapefile. ...
user avatar
  • 107
0 votes
0 answers
9 views

Exporting information about overlapping layers using ArcGIS Pro [closed]

I am using ArcGIS Pro 2.9.3. I have a shapefile layer of points (+ a layer of ten mile buffers around those points), and then a bunch of shapefile layers of polygons underneath the points. Basically ...
user avatar
  • 1
1 vote
1 answer
26 views

Last record of a shapefile not visible on the map

I am trying to load a .shp in QGIS, specifically a line .shp. Weird thing is that when loading it shows all the lines (records) except the last record (the one with the highest ID record). I tried ...
user avatar
  • 11
0 votes
1 answer
49 views

Implement plot purchases on fictional map [closed]

I have a high res fictional map (PNG) of a ancient city. How can implement it as a game where people buy plots on it? I have an image with Dimensions - 2000 x 2000. I Managed to use Maptiler and ...
user avatar
3 votes
2 answers
146 views

Selecting points which touch "boundaries" of another polygon using QGIS

I have an quite complicated polygon shapefile and a lot buffers around points (second shapefile). These small polygons are within and outside of the big polygon. I need to select those polygons which ...
user avatar
1 vote
1 answer
36 views

Converting x/y in Pandas DataFrame to lat/long

I have written the following Python code to convert various input files into a shapefile using Pandas. The coordinates of the input file are x,y which is what my shapefile outputs to, but I would like ...
user avatar
0 votes
0 answers
20 views

How to create a mosaic from different shapefile in R?

I have 37 shapefiles with different names.Individually each of them represent a different part of a country. I would like to create a mosaic of my 37 shp to just have one a the end. To make things ...
user avatar
1 vote
1 answer
38 views

CRS is empty but GeoDataFrame plotted correctly when reading shapefile with GeoPandas

I have a shapefile that I created in QGIS using the projection NAD_1983_2011_StatePlane_Virginia_North_FIPS_4501_Ft_US. When I load the shapefile into Python as a GeoDataFrame, it appears that the gdf ...
user avatar
0 votes
1 answer
38 views

GeoPandas input file to shapefile with coordinate system information

I have written some Python code to convert different input files to a shapefile using geopandas. import pandas as pd import os import geopandas as gpd from shapely.geometry import Point #convert to 3D ...
user avatar
1 vote
1 answer
26 views

Delete a shapefile feature without mixing up the feature IDs?

If I open a (shapefile) feature source and delete a feature, something happens with the IDs (some mixup). If I close and open the shapefile again it is still mixed up. But when I close the shapefile ...
user avatar
  • 63
1 vote
1 answer
21 views

QGIS Aggregate 1x1km grid into 10x10km for Brazilian Land-Use Data

I'm working with an externally-provided dataset, which is a 1x1km grid of the Brazilian Amazon. Each grid cell contains information on the percentage covered by various land-covers e.g. 30% Pasture, ...
user avatar
  • 19
3 votes
1 answer
63 views

Getting all shapefile layers in project using PyQGIS

I'm writing a plugin that needs to check a few things for every shapefile layer in the current project. I am iterating over the layers as shown below, but cant figure out how to check if it is a ...
user avatar
2 votes
2 answers
58 views

Merging multiple point layers with common fields to create single table in QGIS

I have seven point shapefiles at the same geographic location with three common fields ("ID", "name2", "name3") and a fourth field, ("uni_value") that is unique ...
user avatar
  • 129
2 votes
0 answers
26 views

How to clip GeoTiff according to shapefile using javascript?

Situation: I am plotting data provided in a GeoTIFF file on a map using Reactjs and geoTiff.js. An example of the GeoTiff files I am using is at the following link: https://drive.google.com/file/d/...
user avatar
2 votes
0 answers
18 views

QGIS find connected lines and store them as Attribute

I have the following issue and as I'm quite a QGIS beginner I don't know how to solve it. I have several Shape files that contain multisection lines. The all have an attribute called "ID". ...
user avatar
  • 21
1 vote
0 answers
26 views

joinbylocationsummary with loop on the same input layer using PyQGIS

I have adapted a script to use "qgis:joinbylocationsummary" in a loop. I would like to adapt it so the loop adds all the .shp of the directory 'layers_I_want_to_add' to join their maximum to ...
user avatar
2 votes
0 answers
42 views

Saving shapefile as one file retaining symbology

I have used Python inside QGIS 3.24 to create many contour maps from data. The contour maps are in the format shp, and I saved the graduated symbology as a qml file with the same name as the shapefile ...
user avatar
0 votes
1 answer
18 views

R lm.LMtests error in lag.listw(listw, y, zero.policy) : y not numeric

I am working on running an OLS on a shapefile and running tests on the residuals of that OLS where I am getting an error. library(maptools) library(sp) library(spdep) library(lmtest) library(...
user avatar
0 votes
0 answers
17 views

Java OpenMap shapefile writing problem

I am having an issue with using OpenMap in a Java application to output shapefiles. My data is in "Albers Conical Equal Area". When I write a shapefile consisting of a line between two ...
user avatar
  • 1
0 votes
0 answers
20 views

QGIS Calculate Percentage Area of Grid Cell

I'm trying to use QGIS to calculate the area of each grid cell that has been deforested. To do so, I have tried the following: Create Grid to create a 30km x 30km square grid Add Deforestation Layer (...
user avatar
  • 19
0 votes
1 answer
29 views

R Distance from Point to Line: Negative if within shape

I'm working with Brazilian deforestation data - specifically two sf objects: A point shapefile on environmental fines (centroid of land plots that have been fined for deforestation). A polygon of (...
user avatar
  • 19
-1 votes
2 answers
37 views

Read shapefile into pysal [closed]

I've found the following Python module to work out the Mean Nearest Neighbor Distance Statistics of points https://pysal.org/notebooks/explore/pointpats/distance_statistics.html I've successfully ...
user avatar
3 votes
2 answers
114 views

Looking for Python equivalent of QGIS "Nearest Neighbour analysis" tool

I've been using QGIS "Nearest Neighbour analysis" tool to find out the following information about my point shapefile Observed mean distance Expected mean distance Nearest neighbour index ...
user avatar
0 votes
0 answers
15 views

Determine best cell size for vector dataset based on provided info from ogrinfo

I have been using ogrinfo to obtain information regarding my Bathymetry dataset shapefile with the results as follows: Layer name: TEST Metadata: DBF_DATE_LAST_UPDATE=2022-03-30 Geometry: 3D Point ...
user avatar
2 votes
1 answer
50 views

Importing text file with coordinates with "N12.345" and "E6.789" as shapefile in QGIS

In our project we have an app that provides data of coordinates with "N" and "E" for Lat and Lon correspondingly. We get the data as Excel and want to open it as shape in QGIS. We ...
user avatar
1 vote
1 answer
32 views

Census Block Group shapefile and demographic data confusion

I have census demographic data at the census block group level. The key in the data that I'm using looks like this: 010010205.001 Which translates as: 01 - State ---> Alabama 001 - County ---> ...
user avatar
4 votes
1 answer
103 views

Anonymize site locations

I'm putting together some training materials for a workshop on R for spatial data analysis in archaeology, and need to anonymize the true site locations (confidential information) while keeping the ...
user avatar
  • 143
1 vote
0 answers
15 views

Polygon clipping with percentage tile membership

Let me setup the problem: I have a tiled world map (0.1° x 0.1°) with values assigned to each tile. I want to assign the values to each country, and I'm doing so by clipping to their ZEE mask. But ...
user avatar
3 votes
2 answers
90 views

Creating CSV with lat/long from point shapefile using Python [duplicate]

Does anyone know how to create a CSV containing lat and long fields from a point shapefile in Python? I can only find info on how to make a shapefile from CSV with lat/long and not the other way ...
user avatar
0 votes
0 answers
33 views

Using ogrinfo in Python to find specified information [duplicate]

I am using ogrinfo in Python to find out information about a shapefile from subprocess import Popen, PIPE args = ['ogrinfo', '-so', '-al', 'C:/test/test_shapefile.shp'] process = Popen(args, stdout=...
user avatar
1 vote
1 answer
43 views

ogrinfo - specify what information you want returned

I am using ogrinfo to find out information about a shapefile ogrinfo -so -al 'C:/test/test_shapefile.shp' This obviously gives me a large summary, but I'm wondering is there any way to specify that I ...
user avatar
1 vote
1 answer
39 views

Save certain ogrinfo results to variable in Python [closed]

I am using ogrinfo in Python to obtain information about a shapefile. My code is as follows: from subprocess import Popen, PIPE args = ['ogrinfo', '-ro', '-so', '-al', 'C:/test/test_shapefile.shp'] ...
user avatar
0 votes
0 answers
20 views

Extracting points by values in DIVA-GIS

I am currently working on a project which looks at the nesting density of a migratory seabird found to nest in colonies on beaches. I am aiming to see whether the nesting density of the birds has an ...
user avatar
  • 1
1 vote
2 answers
74 views

Converting XYZ file to shapefile using Python

I have numerous XYZ files, which aren't gridded and I'd like to use Python to convert them to shapefiles. I'm not quite sure how to go about this?
user avatar
1 vote
0 answers
29 views

Different number of records in gpkg vs. shapefile after join

I'm using pyqgis 3.10.1.and trying do Spatial join with one-to-many option for points and multipolygon. After processing result shows me too low number of records. I save results to geopackage but ...
user avatar
0 votes
3 answers
51 views

Deleting feature from Costa Rica shapefile using ArcMap

I would like to remove an island from the Costa Rica shapefile. This island is highlighted in the attached picture. There is not enough information in the attribute table for this island and that part ...
user avatar
1 vote
0 answers
11 views

ArcMap View panel flashes constantly - rendering ArcMap unusable

While using ArcMap it will start to flash constantly in the layout view panel. As well, if I zoom into the layout, it will work for a split second and then return to the original view scale on its ...
user avatar
  • 11
1 vote
2 answers
77 views

Merging Linestrings to bigger Linestrings

I have a shapefile with the Linestring elements which looks like this: Here you see a lot of small lines (about 582 in total). Is there a way to extract pure end-to-end lines? For now, I tried to ...
user avatar
2 votes
1 answer
78 views

How to extend a line to Intersect another line

I've received shapefiles for import into a pipeline modeling program. One of the issues I have is that after the shapefiles are imported, close examination shows that pipelines that should have ...
user avatar
0 votes
0 answers
43 views

Displaying a CSV layer and a .shp layer in the same project

I'm a newbie to GIS and particularly to QGIS. I am using QGIS 3.22.5 on MacOS 12.3.1 Monterey. I want my project to display two layers. One layer is sourced from a CSV delimited text file. The other ...
user avatar
1 vote
1 answer
57 views

Clipping shapefile with MultiPolygon shapefile in GeoPandas

I have a shapefile (will be called source-file hereafter), which I need to clip by a MultiPolygon shapefile so that I can have a clipped shapefile for each polygon. I tried the GeoPandas, though I am ...
user avatar
0 votes
2 answers
76 views

sf::st_read() and terra::vect() reading in different extents from the same shapefile

I am currently working with multiple shapefiles in R and working towards rasterizing them using a combination of functions from sf,terra and stars. However, I noticed while reading in a shapefile that ...
user avatar
  • 1,282

1
2 3 4 5
104