whosonfirst/whosonfirst-www-spelunker

Display lbl:bbox property when available

Opened this issue · 7 comments

As outlined in this Pelias issue, the Spelunker should prefer loading the "lbl:bbox" shape over the "geom:bbox" shape when available.

As an example, the bounding box for France currently stretches to include outlying islands of Reunion and Martinique. Though a bounding box that only includes the main areas of France was added in a "lbl:bbox" property field and should be the preferred default bounding box for France.

(This property is currently in the records of France, the US, and Tokyo.)

"Should prefer" <-- where and when?

The "lbl:bbox" should be used instead of the "geom:bbox" any time it is available. This property is only in region and country records now, but this logic should probably be implemented across all placetypes.

The bounding box is loaded in the www/templates/id.html file here, which will need updating.

Is there an example of when and where we are doing anything with bounding boxes, besides dumping them at the bottom of the page?

The Spelunker is a general purpose tool designed to show all the details, not to prefer one property over another.

I'm not opposed to adding logic to give precedence to one bounding box over another given a specific use-case but I am not sure what that is.

Ah, the "geom:bbox" feeds the Leaflet map in the Spelunker, which in turn causes France to appear as:

screen shot 2016-12-02 at 2 49 20 pm

I see. The thing is that is not incorrect.

See also: the United States.

screen shot 2016-12-02 at 2 56 22 pm

Well, that just makes my point even more. The US in not simply the 48 continental states.

We can add hooks to draw a lbl:bbox in addition to geom:bbox when present.