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
2answers
131 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
1answer
14 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
1answer
79 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
0answers
19 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 ...
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
28 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 ...
1
vote
1answer
30 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 ...
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 \ ...
32
votes
2answers
38k views

Uninstalling QGIS that was installed using OSGeo

I installed QGIS using OSGEO4W, and would love to know how to uninstall it, because when I go to "Control Panel > Programs > Uninstall" the program does not appear in the list of installed programs. ...
0
votes
1answer
183 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....
14
votes
2answers
8k views

Splitting shapefile per feature in Python using GDAL?

is it possible to split a shapefile per feature in python? (best would be a solution where i can temporarily save the resulting vector objects to the memory instead to disk). The reason: I want to ...
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__ = ...
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 ...
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 ...
2
votes
1answer
699 views

GDAL conda install on Mac OS trouble

I'm trying to install gdal on my new computer in the anaconda environment using conda but having issues. All I've done so far is install Anaconda for python 3.6 and install gdal as described here + a ...
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' ...
2
votes
1answer
129 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 ...
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
137 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 ...
1
vote
1answer
3k views

Missing QGIS raster menu tools with error'“osgeo [python-gdal]” module is missing'?

I recently had to reinstall QGIS (version 2.2.0-9) and the raster menu is missing its tools. I understand that the GdalTools plugin must be installed and enabled. I have already installed the 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 ...
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 &...
1
vote
5answers
3k views

GDAL/OGR Geometry Type Python

Taking a long shot but does anyone have an idea of whether GDAL or OGR has a function to determine a shapefile or layer geometry type using python? I specifically want the output to print "POINT" for ...
1
vote
1answer
196 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....
3
votes
1answer
760 views

How to connect PostgreSQL from osm2pgrouting

I am using OSGeo Live. It is an Ubuntu system. I installed it in my PC. I was following one pgRouting workshop. https://workshop.pgrouting.org/index.html In one step, I needed to connect ...
0
votes
0answers
333 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
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 ...
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 ...
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/...
0
votes
2answers
88 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 ...
8
votes
2answers
3k views

OGR CreateLayer returns TypeError

I'm trying to create a shapefile layer based on the spatial projection of an already existing raster. (Ultimately, this will be used in gdal.Polygonize to get a shape from my raster data.) However, I ...
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
556 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
75 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
69 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 ...
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 ...
19
votes
2answers
20k views

What is OSGeo4W?

I have been using GIS for a few years now (ArcGIS and MapInfo). But only when I have started using QGIS I come across OSGeo4W, as there is an option to download it on the QGIS website. I have tried ...
2
votes
4answers
9k views

GetRasterBand() method for gdal in Python

I was going through a tutorial book called Python Geospatial Development. On the chapter on using working with geospatial data in python there is an example of a script meant to handle and analysis ...
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), ...
6
votes
1answer
4k views

How to run OSgo4W shell script on Windows?

I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used ...
1
vote
4answers
3k views

Get srid from a shapefile using ogr

I'm writing a script to import shp to postgis, using python, osgeo and psycopg2 ( see my previous question: Import shp to Postgis using Python and ogr ) I'd know if there is a way to get by osgeo ...
0
votes
1answer
767 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 ...
3
votes
1answer
636 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'...
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:/...
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
2answers
668 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() ...
2
votes
1answer
212 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
447 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 ...