2025-09-02     2025-09-03     2025-09-04

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

number of errors=27
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	
860718	null	hydrosheds	434	Ring Self-intersection[104.712612575955 12.2191666666667]	
861025	null	hydrosheds	434	Ring Self-intersection[64.9902777777783 55.8881944444448]	
861269	null	hydrosheds	434	Ring Self-intersection[63.3797222222225 55.658194444445]	
862097	null	hydrosheds	434	Ring Self-intersection[135.060408446045 -3.8983333333332]	
862434	null	hydrosheds	434	Ring Self-intersection[-98.3115277777771 22.4373611111116]	
862733	null	hydrosheds	434	Ring Self-intersection[10.2704166666668 -0.67291666666631]	
862918	null	hydrosheds	434	Ring Self-intersection[-64.6183333333335 55.3535041723926]	
861624	null	hydrosheds	434	Ring Self-intersection[-68.1911118779999 52.2219098810001]	
859005	null	hydrosheds	434	Ring Self-intersection[34.5881944444453 -13.8793055555551]	
859023	null	hydrosheds	434	Ring Self-intersection[-66.4999996019999 54.458812729]	
859035	null	hydrosheds	434	Ring Self-intersection[-56.5373611111104 -2.22736111111095]	
859043	null	hydrosheds	434	Ring Self-intersection[-57.697361111111 -17.5629166666661]	
859061	null	hydrosheds	434	Ring Self-intersection[-64.9493055555554 -3.55541666666625]	
859126	null	hydrosheds	434	Ring Self-intersection[-107.790555555556 29.3120833333338]	
859185	null	hydrosheds	434	Ring Self-intersection[65.7302777777778 55.9670833333333]	
859152	null	hydrosheds	434	Ring Self-intersection[-62.1359722222218 -4.37930555555545]	
859225	null	hydrosheds	434	Ring Self-intersection[32.9068055555559 -24.9581944444446]	
859226	null	hydrosheds	434	Ring Self-intersection[-60.2187499999993 -15.5415277777777]	
859250	null	hydrosheds	434	Ring Self-intersection[112.366275177 -2.71137829461691]	
859256	null	hydrosheds	434	Ring Self-intersection[136.07442080709 -30.8646257243336]	
859960	null	hydrosheds	434	Ring Self-intersection[-90.4736288965952 29.3755555555558]	
859488	null	hydrosheds	434	Ring Self-intersection[-98.0712499999994 22.4101388888894]	
859662	null	hydrosheds	434	Ring Self-intersection[49.289027777778 -18.3973611111111]	
859828	null	hydrosheds	434	Ring Self-intersection[105.044059990776 11.5902777777781]	
859858	null	hydrosheds	434	Ring Self-intersection[139.890277777779 -37.2527127414281]	
860152	null	hydrosheds	434	Ring Self-intersection[24.8355965000002 61.5014215000001]	
860281	null	hydrosheds	434	Ring Self-intersection[154.68555555476 49.3266237404334]