Questions tagged [ogr2ogr]

ogr2ogr is an open source command line utility popular for converting to and from various vector spatial data formats.

230 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
339 views

ogr2ogr SQL Expression Error, From starting with number

I'm merging shp files with ogr2ogr in a python loop and adding the specific filename as coloumn. A command looks like: ogr2ogr -f "esri shapefile" -update -append final/merged.shp 3044/...
0
votes
0answers
120 views

Extracting data from OSM with ogr2ogr --- blank output

I have an issue while extracting data from osm via ogr2ogr. What I tried: When I run from command line: ogr2ogr -f "ESRI Shapefile" example.shp source.pbf -lco ENCODING=UTF-8 -progress -sql "SELECT ...
0
votes
0answers
299 views

Convert Polygon to MultiPolygon using features attributes

I'm trying to convert SHP files to GeoJson using ogr2ogr and that works well with Polygon. Now I'm struggling to convert multiple Polygon geometry features to a single one (MultiPolygon) for each ...
0
votes
0answers
72 views

Transfer indexed Oracle geoloc table to PostgreSQL using ogr2ogr

I am copying tables using ogr2ogr from Oracle to PostGIS using ogr2ogr -f "PostgreSQL" PG:"host=<host> port=5432 user=<user> dbname=<dbname> password=<pwd>" OCI:<USERNAME&...
0
votes
0answers
37 views

How to make sure GDAL Java binding doesn't crash my whole application?

I'm using GDAL Java binding to convert some files (ogr2ogr), such as shapefile to GeoJSON. The problem is when something goes wrong it crashes the whole application and I have to start it up again. ...
0
votes
0answers
132 views

How can I convert a MULTILINESTRING geodatabase file into a coordinate system with lat / long for individual points in a CSV file?

I have tried ogr2ogr, and QGIS but nothing seems to work for converting a MULTILINESTRING into individual lat/long coordinates. I am doing this in order to get it into a flat file so I can rearrange ...
0
votes
0answers
280 views

Missing WFS driver in gdal installation

How do I enable WFS driver in gdal? I've installed gdal from the official osgeo source in Fedora 27 using make. But running ogrinfo --formats, the WFS support is missing. It seems that the format is ...
0
votes
1answer
71 views

OGRInfo On Shapefile = zero length delimited identifier error

I have an ESRI Shapefile that I can open in ArcMap and QGIS and show the attributes fine. However when I try to load to PostGIS using ogr2ogr I get an error saying ERROR 1: ERROR: zero-length ...
0
votes
0answers
480 views

ogr2ogr: How to export / explode GeoJSON features from collections into separate files

I would like to use an ogr2ogr command to export features as multiple separate geojson files from a single GeoJSON feature collection. I have tried using the -explodecollections command but I am ...
0
votes
0answers
233 views

Chinese encoding problem in ogr2ogr from DXF file to GeoJSON?

I have a dxf format file named test.dxf which has some Chinese characters inside. I tried to transform it to GeoJSON file using ogr2ogr -f GeoJSON test.geojson test.dxf and returned GeoJSON showing ...
0
votes
0answers
174 views

Android Library to convert ESRI Shapefiles to GeoJSON

I'm building an Android App for display ESRI Shapefiles but unfortunately, there are only a few free SDKs which support Shapefiles. Most of them working with GeoJSON, so now I'm looking for an Android ...
0
votes
0answers
294 views

Alter and update a shapefile with a field from an ASCII file using ogr

I have a vector file "map.shp" with a field ID. I have an attribute table (data.txt) with the following fields: ID, value1, value2. The field ID is the same in both files. I want to update map.shp by ...
0
votes
0answers
232 views

ogr2ogr merge fgdb (while importing to PostGIS)

I have millions of records and hundreds of tables in several file geodatabases.. The tables name in these FGDBs are all same but just in different areas. For instance, the Admin table, you see below,...
0
votes
0answers
67 views

Cronjob to load OSM data into PostgreSQL with ogr2ogr fails

I try to load daily updates from OSM into a PostgreSQL database. For this I download daily dumps from Geofabrik and load them into my database using ogr2ogr. My script runs fine when running from ...
0
votes
0answers
297 views

ogr2ogr: Transformation from NAD27 to WGS84 not working

I'm trying to use ogr2ogr to transform from NAD27 to WGS84 and check the precision afterwards. For that, I used a GML file with coordinates -124.0, 48.0 It looks like this: { "type": "...
0
votes
1answer
316 views

Connecting to several WFS using python/OWSLIB/OGR2OGR

I'm trying to download a lot of datasets from different WFS URLs using ogr2ogr (and to an extent, owslib) in Python. My problem arises when I try to connect to a second WFS. In my test code, I have ...
0
votes
0answers
172 views

ogr2ogr: extract text elements from PDF into attributes

I have PDF created by the local geodetic authority which is kind of geospatial and contains layers of cadastre underground services (water, sewer, etc) as lines, points, and textual attributes ...
0
votes
0answers
392 views

FileGDB feature layer processing using OGR2OGR sqlite scalecoords

This is an extended question of the following link : Multiply or Divide certain numbers on a projection file(?) of Japan It works great with shapefiles but somehow it's not working well with FileGDB ...
0
votes
0answers
2k views

How to merge multiple GeoPackage files into one file with a single layer using ogr2ogr?

I'm using ogr2ogr in a bash script to merge multiple gpkg files. What I'm doing basically looks like this: ogr2ogr -f 'gpkg' -append merged.gpkg input_file_1.gpkg ogr2ogr -f 'gpkg' -append merged....
0
votes
0answers
288 views

Attribute query in ogr2ogr

I am trying to export a specific part of a dataset, based on an attribute query. My dataset has a field REGION and I would like to select all features where the region is equal to 2. Here is my ...
0
votes
0answers
933 views

converting geojson to shapefile gives error "Unable to Unable to open datasource using following drivers"

Im trying to convert geojson file to shapefile. Below is the code import ogr2ogr import json def main(): #note: main is expecting sys.argv, where the first argument is the script name #so, the ...
0
votes
0answers
267 views

Alternative program to ogr2ogr

Is there an alternative program to ogr2ogr when trying to convert file formats? I've played around with ogr2ogr quite a bit lately (on Windows) but I can't get around some issues .. For example when ...
0
votes
0answers
378 views

Installation and execution of GDAL

I am trying to install GDAL on the remote server. I do: pip install GDAL==1.9.1 It gets installed and then I try to do: gdalinfo --version But I get 'command not found'. I understand that I have ...
0
votes
0answers
471 views

Merging polygons in SHP

Is it possible to merge polygons, using ogr2ogr cmdline tools? I.e. taking a SHP file and generate a new one, where records are merged when a field has the same value?
0
votes
0answers
379 views

How can I prevent ogr2ogr from trying to get the SRID from PostGIS?

I'm running ogr2ogr for a PostGIS to GeoJSON export like this: ogr2ogr -s_srs EPSG:4326 -f GeoJSON unique_geoms.json "PG:host=localhost dbname=local_data user=local_user password=local_pass" -sql "...
0
votes
0answers
293 views

error converting shapefile to geoJSON with Ogre online tool

I am using on online tool built with ogr2ogr to convert shapefiles to geoJSON: http://ogre.adc4gis.com/ It's worked well except for one shapefile, and I can't see why... The shapefile has only six ...
0
votes
0answers
465 views

ogr2ogr export to KML from SQLite, when using SELECT for fields Linestrings are lost

I'm using: ogr2ogr -sql "SELECT * FROM 'trails_utm_utf8' ORDER BY name ASC" -f KML trails.kml trails_utm_utf8.sqlite -s_srs EPSG:900913 -t_srs EPSG:4326 to reorder, re-project and export to KML from ...
0
votes
0answers
166 views

Export additional data with ogr2ogr

I am trying to import my ESRI-shapefile with OGR2OGR to an existing mysql table. This works fine but unfortunately only the featureID and the geometry data is exported. How do I add the labels of the ...
0
votes
0answers
225 views

How to specify the version of output SQLite database in ogr2ogr?

I'm having issues with a .sqlite database that I generate from PostGIS using ogr2ogr. The data appears to export into SQLite properly, and it loads in TileMill fine, but when I try to add any of the ...
-1
votes
1answer
227 views

ogr2ogr cannot import data

I can successfully get a connection to my remote sql server database using: ogrinfo "MSSQL:server=my_server_name;database=my_database;Trusted_Connection=True;" But when I try to import an ...

1 2 3 4
5