Questions tagged [osgeo]

The Open Source Geospatial Foundation (http://www.osgeo.org), or OSGeo, is a not-for-profit organization whose mission is to support and promote the collaborative development of open geospatial technologies and data.

Filter by
Sorted by
Tagged with
2
votes
1answer
225 views

Can you draw an actual line instead of a cutline with GDAL?

I'm fairly new to GDAL and I have some GeoTIFF files that I would like to highlight some bodies of water on. I have gotten pretty far, but I have one problem. The only way I am able to highlight a ...
6
votes
3answers
449 views

Using Python from both OSGeo4W and ArcGIS Desktop? [duplicate]

This question was asked several years ago at: Can ArcGIS and OSGeo4W share the same python install?, but it seems that versions have changed since then. I currently have ArcGIS 10.0 installed (not ...
2
votes
0answers
207 views

different results ogr2ogr command line vs osgeo import ogr with reading osm data

I am trying to read in openstreetmap data (osm.pbf) files into python. Initially, I've always used the ogr2ogr command line approach to convert the data I want from the osm.pbf to a shapefile and then ...
1
vote
0answers
227 views

GDAL/OGR Returning wrong reprojected shapefile

I use the script in this link to reproject a shapefile and save it. The target projection is derived from a georeferenced raster. The problem is while the target coordinate system is UTM 33N (epsg: ...
4
votes
2answers
633 views

pyQGIS 3.0 script not running with processing import

I have problems using version 3 of QGIS with Python 3. I followed different tutorials like this one : how to use pyqgis processing runalg clipvectorsbypolygon But it seems to be working only with ...
0
votes
0answers
51 views

OGR_LINK_FIELD to filename in a Geospatial PDF

I'm using gdal_translate to create a Geospatial PDF. I'm trying to add file path to my feature when clicking on them by using: -co OGR_LINK_FIELD=<column with path> I am creating my PDF in ...
1
vote
1answer
361 views

Unable to import shapefile data (both POLYGON and MULTIPOLYGON) to postgis using GDAL osgeo, ogr

I am trying to import shapefile data (polygons with all of the user fields) to postgis using osgeo. My code fails when shapefile contains both POLYGON and MULTIPOLYGON data. from osgeo import ogr, ...
8
votes
1answer
9k views

How do I install the GDAL bindings for C#/.NET 4.5.1?

I'm trying to use the C# gdal bindings but I get an error in my C# code which says "Unable to load DLL 'gdal_wrap': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". I'...
2
votes
2answers
86 views

can't calculate numeric field with ogr python

I have created two functions: one to add a field to a layer and one to calculate a field. I am having issues with the calculate field function when trying to calculate values for a numeric column. I ...
2
votes
1answer
384 views

Use Python binding of osgeo - Union two linestring layers into one

I am using the Python GDAL/OGR bindings. I have two linestring shapefile layers. They are the census TIGER streets and a new set of line segments that represent lines connecting census block ...
3
votes
2answers
12k views

Installing Python-GDAL with OSGEO?

I have been trying to install python gdal with OSGEO for some time now with no success. I have removed. I have tried with "Express and Advance" as suggested by OSGEO4W site. The error is always "No ...
1
vote
1answer
1k views

How to install MapServer on IIS 7.5 with windows 7 OS

I want to use the map server in my asp.net application. For that one, I need to install mapserver on IIS. I am using windows 7 with 64 bit os. I have IIS 7.5 installed on my PC. Can any one help me ...
0
votes
1answer
219 views

Managing multiple Python interpreters (ArcGIS, OSGeo, etc.)

I currently have several Python interpreters installed through ArcGIS, OSGeo and Anaconda. C:/OSGeo4W64/bin/python.exe C:/Python27/ArcGIS10.4/python.exe C:/Users/[UserName]/Anaconda3/python.exe ...
0
votes
1answer
174 views

Invalid field name by using GetFieldAsString from ogr.py [closed]

I use a little algorithm to transform values from an openstreetmap-file into a table (.dbf). I use the function: GetFieldAsString("string") from ogr.py and everything is fine, but when the "string" ...
35
votes
5answers
44k views

Comparing different open source GIS servers?

I currently know the following open source GIS servers: Geoserver: java based, vector and bitmap support, also supports. Is now on par with mapserver (performance-wise). mapserver: c/c++, used to be ...
1
vote
1answer
282 views

OSGeo4W64 to OSGeo4W (32bit) Environ setting issue

I normally use my Python script using OSGeo4W64 command shell on my 64-bit PC (Windows10). Now, I'm trying to use my script on a 32-bit machine (Windows10). In the 32-bit machine, there's an issue ...
5
votes
0answers
3k views

ArcGIS Server performance comparison

Are there any recent comparisons/studies of ArcGIS Server vs. open source GIS servers in common tasks like providing a WMS/WFS, filtering data/search performance, and so on? We received a lot of ...
2
votes
1answer
6k views

Got “ImportError: No module named osgeo” in gdal_calc but not in main script [closed]

I could import gdal without any problem in my main Python script with: from osgeo import gdal I could also use gdalwarp, gdal_translate with no issue. But when it comes to gdal_calc, I got the error:...
2
votes
1answer
166 views

.DEM files unsupported with OSGEO?

I've downloaded the .DEM files from the NASA SRTM30 dataset (found here) however trying to open these yields ERROR 4: "E140N90.DEM" is not recognized as a supported file format. This is the the same ...
2
votes
1answer
107 views

osgeo ogr layer fieds - have become invisible

We have e python script, using osgeo, that accesses a PostgreSQL database for GIS data. The script have unexpected stopped working, and I have been able to boil it down to: .GetFieldCount() returns 0, ...
1
vote
1answer
590 views

Saving MultiLineString to Shapefile and KML/KMZ with Python [closed]

What is the fastest way to save MultiLineString to Shapefile (without attributes) and KML/KMZ? Preferred open-source libraries like fiona, shapely etc. from osgeo import ogr multiline = ogr.Geometry(...
4
votes
0answers
722 views

Install OSGeo module in virtualenv

How can you install the osgeo module in a virtualenv? I downloaded QGIS using KyngChaos (www.kyngchaos.com/software/qgis) following https://arset.gsfc.nasa.gov/sites/default/files/land/webinars/...
0
votes
1answer
790 views

Module has no attribute Warp?

I'm using GDAL v2.14 on my Windows 10 machine. In that environment, I have two gdal python bindings. One is import gdal, the other is import osgeo. I installed Python's gdal using http://www.lfd.uci....
3
votes
1answer
817 views

QGIS 2.18 Couldn't Load QGIS Utils

I ran into an issue and had to reinstall QGIS 2.18, but I can't seem to get it to properly work though. Whenever I install it it says "QGIS 2.18 is already installed on your computer..." even though I ...
6
votes
2answers
528 views

Overlapping Polygon becoming hole when converting geojson to shapefile

I'm trying to convert a geojson MultiPolygon which contains two overlapping polygons to a shapefile, however I noticed that the resulting shape has a smaller area. Upon inspection it's because the ...
1
vote
2answers
657 views

I cannot find osr after installing OSGeo4W package

I wanted to be able to import OSR from GDAL on my Python 2.7 (Anaconda) Windows 7 64-bit. I installed OSGeo4W after reading this post and eventually I'd like to import osr from osgeo import osr ...
8
votes
1answer
3k views

Crop a raster using rasterio and geopandas

I am cropping a set of historic aerial photographs. These photographs have large black areas in the edges (0 value). However there is also valid data with a 0 value. The workflow I am using is: Load ...
3
votes
1answer
138 views

Line network segment length

I am looking for a way to calculate the segment lengths of a line network. I am probably missing just the right vocabulary to search for the best approach, so I guess asking here would be a good idea. ...
1
vote
1answer
496 views

ogr2ogr add geometry from x y when importing to postgis

Im importing a xlsx with x y coordinates to a postgis database, with the following command: ogr2ogr -overwrite -progress -nln data -nlt POINT -f PostgreSQL "PG:host=Localhost user=postgres password=...
1
vote
1answer
1k views

Importing osgeo module in Ubuntu 10.04

I have problem with importing "osgeo" module in Ubuntu 10.04; I have installed GDAL 1.7 from source ( 1)./configure 2)make) however, still in Python I can't import osgeo module. I appreciate any hints....
2
votes
1answer
528 views

Dissolve ogr geometries in Python [closed]

I parse a geoJson file resulting in a list of osgeo.ogr.geometry-classes (all Polygons). I also have a new one which I want to dissolve with the rest. I'm using the ogr package in python, it does ...
1
vote
2answers
965 views

OSX 10.9 + QGIS 2.0.1 - Missing osgeo module

Running the following: QGIS 2.0.1 (via Kyngchaos) OSX 10.9 GDAL/OGR 1.10.1 (via Homebrew). Recently, I've become unable to use the OpenLayers plugin, which is complaining that I'm missing the osgeo ...
1
vote
0answers
135 views

Problem importing qgis.core inside docker container

I'm trying to use QGIS libraries in docker container. When I try import qgis.core I get this error, really I can't figure out what is the cause. Traceback (most recent call last): File "<stdin&...
5
votes
2answers
4k views

Does OSGeo4W install 32 bit or 64 bit version of QGIS?

If you are installing QGIS via OSGeo installer on a windows 64 bit OS (XP, vista or 7), does it install a 32 bits or 64 bit version of QGIS? Usually the standalone installer installs a 32 bits ...
1
vote
0answers
91 views

NITF Metadata not displaying properly in OSGeo Shell. Works in FWTools

I'm using gdalinfo in the OSGeo Shell to display information on a directory of NITF's. For the majority of the NITF's, gdalinfo is saying the all the corner coordinates are 0, which is incorrect. ...
2
votes
0answers
190 views

GDALINFO not displaying what is in .TFW file

I'm trying to alter the metadata in a Geotiff header via a .tfw file. When I change Pixel Size in the .tfw file, that is reflected in GDALINFO how I would expect. However, when I change the Origin ...
4
votes
2answers
2k views

Reading a shapefile as an array using Python?

I am trying to read a shapefile as an array with Python but I keep getting the same error: Warning 1: Failed to find field ID on layer shapefile_maido_tipe, skipping. ERROR 4: `temp.tif' not ...
3
votes
2answers
7k views

How to use wget inside Msys - OSGEW4W?

I open MSYS from the OSGEO4W and type wget and I get 'command not found'. I'm using Windows 7. Does anyone know how to solve this?
-3
votes
1answer
2k views

Plot a surface with a DEM and mplot3d [closed]

I want to plot a surface on Python with a DEM that I made on QGIS. I found 2 posts on this topic which were published by the same person: GIS Stackexchange: on this post they show us how to obtain a ...
6
votes
2answers
440 views

Setting up foundational OSGeo enterprise GIS? [closed]

First let me describe the task: My lab has approached me about setting up a simple GIS for a colleagues 'non-spatial' lab. There are a couple of key characteristics to the intended setup: Fully open ...
7
votes
2answers
7k views

Point-in-polygon using Python and OGR

I want to use OGR in Python to write a simple point-in-polygon test: def point_in_polygon(point, polygon): """ point : [longitude, latitude] polygon : [(lon1, lat1), (lon2, lat2), ..., (...
5
votes
1answer
2k views

Running script over every file in folder using GDAL in Python?

I'm using GDAL to calculate NDVI mean and max and to find other information about .tif Landsat images acquired from Earth Explorer. I stacked the bands into a single .tif image and have a working ...
0
votes
2answers
5k views

Why does my script return 'NoneType'?

I have this script and It return me some problem that I didn't find. from osgeo import ogr import os class checkVectorMCV: def __init__(self, vector_path): self.vector_path = os.path....
1
vote
0answers
316 views

GDAL Open error in C#

I want to open a csv raster data file with GDAL in C# Dataset csvFile = Gdal.Open(fileLocation, Access.GA_ReadOnly); Produce an error saying that At line 4, X is 412267, where as 412555 was ...
1
vote
1answer
1k views

Importing OGR from OSGEO Issues

I am trying to run: from osgeo import ogr and I get: Traceback (most recent call last): File "", line 1, in from osgeo import ogr File "C:\Python27\ArcGIS10.2\lib\site-packages\...
1
vote
1answer
2k views

Clipping GeoTIFF file by GeoJSON?

Input GeoJSON file: { "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Multipolygon", "coordinates": [[[ [27.397511483867362, 44.161117466010516], [...
2
votes
1answer
1k views

How to save json returned by gdalinfo in python variable

When I run the command in osgeo4W shell gdalinfo -json C:\Users\Gurminder\Documents\Git\Dump\s1a-ew-grd-hh-20160725t043517-20160725t043617-012300-01322b-001.tiff I get a large json of my Ground ...
1
vote
4answers
4k views

Using gdal module with ArcPy?

I am trying to import gdal modules from osgeo installed in my win64x machine but I get the following error: Traceback (most recent call last): File "", line 1, in from osgeo import ogr ...
5
votes
1answer
3k views

GDAL Python cut geotiff image

I was stuck for 2 or 3 days. I have read many lectures from RS/GIS Laboratory of Utah State University. Also I read «Python Geospatial Development» book and many docs from gdal.org. So, my problem ...
2
votes
1answer
334 views

AttributeError: 'SpatialReference' object has no attribute 'ImportFromESPG'

I am trying to create a spatial reference using ImportFromESPG and this is what is returned: AttributeError: 'SpatialReference' object has not attribute 'ImportFromESPG' Code and error are copied ...