Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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.

599 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
40 views

Merge hole between shapes into any neighbouring shape to remove it?

I have a shapefile that I made by from 2 distinct shapefiles (I am using QGIS). The issue is that they don't overlap precisely so I have holes like the following: I tried the vertex editing tool but ...
2
votes
0answers
26 views

Creating Swath View from Point data using Python?

My situation Input: point data from planting file Feature Attribute: [('DeletionFlag', 'C', 1, 0), ['Field', 'C', 254, 0], ['Dataset', 'C', 254, 0], ['Product', 'C', 254, 0], ['Obj__Id', 'N', 15,...
2
votes
0answers
51 views

What happens if you set QGIS as the default program to open a *.SHP file?

In the screenshots of shapefiles in this question, Accessing downloaded shapefiles/attribute data?, you can see that the .shp files have the QGIS logo as its icon. I think this means that on that ...
2
votes
0answers
39 views

Pull information from one shapefile and add it to the attribute table of another?

I'm trying to create a shapefile for one particular area in Germany. I have various shapefiles which store all the information that I need. One of them is a 100m_Gitter_raster (a raster consisting of ...
2
votes
0answers
24 views

QGIS – Edits to shapefile attribute table won't save special characters

I'm working in QGIS with a Government of Canada shapefile of all 338 federal electoral districts. The encoding is UTF-8. In the attribute table, all of the em dashes ("—") that should appear in the ...
2
votes
0answers
76 views

Updating set of attributes on vector layer from .csv table?

I have over 1,000 records in a .shp file, all with a unique ID field (LINKID), along with many other fields containing data (TXTFLD1, TXTFLD2, INTFLD1, INTFLD2, etc). These records have been copied ...
2
votes
0answers
68 views

Shapefile lines disappear, but data remains

I'm working in QGIS 3.4 on a line type shapefile layer with +/-5000 records. I made an edit to the start/end nodes of a couple of lines to move them to a point node from another layer; then when I ...
2
votes
0answers
53 views

PostgreSQL/PostGIS: Adding attributes to a table that I can use to query with

Currently I have a PostGIS database that is taking in shapefiles. However, these shapefiles are converted into tables when they are imported into the database. Each shapefile deals with a farm name, ...
2
votes
0answers
59 views

Using field calculator on shapefile converted from DWG in ArcGIS Desktop?

I am using ArcGIS Desktop 10.3. A third party convert complex autocad drawing (dwg) to shapefile for us. I got from them a zip folder with 1 to 16 Shapefile (depending of the original dwg data), all ...
2
votes
0answers
180 views

How to speed up 'intersection' tool for big amount of data?

I can't figure out how to work with a large dataset. The problem is: I want to know how many points (over 700 000 adresses) are within a polygon layer (it's made out of 5 layers, train noise)(they are ...
2
votes
0answers
39 views

Selecting weights while transferring from shapefile to network

I have a shapefile representing roads (LineStrings) and I need to transfer it to a networkx type (with the lengths as weights) so I can do some network analysis. I have used the s2g library to do so ...
2
votes
0answers
65 views

Dragging one shapefile into QGIS creates three layers?

I am using QGIS 3.0.1. Everytime I drag in a shapefile (actually, *.shp, .shx and .dbf) I get three layers, that seem to differ just in symbology color. This happens with both shapefiles I get from ...
2
votes
0answers
63 views

Exporting shapefiles with symbology using ArcGIS Pro for use in ArcGIS Runtime

I have a set of shapefiles with elevation values in its attribute. In ArcGIS Pro, I have placed these shapefiles into a Scene as a 3D layer. Then I have added extrusion, and the shapefiles are ...
2
votes
0answers
109 views

ogr SetPrecision doesn't work

I'm creating a shapefile with a field type of real, but I want to lower the standard precision from 15 decimal places to 10, here is my code: dst_filename = "Polygonized.shp" drv = ogr....
2
votes
0answers
77 views

Add layer info to points, keeps failing in QGIS

Within QGIS, I am looking to get an extra column in the points file, describing in which layer the point lies. All points are within 1 layer: Layer source >SHP file from shapefile.zip. Validate layer ...
2
votes
0answers
511 views

remove/fill gaps inside polygon qgis

I have created a polygon from grass gis and found small triangle like structure inside the polygon (sometimes at the edge to outside), that I want to remove/fill. I tried with geometry check to fix ...
2
votes
0answers
270 views

Shapefiles to Adjust Hawaii and Alaska

Does anyone know if there is a shapefile available which moves Alaska and Hawaii closer to the continental USA? I have attached a photo which might help.
2
votes
1answer
172 views

Unicode problems while writing selected features to a new shapefile with Fiona

I have a shapefile with a large number of geographic features (marine protected areas). I'm trying to read through all of the areas in the shapefile, select those that fit a certain criterion, and ...
2
votes
0answers
180 views

Creating a Graph from a lines AND a points shapefile in networkx using read_shp

I am trying to use networkx for analysing networks which I represented in QGIS as a line shapefile and a point shapefile. If I import only the lines shapefile using networkx.read_shp('lines.shp') I ...
2
votes
0answers
117 views

Way to refresh shapefile in Spotfire

I am a beginner in working with geospatial data. What I have done so far: 1) I created a map chart visualization in spotfire. 2) I created a shapefile using QGIS. 3) I added the shapefile in the ...
2
votes
0answers
264 views

EPSG code lost when writing shapefile with sf

I've found that the EPSG can be recorded in the .prj file of a shapefile using the "AUTHORITY["EPSG","xxxx"] syntax. However, writing a shapefile with sf::st_write() doesn't seem to add that entry, ...
2
votes
0answers
313 views

“DBF file can not be opened” error using shp2pgsql

I am trying to import a shapefile using shp2pgsql. I wrote this command: shp2pgsql -I -s 2154 -W "LATIN1" W:\IGN\BDPARCELLAIRE-RGF93-LB93-MAJ2013-V4\BDPV_1-2_SHP_LAMB93_D01\COMMUNE.shp CADASTRE....
2
votes
0answers
250 views

Rasterio is masking wrong area?

Okay, my goal is to mask a geotiff by means of a shapefile. Firstly, I made sure that the shapefile and geotiff had same projections: from osgeo import ogr, osr import gdal import os driver = ogr....
2
votes
0answers
56 views

V.net.connect result causing “not responding” error

I have a point shapefile layer (744 points) that I want to connect to a line shapefile layer (42 lines) using v.net.connect from GRASS 7. The process gives me the desired output, even if in wrong CRS (...
2
votes
0answers
872 views

Creating fishnet using Python?

I am trying to create a fishnet of x by x miles for all USA, same as this basically: http://www.giscourse.com/creating-a-fishnet-grid-using-arcgis-10/ However, I want to do this with python. My ...
2
votes
0answers
2k views

Create custom color map for multiple GeoPandas plots to share same scale

My objective is to create a 2x2 figure where each cell in each grid is on the same color scale. Currently, I haven't found a compound plot option in GeoPandas that allows me to plot one GeoDataFrame ...
2
votes
0answers
53 views

Invalid Variant Type Issue - Saving from ArcGIS FeatureServer Layer to Shapefile in QGIS

I'm using QGIS 2.18.10, and I have an ArcGIS server feature layer pulled up that I would like to save locally to my hard drive for editing purposes. The remote layer with which I am working is the ...
2
votes
0answers
113 views

Shape index, compactness and assymetry index with PostgreSQL /PostGIS

I am working on automated land parcel identification and would like to extract road/river/thin and linear-like polygons from a massive dataset. For now, the only index I can get some answers from is ...
2
votes
0answers
1k views

Draw shapefile over PNG image in R

I have a satellite image as a PNG with known coordinates (bottom, left, top, right). I want to draw a shapefile on it (the limits of a county) in R. My first thought was to convert the PNG (it's read ...
2
votes
0answers
98 views

Summing data within a specified radius

I have created a map to display 2011 census data using .shp files of output areas in England and Wales and joined this to a csv file which has the census data for each output area. I then display he ...
2
votes
0answers
144 views

counting raster pixels inside or on the boundary of a postgis ingested shapefile

I'd like to count the number of raster pixels that either intersect a boundary or are contained inside the boundary and think ST_Intersects might be a good tool for this. When using ST_Intersects on ...
2
votes
0answers
113 views

Protect spatial data with digital signature

I've been asked to provide a solution to protect spatial data (format .shp) with digital signature that are bundled together into a single file, much like signed PDF for example. I've been googling ...
2
votes
0answers
119 views

GeoJSON files using too much memory?

I have about/more than 400 GeoJSON layer files in my QGIS project. When I checked the task manager memory, it displays qgis.bin.exe *32 using about 1,334,000 of CPU memory. I had another version ...
2
votes
0answers
74 views

Publishing shapefile in Geoserver

I started to use GeoServer, I uploaded shapefile and I want to publish it but I don't want to show all of the "Feature Type Details". For example, I want to publish only geometry. I know it's possible ...
2
votes
0answers
140 views

How to extract information from a tiff through the use of a shapefile?

I am having trouble in using the data from the South America amazon from a shapefile. What I was asked to do was to take the data from the loss of forest in a format where it is possible to make sense ...
2
votes
0answers
79 views

Overlaying thousands of points of a route from shapefile and dbf on google maps

I have to overlay thousands of points(data taken every second) of a route from shapefile and related data for each points in dbf. I have to show point related data in a popup on click of a point. I ...
2
votes
1answer
89 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 ...
2
votes
0answers
113 views

Create multipolygons grouped by field, ogr2ogr

There is a large polygon data set which I would like to aggregate some of the polygons with the same values in a specific field to multipolygons. I would like to do this using ogr2ogr. I have the ...
2
votes
0answers
379 views

Getting latitude and longitude of vertices/corner points of polygon/building from online maps such as OpenStreetMap?

I have tried using JOSM(Java OpenStreetMap) and QGIS for directly getting latitude and longitude of vertices/corner points of polygon/building but I am unable to get. Is there any way to get?
2
votes
0answers
1k views

Export SQL Server to Shapefile with OGR, difference between 2014 and 2012

I'm trying to export some data from a SQL Server table to a shapefile. I have tested this on a 2014 SQL Sever and it works but when I try and run it on a 2012 SQL Server it creates a blank output. ...
2
votes
0answers
497 views

How do I create this map polygon outline in QGIS

I'm quite new to QGIS and want to create a map using this technique The map of GB is made up of lines on one layer. Each of the yellow polygons must touch or overlap each other and have the outline ...
2
votes
0answers
2k views

Representing a Shapefile with OpenLayers3

I'm trying to represent a shapefile over an ICC raster map using OpenLayers3. I'm quite new to OpenLayers3 and GIS, so I'm still trying to figure out how it works. So far I've deduced I need to ...
2
votes
0answers
2k views

Clip shapefile with shapefile

There are two shapefiles. One is a compilation of municipalities on the coast with borders extending into ocean. The second shapefile is a coastal border. I'm trying to clip the municipality ...
2
votes
0answers
495 views

Shapefile “structure” of multipolygon

I am trying to generate a shapefile with Joel Lawheads pyshape-library. This works fine so far, but I have one important question: Is there any mandatory or recommended order of the rings of a ...
2
votes
0answers
83 views

Shapefiles with phantom (deleted) features become corrupted when edited with LTR version (2.14.5)

We seem to have come across an issue whereby a Shapefile that has been created/edited with previous versions of QGIS and has phantom (deleted) features, as discussed/resolved in Bug Report 11007, now ...
2
votes
0answers
69 views

Add new points into a shapefile iteratively with PyQGIS

I would like to create a filtered layer with the same attributes than an other layer, based on a condition. Moreover, I would like to fill in the shapefile iteratively when my condition is verified. ...
2
votes
0answers
533 views

How to extract the study area from a netCDF by a shapefile boundary with Python?

I have a global size netCDF document, the variable is three dimensions, including time. lat and lon. I have a shapefile boundary for my study area, both of them have same projection. How can I extract ...
2
votes
0answers
80 views

Label edits disappear upon saving?

I am trying to label a map I'm creating in QGIS v 2.8.9. I'm using data defined labeling to both manually place and rotate labels. I've created the required fields (X, Y, and Rotate) all as decimal ...
2
votes
0answers
505 views

How to export a training shapefile as an XML spectral signature file via QGIS?

I recently used the answer from Using Orfeo Toolbox object based classification in QGIS tutorial/workflow? to perform an object base segmentation on a SPOT image I acquired a while ago. I tried both ...
2
votes
0answers
573 views

Find Properties of Nearest Line Segments to Point in Python

I have been trying to find a workable Python approach to finding nearest line segments to one (or more) points, and came accross @gene's solution to @RustyMagoo's problem here: from shapely.geometry ...