Monthly Archives: April 2021

Export Shape File or GeoJson file to Postgis using Ogr2Ogr

For exporting  GIS shapefile to a postgresql database we can use ogr2ogr  command, example:   ogr2ogr -t_srs EPSG:3857 -f PostgreSQL “PG:dbname=databasename user=databaseuser” test.shp   In example above we export  (test.shp) to database: “databasename“ with a dbuser: “databaseuser”  with SRID= EPSG:3857   For exporting a geojson file into Postgis ogr2ogr -f “PostgreSQL” PG:”PG:dbname=databasename user=databaseuser” “test.geojson”   […]