Skip to main content

Questions tagged [ogr]

The OGR Simple Features Library is a C++ open source library (and command line tools) providing access to vector file formats.

1 vote
0 answers
42 views

Issues with GDAL installation - ogr not available?

I am attempting to install GDAL on my Windows 10 machine. I have previously done this successfully using the wheels from Gohlke's now deprecated site so I am learning a new way to do an old thing. ...
Graham Oxman's user avatar
0 votes
0 answers
16 views

OGR_STYLE Label 'anchor position' not applying in MapInfo Tab file

I've tried creating a label feature in MapInfo using an OGR_STYLE column, but the anchor position (p:12) doesnt seem to be being applied to the label. e.g. LABEL(f:"Arial, Helvetica", c:#...
Prosper's user avatar
  • 115
1 vote
1 answer
30 views

How to create one buffer around all the points using ogr2ogr?

I know how to make a buffer around each point, $ ogr2ogr oom.csv a1.houses.csv -lco GEOMETRY=AS_WKT -dialect SQLITE -sql \ "SELECT ST_Buffer(GEOMETRY,.01,1) AS WKT FROM 'a1.houses'" $ cat ...
Dan Jacobson's user avatar
0 votes
0 answers
15 views

gdal ogr transform c++ swaps axis order x to y [duplicate]

This is example #include "gdal/gdal.h" #include "gdal/ogr_spatialref.h" #include <iostream> void TransformBounds(double xmin, double ymin, double xmax, double ymax, ...
Vignesh M's user avatar
3 votes
1 answer
44 views

Is it possible to get features by the WFS vector driver in a coordinate system that is not the default srs regarding the WFS capabilities?

We currently experiment with the gdal java bindings to receive data from a WFS service. Regarding the WFS specification a FeatureType must define its default coordinate system (Tag DefaultCRS). We ...
Alexander Schlottmann's user avatar
2 votes
1 answer
60 views

Error in dissolving shapefile with ogr2ogr

I am trying to dissolve a shapefile having polygon geometries. I want to dissolve the shapefile which will create a single multi-polygon geometry. ogr2ogr -dialect sqlite -sql SELECT ST_Union(geometry)...
Badal's user avatar
  • 329
1 vote
1 answer
41 views

Writing to FlatGeoBuf using Python OGR results in "ERROR 1: ICreateFeature: Mismatched geometry type"

When I try to create even very basic point geometries using OGR's FlatGeoBuf driver in Python, I keep getting this error: "ERROR 1: ICreateFeature: Mismatched geometry type" Here is a ...
Eoin's user avatar
  • 303
2 votes
1 answer
62 views

Specify layer when using a geopackage in ogr2ogr

I want to clip a vector-layer by another layer with ogr2ogr as explained here. I always struggle to find out how to refer to a layer in ogr2ogr for input and output. Does anyone have a quick tip?
Lenn's user avatar
  • 1,297
0 votes
1 answer
39 views

Read only the structure of a geopackage using GDAL/OGR?

I'm trying to figure out if it's possible to only show the structure (layer names, field names and types, constraints, etc) of a GeoPackage which has no data record using GDAL/OGR (ogrinfo). Is it ...
swiss_knight's user avatar
  • 10.5k
0 votes
0 answers
48 views

MaxRev.Gdal.Core - OSGeo.OGR driver.createdatasource fails with System.NullReferenceException

I try to create a new GeoPackage file and write some point data into it. But my code already fails, when I try to create the new GeoPackage file. I try to create this file within an unix/C# ...
Marcel Gangwisch's user avatar
3 votes
2 answers
151 views

How to extract the integer-based geometry type code from an OGR feature

Main question Using OGR in Python, how can I extract the integer-based geometry type code for a specific feature? I know how to do this when dealing with a whole layer. For example, reading a layer ...
Felipe D.'s user avatar
  • 2,689
2 votes
2 answers
76 views

How to set a 'dataset open option' in ogr on a file geodatabase?

In the documentation for the GDAL/OGR OpenFileGDB driver, there is a Dataset open option called LIST_ALL_TABLES. Using python, how exactly do I set that?
EvanT's user avatar
  • 103
3 votes
2 answers
56 views

Let ogr/GDAL automatically choose Driver based on file extension

I inherited some code for a QGIS Python plugin which uses the ogr module. For each usage of ESRI Shapefiles is hardcoded due to the loading of the respective driver (ogr.GetDriverByName("ESRI ...
Honeybear's user avatar
  • 2,514
1 vote
0 answers
67 views

How to combine ODA File Converter with OGR (GDAL) so that dwg is a format option

I have downloaded ogr/gdal with QGIS 3.34.1 and I have downloaded the ODA file converter from https://www.opendesign.com/guestfiles/oda_file_converter However, I am not sure how to combine the two so ...
guest_231213's user avatar
1 vote
1 answer
55 views

How to assign a layer to a group in GDB datasets using gdal python

I'm currently working with ESRI GDB datasets and I can easily open hierarchical geodatabases and walk the tree using the API that gdal provides. root_group = ds.GetRootGroup() for g in root_group....
Alireza S.N's user avatar

15 30 50 per page
1
2 3 4 5
74