2025-09-03     2025-09-04     2025-09-05

valid geometry for not adm shape, fix with st_makevalid()

number of errors=15
number of warnings=0
Group=chkGrpShp

select geoshapeid,countrycode,source,sourceid,ST_isValidReason(wkb_geometry) as reason from geoname_shape where level<0 and not st_isvalid(wkb_geometry) order by countrycode

Self-intersection at or near point: find with SELECT geoshapeid,ST_isValidReason(wkb_geometry) from geoname_shape where NOT ST_isValid(wkb_geometry) 
fix with ST_Buffer(foo.the_geom,0.0)

geoshapeid	countrycode	source	sourceid	reason	
866286	null	hydrosheds	434	Ring Self-intersection[-74.4026388888885 9.28180555555593]	
866416	null	hydrosheds	434	Ring Self-intersection[9.95513888888928 3.7004166666668]	
866562	null	hydrosheds	434	Ring Self-intersection[-105.582083333334 22.4373611111109]	
866612	null	hydrosheds	434	Ring Self-intersection[31.0245295000002 62.9518105000001]	
866618	null	hydrosheds	434	Ring Self-intersection[26.4909015000002 61.0865865000001]	
867581	null	hydrosheds	434	Ring Self-intersection[28.9929564990001 64.5853995000001]	
867350	null	hydrosheds	434	Ring Self-intersection[22.103055555556 54.020972222223]	
864475	null	hydrosheds	434	Ring Self-intersection[95.8486109775973 20.8538888888887]	
868784	null	hydrosheds	434	Ring Self-intersection[-61.4834722222221 -5.9331944444441]	
865136	null	hydrosheds	434	Ring Self-intersection[29.3040619990002 63.9224685]	
865538	null	hydrosheds	434	Ring Self-intersection[-66.9563888888881 58.1175000000003]	
865661	null	hydrosheds	434	Ring Self-intersection[-92.4423611111111 18.2256944444451]	
865911	null	hydrosheds	434	Ring Self-intersection[-69.1638888888884 58.3000000000005]	
869688	null	hydrosheds	434	Ring Self-intersection[-92.86625 17.9084722222229]	
869889	null	hydrosheds	434	Ring Self-intersection[-74.9101388888885 8.99236111111145]