Questions tagged [ogr]

The OGR Simple Features Library is a C++ open source library (and commandline tools) providing read (and sometimes write) access to a variety of vector file formats including ESRI Shapefiles, S-57, SDTS, PostGIS, Oracle Spatial, and Mapinfo mid/mif and TAB formats. OGR is a part of the GDAL library

The OGR Simple Features Library is a C++ open source library (and commandline tools) providing read (and sometimes write) access to a variety of vector file formats including ESRI Shapefiles, S-57, SDTS, PostGIS, Oracle Spatial, and Mapinfo mid/mif and TAB formats.

OGR is a part of the GDAL library

212 questions
2
votes
2 answers

GDAL in iOS, runtime dll proj4 not available, OGR functions do not work

I have some problems with gdal compiled on iOS ( gdal internally uses proj for some operations ) I'm developing for iOS, and want to use this library to perform coordinate transformation, but some functions requires proj dll and at runtime i get…
atrebbi
  • 553
  • 3
  • 20
2
votes
1 answer

Convex Quadrilateral Polygons subdivision in equal parts using Python / OGR

Consider an irregular polygon (P) which has four vertices. I would like to subdivide P into smaller polygons as shown in fig. 1. In the old days I was using ArcGIS 9.3 and a VBA macro written by Miles Hitchen to achieve this. The VBA code is…
Dimitris
  • 485
  • 1
  • 4
  • 16
2
votes
3 answers

Extract Point From Raster in GDAL

I have a raster file and a WGS84 lat/lon point. I would like to know what value in the raster corresponds with the point. My feeling is that I should use GetSpatialRef() on the raster object or one of its bands and then apply a…
Richard
  • 56,349
  • 34
  • 180
  • 251
1
vote
1 answer

How to convert S57 chart to PNG image using the ogr2ogr

I have a S57(.000) chart file, I want to convert it using ogr2ogr to a PNG file. Which command line should I use? If not possible to convert direct to PNG file, can I convert it to other format like ShapeFile the convert to PNG file? By the way, I…
ZyGene
  • 21
  • 5
1
vote
1 answer

Installing GDAL on Windows with Python

I'm attempting to install GDAL on my new work computer. I was attempting to use this process I found on another SO answer that I have used successfully at a previous job: pip install wheel pip install pipwin pipwin install numpy pipwin install…
Graham
  • 11
  • 2
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
0 answers

How can I solve problem when I want to use ogr in django?

I'm writing code with Django code. When I want to call spatial data using gdal, it suddenly encounters the following error. It should be noted that gdal is installed on the system and works properly. ImportError: DLL load failed while importing…
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
0 answers

GDAL/OGR (Ogr2ogr) python binding windows OCI driver

I installed GDAL-3.3.1-cp39-cp39-win_amd64.whl on windows and I am trying ogr2ogr.py in python. For defaults drivers work perfectly, but in support drivers is not OCI driver (https://gdal.org/drivers/vector/oci.html#vector-oci). When I installed…
peter p
  • 31
  • 2
1
vote
1 answer

Cannot convert multipolygon to polygon in shape file: no geometry column OGR_GEOMETRY?

The attempt is to change from multipolygon to polygon (shapefile) using: ogrinfo tmpem122.shp -sql "alter table tmpem122 alter column OGR_GEOMETRY type geometry(polygon, 4326) using st_geometryn(geometry,1)" I get this error message: ERROR 1:…
Gery
  • 8,390
  • 3
  • 22
  • 39
1
vote
1 answer

Why doesn't MapServer recognize shp file created from ogrtindex?

I am trying to create a MapServer layer from tif pyramid but always facing the same error : msDrawMap(): Image handling error. Failed to draw layer named 'ign_2020'.; msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file…
PopHip
  • 700
  • 6
  • 23
1
vote
2 answers

Geo Django GDAL: Unable to open EPSG support file gcs.csv

I recently did a clean window installed. I installed OSGeo4W via: https://trac.osgeo.org/osgeo4w/ I installed GDAL by downloading the pip wheel GDAL-2.3.2-cp36-cp36m-win_amd64.whl I also configured my django settings.py to: if os.name == 'nt': …
user9469766
1
vote
1 answer

sp::over(). Does the dot belong to one of the polygons identified with an OGRGeoJSON file?

I'm trying to get a boolleans vector, where for example, v[i] =1 tells me if an i-th point (latitude longitude pair, present inside a train dataframe) falls within one of the geographical areas identified by an OGRGeoJSON file. The OGR file is…
pofferbacco
  • 126
  • 6
1
vote
2 answers

creating fishet grid using python

I'm trying to create a fishnet grid to aggregate some geospatial data. I am using the following code from the GDAL/OGR Python cookbook however it returns only one polygon object which is basically a huge rectangle. Please let me know what I'm doing…
Hisham Sajid
  • 191
  • 2
  • 10
1
vote
2 answers

SQLite - Extract substring between delimiters for REPLACE function

I have a column field: location. I need to extract the string between the first and second delimeter ('/'). I already have a column name where I ltrim to the first '/'. I've tried to create a similar query with a combination of rtrim, replace,…
Ian Horn
  • 27
  • 4