diff --git a/pdipr/analyse-7071-95-pdipr.sh b/pdipr/analyse-7071-95-pdipr.sh new file mode 100755 index 0000000..9294807 --- /dev/null +++ b/pdipr/analyse-7071-95-pdipr.sh @@ -0,0 +1,47 @@ +#! /bin/bash + +source $(dirname $0)/../config.sh + +OUT=7170_95_decalage.xml.gz +ERROR=95 +rm -f $OUT + +echo " + + + + + + +"| gzip -9 > $OUT + +PGOPTIONS='--client-min-messages=warning' psql osm -qc " + +select format('', + st_geohash(geom), + st_y(geom), + st_x(geom), + nom) +from ( +select nom, st_transform(st_closestpoint(wkb_geometry,st_centroid(unnest(ST_ClusterWithin((pt).geom,200)))),4326) as geom + FROM ( + SELECT + nom, ST_Dumppoints(wkb_geometry) as pt, wkb_geometry + FROM + pdipr + ) i + LEFT JOIN planet_osm_line o + ON ( + route='hiking' + AND ST_DWithin(ST_Transform((pt).geom,3857),way,200) + AND ST_DWithin(ST_Transform(way,4326)::geography, st_transform((pt).geom,4326)::geography, 25) + ) + WHERE osm_id IS NULL + group by nom,wkb_geometry +) as error; +" -t | gzip -9 >> $OUT + +echo " +" | gzip -9 >> $OUT + +curl --form source='opendata_xref-france' --form code="$OSMOSEPASS" --form content=@$OUT -H 'Host: osmose.openstreetmap.fr' "${URL_FRONTEND_UPDATE}" diff --git a/pdipr/analyse-7071-98-pdipr.sh b/pdipr/analyse-7071-98-pdipr.sh new file mode 100755 index 0000000..cc6d78e --- /dev/null +++ b/pdipr/analyse-7071-98-pdipr.sh @@ -0,0 +1,47 @@ +#! /bin/bash + +source $(dirname $0)/../config.sh + +OUT=7170_98_decalage.xml.gz +ERROR=98 +rm -f $OUT + +echo " + + + + + + +"| gzip -9 > $OUT + +PGOPTIONS='--client-min-messages=warning' psql osm -qc " + +select format('', + st_geohash(geom), + st_y(geom), + st_x(geom), + '') +from ( + SELECT geom + FROM ( + SELECT + st_transform((ST_Dumppoints(wkb_geometry)).geom,4326) as geom + FROM + pdipr + ) i + LEFT JOIN planet_osm_line o + ON ( + highway IS NOT NULL + AND ST_DWithin(ST_Transform(geom,3857),way,200) + AND ST_DWithin(ST_Transform(way,4326)::geography, geom::geography, 25) + ) + WHERE osm_id IS NULL + GROUP BY 1 +) as error; +" -t | gzip -9 >> $OUT + +echo " +" | gzip -9 >> $OUT + +curl --form source='opendata_xref-france' --form code="$OSMOSEPASS" --form content=@$OUT -H 'Host: osmose.openstreetmap.fr' "${URL_FRONTEND_UPDATE}"