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.
4,747
questions
0
votes
1answer
38 views
Landscape change metrics for vector data
I am new to GIS.
I am currently working on a problem which involves two vector datasets about habitat and land use ("now" and "future"). I need to generate metrics like "...
6
votes
3answers
318 views
Plotting polygons as separate plots using Python
I have a shapefile with several polygons in a geodataframe. I want to plot each individual polygon in their own plot.
I tried
for pol in z3:
plt.figure()
plt.plot(pol)
plt.show()
But this just ...
0
votes
0answers
14 views
How can VIIRS-Data be obtained / processed
I am looking for a way to obtain data about avg light-pollution for specific places.
It seemed NASAs https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/products/VNP46A1/ might be a good ...
3
votes
1answer
70 views
Iterating over shapefile to mask and extract raster data in Python
I have a shapefile that is a grid with multiple polygons that have a specific id in them ranging from 1 to 50. Each polygon overlays an agriculture research plot that I would like to calculate ...
2
votes
1answer
74 views
Problem exporting shp as CSV
I imported a shapefile into QGIS, made a copy of it, and edited that copy. My edits consisted in changes in the coordinates of a few points. I then exported this edited shapefile as a .csv. For peace ...
4
votes
1answer
38 views
Creating polygons with “Create shapefile layer” always produce multipolygons instead of polygons when saving in QGIS
Not sure if is a bug or I'm missing something.
Every time i'm creating a new shapefile with "Create shapefile layer" i got a multipolygon instead of a polygon (at least is what I'm expecting)...
6
votes
2answers
69 views
Saving two shapefiles into one GeoJSON
I have 2 shapefiles in QGIS (one point layer and one Line layer as shown in Figure). I am trying to save these two layers in one GeoJSON. I have seen some of the previous answers such as answer [1] , ...
3
votes
1answer
80 views
Data conversion between Shapefile and Geopackage: does it affect accuracy of data?
I use Shapefile as interchange format and Geopackage as the format to to processing. So I convert file format at least twice between Shapefile and Geopackage.
Does/can this somehow affect the data ...
0
votes
0answers
22 views
Open Data Cube: Aggregation of pixels' value based on shapefile and mask raster
I have several Sentinel-2 products connected to ODC. My purpose is to use a shapefile with parcels in order to extract the average value of each parcel (creation of object based dataset). In addition, ...
0
votes
0answers
26 views
QGIS: Plug-in to determine optimal distance between coordinate and shape file [duplicate]
I have coordinates of power plants and I would like to determine their optimal distance (shortest distance) to electric grid lines (shape file).
How could this be done in QGIS?
-1
votes
1answer
39 views
QGIS: Interactive cursor to know latitude and longitude in boundary layer (shapefile)
Is there a way of knowing the coordinates in a specific point of a shapefile (boundary layer/map of the country) in QGIS?
Similar to what is done on Google Earth. As the cursor moves, the coordinates ...
2
votes
1answer
49 views
OGR2OGR import to SQL from geometry to geography
I'm trying to import a shapefile to SQL Server 2019. This command works:
ogr2ogr -f "MSSQLSpatial" "MSSQL:server=[myserver];database=test;tables=CAPZONE;UID=[myuser];PWD=[mypassword];...
0
votes
0answers
59 views
Calculating the area of each county that has a specific land cover value (R or QGIS)
I need to calculate the area of each U.S. county that is covered by a specific type of land cover.
I am using a county shapefile (polygons) and the land cover data is a raster that comes from the NLCD ...
0
votes
0answers
29 views
Convert a SQL Server table to a shapefile with projection info
I've been using ogr2ogr to write out shapefiles from my SQL Server spatial map layers. When I run the command it delivers the .shp, .shx, and the .dbf but no prj file. Is there a way to get ogr2ogr ...
0
votes
1answer
33 views
5
votes
2answers
103 views
From uploaded zipped shapefile to Geopandas DataFrame in Django Application
I'm trying to get to a point where I can quickly filter thousands of points in a shapefile. My Django application asks for a zipped shapefile to upload, where the zipped file contains at least the ....
5
votes
1answer
72 views
Finding the closest point to a polygon in a shapefile using GeoPandas
I have the following map of statistical regions of Belgium:
The blue dots correspond to coordinates for which I have temperature data. Surrounded by the red circle is Brussels. As it can be seen, ...
0
votes
1answer
65 views
Adding a shapefile in QGIS
Recently I am working on a project which is based on making map for state-wise health care indicators. And I am getting the data (shapefile) from here: link
I just downloaded the shapefile which are ...
1
vote
3answers
88 views
Calculating proportion of area that is land within bounding box using Python [duplicate]
I am trying to find the proportion of land in an area specified within a bounding box (in python). The bounding box is given by min/max latitude & longitude coordinates.
The initial solution I ...
1
vote
0answers
36 views
How to get differentiate between stacked parcel shapefile and general parcel shapefile? [closed]
I am totally new to this domain. I would like to detect stacked parcel shapefile and mapped respective data or outlines created to all stacked parcels. In a general case where only one parcel on land ...
0
votes
0answers
26 views
Road data missing in shapefile downloaded from OpenStreetMap
I am trying to prepare a base map of road network of Cooch Behar District of West Bengal, India. I have been trying to download the OpenStreetMap (OSM) for the district but found that many roads are ...
6
votes
2answers
92 views
How to lock a shapefile in QGIS so only I can edit
I am doing a project using shapefiles in QGIS. These will be sent to somebody who will view in QGIS and I want to put a lock on the data so that it can be viewed but not edited by somebody else ...
3
votes
1answer
54 views
Using shutil.copyfile() to copy shapefiles from one folder to another using a text list [closed]
I am trying to copy shapefiles from one folder to another using a list of shapefile names saved in a txt file (shapefile name: BH_0231). I have the script below that works for copying one file type, ...
3
votes
0answers
28 views
Inconsistently getting “Input shapes do not overlap raster”, CRS appear to match
Masking topographic raster data by a shapefile (bedrock geology polygon).
Following this guide I do this:
with fiona.open("geology.shp", "r") as shapefile:
geology_mask = [...
2
votes
1answer
39 views
Converting shapefile to WKT file
I have one country layer in a shapefile consisting of a lot of attributes, but the result needs to be in WKT file/format. I'm using QGIS 3.12 . I'd tried GetWKT Plugin but it limited to one selected ...
2
votes
1answer
39 views
Merging multiple shapefiles and finding which shapefile gives the minimum value for each attribute in QGIS?
I have several different shapefiles that I want to combine into one based on the minimum value of each attribute. I found this solution. However, I also want to know which shapefile each minimum value ...
0
votes
1answer
40 views
Shape or point pattern [closed]
Is it possible to draw one shapeline or one point and repeat it in a specific direction with a specific distance for a specific amount? Like the pattern function in AutoCAD? I'm working with QGIS.
An ...
1
vote
1answer
77 views
Getting a count of points in a multipolygon?
I have a set of lottery retail locations, latitude and longitude, that I transformed to points and added the geometry column like this:
ALTER TABLE lottery.retailers ADD COLUMN geom geometry(Point, ...
0
votes
1answer
47 views
Django: how to set all of the model's fields using LayerMapping?
I have a GeoDjango model like below (in "data" app):
from django.contrib.gis.db import models
class FirstModel(models.Model):
data_id = models.IntegerField(blank=True, null=True)
...
1
vote
1answer
52 views
How to save/import .shp file data to a PostGIS table in Java
Ok, I've searched and at a loss as to why I cannot find anything on how to save a shapefile to PostGIS with Java. Thought GeoTools might be helpful, but doesn't seem to be there either.
So here's the ...
1
vote
0answers
23 views
GEE large export of pixels using shapefile polygons: Is it possible to automate a division of the polygons asset?
I need to export pixels from a processed image of Sentinel-2 using GEE Javascript with a 10 pixel size. The export is for pixels within 120,000 land parcel polygons.
I am way above the limit for pixel ...
0
votes
2answers
37 views
PostGIS import shapefile Error
I am using PostGIS GUI to import shapefile. The connection is good. While I successfully imported the Alabama table. I got the following error when I tried to import the other two shapefiles. I ...
1
vote
1answer
21 views
Working with .geo of GEE in R
I am doing something similar to a previous post on stack exchange regarding exporting data from GEE to csv. Once I have the .geo column, how do I work with it in R? I would like to create a shapefile ...
1
vote
0answers
21 views
Can we include any URL path for the Shapefile while creating a feature store in Deegree GIS?
I have used the Documentation and the examples of Deegree GIS application and I am able to give the path for my Shapefile in my local system, while creating a feature store just like below.
<...
1
vote
1answer
26 views
Merging attributes into shapefile (US County-level data) using R
I'd like to make a plot of the US, with each county colored according to a scalar value (the average summer temperature).
I'm using R.
I have a shapefile with all the counties:
> shape = st_read(...
2
votes
2answers
55 views
Finding the average of a raster across a given region, in R, for many points in time
I have a time-series of rasters (daily maps of global temperature for the past year), and a shape-file outlining state boundaries.
I'd like to find the average temperature in each state on each day of ...
1
vote
1answer
39 views
I cannot manage to export coordinates to a shapefile using Python
This is the test code I have written:
import shapefile
w = shapefile.Writer(shapefile.POLYGON)
w.poly(parts=[[[1,5],[5,5],[5,1],[3,3],[1,1]]])
w.field('FIRST_FLD','C','40')
w.field('SECOND_FLD','C','...
0
votes
1answer
31 views
Rasterizing shapefile with attribute value as pixel value labels with GDAL in Python
I am new to GDAL and geom shapefiles.
I have a 3-band .img file (with other associated files) as raster images.
And also a shapefile which includes 10000+ features (multi-polygons), the properties of ...
1
vote
1answer
47 views
Shapefile points, individual editing
I am very new to QGIS and have run into a problem dealing with shapefiles.
Recently, I went into the field with an app for smartphones called 'SW Maps' that I used to create some basic layers for ...
1
vote
1answer
35 views
Calculate ratio of a vector field within a raster grid cell
I have a large dataset (shapefile) in which one variable is binary. I want to be able to find the fraction of 1 for all the points, but within a given raster grid cell, see below.
Yes, as you can see ...
1
vote
1answer
76 views
Making a for loop/function testing geometries' intersections for multiple time-units in R
I have two multipolygons and I want to test intersections between their geometries based for different cycles of years.
Basically I have a flood dataset that contains flood events and their geometry ...
1
vote
1answer
60 views
How to execute GDALRasterize() function wtih options?
I am using GDAL 2.1.0, in both Windows and Linux environments.
I want to programmatically rasterize a shape file in my C++ app. Thanks for any clues you can provide.
gdal_rasterize
I can successfully ...
0
votes
0answers
26 views
importing shapefiles into AutoCAD map
I need to import a complex polygon shape file into AutoCAD (AutoCAD map 3D 2015).
I can import using Mapimport command, I can use the shp attributes to split into different drawing layers etc.
What I ...
1
vote
1answer
55 views
Extracting shapes from GeoTIFF using rasterio returns excessive number of polygons
I am using the shapes interface of rasterio to extract polygons from a GeoTIFF image. rasterio returns an excessive number of polygons which is not expected. It is taking a long time to extract a ...
-1
votes
1answer
17 views
Should a GDAL vector dataset have a geotransform?
For example: Does a shapefile have a geotransform?
The answer is probably: No, a vector dataset does not have a geotransform, because the purpose of a geotransform is to transform between projection ...
1
vote
1answer
42 views
Merging attributes by location in PostGIS
I am a newbie on PostGIS and I want to transfer an attribute or even a symbology from a layer to another. For example, I have a file with points that each country has a point at the center, I want to ...
0
votes
0answers
24 views
Naming and Extracting shapefiles using value from attribute table using ArcGIS Pro ModelBuilder
I am working with ModelBuilder in ArcGIS Pro to create a process that will select a distinct shapefile from a feature class and create a new layer. This new layer will then be used to clip and extract ...
3
votes
0answers
53 views
Plotting the albedo using Python
import glob
import numpy as np
import pandas
import os
import rasterio
import geopandas as gpd
import matplotlib.pyplot as plt
def get_image_stats_only(img_array):
raw_stats_dictionary = {'mean':...
1
vote
0answers
49 views
Measuring distance from centroid to polygon's boundaries in R
I'm still new to raster and sf and I'm having some trouble getting a distance between a point and a polygon for every time period.
I have a sf object with MULTIPOLYGONS that refers to flood episodes ...
0
votes
2answers
76 views
Problem with spatial join of large shapefiles
I want to combine the attributes of five shapefiles into one shapefile using QGIS. Therefore, I used several data processing steps including clipping the five shapefiles to the boundaries of my ...