Questions tagged [osgeo]

The Open Source Geospatial Foundation (OSGeo) is a not-for-profit organization whose mission is to foster global adoption of free and open geospatial technology by being an inclusive software foundation devoted to an open philosophy and participatory community driven development.

136 questions
2
votes
1 answer

QGIS cannot find headers file

I'm trying to create a custom QGIS desktop application with Qt 5.9.1 I have downloaded OSGeo4W (x64) geospatial software set and the Github C++ QGIS samples but I'm facing an error at compile time: Cannot open include file: 'qgsmapcanvas.h': No…
Andrea D'Ubaldo
  • 137
  • 1
  • 6
2
votes
1 answer

Failure to import kml module from fastkml package

Starting with a command window started by OSGeo4W, I successfully installed the fastkml python package compatible with python 2.7 running on windows 7. When I run python from the command window, I can import the kml module from the fastkml…
Hamish Drewry
  • 65
  • 1
  • 6
2
votes
1 answer

Unable import gdal into python installed with anaconda (MacOSX)

Getting the following when I try to import osgeo gdal on Mac. I have installed gdal etc via anaconda. >>> from osgeo import gdal Traceback (most recent call last): File "", line 1, in File…
Stephen
  • 559
  • 6
  • 17
2
votes
1 answer

Get features by querying shapefile

I have a shapefile and I would like to query features that are inside of the geometry (Polygon) by executing SQL script. I am using Python osgeo library for running the queries: shapefile = osgeo.ogr.Open(file) layer = shapefile.GetLayer() driver =…
Laurynas Stašys
  • 328
  • 4
  • 16
2
votes
1 answer

How to reproject and area match a netCDF and shapefile

I am new to GDAL and just getting my feet wet. I'm trying to compare rasters stored in netCDFs to shapefiles. The shapefiles are sub-sections of the area covered by the netCDFs and the datasets use slightly different projections. I convert the…
JFerg
  • 173
  • 6
2
votes
1 answer

feather edges in raster images with GDAL

Can someone tell me how to feather the edges of an image using gdal? I have been under the impression that the -cblend switch would do it but maybe I'm misunderstanding something. This is what I've tried: gdalwarp -t_srs ESPG:4326 -multi -cblend 200…
Steven Lutz
  • 467
  • 1
  • 6
  • 16
2
votes
0 answers

Converting arcpy based python script to OGR for semi-automated Metadata creation

I have created a script to automatically generate base ANZLIC standard metadata using arcpy based coding. Can anyone help me convert it to OGR/GDAL python? This is so that it can be run in QGIS and work with all types of vector and raster data. The…
GeorgeC
  • 956
  • 5
  • 16
  • 40
2
votes
3 answers

How to create a grid from LiDAR points (X,Y,Z) with GDAL python?

I'm new really to python programming, and I was just wondering if you can create a regular grid of 0.5 by o.5 m of resolution using LiDAR points. My data are in LAS format (reading with from liblas import file as lasfile) and they have the…
Gianni Spear
  • 7,033
  • 22
  • 82
  • 131
2
votes
2 answers

ImportError: Python + GDAL - OSGeo4W installation

I have installed the latest compilation of OSGeo4W for Windows and I want to use the various GDAL tools available. When I open the OSGeo4W command shell, enter Python and write > from osgeo import gdal I get the following error: > Traceback (most…
Chau
  • 5,540
  • 9
  • 65
  • 95
1
vote
0 answers

proj.db not found in gdal-3.2.1 runing in Amazon Linux 2

Even if i've set the PROJ_LIB env variable to the path of proj.db from the terminal and from the code (Python) it still dosen't recognize it. I'm not sure about this but does it have anything to do with the OS which is Amazon Linux 2, because it was…
Syler
  • 23
  • 4
1
vote
1 answer

I keep getting blank images while trying to Georeference an image with GDAL

#!/usr/bin/env python3 import numpy as np from osgeo import gdal from osgeo import osr # Load an array with shape (197, 250, 3) # Data with dim of 3 contain (value, longitude, latitude) data = np.load("data.npy") # Copy the data and…
HMUNACHI
  • 41
  • 7
1
vote
1 answer

How to check if the environment variable "PROJ_LIB" is defined and how to unset it ? (PyQGIS Standalone Script Executer)

I just tried the standalone PyQGIS application by running the custom script "Proximity.py"* in a VS Code project without the need of a GUI (such as QGIS). But, when I run the python-program I get the following message: proj_create_from_database:…
Rick Atb
  • 31
  • 3
1
vote
1 answer

Python code in AWS Lambda to load Shapefile to PostGIS(RDS)

I am new to GIS implementation. I am trying to develop AWS Lambda Code in Python to Load Shape File Dynamically. I developed the code after doing some research and it is perfectly working on my local. But the same code is troubling when I am trying…
Vikas Kumar
  • 87
  • 2
  • 18
1
vote
1 answer

GDAL - TypeError Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'

I am trying to run some GDAL operations inside my Anaconda environment. However once I upgraded my gdal and other packages the program crashed. Environment: Anaconda Package Version Channel GDAL 3.3.0…
disguisedtoast
  • 149
  • 1
  • 4
  • 15
1
vote
0 answers

DeprecationWarning: gdal.py was placed in a namespace, it is now available as osgeo.gdal

I have a problem with my script. I would like to use a package that allows me to use the qgis software directly in my code. This package is called qgis.core. I had some trouble installing it, but it seems to be done. The problem now is that when I…
Carl Bethuel
  • 37
  • 10
1 2
3
9 10