<div dir="ltr">Hi Pierre, you should be asleep by now :) Hope the Snow is not too deep either :)<div><br></div><div>I did not know about that the HOT Private Store. Is that rendered on the OSm Layer or otherwise available? Would be interested in knowing a little bit more about that.</div><div><br></div><div>Selecting objects in Sql is very dependent on the indexing. using + or <> with an index is very efficient. Using Like "haiyan%" can be reasonably fast if the data in the tag starts with the term you are searching for (eg: "haiyan") (case conversion will have an impact depending on the size of the string).</div><div><br></div><div>If your search term is in the middle of the key data, eg; "damaged: haiyan: debris" it will be VERY slow as that will trigger a sequential scan</div><div><br></div><div>I have my own planetosm database, if the crisis is not a seperate tag, ie, embedded within one tags data, I would set a trigger on the update that extracted the crisis name, eg: haiyan, and stored it in an indexable column. This is not particularly efficient, but I would have no choice as I think it is very important to be able to extract data specific to a Crisis.</div><div><br></div><div>If you think about Overpass Queries, they would also not handle the data embedded in the tag particularly well, I am sure they could do it, but it would be subject to the same issue above.</div><div><br></div><div>One possible solution would be to use the Postgres HStore, which is basically a text field. Postgres does have a unique ability to index data withing the hstore, but I would not use this method on my production database.</div><div><br></div><div>Osm does have these tags already defined, I am sure you are aware</div><div><br></div><div><ul style="line-height:19.2000007629395px;margin:0.3em 0px 0px 1.6em;padding:0px;color:rgb(0,0,0);font-family:sans-serif;font-size:13px;text-align:justify"><li style="margin-bottom:0.1em"><tt dir="ltr" style="font-family:monospace,Courier;font-size:15px;white-space:pre;background-color:rgb(221,221,238)"><a href="http://wiki.openstreetmap.org/wiki/Key:building:condition" title="Key:building:condition" style="text-decoration:none;color:rgb(11,0,128);background:none">building:condition</a>=*</tt> <i>for the condition of the building</i></li><li style="margin-bottom:0.1em"><tt dir="ltr" style="font-family:monospace,Courier;font-size:15px;white-space:pre;background-color:rgb(221,221,238)"><a href="http://wiki.openstreetmap.org/wiki/Key:ruins" title="Key:ruins" style="text-decoration:none;color:rgb(11,0,128);background:none">ruins</a>=*</tt> - <i>for ruins of buildings</i></li><li style="margin-bottom:0.1em"><tt dir="ltr" style="font-family:monospace,Courier;font-size:15px;white-space:pre;background-color:rgb(221,221,238)"><a href="http://wiki.openstreetmap.org/wiki/Key:abandoned" title="Key:abandoned" style="text-decoration:none;color:rgb(11,0,128);background:none">abandoned</a>=*</tt> - <i>for a building </i></li></ul></div><div><br></div><div>My thought would to NOT use these, as the fact that a building was tagged as abandoned is relevant in assessing if you want to assess it in a Humanitarian Crisis.</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><br></div><div>Regards</div><div><br></div><div>Mark Cupitt</div><div><br></div><div><div>"If we change the world, let it bear the mark of our intelligence"</div><div><br></div><div><a href="https://www.openstreetmap.org/user/Mark_Cupitt" target="_blank">See me on Open Street Map</a><br></div><div><a></a><div><br></div></div><div><a href="http://ph.linkedin.com/in/markcupitt" target="_blank">See me on LinkedIn</a><br><img src="http://s.c.lnkd.licdn.com/scds/common/u/img/webpromo/btn_myprofile_160x33.png"><br></div><span style="font-family:arial black,sans-serif"><div><span style="font-family:arial black,sans-serif"><br></span></div><b><a href="http://gis.stackexchange.com/users/17846/mark-c" target="_blank">See me on StackExchange</a><br></b></span><img src="http://gis.stackexchange.com/users/flair/17846.png"><br></div><div>===============================================================================================</div><div>The contents of this email are intended only for the individual(s) to whom it is addressed and may contain</div><div>confidential or privileged information.  If you are not the intended recipient, you must not disclose, copy, distribute,</div><div>or use the contents of this email.  If you have received this email in error, please notify the sender immediately and</div><div>delete the email and any attachments.<br></div><div>
===============================================================================================
</div></div></div></div>
<br><div class="gmail_quote">On Fri, Jan 23, 2015 at 11:41 AM, Pierre Béland <span dir="ltr"><<a href="mailto:pierzenh@yahoo.fr" target="_blank">pierzenh@yahoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"><div dir="ltr"><span>Mark</span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>About the prefix hot:, this is reserved for the HOT private store. Adding this prefix to objects in JOSM, the objects are saved in the HOT private store.</span></div><div> </div><div><span style="font-style:italic;color:rgb(0,0,191);font-weight:bold">Pierre <br></span></div><br>  <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div dir="ltr"> <hr size="1">  <font face="Arial"> <b><span style="font-weight:bold">De :</span></b> Pierre Béland <<a href="mailto:pierzenh@yahoo.fr" target="_blank">pierzenh@yahoo.fr</a>><br> <b><span style="font-weight:bold">À :</span></b> Markware Software Services <<a href="mailto:markwaresoftware@gmail.com" target="_blank">markwaresoftware@gmail.com</a>> <br><span class=""><b><span style="font-weight:bold">Cc :</span></b> HOT Openstreetmap <<a href="mailto:hot@openstreetmap.org" target="_blank">hot@openstreetmap.org</a>>; S Volk <<a href="mailto:svolk2@hotmail.com" target="_blank">svolk2@hotmail.com</a>> <br> </span><b><span style="font-weight:bold">Envoyé le :</span></b> Jeudi 22 janvier 2015 22h30<span class=""><br> <b><span style="font-weight:bold">Objet :</span></b> Re: [HOT] Damage evaluation tagging schema<br> </span></font> </div><span class=""> <div><br><div><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"><div>Hi Mark</div><div><br clear="none"></div><div dir="ltr">I agree, we have to consider also aspects like how easy to extract for an event. For Haiyan, we had a specific tag. But what, if it would have be necessary to add tags recently for Hagupit?</div><div dir="ltr"><br clear="none"></div><div dir="ltr">About SQL queries, are-they any efficient way (time related) to say</div><div dir="ltr">select objects where key contains "haiyan" ?<br clear="none"></div><div><span></span></div><div> </div><div><span style="font-style:italic;color:rgb(0,0,191);font-weight:bold">Pierre</span><br></div></div></div></div><br></div> </span></div> </div>  </div></div></blockquote></div><br></div>