[OSM-dev] Website to generate polygons from OSM relations
Frank Broniewski
brfr at metrico.lu
Wed Jun 12 06:41:55 UTC 2013
Hey Jocelyn,
nice work! Your service is really running quite fast. How do you
determine what a polygon relation is? Do you have a list of keys and
values, like osm2pgsql does? Or do you check if a geometry is closed and
produce polygons from them?
This was one of my biggest issues when I tried to convert a osmosis
geometry to polygons.
Good work,
Frank
Am 2013-06-11 23:45, schrieb Jocelyn Jaubert:
> Hi,
>
> I have put into production a website to generate various outputs from
> OSM relations, by taking into account inclusion of other relations. It
> is available at:
>
> http://polygons.openstreetmap.fr/
>
>
> What it can do:
>
> - generate whole geometry from an OSM relation ID, with handling of
> sub-relations - this works especially well with the recursive French
> model for administrative relations, and can be used as a sanity check.
>
> - generate simplified geometries, even bigger or smaller - this is
> useful to cut a .osm file with a good .poly file.
>
> - export WKT, .poly, GeoJSON, or even a picture.
>
> - import a user .poly file, and then do an Union from an OSM relation.
> I used this to fix some polygons used for Geofabrik extracts.
>
>
> A few examples:
>
> OSM relation for Corsica:
> http://polygons.openstreetmap.fr/?id=76910
>
> http://polygons.openstreetmap.fr/get_image.py?id=76910¶ms=0.020000-0.005000-0.005000
>
> Same thing for France (image is a little longer to generate)
> http://polygons.openstreetmap.fr/?id=1362232
>
> Union of Geofabrik and OSM relation for PACA, a french region:
>
> http://polygons.openstreetmap.fr/get_image.py?id=8654¶ms=0.020000-0.005000-0.005000&name=provence-alpes-cote-d-azur_5k3mbx
>
> (you can see that some part of the region were missing from the yellow
> polygon)
>
>
> The source code is available at:
> https://github.com/jocelynj/osm-polygons-generation
>
> This uses an osmosis database, containing the whole word, and some
> Postgis functions. If you have any suggestion, don't hesitate to propose
> them !
>
>
> Thanks,
> Jocelyn
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
--
Frank BRONIEWSKI
METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN
tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
More information about the dev
mailing list