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
0 answers

Writing a geopackage error - violating constraints?

I have a geopackage that I want to split into many smaller geopackages. Kind of like 'tiles'. I have been successfully using the ogr2ogr tool for many countries around the world. But for some reason this bit does not work (the area in question is…
TheRealJimShady
  • 777
  • 3
  • 9
  • 24
0
votes
0 answers

Restore ABS Mesh Blocks data into postgres

I've downloaded the ABS Mesh Blocks data set. and i want to restore it into postgres db using ogr2ogr. inside the downloaded folder i've below files MB_2021_AUST_GDA2020.dbf MB_2021_AUST_GDA2020.shx MB_2021_AUST_GDA2020.prj …
Inshaf
  • 31
  • 1
  • 6
0
votes
0 answers

oracle ogr2ogr import to DB wrong encoding Brazilian shapefile

I'm facing a problem while importing a shapefile with ogr2ogr with portuguese-brazilian charset. The shapefile has been downloaded from OpenStreetMap and is correctly read on QGis. When I tried to import it through ogr2ogr I got several street names…
nidhogg
  • 11
  • 3
0
votes
0 answers

Does ogr2ogr support selecting from gpkg using shp polygons as filter?

I have two input sources: region.shp. Geometry type MultiPolygon. Currently contains 3 regions. roads.gpkg. One layer, "road" with geometry field named "geom" with type LineString. I want to create a new gpkg with all the roads that are within…
Mads Skjern
  • 5,648
  • 6
  • 36
  • 40
0
votes
0 answers

How to avoid warning: ogr2ogr: Warning 1: Several drivers matching gml extension. Using GML

I run ogr2ogr to create a GML file from a Spatialite file. $ ogr2ogr dump.gml spatialite.db Warning 1: Several drivers matching gml extension. Using GML It always produces this warning, which I would like to avoid since it shows up in my error log.…
Mads Skjern
  • 5,648
  • 6
  • 36
  • 40
0
votes
1 answer

Python ogr2ogr command not found

I have a python code that worked before, I converted data from shp to kml, I'm working on colab, I was getting the result with the following code after running all the necessary libraries, but my code has been giving the following error for about 1…
0
votes
0 answers

Ogr2Ogr appending duplicate records (2X Times) to PostgreSQL Table

I'm synchronizing data from AmigoCloud's table with a PostgreSQL table. I'm using GDAL's ogr2ogr module in osgeo environment. The command I'm running is as follows: ogr2ogr -append -f PostgreSQL PG:"dbname=`my_db_name` user=`my_user`…
RMT
  • 105
  • 8
0
votes
0 answers

Ogr2Ogr conversion to SQLIte: geometry format?

I use ogr2ogr to convert DXF-files. The conversion to KML and geojson works very well. For another purpose I need to convert the DXF to SQLite. It works, but I don't know how to use or read the geometry. There's a table "Entities" with a column…
Jim Beem
  • 21
  • 3
0
votes
1 answer

GDAL version 3 and higher does not work with Mapinfo and Decimal Fields

I'm having a problem trying to convert a MapInfo file from MID/MIF format to TAB format. This problem occurs from version GDAL 3.0.4 and higher. On version 2.1.2, everything works without problems. I use the following command ogr2ogr -f "MapInfo…
0
votes
0 answers

converting geojson linestring to geojson point

I have some geojson files in linestring format. Do you know how to convert these to point format? I tried to look up ogr2ogr to do this but could not find any information? What methods could I use or how could I use ogr2ogr to convert a geojson…
jms1980
  • 1,017
  • 1
  • 21
  • 37
0
votes
0 answers

"InvalidResourceName" when trying to access parquet files from Microsoft's Planetary Computer Blob Storage

I have some python code that makes a call to Microsoft's Planetary Computer api and gets back a signed url. I am then trying to call ogr2ogr in a subprocess to pull down the parquet files and insert them into a database. When I use dask as…
kmedlen
  • 11
  • 3
0
votes
1 answer

OGR2OGR PostgreSQL / PostGIS issue after enabling postgis extension on import

I'm running psql (PostgreSQL) 14.5 (Homebrew) with PostGIS extension version 3.3 I'm using gdal's ogr2ogr to import geojson files. ogr2ogr -f "PostgreSQL" PG:"dbname=test4 user=myuser" "myfile.geojson" If I import all files into a new database and…
Brettk80
  • 1
  • 1
0
votes
0 answers

How to use mapFieldType with gdal.VectorTranslate

I'm trying to export a postgresql database into a .gpkg file, but some of my fields are lists, and ogr2ogr send me the message : Warning 1: The output driver does not natively support StringList type for field my_field_name. Misconversion can…
0
votes
1 answer

Spatialite in Cygwin

Using the latest setup-x86_64_2.919 to install Cygwin, I just noticed that Spatialite is not there. So, I installed it from the source code (libspatialite-5.0.1.tar.gz) and I re-installed gdal-3.5.1 from the setup file. It seems that gdal has not…
Gery
  • 8,390
  • 3
  • 22
  • 39
0
votes
1 answer

Error - ERROR 1: Unable to find driver `‘ESRI'. while running ogr2ogr command

I have installed gdal $ conda install -c esri gdal And then tried to run the command to merge 2 shapefiles $ ogr2ogr -f ‘ESRI Shapefile’ n4600e00800_30.tif_highlight-1.shp n4600e00900_30.tif_highlight-1.shp but getting error ERROR 1: Unable to…
user1298426
  • 3,467
  • 15
  • 50
  • 96