New answers tagged ogr2ogr
1
vote
Accepted
Wrong schema while importing data via with ogr2ogr into postgresql database and using dblink
I have found the solution. It was not a problem within the database, it was a missleading config of the ogr2ogr command. Actually it is possible to set the schema with the -nln parameter! But at this ...
2
votes
Accepted
Extract particular layers from DXF file and make shapefile
You can separate the data in this way:
ogr2ogr -f "ESRI Shapefile" -skipfailure --config DXF_MERGE_BLOCK_GEOMETRIES TRUE --config DXF_INLINE_BLOCKS TRUE -nlt POINT -sql "select *, ...
2
votes
Reducing shapefile size from PostgreSQL using ogr2ogr
You can shrink the shapefile that ogr2ogr has created. Read https://gdal.org/drivers/vector/shapefile.html#field-sizes
It is also possible to force a resize of the fields to the optimal
width by ...
0
votes
Convert a mbtiles tileset folder into a single .mbtiles SQLite file?
You should be able to use mbutil from Mapbox, which allows you to either convert .mbtiles file to a folder or vice versa. There is also a PyPi package, you can use.
This should work for you:
mb-util --...
0
votes
Get coordinates of .pbf/.osm of ways and relations directly?
No, it is not possible to get the geometry of ways and relations directly. The OSM data model is based on nodes-ways-relations https://wiki.openstreetmap.org/wiki/Elements. Steve Coast has written a ...
2
votes
Multipart to Singlepart in ogr2ogr
ogr2ogr has an -explodecollections flag. Different name – same result.
ogr2ogr -explodecollections singlepart.gpkg multipart.gpkg
1
vote
Accepted
ogr2ogr list of layers created
Ogr2ogr by default does not change the names of the layers and you should get a list with
ogrinfo -nomd -nogeomtype foo.xlsx
However, the PostGIS driver https://gdal.org/drivers/vector/pg.html ...
0
votes
Merging large number of .shp files via command line with ogrmerge.py
Various commenters suggested this problem would be easier to deal with by creating subdirectories.
I wrote a python script to do this and also merge the shapefiles. It isn't elegant, but it works.
...
3
votes
GDAL og2ogr: insert/update existing PostGIS table from shapefile
If the field names in PostGIS and shapefile are the same a command like this should work.
ogr2ogr - progress - append
-f PG:"dbname='dbname' host='ipXXXXX' port='5432' user='XXXX' password='XXXX'...
Top 50 recent answers are included
Related Tags
ogr2ogr × 1020gdal × 292
shapefile × 190
postgis × 176
geojson × 110
ogr × 104
qgis × 98
postgresql × 93
python × 70
coordinate-system × 59
kml × 52
sql × 49
openstreetmap × 47
file-geodatabase × 47
sqlite × 41
convert × 39
spatialite × 36
sql-server × 35
geopackage × 31
csv × 29
dxf × 26
gml × 21
osgeo4w × 19
mapinfo × 17
sql-server-spatial × 17