Questions tagged [ogr2ogr]

ogr2ogr is used to convert simple features data between file formats performing various operations during the process such as spatial or attribute selections, reducing the set of attributes, setting the output coordinate system or even reprojecting the features during translation.

97 questions
0
votes
1 answer

Convert postgis tables to Mapinfo files

I have serval postgis tables that are converted from MIF/MID files, and I made some data processing on them. I used ogr2org to convert MIF/MID to postgis tables, ogr2ogr -f PostgreSQL PG:"" "xxx.mif" but how can I convert the tables to…
Tom Leung
  • 334
  • 5
  • 18
0
votes
1 answer

How to build gdal jni on windows

I want to use ogr2ogr.java and it need the GDAL jni to work. I have tried following the instruction mentioned here Build Instructions for GDAL/OGR In Java (Windows) but, still I am not able to build it. I am using windows 7 64 bit operating…
Deepak Pandey
  • 618
  • 7
  • 19
0
votes
1 answer

SQL Server ogr2ogr batch unable to access ogr_MSSQLSpatial.dll

I have an ogr2ogr batch file that reprojects SQL data into a new SQL Server table. It works fine when I run the bat file manually but it fails if I run the bat file via a SQL Server stored procedure. I have given the gdal folders SQL Service…
0
votes
0 answers

ogr2ogr Batchfile from TSQL Stored Procedure

I have a stored procedure with the following sql EXECUTE xp_CMDShell '\\gissrv\data\BroadSpectrumSQLTreeExtract\ogr2ogr_reproject.bat' which is meant to run the batch file containing pushd \\gissrv\data\BroadSpectrumSQLTreeExtract\ogr2ogr ogr2ogr…
0
votes
1 answer

gdal ogr2ogr produces empty files when converting kml files

I am trying to covert a bunch of .kml files using gdal ogr2ogr on terminal on a machine running Mac OS 10.12. There is no error message, but the output files are empty. .kml files are google location history downloads. The code I am using is:…
supercontra
  • 165
  • 1
  • 9
0
votes
1 answer

Converting .qgs to .shp

I have a .QGS file which I'm unable to read as QGIS is not my main platform for visualising maps. Our main platform is ArcGIS. Is there any way I can convert from .QGS to .shp or .mxd? I'm trying to use http://www.ogr2gui.ca/ to help me convert but…
MaryLim
  • 13
  • 6
0
votes
1 answer

output from GDAL ogr2ogr

I want to convert a .shp file to .geojson format using ogr2ogr, which I can do from the (linux) command line. However, rather than a command line conversion, I want to invoke the conversion from a php script (using e.g. exec(..) ) and send the…
MikeP
  • 71
  • 6
0
votes
1 answer

Convert Mapinfo files into postgis tables

I have files: Postcode Area Boundaries.MID "AB","Aberdeen" POLYGON((383707 866131,383465 866240,383302 866387,383202 866505,383089 866586,.....)) "AL","St Albans" POLYGON((526248 203348,....)) ....... Postcode Area Boundaries.MIF VERSION…
nospor
  • 4,190
  • 1
  • 16
  • 25
0
votes
0 answers

Convert MIF and MID files into postgis tables

I have tables like this: CREATE TABLE postcode_area_boundaries ( ogc_fid INTEGER, wkb_geometry GEOMETRY(MultiPolygon,3857), postarea VARCHAR(2), area_km DOUBLE PRECISION, area_mi DOUBLE PRECISION, ); CREATE TABLE…
nospor
  • 4,190
  • 1
  • 16
  • 25
0
votes
1 answer

sqlite query on path as directory, ogr2ogr

I am using ogr2ogr to remove null geometries rows in a shapefile. All works fine when work in the directory and run the command below without the path. To do this efficiently, I need to be able to query on the shapefile by giving its path. The…
brendan8229
  • 47
  • 1
  • 2
  • 9
0
votes
1 answer

topojson - combine county CSV data into shp file for state

I am trying to combine a CSV file of county data with a SHP file of NY state that I got from the US Census site. I've downloaded the shape files. And lets say for NY, this would be the CSV file: countyid countyname 1 Albany County 3 Allegany…
gregdevs
  • 703
  • 2
  • 11
  • 37
0
votes
1 answer

Filename and path link in batch

So I have a line of code in .bat using ogr2ogr geospatial tool: for /R %F in (*_gpx.shp) do ogr2ogr -update -append "%~dpnF.shp" "______________" In the "___________"space I need to specify a file, that: -is in the same folder as *_gpx.shp…
adamczi
  • 343
  • 1
  • 7
  • 24
0
votes
1 answer

How to use GDAL's ogr2ogr to create bounding box

I'm learning about GeoJSON and following Bostock's Lets Make a Map tutorial. Here he uses Natural Earth data, and converts SHP files to JSON for use in D3. The following takes only GBR and IRL data from the SHP file to create subunits.json, which I…
user3821345
  • 648
  • 1
  • 11
  • 33
0
votes
1 answer

Combining GeoJSON Features

I have a large (200MB) geoJSON file that has a lot of complex polygons and multipolygons. A very truncated example is at https://gist.github.com/jinky32/81f61e1fc118822ba103?short_path=d16949b As you can see this file is comprised of polygons and…
Stuart Brown
  • 977
  • 2
  • 22
  • 47
0
votes
0 answers

I get differents geojson using GDAL ogr2ogr 1.10.1 or 1.9.0 version

I have two Ubuntu environments: one has installed GDAL 1.10.1 and second has installed GDAL 1.9.0. If I run into env. GDAL 1.9.0: ogr2ogr -f GeoJSON filename.geojson filename.kml filename.geojson has this structure: { "type":…
imruizme
  • 11
  • 3