Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
37 views

Showing lines in shp file with different size of border depends on feature value - PyQGIS

I have shp files with lines which looks something like this: ID name weight 1 a 15000 2 b 100 3 c 450 4 d 50 5 e 10000 And I need that lines ...
2
votes
0answers
16 views

Shapefile polygon operation efficiency

I would like to make a graph from a shapefile, where edges would express spatial relations between polygons according to DE-9IM For that, I use fiona + shapely My code is working but it is extremely ...
1
vote
2answers
68 views

Reproject all shapefiles in same folder in same projection with raster?

I have 4 shapefiles in the same folder names like that (1996.shp, 2000.shp, 2006.shp, 2014.shp) and one raster. I need to reproject all shapfiles in the same projection (4326) of raster, but I do it ...
0
votes
1answer
19 views

How do I re-project a shape file from WGS84 to World Sinusoidal?

I have a polygon shape file which is on WGS84 and I want to re-project it on EPSG:53008 (World Sinusoidal). When I'm trying to do it either by 'Save as' or by 'Data management tool' it says that the ...
0
votes
1answer
21 views

Problem editing, clipping, and saving large shapefile QGIS 3.4

I'm working with a very large shapefile in QGIS 3.4. I only need one section of the layer (near the main city, not the areas outside it) and I'm trying to delete the large sections which I don't need. ...
0
votes
0answers
19 views

How to overlap linestrings with PostGIS or QGIS?

Explanation: I have 2 tables on PostgreSQL, one table named 'city' that have linestrings wich represents streets from a city (using QGIS I downloaded OpenStreetMaps data and imported to PostgreSQL ...
0
votes
1answer
65 views

Extract longitude and latitude from object in shapefile

I'm new to GIS and (ESRI) shapefile. I would like to extract GPS-Coordinates or longitude and latitude from every object in a shapefile, mainly from polygons. Here is a picture with one of these ...
0
votes
0answers
22 views

full python 3 script to load shp file inpo Postgis file

I am using Python 3 libraries to programmatically push a shapefile into a remote POSTGIS data base. I retrived the code googling aroung and slighty modifing it. Here the script: import pandas as pd ...
1
vote
1answer
84 views

Determine on which side of a line points are located

I have a point shapefile (point.shp) and a line shapefile (line.shp). I want to determine on which side of the line each point is located. The best would be to use a pyqgis command to add a field to ...
0
votes
0answers
11 views

Create a valid shapefile with phpmyadmin/Shapefile lib

I'm trying to create a shapefile with the PhpMyAdmin\ShapeFile library. I followed the example in the Github project repository, but I would like to create a shapefile within polygon elements, not ...
4
votes
2answers
94 views

Clustering 30m pixels into 120m pixels, fishnet using QGIS?

I have a raster file representing tree cover loss made of 30m*30m pixels taking the value 0 or 1. 0 means no loss and 1 means tree cover loss. I want to cluster these pixels into bigger pixels of the ...
5
votes
2answers
70 views

Measuring average, min and max of vertex height of linear shape using QGIS?

I have a linear shape, all of the vertexes of each segment has a z-value, stored in the geometry. I need for every record, segment the average, min and max height value aggregated from their vertex ...
0
votes
1answer
50 views

Rasterize shapefile to overlay on map uisng QGIS (or any other suggestion)

I'm developing an app to display a map in QGIS. The map data is from Bing Map servers. I want to overlay a shapefile on the map. I want the same visual display we see on QGIS. Like this So my ...
2
votes
1answer
26 views

.CSVT File no longer converting string variable to float value

I was testing joining a dataset to shapefiles in Qgis. The text file that I used in my earlier testing as my csvt file worked perfectly and I was able to create gradient maps using my joined dataset. ...
0
votes
0answers
23 views

How to parse a shapefile with Esri JavaScript API and/or ArcGIS Server?

I'm developing a webapp that uses the Esri JavaScript API 3.xx (Dojo 1.x) together with an ArcGIS Server 10.6.xx. Until now I was parsing shapefiles in my Java backend that makes use of an offical ...
0
votes
0answers
26 views

Get a column from database and populate the shapefile attributes?

I would like to know how to get copy a specific columns from the database and add that column in a shapefile attribute table? I am open to other better ideas.
1
vote
0answers
7 views

Is there a way to convert an RDL filetype to a SHP filetype

I Have an open records file from a county that provided an RDL file extension which we can view in MS 8 Viewer but is there any way of getting that into SHP format so we can normalize the data fields ...
1
vote
1answer
39 views

Creating a “catchment area” geometry from place points in QGIS

I have data from Geonames.org on the location of population centres, provided in the format of Center Name, Latitude and Longitude. Only one latitude and longitude point is provided for each ...
0
votes
1answer
33 views

QGIS: Clip a shapefile based on values in a raster

I would like to clip a shapefile based on the values of a raster file beneath it, using QGIS. The specific context is a shape file of Local Government Areas overlaid onto a population density raster....
3
votes
2answers
6k views

Merging and dissolving shapefile in R?

I am migrating from ArcMap to open source GIS. I've succesfully installed R and many packages in a Ubuntu 12.04 machine. I am used to linux and programming in C, but not to R and its syntax. I am ...
0
votes
0answers
25 views

Comparing Multiple Shapefiles

I have 4 shapefiles that I need to compare spatially, to highlight inconsistencies between them in ArcGIS. I have used the Feature Compare tool so far, but I'm looking for a faster way to compare the ...
0
votes
1answer
53 views

Add coordinates and id field into point shapefile in R/PyQGIS

I have a points shapefile with almost 1 million features. I would like to add three new attributes: y, x (coordinates) and an ID (integers from 1). How can I perform this task in R or PyQGIS? Using ...
0
votes
0answers
51 views

Convert classified point matrix to shapefile

I've use R to generate a matrix of points tagged to separate categories. Each point has a lat, long. and category. When I plot them in QGIS (using colored points of the appropriate size) it looks like ...
1
vote
1answer
39 views

Deleting empty Geometry in shapefile using GDAL command-line GDAL utilities?

How empty geometries be deleted from shapefile using the command-line GDAL utilities?
2
votes
1answer
40 views

Joining 2 layers by location doesn't join desired fields from attributes tables

I have 2 layers that I'm trying to join by location: 1 is a point layer (CRS 4326) and the other is a shapefile layer (CRS 4326). The shapefile layer has a field in the attribute table whose values I ...
-3
votes
2answers
25 views

Get stats from a shape inside another shape

I have a big shapefile with many features. Then I have a another shape of less size, wich is in the same space that the first shape. I need to get stats (area, %) from the first shape that only match ...
2
votes
1answer
34 views

Whitebox Tools ClipLidarToPolygon writes no points to output file?

Running Whitebox Tools (v 0.11) on Windows from the official binary. The ClipLidarToPolygon tool creates an output LAS file with no points and the message There are fewer than two points in the LAS ...
0
votes
2answers
65 views

Assigning an OSM originated tag to a SHP file field in QGIS

I am using QGIS to do some basic data processing. I have a shapefile (originated from OSM data) that has a number of fields. One of those fields (tags) contains a bunch of tag data. Example of a "...
0
votes
1answer
46 views

Draw a mask on a TIFF file

I have a raster (TIFF file) and I would like to draw a mask on it. So, I basically create a shapefile and draw polygons on the area I wanted to mask. Then, I would like to rasterize this shapefile by ...
3
votes
3answers
4k views

permission denied when creating shapefile

I'm having problems creating new shapefiles - in QGIS 2.14.20 any new fields I create and any associated data are not saved. I've now got the same problem in QGIS 3.0, but there I get a message ...
0
votes
3answers
50 views

Filtering attributes in a shapefile using a common ID from an Excel file

I am using QGIS 2.18.11 and I have a shape layer with lines and polylines I need to review; but not all of them, only certain ones. The ones I need to review are marked in a specific field (rev = 0 or ...
0
votes
0answers
21 views

Merge two shapefiles into one new shapefile with OGR/GDAL library in C#?

I am currently coding a C#/WPF application that lets you choose two shapefiles and create a new merged one, with the content of both shapefiles. My problem is that I am quite new (1 month with gis) ...
2
votes
1answer
52 views

Joining CSV file to Shp file using ogr2ogr and python

I am having problems with the code below i.e. parsing the SQL string in python. I keep getting an error. I am joining a CSV file called lookup_scales.csv to a shp file called RC_CATALOGUE_GRANTED. I ...
0
votes
1answer
54 views

Identify EPSG in SQL Server

I have been trying to load a shapefile available at https://www.elections.on.ca/en/voting-in-ontario/electoral-district-shapefiles/open-use-data-product-licence-agreement/download-shapefiles.html to ...
0
votes
1answer
53 views

Converting RTK Elevation Data to DEM?

I have a shapefile that contains elevation data. I want to eventually convert this to a slope layer. I'm assuming I have to convert to a raster, then a DEM, then slope. Is that correct? If so, ...
0
votes
0answers
38 views

Rasterise shapefile as 1 band (grayscale)

My code converts shapefiles to rasters. I had first done this in colour, but now I need greyscale (1 band). The code seems to create this for the first raster file, but the other raster files seem ...
0
votes
2answers
3k views

Using Google Maps image as layer with Matplotlib Basemap?

I have produced a heat map of assaults in Sydney by suburb. However, my map looks a bit plain and I'd like to do something fancier - I'd like to use a Google Maps image as a background layer - I haven'...
3
votes
1answer
80 views

Importing from CSV and changing projection using ArcPy?

I'm attempting to convert CSV files to a group of shapefiles, then re-project them to a different coordinate system. The first conversion works, but I'm having issues with the projection piece. ...
0
votes
1answer
37 views

Converting bulky shapefiles (54 MB) to GeoJSON

I am trying to convert my shapefile to GeoJSON using the below code snippet: StringWriter writer = new StringWriter(); String geoJson = null; FeatureJSON fjson = new FeatureJSON(); fjson....
9
votes
5answers
11k views

Clipping LAS data using shapefile polygons and open source software?

I am trying to clip or filter lidar files (.las, .xyz) using a shapefile that contains multiple polygons. Is there open source software that can do this spatial operation? My .las files are enormous,...
1
vote
1answer
175 views

Export spatial data from SQL Server to ESRI shapefile using OSGeo

i did a join between 2 tables departements2 which has all department with their id and geometry with BM_REGIONFR with id of department and region ( i have 5 region in each region many departement ) ...
1
vote
1answer
80 views

Splitting LAS file into smaller LAS files by shapefile geometry boundaries - using PDAL or Global Mapper. [duplicate]

I've looked up pdal documentation on how to clip LAS point cloud files:- https://pdal.io/workshop/exercises/analysis/clipping/clipping.html Referencing this example, and having a quick look around, ...
0
votes
2answers
173 views

QGIS Connection PostGIS and shapefile? [closed]

I'm working on QGIS with a database created in PostGIS and a shapefile. Inside the database, I have geometry type data about location of some points, instead on the shapefile there some selected areas....
2
votes
2answers
76 views

How do apps like zillow serve up data?

I'm a total newbie to GIS, but attempting to build an app similar to zillows that quickly serves up data based on user input. Currently, i'm collecting the data via shp files which are being store ...
2
votes
1answer
31 views

Coordinates offset when using Mapshaper to convert shapefile to GeoJSON

I'm a newbie to the GIS world and I'm trying to convert a shapefile to GeoJSON for use in Mapbox. When I view the resulting layer in Mapbox, most of the features appear southeast by 20-30 feet of ...
5
votes
2answers
4k views

Dividing Earth into continent polygons

Is there a simple (low res is fine) polygonal data set that divides the entirety of Earth's surface into continents, with no overlap and no area excluded? Specifically: North America, South America, ...
0
votes
0answers
57 views

Finding out which U.S. state a tweet was generated in

I have a database of records with latitude and longitude information (imagine this is a CSV file containing tweets and their geo-coordinates). I also have shapefiles of U.S. states. I want to add ...
2
votes
2answers
76 views

Cannot select polygon from shapefile in QGIS?

I am working currently on a small-scale map using among other sources Natural Earth shapefiles (NE). For an unknown reason, one of the polygons created by me on the basis of the fragments of NE ...
2
votes
1answer
22 views

How to export a unique ID field of a geopackage

When I am converting my geopackage file in shapefile, the unique ID field is not exported. I could duplicate it before exportation, but I wanted to know if it could be done in one step, in order not ...
2
votes
1answer
90 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 ...