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 <mtncl...@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 <si...@spatialdbadvisor.com> 
wrote:
Try here for an example:

https://www.dropbox.com/s/n234bc6i5hj7y4o/Ireland.sql?dl=0
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users




--
Regards
Simon
--------------------------------------------------------------------------------------------------------
Spatial Advice & Solutions Architecture
Database 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: si...@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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to