Most Popular

1500 questions
19
votes
7 answers

Reading raw data into geopandas

Is it possible to read raw data into a geopandas GeoDataFrame, a la a pandas DataFrame? For example, the following works: import io import pandas as pd import requests data =…
Aleksey Bilogur
  • 1,165
  • 3
  • 10
  • 18
19
votes
4 answers

Using Rasterio or GDAL to stack multiple bands without using subprocess commands

Does anyone have a eloquent way of stacking multiple .tif files into a multiple band stack using Rasterio and/or GDAL? I am looking for a way to avoid using a subprocess command like gdal_merge.py and rather have it as part of my python script. I…
Jens Hiestermann
  • 365
  • 1
  • 3
  • 5
19
votes
2 answers

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.GetFeature(0).GetDefnRef().GetFieldDefn(i).GetName() …
user3716774
  • 323
  • 1
  • 2
  • 7
19
votes
5 answers

Trying to extract a list of Unique Values from a field using python

I have a number of columns in a number of tables withinh a FGDB where I need to extract the unique values for each column. For Example: the values may be [1,2,2,2,3,4], and I am trying to return [1,2,3,4] I could do this job a number of other…
Leith Hawkins
  • 470
  • 1
  • 4
  • 16
19
votes
3 answers

Duplicating layer in memory using PyQGIS

I have a layer in QGIS, and I want to duplicate it through a plugin so I can use the copy of it as I want, without modifying the original. Of course layer2 = layer1 will not work, because everything that happens to layer2 will also happen to layer1,…
Ril8772
  • 375
  • 2
  • 6
19
votes
4 answers

How to add a node/vertex in a QGIS edit session?

I'm doing some polygon (boundary) cleanup, and am wondering if it is possible to add a node/vertex to a set of selected polygons or even a single polygon. By the way, the QGIS topology editing tools are incredible - extremely simple but very…
DPSSpatial_BoycottingGISSE
  • 18,790
  • 4
  • 66
  • 110
19
votes
5 answers

Visualizing network on map

I have several hundred geo-referenced data points, and the relationships from that point to other points. I'm trying to figure out the best way of visualizing this on an interactive map (possibly using google maps). One idea I had was that when a…
djq
  • 16,297
  • 31
  • 110
  • 182
19
votes
4 answers

Changing popup position on Leaflet marker?

I want open a popup on bottom of my marker icon in Leaflet. my code: var mymap = L.map('mapid').setView([51.505, -0.09],…
Gerd
  • 731
  • 1
  • 8
  • 17
19
votes
4 answers

Convert raster to smooth contour polygons in QGIS

I have had limited success creating smooth contour polygons from a raster layers. I have created contour lines and boundary polylines and then used QGIS Union. Then I use QGIS Polygonize. Then use zonal statistics to the original raster to get…
Rx_
  • 411
  • 1
  • 4
  • 8
19
votes
1 answer

Getting pixel values at single point using rasterio

To get a single pixel value at a point in a raster using rasterio, there is an example here: https://github.com/mapbox/rasterio/pull/275 However, is there a direct API within rasterio (and not the cli) which can be used to extract value at a single…
user1186
  • 111
  • 2
  • 10
  • 29
19
votes
5 answers

What annoys you about your GIS Environment?

I have a question regarding your favourite GIS environment. Over the past few decades, there have been the usual major players, MapInfo, ESRI, Intergraph (Grass?), and we all love and hate aspects of the major players of GIS. The purpose of my…
OptimizePrime
  • 2,359
  • 18
  • 20
19
votes
1 answer

Converting a polygon into a raster using R

I'm trying to convert a shapefile into a raster within R. My approach is to read in the raster as follows: library(rgdal) # Loads SP package by default demo <- readOGR('F:/data/', 'shapefile') # Creates a SpatialPolygonsDataFrame class (sp) This…
djq
  • 16,297
  • 31
  • 110
  • 182
19
votes
8 answers

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 have a shapefile of the region with country…
Sannita
  • 307
  • 1
  • 2
  • 5
19
votes
4 answers

Avoiding labeling features if overlapped by another layer in QGIS?

With QGIS 2.12.2, how can I set up layer labeling to avoid placing labels where features from another layer already exist? For example, if I have a stream/river polyline layer that contains lake "centerlines", and I place a "lake" polygon layer…
RyanKDalton
  • 23,068
  • 17
  • 110
  • 178
19
votes
7 answers

What GIS application can open and use .osm files?

A quick question that I don't see an answer to elsewhere: if I download a .osm dataset from Planet.osm (for example) which GIS applications could consume/display this data without translation? For example, this page says ArcGIS 10 "can use…
Mark Ireland
  • 13,147
  • 3
  • 33
  • 67