1
vote
1answer
49 views

ogr2ogr/python overwrite PostGIS table

Using ogr2ogr command line I can overwrite or append to an existing PostGIS table like: ogr2ogr -f "PostgreSQL"-overwrite PG:"host=myserver port=54321 user=user dbname=mydbname password=mypassword" ...
0
votes
1answer
132 views

Will MapInfo only read PostGIS data that has been loaded via EasyLoader?

NMZ says in this thread that MapInfo will only read data in PostGIS that has been loaded by MapInfo's EasyLoader. I wasn't sure if this was still the case so I've loaded data into postgis via ogr2ogr ...
0
votes
1answer
89 views

Convert from Gauss-Kruger to Bing coordinates / projection

I am trying to convert a shapefile with ogr2ogr from Gauss-Kruger (zone 4) to Bings coordinate system / projection using the advice given in ...
1
vote
2answers
244 views

How to change shapefile longitude from -180 - 180 to 0 - 360?

I have a shapefile of world countries, with longitude between -180° and 180°. How can I change the shapefile (eg. with ogr2ogr) for having longitude between 0 and 360°. Following OSGEO/Trac ...
3
votes
1answer
52 views

New attribute creation using ogr and regex

I've got a folder full of dxf files with elevation values included as part of a long text attribute. I've written a regex expression to extract the elevation value, and would like to add it as a new ...
5
votes
1answer
143 views

ogr2ogr selecting features by attributes

I am writing a shapefile after some processing; however, in the final step I need to do some selection by attributes from the the shapefile. I am using the command in a shell with the aim of using it ...
0
votes
0answers
30 views

How to retain crs data when datum-shifting using ogr2ogr?

I'm converting a shapefile from OSGB36 to WGS84 using ogr2ogr like so: ogr2ogr -f "ESRI Shapefile" new.shp original.shp -s_srs EPSG:27700 -t_srs EPSG:4326 However, the original contains the ...
2
votes
2answers
151 views

Change python + ogr2ogr.exe to python + ogr

I have written several complicated python scripts that end up using ogr2ogr to load or translate data. I have been converting these scripts to standalone exe files meaning the team do not require ...
1
vote
1answer
214 views

Error during conversion of shapefile to MySQL using ogr2ogr

I have installed MS4W in Windows 7. I get an error when I try to convert a shapefile to MySQL database using GDAL/OGR ogr2ogr. This is the command I'm trying: C:\ms4w\tools\gdal-ogr>ogr2ogr -f ...
0
votes
0answers
49 views

VSI File API support in ogr2ogr

It seems that support for streaming input is wishy-washy in ogr2ogr. For example, why can I do this: curl "http://data.usgin.org/arizona/wfs?service=WFS&version=1.1.0& ...
3
votes
1answer
595 views

ogr2ogr coverting DXF to shapefile, why am I losing part of the feature?

I'm starting to mess around with some of the GDAL toolsets, specifically the ogr2ogr. I'm working with converting a 2000 ACSII DXF file to shapefiles depending on geometry. Everything seems to work ...
1
vote
1answer
67 views

Offset shapefile to start from prime meridian

I have Natural Earth shapefile (for example this file: link) covering whole globe in -180:180 range. I want to offset this file, so that it starts from Greenwich prime meridian instead -180. How can ...
2
votes
1answer
310 views

Batch convert OSM/PBF data

I need to import some OSM data about a region of Italy into a SHP file or Postgres DB, possibly with batch process. I already use OGR2OGR to batch import data from SHP to Oracle and Postgres and I ...
1
vote
3answers
120 views

Why is ogrinfo showing no layers from an ESRI FileGDB?

I have an ESRI File Geodatabase (FileGDB) (size is 15+GB), which has over 10 layers, when I open it up in ArcGIS, everything seems to be working. I want to move this database to postgreSQL with OGR ...
2
votes
1answer
254 views

How to debug ogr2ogr ERROR 1: Did not get at least 2 values or invalid number of set of coordinates?

I'm trying to convert a government data contour GML (http://geo.data.linz.gv.at/katalog/geodata/hoehenschichten/2011/1m-Hoehenschichten.gml) to Shapefile. It seems like it was created by FME: ...
3
votes
1answer
2k views

How do you open shapefiles with ogr2ogr

I'm following along the D3 tutorial, and on this line: ogr2ogr \ -f GeoJSON \ -where "adm0_a3 IN ('GBR', 'IRL')" \ subunits.json \ ne_10m_admin_0_map_subunits.shp run into the following ...
2
votes
0answers
160 views

Ogr2Ogr: Failed to create GPX file output.gpx

When i try to export an shapefile to gpx using ogr2ogr. ogr2ogr -f GPX output.gpx D:\mypaste\input.shp -sql "SELECT Id AS name FROM layername" It gives me the following error "Failed to create GPX ...
3
votes
2answers
428 views

Why does Ogr2Ogr Postgres import fail?

I have a lot of S57 files that need to be imported to PostgresDB. The process takes over 2 hours. In order to improve performance, I have tried using PG_USE_COPY to use copy instead of DB inserts. I ...
5
votes
1answer
977 views

OGR Shapefile to CSV: Using Python to get WKT for multipart Polys.

Using ogr2ogr and python, I'm running into a wall with trying to create a csv with WKTs for a shapefile that contains multipart polygons. Currently this is this code I'm using (found it on interweb): ...
0
votes
1answer
650 views

How current is GDAL in Java

I have used the ogr2ogr to import various formats to Postgres and have used GDAL utilities. Is there a complete Java port for these tools? Or are they simply wrappers calling JNI to C++ code? I have ...
2
votes
1answer
1k views

How to reproject shapefile using ogr2ogr

I have shapefile in EPSG:2834 and I want to reproject it into EPSG:4326. I am trying to use ogr2ogr in Windows; however, I get this failure output: C:\Users\Nik\Desktop\Logan_Lines>ogr2ogr -t_srs ...