[postgis-users] PARTIALLY RESOLVED: Geography/geometry

Martin Davis mtnclimb at gmail.com
Mon Jan 21 20:21:26 PST 2019


Perhaps log this as an OGR issue [1]?  Probably need to bisect the problem
a bit more though (e.g. reduce the input to a single failing polygon).

[1] https://github.com/OSGeo/gdal/issues





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

> I replaced the shapefile load script dropping ogr2ogr in favor of
> shp2pgshp.
>
> This appears to have given me clean multipolygons as nothing was reported
> by the following:
>
> select ST_ISValidReason(a.geog4326::geometry)
>   from data.osm_county as a
>  where ST_IsValidReason(a.geog4326::geometry) <> 'Valid Geometry'
>
> I discovered though this process that the original shapefile had 10
> counties that were duplicated.
> I used postgresql to delete the duplicates.
>
> All my SQL appears to be working.
>
> Perhaps Martin is right: there is something wrong with the ogr2ogr load
> (though I switched from -nlt POLYGON to -nlt PROMOTE_TO_MULTI and it didn't
> make any difference).
>
> I think this request for help can now be closed.
>
> Thanks to all.
>
> regards
> Simon
>
>
>
> Just ’select geom’ will return the extended hexwkb (which we should have
> JTS support as a matter of convenience). If you need pure standard hex wkb,
> then
>
> select encode(st_asbinary(geom), ‘hex’)
>
> will do that
>
> P
>
> On Jan 21, 2019, at 2:39 PM, Martin Davis <mtnclimb at gmail.com> wrote:
>
> Not much help, I'm afraid.   I need the geometry in WKBHex.  Not sure
> offhand how to get that out of PostGIS.
>
> Just post the WKT and let's see what that looks like.
>
> On Mon, Jan 21, 2019 at 1:52 PM Simon Greener <simon at spatialdbadvisor.com>
> wrote:
>
>> Try here for an example:
>>
>> https://www.dropbox.com/s/n234bc6i5hj7y4o/Ireland.sql?dl=0
>>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
>
>
>
> --
> Regards
> Simon
>
>
> *--------------------------------------------------------------------------------------------------------*
>
> *Spatial Advice & Solutions ArchitectureDatabase Spatial Stored Procedure
> Designer*
> Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE FME
> Awarded "2011 Oracle Spatial Excellence Award for Education and Research"
> A: 39 Cliff View Drive, Allens Rivulet, 7150, Tas, Aust
> W: www.spdba.com.au
> E: simon at spdba.com.au
> V: +61 *362 396 397*
> M: +61 *418 396 391*
> GITC Supplier: T1005
> Skype: sggreener
> Long: 147.20515 (147° 12' 18" E)
> Lat: -43.01530 (43° 00' 55" S)
> GeoHash: r22em9r98wg
> NAC:W80CK 7SWP3
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190121/4abcb750/attachment.html>


More information about the postgis-users mailing list