[HOT] Question [about the/à propos du] HOT Export

augustindoury at gmail.com augustindoury at gmail.com
Sat Oct 31 14:17:22 UTC 2015


Hi all,

I don't find a solution yet. Help still welcome !

In fact I feel like what I want to do seems just not possible with the
HOT Export : export only some features which have a specific combination
of tags. It's possible to get them but the shapefile will be full of
undesired features, because those features have, at least, one tag of
the specific combination of tags. It's like it's not possible to be
restrictive.

==EXAMPLES==

1) Job :
http://export.hotosm.org/en/exports/3c4c5bee-a60f-4073-aa7a-3a9ed1c89e3e/
<item name="Clinique" type="node">
      <key key="health_facility:type" value="health_center"/>
</item>
I get all the desired features but just with the column
health_facility:type, I'd like to have the other tags of these objects
in the shapefile, I try to get an other column in the next example.

2) Job :
http://export.hotosm.org/en/exports/b315b903-8e9a-4757-b0a0-6cd720ceb217/
<item name="Clinique" type="node">
      <key key="health_facility:type" value="health_center"/>
      <key key="amenity" value="clinic"/>
</item>
I get all the amenities and all the health_facility:type whatever the
value is ... restaurant, fuel, school etc., even if the value of the
other tag is NULL
Although I'd like to have only the features which have the combination
of both tags.

3) Job :
http://export.hotosm.org/en/exports/8324dbb8-7129-4cc9-95a4-3a95dbe60629/
<item name="Clinique1" type="node">
       <key key="health_facility:type" value="health_center"/>
</item>
<item name="Clinique2" type="node">
       <key key="amenity" value="clinic"/>
</item>
I get the same result as Job2

Thanks in advance,

Augustin

PS : I have what I want using OverpassAPI through QuickOSM in Qgis but
this way is not really good to publish/refresh data. It needs the user
to have Qgis installed and to know how to use it.


On 29/10/2015 21:07, augustindoury at gmail.com wrote:
> Salut à tous, hi all !
> Une question sur le HOT Export ci-dessous (en français)
> A question about the HOT Export below (in english)
>
> ---FR----------------------------------------------------------------------------------------------------------------------
>
> Salut à tous,
>
> Je tente d'utiliser la nouvelle version du HOT Export
> (http://export.hotosm.org) en utilisant un preset perso après avoir
> désactivé tous les schémas d'attributs proposés (tree tags).
> L'objectif est d'obtenir un shapefile qui contient tous les objets OSM
> répondant à une combinaison donnée de couples clé/valeur.
>
> Un exemple avec ce bout de preset [1]
>
> Dans le shapefile de points que je récupère, j'ai tous les objets de la
> bbox dont au moins une des clés listées ci-dessous a une valeur
> non-nulle, quelque soit la valeur.
> Par exemple je récupère des amenity=hospital ou police.
> ou encore name=* pour une ville.
>
> Y a-t-il un moyen d'extrait uniquement les objets qui ont une
> combinaison spécifique de clés/valeurs ? par exemple tous les objets
> ayant amenity=clinic avec health_facility:type=health_center ?
>
> Finalement obtenir le même résultat qu'un requête Overpass XML via
> QuickOSM comme celle-là [2]
>
> Merci d'avance,
>
> Augustin
>
> ---EN----------------------------------------------------------------------------------------------------------------------
>
> Hi all,
>
> I try to use the new version of HOT Export (http://export.hotosm.org) by
> deselecting all the tree tags and uploading a custom preset.
> I'd like to extract in a shapefile just specific features which have
> specific key/value combinations.
>
> Portion of preset looks like this [1]
>
> But in the resultt points shapefile I get all the features of the bbox
> which have at least one of the listed keys, whatever the value is.
> For example I have some amenity=police or hospital
> or some name=* about a town.
>
> Is there a way to extract JUST the features which have a specific
> combination of key/values ? I mean just the amenity=clinic with
> health_facility:type=health_center ?
>
> Finally just obtain the same result as an Overpass XML query via
> QuickOSM as this one [2]
>
> Thanks in advance,
>
> Augustin
>
> ---EN-FR----------------------------------------------------------------------------------------------------------------------
>
> [1]
> <?xml version='1.0' encoding='UTF-8'?>
>     <presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0">
>             <group name="CSPS">
>                 <item name="Accueil CSPS" type="node">
>                 <key key="health_facility:type" value="health_center"/>
>                 <key key="amenity" value="clinic"/>
>                 <key key="operator:type" value="public"/>
>                 <key key="name"  value=""/>
>                 <key key="is_in:health_admin2" value=""/>
>                 <key key="is_in:health_admin1" value=""/>
>                 <key key="survey:date" value=""/>
>                 </item>
>         </group>
> </presets>
>
> [2]
>
> <osm-script output="json" timeout="25">
>   <union into="_">
>     <query into="_" type="node">
>       <has-kv k="amenity" modv="" v="clinic"/>
>       <has-kv k="health_facility:type" modv="" v="health_center"/>
>       <has-kv k="operator:type" modv="" v="public"/>
>       <bbox-query e="" into="_" n="" s="" w=""/>
>     </query>
>   </union>
>   <print e="" from="_" geometry="skeleton" limit="" mode="body" n="" order="id" s="" w=""/>
>   <recurse from="_" into="_" type="down"/>
>   <print e="" from="_" geometry="skeleton" limit="" mode="skeleton" n="" order="quadtile" s="" w=""/>
> </osm-script>
>
>
>





More information about the HOT mailing list