Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
0
votes
0answers
20 views

Python import conflict between arcpy and osgeo's osr

I'm encountering an interesting conflict between arcpy and osgeo's osr. It seems that the order in which the two modules are imported effects arcpy's ability to look into ArcSDE databases. If you ...
0
votes
2answers
30 views

Create vector .shp file and draw several lines with various attributes (L, Z, S%, etc) from coordinates pairs

I have a set or coordinates which forms lines from two points (p1-p2, p2-p3,...., p(n-1)-p(n)), I want to create a SHP file in order to draw several lines from these points, which have several ...
0
votes
0answers
37 views

Open .asc file inside .tgz.tar archive without decompressing with Python and GDAL

I am trying to open an .asc file inside a .tgz.tar archive with Python and osgeo.gdal. Here is the link to the official description that this is possible by using /vsitar/ #source file name ...
2
votes
0answers
25 views

GDAL osgeo for python treating Z dimension differently

I have a space defined by a polyhedral surface, and I would like to check if a point is inside this space, and I would like to do this in python with gdal. After trying the default installation of ...
1
vote
1answer
39 views

GDAL module in python error

I have some troubles with GDAL module on Python. When I try to import gdal, console displays this: Файл "c:/rstp/Lib/site-packages/osgeo/__init__.py", строка 48, из <module> __version__ = ...
3
votes
1answer
55 views

Docker container for OSGeo [closed]

Has anyone developed a docker container for OSGeo? Currently, the bootable image can be downloaded from here. It is set up to run in a virtual machine such as Virtual Box, but I am looking to run it ...
1
vote
1answer
32 views

installing gdal from osgeo to work with GeoTIFF

I just installed Anaconda Navigator (and nothing else) in Windows and want to be able to work with GeoTIFF files in Spider (Python 3.7). It is my understanding that Navigator can search for packages ...
1
vote
0answers
52 views

Plotting CDF of the values in a raster (.tif) file, using Python or QGIS?

I have a tiff file with some values and I want to read those values and plot a CDF (Cumulative Distribution Function). So far I only know how to get the mean value from osgeo import gdal gtif = gdal....
1
vote
1answer
139 views

Cutting a portion of a satellite image based on coordinates in GDAL?

I have a satellite image of 7-channels (Basically I have seven .tif files, one for each band). And I have a .csv file with coordinates of points-of-interest that are in the region shot by the ...
0
votes
1answer
88 views

No module named 'osgeo' after installing GDAL on Mac

I installed GDAL on Mac and it was successful because when I type in the terminal : gdalinfo --version it renders me the right version. The issue is when I switch to Pycharm or the default IDLE of ...
0
votes
1answer
189 views

GDAL polygonize only particular values

I want to polygonize .tiff raster file for specific values. For example, using one method I firstly reclassified the raster by gdal_calc.py --calc="A*logical_and(A>0,A<1)" then used gdal....
0
votes
2answers
104 views

How to extract FileGDB's domains without ArcGIS?

I'm trying to get an ESRI File Geodatabase domains by using the GDAL\OGR library. By doing so, I wish to edit this datasource using QGIS' Attributes Form with designated value map widgets that point ...
1
vote
1answer
197 views

Open .tiff, set projection, then re-save in Python with GDAL

I am trying to set the projections of a .tiff file from another file with GDAL in Python. I successfully set the projections, but how do I re-save the .tiff afterwards? Here is my code: ds = gdal....
2
votes
2answers
134 views

Check if custom CRS already exists, find EPSG

I created a "custom" CRS with specifications I got from someone who needs the data in that specific system. It worked well and I now have a *.prj file, so basically a WKT-representation of that CRS. ...
0
votes
0answers
337 views

Installing OSGEO and GDAL in Ubuntu

I'm trying to run a Python program which needs to import from osgeo import gdal, ogr import osgeo.ogr, osgeo.osr from osgeo.gdalconst import * But when I run it outputs Traceback (most recent call ...
1
vote
1answer
41 views

Transforming to GPS coordinates using projections with osgeo with Python

I am trying to transform a shapefile and its datum to GPS (EPSG Projection 4326 - WGS 84) but I get very different result on Google Earth, I write: from osgeo import ogr, osr file_name = 'POIS.shp' ...
1
vote
0answers
28 views

QGIS library to OSGEO library codes

is there any way to convert the scripts which is produced in QGIS as python scripts from processing modeler to codes using osgeo library codes? i want some codes that can be used in QGIS algorithm in ...
0
votes
1answer
15 views

Determining Appropriate DBDB-V Subdataset

I am using DBDB-V v6.2 and GDAL, specifically the dbdbv6_level0c.h5 HDF5 file and the GDAL 2.3.3 C# binaries. Using these lines of code I can easily find the full list of Subdatasets used in the ...
0
votes
0answers
90 views

osgeo4mac QGIS 3.4.4 issues with gdal's merge

I'm trying to run the gdal mosaic tool from QGIS3 homebrew osgeo4mac, but when I run it I get this error: 2019-02-11T18:25:17 INFO gdal_merge.py -ot Float32 -of GTiff -o /private/var/folders/...
0
votes
0answers
116 views

MacOS error when installing GDAL in conda: pyopenssl and setuptools dependency

I was trying to install GDAL on MacOS Mojave 10.14.3 using these following methods: conda install -c conda-forge gdal conda install -c conda-forge/label/gcc7 gdal conda install -c conda-forge/label/...
1
vote
1answer
64 views

Resampling two raster files

I have two rasters, one for road network and another one for the DEM of the country. I have to overlay the road network raster on top of DEM raster so as to get the elevation of roads. But my rasters ...
0
votes
2answers
89 views

Opening KML file from ArcGIS server with GDAL?

I am able to open the google KML sample by running: ds = gdal.OpenEx( fn, 0 ) But when using a specific file that I get from my country's database, it doesn't work. I've solved the problem by ...
2
votes
1answer
131 views

Is there a GDAL function similar to OpenCV's WarpPerspective?

I't trying to mosaic a GeoTiff raster against another. Initially, they were both georeferenced in WGS-84 CRS. Using OpenCV, I calculated a homography transformation (a 3x3 projection matrix), that ...
0
votes
1answer
130 views

Install osgeo live package in existing Ubuntu?

I am using Ubuntu. In my secondary computer I use Lubuntu based OSGEO-LIVE 12.0. OSGEO-LIVE is a great software when it comes to any GIS application and reduces tedious work of individual package ...
0
votes
0answers
559 views

gdal.Open error: 'NoneType' object has no attribute 'GetRasterBand'

I am running a python script which calibrates a hydrologic model, this script uses gdal from Osgeo. Following is the command I am giving python: from osgeo import gdal infile="G:\ARORA\vic_inputs\...
3
votes
0answers
76 views

Using a Python IDE with OSGeo

I have the latest version of OSGeo4W64 installed on my Windows machine. I find it very convenient to have all the Python modules for QGIS, GDAL and GRASS all in one place. I would like to set up an ...
2
votes
0answers
70 views

gdal_translate does not crop the GeoTIFF file [closed]

When I use gdal_translate to crop the GeoTiff file, the output file is saving the same as the input file. Nothing changed. The size needs to decrease at the boundaries I specify. What can I do? from ...
2
votes
1answer
2k views

No module named osgeo - continued

I'm having this issue when I try to use the Polygonise(raster to vector) tool in QGIS 3.4.3 (Madeira) on a Mac running Mojave: File "/usr/local/opt/gdal2-python/bin/gdal_polygonize.py", line 36, in &...
2
votes
1answer
1k views

Missing osgeo in QGIS 3.4 Madeira (macOS High Sierra)

I am trying to install QGIS 3.4 on my Mac. When I open QGIS I get a message that osgeo is missing. Couldn't load plugin 'processing' ModuleNotFoundError: No module named 'osgeo' Here are ...
1
vote
1answer
196 views

Can't get dataset from raster map(.tiff) using GDAL on VS2012 C++

Can someone help me regarding this problem? It seem the code can't read the data set of my raster map.It will throw this exception (popup to break or continue). Unhandled exception at ...
0
votes
1answer
2k views

Installing osgeo (“osgeo not found”)

I'm using Win10 (with the bash shell) and one of my python scripts requires gdal/osgeo. I ended up trying multiple install methods (gdal was successful with all of them, but I couldn't use osgeo), ...
0
votes
1answer
83 views

Splitting a Shapefile based off coordinates in Python using osgeo (ogr) or pyshp

I'm having trouble with splitting a shapefile of all the regions in Mongolia into a smaller shapefile based off some input coordinates. The big shapefile I'm trying to split can be found here: https:/...
0
votes
1answer
769 views

QGIS 3 and Python import qgis.core error

I am trying to set up QGIS3 and python so I can write a script that uses GDAL- I want to do this from the OSGEO4W shell. I have read a lot of questions and followed some tutorials which led me to do ...
2
votes
1answer
213 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 ...
2
votes
0answers
201 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
219 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: ...
0
votes
2answers
677 views

Extracting coordinates from multipoint geometries?

I found this guide to get pixel value of raster under point: Getting pixel value of GDAL raster under OGR point without NumPy? I've a problem here: for feat in lyr: geom = feat.GetGeometryRef() ...
4
votes
2answers
619 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
2answers
5k views

Python 3.6 error import osgeo

I'm trying to install GDAL osgeo lib into Python 3.6 on Debian Stretch I installed neccessary packages like: sudo apt-get update && sudo apt-get install -y \ binutils \ libproj-dev \ ...
1
vote
1answer
341 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, ...
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 ...
14
votes
6answers
8k views

QGIS 3.0 can't load plugin processing, no module named 'osgeo', on Manjaro Linux

I have installed QGIS3 from the AUR package, as well as all optional dependencies: https://aur.archlinux.org/packages/qgis/ However, when launching, I receive the following error: Couldn't load ...
0
votes
1answer
213 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
169 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" ...
1
vote
1answer
266 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 ...
3
votes
1answer
638 views

PyQGIS ImportError: DLL load failed:

I'm trying to create a PyQGIS standalone script in windows 10 but I have some errors. First I have read this post and I follow comment of Mr. @caiohamamura but I have semi-success I think, and I don'...
2
votes
1answer
5k 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
161 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
104 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
577 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(...