All Questions
896 questions
1
vote
2
answers
606
views
Atlas map generation in QGIS using point layer only
I am trying to automate generating maps with Atlas using points only. As the snapshot shows the data points for each village is shown by a color. Every four villages fall under one health area. There ...
1
vote
1
answer
95
views
New Geocoded Points Layer Misaligned With Polygon Layer
I learned on ArcGIS, and I'm familiarizing myself with the use of QGIS. So far I love it, but the process of re-projecting and transforming datums seems less intuitive than in Arc.
I recently ...
1
vote
1
answer
1k
views
rotate point along line layer [closed]
I have two layers: point and line (postgis or shp)
The line layer represent a hiking trail. The point layer the mountain passes. The points are exactly on the same position like the node of the line. ...
1
vote
2
answers
8k
views
ArcMap doesn't recognize geodatabase files under "Add Data"
I have a folder filled with geodatabase files of the following formats: ATX, FREELIST, GDBINDEXES, GDBTABLE, GDBTABLX and SPX. I would like to convert these to shapefiles using ArcMap. I've been ...
1
vote
1
answer
974
views
Black edge (NoData pixels) in Landsat 8 color correction in ERDAS
My boss asked me to mosaic and color-balance multiple Landsat 8 tiles for presentation. I tried to do that in ERDAS but it returned weird result as below:
Obviously it's the black edges or nodata ...
0
votes
1
answer
58
views
Merging multiple road layers into one (like on topo maps) using QGIS [closed]
I have two shapefiles in QGIS containing polylines. One has 7m wide lines and the other has 5m wide lines. They currently exist on different layers, making intersections look like overpasses.
How do I ...
0
votes
0
answers
39
views
Rasterio:Generate GeoTIFF Image from a Multipolygon after buffer
After import a raster file and add buffer of 20 meters I want to write a new raster with this dimensions, but getting error:
import rasterio
from rasterio import features
from rasterio import ...
0
votes
1
answer
567
views
Merging adjacent polygons to one which sum of attribute values of adjacent ones is between 1000 and 2000?
I have a huge number of polygons that contain attribute field that represent number of offices inside each polygon. Now I want to merge all adjacent polygons which count (sum) of offices values is ...
0
votes
1
answer
3k
views
Why are map tiles being repeated? Using MapServer and Openlayers
Problem I have: map tiles from my layer are being repeated.
Shapefile is projection 3059.
I have specified 3059 is in the mapfile and also when creating map object.
I know OpenLayers.Layer.WMS is ...
0
votes
1
answer
89
views
Test intersections with time indicators in R
I have a sf object with MULTIPOLYGONS that refers to flood episodes from 1800's onwards(https://data.gov.uk/dataset/16e32c53-35a6-4d54-a111-ca09031eaaaf/recorded-flood-outlines). Then I have another ...
0
votes
1
answer
3k
views
Imagine files between ERDAS and ENVI
I have ENVI 5.0 , ERDAS 2013 SP2, and ArcGIS 10.1 SP1. Every time I save an Imagine file from ENVI 5.0 and open in ERDAS 2013 and it seems like ERDAS does not like it and it would not open and would ...
0
votes
3
answers
9k
views
How to convert *.shp files to *.gmt format type files?
I am new at using GMT (Generic Mapping Tools) and I am wondering if it can use a shapefile of a hydrographical network.
Can I perhaps change my .shp to .gmt format and combine it with a GMT map? If ...
0
votes
1
answer
654
views
Converting tif to format for TIMESAT using BEAM VISAT or ERDAS IMAGINE?
How can I convert tif image into a format for TIMESAT software to create a time series?
I am using BEAM VISAT or ERDAS IMAGINE program.
-5
votes
3
answers
941
views
How can I use ogrinfo to reach information about a .shp?
How can I use ogrinfo?
where should I write it?
In the visual studio's command prompt or somewhere else?
Can you make some examples?
when I use ogrinfo in the windows or visual studio's command ...
43
votes
3
answers
29k
views
Is it possible to look at the contents of Shapefile using Python without an ArcMap license?
I wondered if it is possible to look at the contents of a shapefile using Python without having and ArcMap license. The situation is that you can create shapefiles from many different applications, ...
30
votes
2
answers
7k
views
Using OGR and Shapely more efficiently? [closed]
I'm looking for some suggestions about how to make my python code more efficient. Normally efficiency doesn't matter for me but I am now working with a text file of US locations with over 1.5 million ...
29
votes
7
answers
15k
views
How can I update ogr2ogr to include the PostgreSQL driver?
I'm trying to use ogr2ogr to upload a shapefile to a remote PostGres installation. When I ran this command:
celenius:~ celenius$ ogr2ogr -f PostgreSQL PG:"host=255.34.00.00 user=postgres dbname=mydb ...
27
votes
2
answers
30k
views
Converting from Geography to Geometry data type in PostGIS?
I have a shapefile that has geography types.
Can I convert it with a tool like shp2pgsql or is there a postgis function to do that?
27
votes
4
answers
14k
views
How do you determine a shapefile's charset?
Is there a way to determine the charset used for a given shapefile?
23
votes
1
answer
7k
views
How to rename field names in a shapefile from the commandline?
I need to rename the field names (attributes) in a shapefile. Is there an easy way to do this from the command line?
22
votes
4
answers
75k
views
Opening and extracting data from Shapefiles?
We are in need of US highway data.
We found it for Florida at the state GIS website.
We downloaded the data for Florida highway intersections from here (this is a zip file).
How do we use these ...
21
votes
7
answers
13k
views
Stopping writeOGR from abbreviating Field Names when using ESRI Shapefile driver
I'm currently using the following script to add some attribute data from a table to lots of individual shapefiles:
library(rgdal)
specieslist <- read.csv("SpeciesList1.txt", header=F)
...
20
votes
2
answers
19k
views
Get field names of shapefiles using GDAL
I use GDAL in Python for importing shapefile. I want to know the field names for the file, my current way is:
fields = []
for i in range(1, layer.GetFeature(0).GetFieldCount()):
field = layer....
20
votes
2
answers
45k
views
Converting data from .gdb into shapefile without ArcMap
I have a .gdb folder with LOCK Files, FREELIST Files, ATX Files, GDBINDEXES Files, GDBTABLE Files, GDBTABLEX Files and, SPX Files.
I want to convert the parcel data within this folder into a shapefile ...
19
votes
2
answers
16k
views
Adding custom feature attributes to shapefile using OGR in Python
I am seeking a way to take an existing Shapefile that has a Feature set of 200 countries. Each country Feature has an attribute of "NAME." My objective is to create a Python script that adds an ...
18
votes
5
answers
1k
views
Fetching the on-click data from the website into QGIS
I would like to fetch the on-click data into QGIS and show them as the placemarks.
Basically the issue comes from i.e this website:
https://eclipse.gsfc.nasa.gov/SEgoogle/SEgoogle2001/...
17
votes
4
answers
14k
views
Make shapefile from raster-bounds in Python
I have a raster that I opened with rasterio. When I do raster.bounds I get
BoundingBox(left=399960.0, bottom=-3309780.0, right=609780.0, top=-3099960.0).
My question is now, if there is any simple ...
17
votes
1
answer
958
views
Query OSM for all beaches facing west? - QGIS preferred
I want to identify all beaches on this planet (or a given subset of it) that are facing westwards (+/- 20-30 degrees).
My idea is to use OSM as the data source. Extracting all polygons that have the ...
16
votes
2
answers
836
views
How to clean such a bad shapefile for routing?
I am trying to clean a shapefile to make it usable for routing with pgrouting, postgis, postgresql.
Here an intersection, it seems to be connected but when we zoom …. It is not:
Same here :
Here ...
16
votes
4
answers
31k
views
Importing .shp to PostgreSQL?
I want to import a shp file to postgreSQL. First I create sql file and then run PostgreSQL. To create sql file, I run this command in windows cmd:
shp2pgsql -s 4326 worldCountries.shp worldcountries ...
16
votes
2
answers
20k
views
How to access Shapefile metadata using OGR?
I'm trying to use ogrinfo to get some details on a shapefile I downloaded. Currently, the only way I know how to do this is to load it into QGIS and manually click around to find any information on ...
15
votes
4
answers
10k
views
Avoiding creation of corrupt Shapefiles during Editing using QGIS
I have one of my GIS technicians digitizing some lines in QGIS in shapefile format. I don't know how he did it (and neither does he), but somehow the shapefile became corrupt. It was creating random ...
15
votes
6
answers
13k
views
Automate SHP to JPG creation
Does anyone know of a way to batch convert shapefiles to jpegs or another common image format?
edit: I should have clarified that I would like to apply a styling to each shapefile, and then export ...
14
votes
3
answers
6k
views
Adding a GIS feature to existing database entry with QGIS
I've built a database with postgreSQL with tables, which include geometry columns.
When I add some data to my non-geometry columns, I can see them in QGIS when I connect to my database using postgis. ...
14
votes
1
answer
6k
views
Dissolving not based on attribute in GeoPandas
I would like to dissolve a shapefile regardless of attribute content using geopandas. The regular dissolve can be accomplished with something like this:
import geopandas
all = geopandas.read_file(r'...
13
votes
1
answer
16k
views
Importing shapefiles to SQL Server [closed]
I often use the brilliant SQL Server 2008 Spatial Tools to import shapefiles into SQL Server 2008. This works absolutely fine but it leaves me wondering, how do Microsoft expect end users of SQL ...
12
votes
4
answers
18k
views
using shapely: translating between Polygons and MultiPolygons
[EDIT: the solution to this was simply to use OGR to read shapefiles. See geographika's example.]
In an ESRI shapefile, there is no distinction between Polygons and MultiPolygons. Furthermore, there ...
12
votes
2
answers
6k
views
ogr2ogr error importing shapefile into PostGIS : "numeric field overflow"
I'm trying to import a shapefile into a PostGIS database using ogr2ogr as follows:
ogr2ogr -lco GEOMETRY_NAME=geom -lco LAUNDER=NO -a_srs "EPSG:4326" -f "PostgreSQL" PG:"dbname=db" test.shp
This is ...
12
votes
3
answers
10k
views
R/sf: Some edges are crossing in a MULTIPOLYGON. How to make it valid when using S2 geometry?
Goal: I would like to know the NUTS region (2016 version) of points in Europe.
Method: (1) Download the official geodata from Eurostat, (2) Use st_join from sf with R.
Problem: I've updated sf, now ...
12
votes
4
answers
2k
views
How to model a graveyard - one point per deceased or one per grave? [closed]
This is a continuation of my previous question about our project on how to economically get away with the implementaion of a graveyard in a GIS system…
On the graveyard we can find
Regular ...
12
votes
3
answers
15k
views
Extract data from NetCDF using a shapefile polygon in Python [duplicate]
I need to subset data from a NetCDF using a specific shapefile. The data are sea surface temperature and ocean color at 1/4 degree resolution. I have 4 polygons describing the US. Northeast ...
11
votes
4
answers
9k
views
Creating shapefile with auto increment primary key in QGIS
Is there a way to create an auto increment primary key column when creating a new Shapefile in QGIS?
11
votes
4
answers
26k
views
Converting shapefile to SVG keeping internal data?
I am very new to GIS. I found a tutorial on how to make a choropleth using Python tools. I want to follow it but use my own data and map. However the tutorial uses a US map SVG file and I need to use ...
11
votes
3
answers
22k
views
Creating shapefile from lat/long values using ArcPy? [closed]
How can I create a shapefile using Python in ArcGIS 10?
I have lat & long.
From this I need Python code which will create a shapefile in ArcGIS Desktop 10.
11
votes
2
answers
1k
views
Quickly browsing of features for the active vector layer?
I often need to view on the canvas the (selected or not) features from the current active vector layer.
In this situation, I only need to view something on the canvas, without doing anything on the ...
11
votes
1
answer
16k
views
How can I use fortify() to create a filtered R data frame from a shapefile?
I am in the process of building a ggplot choropleth map of population in administrative areas in Wales. I have downloaded the Boundary-Line data from the Ordnance Survey and extracted what seems to be ...
11
votes
3
answers
7k
views
Best choice for building static maps: PostGIS, SpatiaLite or Shapefile?
I usually build static topographic maps, which are mostly printed. I'm often using OSM and rasterfiles (mainly different DEMs). The areas I'm mapping seldom exceeds 20.000 km². I'm using exclusively ...
10
votes
2
answers
4k
views
Read N number of rows from shapefile using GeoPandas
Pandas has a parameter nrows for selecting how many rows will be read into the DataFrame.
Does GeoPandas have a similar parameter? Couldn't find in the documentation.
10
votes
5
answers
12k
views
US ZIP Codes +4 By State or County- Shapefile (or table/dbf)
I am looking for Zipcode data with the +4 digits at the end for a City (I can use it by state and clip the points to my municipal boundary), and with edges or geocodes. I called the post office and ...
10
votes
2
answers
1k
views
Retrieving size of shapefile in ArcPy?
Is it possible to retrieve the size of a shapefile using python and arcpy? If so, how?