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
8 views

Spatial regression: general nesting spatial model using splm package in R

I have a shapefile of panel data (multiple years of observations for each polygon). I am estimating fixed effects spatial regression models with this data. I used one year of this data to generate a ...
3
votes
0answers
17 views

Simulation in grid/array over map in Python

I'm new to GIS... I'm a physicist and I have a simulation which I usually run in numpy arrays (usually ending up with a heatmap or contour plot like below). However, I now want to run the simulation ...
-2
votes
0answers
24 views

How to convert a .tif to .shp? And what ist “gdal_polygonize.py” [closed]

I’m really new to RStudio and programming in general and am honestly stuck. The project: I was given a few lines of code from my Prof and now I am trying to write a program that can detect Yurts in ...
4
votes
1answer
42 views

XML bounding boxes to shapefile QGIS

I used labelImg to create some bounding boxes around items of interest on a TIF image. I am wondering if I can convert those XML bounding boxes into shapefiles? I've looked at a few other posts for ...
1
vote
1answer
20 views

Create square grid on raster file

I have tried to create a fishnet(10 by 10) using the below code. But the output is as shown below. What is that I'm missing in the below code? import geopandas as gpd from shapely.geometry import ...
1
vote
1answer
33 views

Shapefile partly hidden in QGIS but fully visible in Geosecma

I'm working in QGIS Hannover and have added some vector shapefiles to my project. Some of the data in the files won't show up in the viewport, leaving "holes" in the map. The same file ...
0
votes
1answer
28 views

ogr2ogr SHP to MSSQL import leaves geometry column empty

I am trying to import a Shapefile with polygon features into MSSQL database with this command: ogr2ogr -f "MSSQLSpatial" "MSSQL:server=***;uid=***;pwd=***;database=***" "D:\...
-1
votes
1answer
23 views

Using ArcPy to change point locations with values from a CSV file [closed]

I have a point layer in SHP (esri Shapefile) that shows trees in the area under study. Each tree in a point layer is assigned an area name (column "ID") and X and Y coordinates. I have a lot ...
0
votes
1answer
15 views

Render the point shapefile and raster layer together as single image

I have a point layer as one shapefile and MrSid file as raster layer. How to overlap these two layers and clip the merged layer and render it as an output image file?
2
votes
1answer
39 views

Shapefile string data max length and character [duplicate]

Does anyone know why in ESRI help website (1, 2), it states that the field length if not specified will default to 255. However when I manually create a shapefile the max character is only 254. Why is ...
0
votes
1answer
29 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 "...
5
votes
3answers
284 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
10 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 ...
0
votes
0answers
31 views

What causes error when trying to read in shapefile? [closed]

Code: pts <-data.frame(x = d$Longitude, y = d$Latitude)# Create a dataframe using the longitude and latitude from# the plots shapefile coordinates(pts) =~x+y proj4string(pts) = CRS("+init=...
3
votes
1answer
55 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
73 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
36 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
60 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] , ...
-1
votes
0answers
15 views

Creating new layers of points according to a multipolygon layer in R

I have a shapefile of points and another one of polygons. I'm trying to create new separate layers of points based on the division of polygons. i.e a new shapefile that contains all the points that ...
3
votes
1answer
67 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
12 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
25 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
36 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
35 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
57 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
21 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
30 views

Using CSV data in ArcGIS Pro

How do I transform CSV data into Shapefile in ArcGIS Pro ?
5
votes
2answers
49 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
53 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
46 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
47 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
32 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
22 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
85 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
46 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
27 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
34 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
34 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
72 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
42 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
41 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
22 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
36 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
20 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
22 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
40 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
36 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
26 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
2 3 4 5
95