All Questions
896 questions
10
votes
2
answers
11k
views
Creating missing .shx file?
I am using ArcGIS Desktop to view one shapefile.
Only a select number of features are being displayed. The same number are showing in the attribute table even though the database file (.dbf) has a ...
9
votes
5
answers
5k
views
Deleting shapefiles with its belongings in QGIS
In the Browser it's not possible to delete shapefiles. In ArcMap you can delete shapefiles easily within the ArcCatalog.
How can I delete shapefiles in QGIS without minimizing the QGIS Window, ...
8
votes
1
answer
3k
views
Fitting known size polygons into irregular polygons using ArcGIS Desktop?
I have a task that sounds simple, but I just can't get through the last step. I need to find suitable areas where wind farms that have a size of 500x150 meters, could be placed. The restrictions are ...
8
votes
8
answers
8k
views
Rounding coordinates to five decimals in GeoPandas
I have a shapefile, which I converted into GeoPandas DataFrame. I would like to round the coordinates to 5 decimals.
Is there a method/function in GeoPandas that can do this?
My shapefile contains ...
8
votes
2
answers
2k
views
Reordering polygon shapefile permanently?
I've written a script which produces a polygon shapefile of the extents of all the thousands of rasters in our library. I want to organise the FID so that the files with the largest extents are on the ...
8
votes
3
answers
18k
views
Load a raster file directly in Leaflet
Is it possible to load a raster file (e.g. GeoTIFF or Erdas img) directly into a Leaflet map? If so, can you guide me to the correct documentation or method to do this?
I am trying to do this with the ...
8
votes
1
answer
15k
views
Getting error when clipping shapefile to shapefile using ogr2ogr?
I want to clip a shapefile to a shapefile. The input shapefile is a 1 m vector grid generated in QGIS. The tile I'm clipping to is just a simple polygon (the geometry is contained within the 1 m ...
7
votes
2
answers
5k
views
Keep the same field headers after joining a table to a shapefile in QGIS
I noticed that after joining a table to a shapefile the headers of each fields in the table used for the join are changed by QGIS and they are attributed to a different name.
For instance, I had a ...
7
votes
2
answers
8k
views
Merge shapefiles using ogr2ogr and retrieve the attributes of both
I have two shapefiles that I want merge (overlay/intersect) having in the destination the attributes of the two sources file.
ogr2ogr file_merged.shp tl_2010_us_uac10_conus_albersUA.shp
ogr2ogr -...
7
votes
1
answer
6k
views
Export shapefile using PyQGIS
I am trying to export selected feature using PyQGIS.
Till now I have tried these codes. After using this I can select feature but don't know how to export selected feature to new shapefile.
canvas = ...
5
votes
1
answer
1k
views
Making a 3D map with shapefiles, lidar and aerial image data
I want to try to make a simple 3D map for a small area (10 square miles) with some housing, some roads and some vegetation on it. My geodata is as follows:
shapes with houses/roads/vegetation.
...
5
votes
1
answer
9k
views
How to create a 3D shapefile with QGIS from values stored in the attribute table
I have a shapefile containing buildings represented as polygons (basically the area of the buildings).
In the attribute table there is a field where the elevation of every building is stored (every ...
5
votes
1
answer
5k
views
Open Source Alternatives to ERDAS IMAGINE ATCOR?
I have been using ERDAS IMAGINE's ATCOR extension for ATmospheric CORrection of ASTER imagery.
What opensource options exist for atmospheric correction of ASTER Level 1B products?
I'm primarily ...
5
votes
2
answers
11k
views
Selecting features of vector layers based on another vector layer using QGIS?
I am using QGIS 2.12.2. I am using three vector layers (point, polyline and polygon shapefiles) of the region of interest. Any advice in making the selections from one dataset based on the other ...
4
votes
1
answer
3k
views
Geoserver - empty native SRS field
I'm converting layers from shape files to postgis with the below command:
shp2pgsql -s 22175 -c -W "latin1" path/file.dbf' table_name db_name | psql -d db_name
Next, I add this layer to the ...
3
votes
1
answer
1k
views
Clipping LAS data with multiple shapefiles
I am looking for a method to clip with multiple shapefiles (139 shapefiles polygon) a lidar.las file.
I'm using the software Fusion, as described in: How to clip LAS data using shapefile polygons ...
3
votes
4
answers
33k
views
Intersection between points and polygons in QGIS
I have two shapefiles: points and polygons.
I want to know what points (not how many) fall inside each of the polygons of my MultiPolygon shapefile.
I thought the "Intersect" function was ...
2
votes
1
answer
856
views
Strategies for working with large shapefiles
I am interested in learning about how to work with "Road Network" files - for example, I would like to find out the driving distance between two sets of geographical coordinates (i.e. ...
2
votes
2
answers
11k
views
How to rasterize a vector dataset in R?
I would like to compare vector vs raster data. So i try to fix a problem using both ways.
I made it in vector first :
coastline<-readShapeSpatial("shp")
wets<-readShapeSpatial("shp")
wetb<-...
2
votes
2
answers
2k
views
Dividing shapefile into multiple shapefiles using an attribute value in QGIS Graphical Modeler
I have a shapefile with a column that have project references, I want to create a different shapefile for every project reference there is.
Note that the project references are not unique in the sense ...
0
votes
1
answer
551
views
organizing attribute table: multiple sets of variables per point
I would like to have hints on the best way to organize my dataset (I am working with ArcGIS 10.1, advanced license). I would like to build a points layer, each point being a weather station in the ...
0
votes
1
answer
741
views
Erase shapefile (polygon) area from GeoTIFF
I've been reading several posts to do so and one option would be to use gdalwarp -cutline, but I would need to keep what it is NOT inside the polygon area. GDAL or any command-line tool does that?
0
votes
1
answer
1k
views
Improving our spatial data by calculating "Close to Coastline", "Close to Park", "Close to Stadium" etc [closed]
A quick background for context is maybe helpful for this.
Essentially we have "vacation rentals" and I would like to add additional data to them automatically. We create booking websites for ...
70
votes
7
answers
4k
views
Are there any attempts to replace the shapefile? [closed]
Recently I've been spending a lot of time converting perfectly good field names like "Percent of citizens age 25 and over with a bachelor's degree or higher" into things like "edbchogtr" to meet the ...
38
votes
10
answers
36k
views
Open Source Tool capable of reading Esri File Geodatabase (.gdb)?
I have an ESRI File Geodatabase (.gdb) file that I would like to convert to shapefile (or any other non-proprietary format). Are there any Open Source tools to do so?
34
votes
3
answers
20k
views
How to easily edit attribute data using Regular Expressions?
I am writing a tutorial for MSc students that uses QGIS.
One of the tasks requires the attribute data to be modified
(see pdf draft of tutorial here if interested ).
The question is how to get them ...
32
votes
6
answers
2k
views
"Oddities" in the Shapefile technical specification
I've been writing a shapefile parsing library, and have encountered a couple of design decisions in the specification that I don't immediately understand. I'm hoping there's a wizened old ESRI ...
29
votes
3
answers
23k
views
Selecting feature types when using ogr2ogr to convert to shapefile?
Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types.
When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
21
votes
2
answers
26k
views
How to split non-contiguous feature in QGIS?
I have a shapefile with a feature that is non-contiguous. I want to split the areas on the left from the area on the right. However, QGIS's Split Features tool requires you to draw a line over the ...
20
votes
2
answers
20k
views
API documentation for Gdal/Ogr with C#
I want to assign projection to shapefile in my web C# application, for this i am using Gdal/OGR/OSR C# bindings and add osr_csharp.dll and ogr_csharp.dll references. But i am facing some difficulty ...
20
votes
5
answers
56k
views
Seeking shapefile of city boundaries in US?
Where can I find a shapefile that contains boundaries for the major cities in the United States?
I have tried the census website but could not find anything.
19
votes
8
answers
108k
views
Seeking Free Shapefile of European Countries?
I do not seem to be able to find a free shapefile of the European countries. This is the kind of map I am looking to populate with my own data using ESRI ArcGIS:
The Eurostat website only seems to ...
19
votes
1
answer
32k
views
Reprojecting raster from lat/lon to UTM in R?
i have to turn it into a UTM in order to make the buffer functional.
wets<-readOGR(dsn=".",layer="shapefile")
r.raster <- raster()
extent(r.raster) <- extent(wets)
res(r.raster) <- 100
...
17
votes
4
answers
11k
views
Is starting names with numbers a bad data naming convention?
My company uses ArcGIS and has a project and data file naming standards in place and (for the most part) followed. Something that has always bothered me about he naming standards is that it mandates ...
16
votes
2
answers
7k
views
Clip raster by shapefile in parts?
I am trying to write .sh script command to clip raster by polygonal shapefile. Shapefile have name field with unique name of polygon feature. On the output must be rasters with name of polygons in ...
16
votes
4
answers
5k
views
Python module to delete SHP features (without Desktop GIS installed)
I have a piece of software (not Arc) that runs nightly on a non-production machine which updates shapefile features from an external database. Periodically I would like to delete all of the features ...
15
votes
2
answers
43k
views
Choosing the correct value for proj4string for shapefile reading in R?
I am having a shapefile of polygons and another CSV file which contains a list of points as (Lat, Lng) pairs..
I want to check for each (lat, lng) pair from the CSV file which polygon does it fall ...
15
votes
4
answers
12k
views
What is the best way to programmatically convert between WKT and Proj4 string?
Some shapefiles have a .prj file associated with it, and the .prj file contains the projection info of the shapefile in the format of WKT.
Sometimes I need to convert WKT to proj4 string, and ...
15
votes
4
answers
73k
views
How to export a dataset with "SpatialPolygonsDataFrame" as a shapefile
How to export spatial datasets in R, such as tornados dataset in GISTools package, as a shapefile with the exact same spatial reference and the exact values?
library(GISTools)
data(tornados)
Desired:...
15
votes
7
answers
62k
views
Shapefile layer no longer editable (toggle edit option greyed out) in QGIS
I am using QGIS 2.16 / Windows 10.
I have a point shapefile which I have been using for a little while that has always been editable.
Today I was editing the layer, saved my edits and left my ...
15
votes
3
answers
43k
views
Making shapefile from Pandas dataframe?
I´d like to construct a shapefile from a Pandas Data Frame using the lon & lat rows.
I have got a csv file and I process it with pandas to make a data frame which is easier to handle
Is it ...
14
votes
5
answers
16k
views
Renaming Shapefiles in QGIS?
I have a huge list of layers in a project that are named in a foreign language. I want to translate and add the English title to the name.
When I right click on a layer and choose Properties -> ...
12
votes
1
answer
4k
views
Identify shape of the polygons: elongation, roundness, etc
I am generalizing geological map. In the initial step I am dealing with small polygons which should be either deleted, enlarged, aggregated and etc.
Before applying operations mentioned above I ...
11
votes
3
answers
14k
views
Counting points in shapefile within polygons of another shapefile using ArcGIS Desktop?
I'm creating a map with two shapefiles:
A polygon of counties
Points of cities
I used the function Intersect to group the cities in each county.
I'm trying to get the number of cities in each ...
11
votes
4
answers
11k
views
Splitting line shapefile into segments of equal length using Python
I want to split a line shapefile into segments of equal length, let say into lengths of x meters each. There is tool v.split.length as mentioned in this answer: How to split line into specific number ...
10
votes
1
answer
5k
views
Add layer to existing geopackage not working in QGIS?
My organisation uses mainly ArcGIS and we have a need to share data with contractors. I recently introduced QGIS (because one of our application uses WKT to import geospatial data and QGIS makes the ...
10
votes
1
answer
20k
views
How to re-project shapefiles?
I wanted to re-project a QGIS project, but there is no such option. When searching for an answer I see ogr2ogr suggested for this task, by re-projecting each vector layer (shapefile in this example). ...
10
votes
3
answers
4k
views
Polygon shapefile with null values?
Does anyone know where I can find a sample shapefile that has null entries in it (preferably a polygon shapefile)?
I'm not sure how to create one with null entries.
10
votes
2
answers
6k
views
Performance of Shapefile and PostGIS with GeoServer?
I'm going to build a web application, which will render around ten maps using GeoServer. I will be also changing the attribute data in the application for some layers.
What is the recommended choice ...
9
votes
3
answers
12k
views
Merging shapefiles with different geometries (point and polygon) to get single layer with multiple geometries?
I want to merge two shape files in which one is of point geometry type and other is polygon type in order to get a single layer containing both points and polygon in a single map.