[postgis-users] Geography/geometry

Martin Davis mtnclimb at gmail.com
Mon Jan 21 15:01:36 PST 2019


Could the problem be the use of the ogr2ogr option -nlt POLYGON ?  Some of
the input geometries are multipolygons, and it sounds like the way to
handle this with ogr2ogr is to use GEOMETRY or PROMOTE_TO_MULTI [1][2]

[1] https://www.gdal.org/ogr2ogr.html
[2] https://gis.stackexchange.com/a/195223

On Mon, Jan 21, 2019 at 1:00 PM Simon Greener <simon at spatialdbadvisor.com>
wrote:

> The shapefile (from OSM) can be accessed here:
>
> https://www.dropbox.com/s/jbptp3ycmc8cqzi/gis_osm_county_a_free_1.rar?dl=0
>
> The command used to load is:
>
> ogr2ogr -overwrite -progress -skipfailures -a_srs "EPSG:4326" ^
>   -f "PostgreSQL" PG:"dbname='gisdb' host='localhost' port='5432'
> user='postgres'  ^
>   gis_osm_county_a_free_1.shp -nln data.osm_county -nlt POLYGON ^
> -lco LAUNDER=YES -lco GEOMETRY_NAME=geog4326 -lco GEOM_TYPE=geography -lco
> FID=ID -lco DIM=2 -lco SPATIAL_INDEX=YES
>
> Am I missing something with the ogr2ogr command for the load?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190121/b8015125/attachment.html>


More information about the postgis-users mailing list