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

learn more… | top users | synonyms

0
votes
1answer
16 views

Why does Spatialite layer prompt for CRS if SRID was not explicitly defined in Layer Options?

In QGIS, if I Save As... a SpatiaLite file and don't enter an SRID in Layer Options, I will be prompted for a CRS upon opening the file. Yet GDAL documentation says that this option is only for ...
0
votes
1answer
9 views

C# ogrinfo with virtual vector source doesn't work GDAL 1.10

I am trying to use GDAL 1.10 with a vector virtual source which is nothing more than the example union of two shapefile layers. from the commandline, ogrinfo works fine on the source. But the C# ...
0
votes
0answers
19 views

Dissolving a TIN using python/ogr binding

I have a TIN model where I remove some of the triangles (see fig. 1). Most of the triangles touch on one edge, some on one vertice. I would now like to generate a polygon shapefile containing the ...
0
votes
1answer
32 views

Where can I find ogr_FileGDB.dll v1.4 compilled for Windows?

Since v1.3 do not have custom CRS support, where can I find the ogr_FileGDB.dll v1.4 compiled for Windows?
0
votes
0answers
30 views

GeoPandas save to shapefile issue: Unable to open EPSG support file

When I try to use to_file() to write a GeoPandas GeoDataFrame to a shapefile I get the following error. df3.to_file('~/Desktop/testout.shp', driver = 'ESRI Shapefile'); ERROR:Fiona:OGR Error 4: ...
0
votes
1answer
35 views

How add a text field and then reproject all shapefiles which are in sub folders

I have a folder and inside of that folder, I have about 500 sub folders which contain on average about 5 shapefiles each. What I want to do is: to check if there is a field, lets say field_1, and ...
0
votes
0answers
26 views

Aggregate/merge data upon insert into PostGIS (via gdal)

I am working on a project where I take a large raster file (1.5GB+), put it through a number of image-processing operations, and finally convert it to vector data. Being that the raster is large, I am ...
3
votes
1answer
45 views

How to re-compile ogrinfo against gdal used by QGIS?

I just solved a problem with missing libraries blocking use of ogrinfo and ogr2ogr, only to find that these utilities are garbled in one more way: whenever I run any of these, I get following error ...
2
votes
2answers
11 views

Fusion table connexion issue

I'm trying to import some data from a SHP to GFT (Google Fusion Table). I get a 401 error. I'm using an Ubuntu 14.04 LTS Linux 64 bits with GDAL 1.11.0, released 2014/04/16. GFT is available (tested ...
0
votes
0answers
28 views

Install GDAL 2.0 on a MacOSX

Anbody knows what's the easiest way to install GDAL 2.0 on a MacOSX? The usual suspects kingchaos binary distribution and homebrew seem to be stuck on GDAL 1.11 I need support for TopoJSON feature ...
0
votes
1answer
27 views

Using ST_LINE_INTERPOLATE_POINT in OGR and python

I'm interested in finding the midpoint on a linestring using OGR and python. This can be a line with more segments. Could I use the ST_LINE_INTERPOLATE_POINT in python using the ExecuteSQL() method? ...
1
vote
1answer
31 views

Python ogr filter attribute SQL

I have a shapefile with 4 attribute fields (MC_ID, MC_info, C_ID, C_info). I want to change some MC_ID values selecting the features by C_info. For example: I want to set MC_ID = 2 for C_info = g19, ...
2
votes
0answers
31 views

Is GDAL/OGR (specifically CoordinateTransformation) thread-safe?

I'm using the Java bindings if it matters. I have a heavily multi-threaded program and this is one of the bottlenecks that I have in a synchronization block. If I could remove the synchronization, it ...
1
vote
0answers
16 views

how can I get the rest attributes like ATTV, ATTL etc. using S57 Reader?

I'm using GDAL to read S57 files to display them with S52 styles, but I was unable to get the attributions like "ATTV", "ATTL"? Do you know how to get it? I have put the two supporting files, ...
1
vote
1answer
42 views

How to read GeoCSV with OGR?

I have a GeoCSV file which stores the geometry in a WKT formatted cell following this recommendation: "identifier","date","geom","value" "Dgf01","15.04.2013","POINT (52.404869 13.147457)","285" ...
0
votes
0answers
15 views

How to specify the new layer type in writeOGR{rgdal}?

There is a task that we copy some polygons into postgis using rgdal package. I noticed postgis is strict with geometry type so that the new multi-feature layer type must be specified. I tested the ...
0
votes
0answers
36 views

How to build .vrt of shapefiles?

I've a huge number of shapefiles and I would like to create a VRT as I do with gdalbuilvrt for raster. I find here https://github.com/dwtkns/gdal-cheat-sheet that it should be possible and the format ...
0
votes
2answers
62 views

CRS problem between QGIS and fiona / OGR

I have a really annoying problem working with QGIS for visualization and python (fiona / OGR) for the actual operations. I am, by example, doing a simple dissolving operation with fiona. The input is ...
0
votes
1answer
43 views

Filter OGR datasource in Python (or XML)

I'm trying to streamline the process whereby we build tiles (of ~30 layers, representing planning zone and zone-overlay boundaries). I have a strong preference for FOSS tools. A couple of our people ...
2
votes
2answers
90 views

Creating a really large shapefile without eating all the virtual memory

I am doing something similar to below to create a really large (large than memory on my machine) shapefile: shapes = shapefile.Writer(shapefile.POINT) shapes.autoBalance = 1 shapes.field('MyId','N') ...
2
votes
2answers
188 views

How to make a movie from a ascii grid files?

Lets say I have several ascii grid files for each time step for a particular location. I would like to spit out the image for each of these ascii grid files and legend on the side bar. I also would ...
3
votes
2answers
203 views

How to make a local copy of a large WFS dataset?

We are writing a application in which a part of the job is to fetch a relatively large (>10000 features) and often updated dataset from a WFS server, store a local copy, and do geospatial analyses on ...
2
votes
0answers
70 views

Enable LWGEOM for OGR tools (QGIS 2.8)

I am doing some scripted operations on a Spatialite DB using OGRINFO, OGR2OGR etc. in the QGIS 2.8 OSGEO4W shell. Unfortunately, LWGEOM functions such as ST_Split() are unavailable and ...
0
votes
1answer
41 views

How to get unique feature count from a field w.r.t another field using ogrinfo?

We have some 40 folders which has two - three tab files in each folder. Table structure will be the same for all the tab files. What i would like to extract is Feature Count, LineNo (will be ...
1
vote
0answers
96 views

Serving Dynamic Tiles

I want to display data (tiles and utfgrid info) inside MSSQL on top of google maps using Mapnik. I have looked into mapnik and setup a small prototype both with tilestache and also with node-mapnik ...
1
vote
1answer
47 views

NAD83 2011 AZ central projection

I am having trouble getting GDAL to read a file geodatabase with data projected in NAD83(2011) State Plane Arizona Central FIPS 0202. I have developed the following code: # standard imports import ...
0
votes
0answers
120 views

How to write features in file geodatabases (FileGDB) with GDAL and Python?

I am trying to copy features from a spatiallite database to a filegeodatabase. The target FileGDB already exists with the required feature classes. I am using the FileGDB-API 1.4 on Ubuntu and Python ...
0
votes
0answers
68 views

GDAL/OGR - Ogr_wrap.dll entry point not found

I am using the latest stable compiled binaries of GDAL 1.11 from gisinternals.com with a C# project in Visual Studio 2013 and im having some problems with the ...
0
votes
1answer
91 views

How to get projection data (.prj) of raster image using GDAL/OGR?

I start with a boundary shape-file (think U.S. states) in lat/long that I convert to some projection, and then rasterize the result as a .tif. What I need now are the raster coordinates of the ...
1
vote
1answer
29 views

Most efficient way to retrieve pixel distributions inside many polygones (custom zonal stats)

I want to get the distribution of pixels from a 1 band raster that fall in each polygon of a shapefile to proceed to some statistics. I guess a zonal statistics does it in some kind of way but I need ...
2
votes
1answer
82 views

Defining projection using readOGR if the shapefile doesn't have it?

I think that by using readOGR to import a shapefile renders worthless to put proj4string to the script since if any coords are available in the shapefile, it will be transported through the readOGR. ...
1
vote
2answers
239 views

How to read ESRI File Geodatabase (FileGDB) with OGR?

I have a file ending with *.gdb. I don't know what it actually is. I also don't know what to expect inside the file. I am trying to access it with ogr. I tried with ogrinfo: ogrinfo test.gdb ERROR ...
3
votes
1answer
114 views

Force OGR to use specific driver for input format

How could one force ogr2ogr to use a specific format to read input files? Out of the box ogr2ogr automatically chooses from it's long list of formats, which most of the time is great. However today ...
0
votes
0answers
35 views

GDAL/OGR C++: How to connect to SQL

Using GDAL 1.11 it is possible to execute SQL commands against a OGRDataSource: But how do I connect the OGRDataSource to a SQL Database? In my case an Oracle XE 11g. I suppose the OCI drivers have to ...
0
votes
0answers
31 views

How to use cx_Oracle db connection with OGR API

I am creating ogr datasource for oracle spatial using OCI connection in pyton code successfully. I can also get the layer from the datasource and I can add new features. But I am also using ...
1
vote
1answer
180 views

dissolve polygons of GeoJSON with gdal/ogr

I have a GeoJSON with only polygons in it. I have to dissolve (merge) the polygons with the same "DN"-value. I found out that you can do it with shapefiles like this: ogr2ogr outputfile.shp ...
1
vote
0answers
58 views

Reading/writing utf-8 encoded data using Fiona?

So I have a 'cpg' file with my 'in_file' shapefile data (definitely set to 'utf-8'). I was using 'meta' to create the same schema/crs as 'in_file'...though it runs, my text fields are borked on ...
0
votes
2answers
161 views

How to measure distance using shapely

Reading the documentation...it looks like I should have this right, but I don't. The example is: Point(0,0).distance(Point(1,1)) 1.4142135623730951 Based on this example I wrote this block ...
1
vote
1answer
63 views

How to call 'shapely' .coords on a fiona filtered list?

I have to filter a shapefile by attribute then compare it to another shapefile using .coords...however I am a bit perplexed how to do this as my filter is returning a list type...(and .coords requires ...
0
votes
1answer
122 views

Converting JSON to GeoJSON MultiPoint using `ogr.CreateGeometryFromJSON`

I am trying to convert a JSON array to a geom in Python, by first converting it to a GeoJSON. I have point coordinates in a JSON array, [{'lat':100.0, 'lng':0.0},{'lat':101.0, 'lng':1.0'}] that ...
1
vote
0answers
127 views

create image out of geojson (gdal_rasterize?)

Short version: I need to know how I can convert a .geojson-file to an according .png-file (or any other image format) long version: I have a .geojson which was created by gdal_polygonize from a .png ...
0
votes
0answers
42 views

Using GDAL with a line layer and points layer, find next point along line layer

With the points layer and line layer, I'm trying to create a graph for path finding. I've got a line layer that I've dissolved, thinking that might make this easier. The points in the points layer lie ...
2
votes
1answer
273 views

QGIS 2.8.1 ogr OpenFileGDB zip format

I am experimenting with the OGR OpenFileGDB zip file format in QGIS 2.8.1 on Windows 8.1 x64 and although OGR says it can happily read the format (with a couple of Code Page warnings) I am unable to ...
0
votes
1answer
116 views

Coordinate Transformation in Gdal/Ogr (EPSG:4326 to EPSG:3068)

I think gdal/ogr(/proj4) doesn't recognize epsg:3068 right? Here is what I tried: public static void transformSRS(){ // creating EPSG:4326 SpatialReference sourceSRS = new ...
0
votes
0answers
14 views

Reprojecting: Different results in OGR and PROJ.4 for EPSG24373 (India) [duplicate]

I need to convert EPSG4326 lon/lat tuples to EPSG24373 (Kalianpur 1880 / India zone III). However, when using the Python bindings of OGR and PROJ.4 (pyproj), I get different results. I wrote the ...
2
votes
1answer
108 views

Difference between osgeo gdal/ogr python module and GDAL C++ library

I am developing application in python and I use the osgeo gdal/ogr python bindings for gdal, but its not clear to me what exactly is the difference between the gdal/ogr in python and the gdal library ...
3
votes
0answers
257 views

Why are OGR (MySQL / PostGIS) connections extremely slow in QGIS 2.0 - 2.8 (when compared to QGIS 1.8)?

In our project we have been using QGIS 1.8 Lisboa with a MySQL database placed on a server accessed via local network since two years. Everything is working fine and quick. The vector layers can be ...
4
votes
2answers
494 views

GDAL in C++: Reading a ShapeFile

I am trying to use the GDAL Lib to read a ShapeFile (.shp). I followed the instructions of http://www.gdal.org/ogr_apitut.html - But it doesn't work! #include <gdal_priv.h> #include ...
1
vote
0answers
92 views

How to set time field when generating a GPX track with Python OGR?

I want to generate a GPX file with Python OGR. In particular I want to generate a tracks (layer of features of OGR type wkbMultiLineString) My script is below. I get the error ERROR 1: No such field: ...
2
votes
2answers
126 views

Find unit of EPSG-Code

I need a way to find out the unit of an EPSG-Code (e.g: meter) from java (ogr, gdal, osgeo?) but any other approach would be fine as well. I want to do something like: if(epsg.unit==meter){ do ...