Wikidata:Property proposal/bounding box
Bounding box
editBounding box west coordinates (1 of 2 pairs)
editDescription | one of two extreme points of a bounding box (SW or NW). Note the second proposal below for the 2 of 2. |
---|---|
Represents | minimum bounding box (Q6865426) |
Data type | Geographic coordinates |
Domain | map (Q4006), spatial reference system (Q161779) or rather geographic coordinate system (Q22664) |
Example | Addresses and travel map of Helsinki from 1876 (Q17610148) →60.145382160146696, 24.86374620040312 (southwest / lowerleft) Finnish national grid coordinate system (Q10542255) → 59.75, 19.24 |
Bounding box east coordinates (2 of 2 pairs)
editDescription | one of two extreme points of a bounding box (NE or SE) |
---|---|
Represents | minimum bounding box (Q6865426) |
Data type | Geographic coordinates |
Domain | map (Q4006), spatial reference system (Q161779) or rather geographic coordinate system (Q22664) |
Example | Addresses and travel map of Helsinki from 1876 (Q17610148) → 60.19526296266577, 24.999132404114395 (northeast / upperright) Finnish national grid coordinate system (Q10542255) → 70.09, 31.59 |
- Comment I think Susannaanas was looking for this. Please insert your sample above
--- Jura 09:58, 14 June 2016 (UTC)
- Comment I did not yet add values, since I think it's worth discussing which values are best to use. DCMI model uses coordinate values for each of the 4 edges and more notations can be found here in the Bounding Box service. / Susannaanas (talk) 10:45, 14 June 2016 (UTC)
- Sure. Coordinate datatype requires you to input latitude and longitude. With two statements, you'd get four coordinates. BTW, please keep the two proposals together.
--- Jura 10:56, 14 June 2016 (UTC)
- Sure. Coordinate datatype requires you to input latitude and longitude. With two statements, you'd get four coordinates. BTW, please keep the two proposals together.
- Thanks! I made one possible proposal with upperleft/Northwestern – lowerright/Southeastern values. I hope this is usable for external use. Comments? / Susannaanas (talk) 11:04, 14 June 2016 (UTC)
- Comment Perhaps it is not necessary to fix whether the box is with upperleft-lowerright or lowerleft-upperright values? / Susannaanas (talk) 13:14, 14 June 2016 (UTC)
- It shouldn't matter. WQS can search within: mw:Wikidata_query_service/User_Manual#Search_within_box. Not sure what is the best way to find something that is near that box. Maybe @Smalyshev (WMF): has a suggestion for an alternate approach.
--- Jura 18:32, 14 June 2016 (UTC)- Well, right now WDQS has to know which corner is which coordinate. For latitude, I think you can guess which coordinate is the southern corner and which one is the northern. For longitude, it's not as simple because unlike latitude, longitude is continuous around the globe, and while you usually mean the smaller box theoretically you could also mean the bigger box going the other direction. Also, leaving it to the user will make automatic processing harder - not by a lot but even if you make a rule like "smaller box wins" or any other like this, processor will have to do something which is harder than not doing something :) So I'd prefer to have defined corner properties - preferably SW and NE corners - to make things easier. Alternatively, we could also implement box search with NW and SE corners, but I'm not sure it's worth the time. But having clarity which coord is which I think is important - it's kind of hard to make such decisions inside SPARQL query for example. --Smalyshev (WMF) (talk) 20:00, 14 June 2016 (UTC)
- Thanks, I hope I will get that beautifully in the proposal – SW and NE, that is! /Susannaanas (talk) 23:05, 14 June 2016 (UTC)
- Smalyshev (WMF): Strange that I can't put Winters (Q986857) and Ashrama (Q17152020) as NW and SE corners into the sample query to get the same result [1]. I understand the argument about the advantage of defining the "smaller box" beforehand, but shouldn't we allow at least some flexibility as what corners to pick?
--- Jura 07:48, 15 June 2016 (UTC)- I see what you mean, it may be annoying to try and figure which thing should be in which corner. I'll see if I can make more automatic API there, depends on some technicalities. As for the property, however, I think it's better still to have exact definition of which corners it refers too. It will be easier to work with. Smalyshev (WMF) (talk) 22:20, 15 June 2016 (UTC)
- Smalyshev (WMF): Do you think we would need 4 properties are could that be done with 2? -- Jura 05:30, 16 June 2016 (UTC)
Even in SPARQL, we should be able to determine if it's (SW and NE) or (SE and NW). So 2 properties should do: one for W, the other for E. -- Jura 16:29, 16 June 2016 (UTC)- For now, it'd be certainly easier if we knew which coordinate it refers to. However, if I manage to implement more generic interface, then two coordinate is enough, provided that it is known which one is which, but I think it'd be still easier if we mark them explicitly. Yes, that means 4 properties, if we want any combination, or 2 specific properties. The problem is SPARQL has no real conditionals, etc. - it's a declarative language - so if we don't know which corner means what, it may be hard to write proper query that captures all the cases. I'm open to ideas though on improvement of this. Smalyshev (WMF) (talk) 05:14, 14 July 2016 (UTC)
- Smalyshev (WMF): Do you think we would need 4 properties are could that be done with 2? -- Jura 05:30, 16 June 2016 (UTC)
- I see what you mean, it may be annoying to try and figure which thing should be in which corner. I'll see if I can make more automatic API there, depends on some technicalities. As for the property, however, I think it's better still to have exact definition of which corners it refers too. It will be easier to work with. Smalyshev (WMF) (talk) 22:20, 15 June 2016 (UTC)
- Well, right now WDQS has to know which corner is which coordinate. For latitude, I think you can guess which coordinate is the southern corner and which one is the northern. For longitude, it's not as simple because unlike latitude, longitude is continuous around the globe, and while you usually mean the smaller box theoretically you could also mean the bigger box going the other direction. Also, leaving it to the user will make automatic processing harder - not by a lot but even if you make a rule like "smaller box wins" or any other like this, processor will have to do something which is harder than not doing something :) So I'd prefer to have defined corner properties - preferably SW and NE corners - to make things easier. Alternatively, we could also implement box search with NW and SE corners, but I'm not sure it's worth the time. But having clarity which coord is which I think is important - it's kind of hard to make such decisions inside SPARQL query for example. --Smalyshev (WMF) (talk) 20:00, 14 June 2016 (UTC)
- It shouldn't matter. WQS can search within: mw:Wikidata_query_service/User_Manual#Search_within_box. Not sure what is the best way to find something that is near that box. Maybe @Smalyshev (WMF): has a suggestion for an alternate approach.
- Oppose I still think a bounding radius works much better with the existing coordinate location (P625) and is a better, non-biased fit to real-world structures that are usually not aligned to compass directions. --Srittau (talk) 23:37, 15 June 2016 (UTC)
- Comment Bounding radius sounds fine (esp. for indicating things like hunting range etc.) But a bounding box, despite its axial orientation bias, has its uses too - say in breaking a space into quadrants for a search party. A way to avoid the upper/lower right/left coordinate confusion would be to specify the bounding box central coordinate, and an angular latitude and longitude delta. The extremity coordinates would be easily calculated from that, yielding a box. This approach (a sibling of the bounding radius) assumes that the central coordinate is in the region being conveyed. (Interestingly at a pole (+-90 deg. latitude), longitude is no longer relevant except that a 'width' vector can still be calculated along a line perpendicular to the longitude, in order to define the bounding box). Chindown (talk) 06:01, 22 August 2016 (UTC)
Support per my comments on Wikidata:Project_chat/Archive/2016/05#.22Approximate_radius.22_for_geographical_features. (@The Anome, Thryduulf, Innocent bystander, ValterVB, Mahir256, Denny: Pinging you because you all contributed to the discussion there) - Nikki (talk) 10:06, 16 June 2016 (UTC)- There was also discussion at Wikidata:Property_proposal/Archive/52#map_zoom_level (and the proposal directly below that one). @K7L, Pigsonthewing, Ymblanter, Michiel1972: Pinging you as well because you contributed to that discussion. - Nikki (talk) 10:11, 16 June 2016 (UTC)
- The proposal has been changed, so changing my vote to Oppose. I think the changes are a bad idea and would make these properties much more annoying to use because you'll generally have to work out which is north and south before you can use the data. I'm not even convinced that it's always possible to determine whether a point is the north or south one (e.g. if it crosses a pole). I also don't see what the benefit to changing it is. If you know the NW/SE points, you can enter the NE/SW points. - Nikki (talk) 08:37, 22 June 2016 (UTC)
- In its current form, it no longer requires you to know if its N or S. I guess then it's even better if you don't know it.
--- Jura 08:46, 22 June 2016 (UTC)- If you don't know which is north and which is south, you don't know enough about the bounding box you're adding and should not be adding the data anyway. This version does not explicitly define the bounding box, it requires guessing which corners are meant. That is completely unacceptable to me. - Nikki (talk) 18:43, 22 June 2016 (UTC)
- In its current form, it no longer requires you to know if its N or S. I guess then it's even better if you don't know it.
- We have properties like coordinates of northernmost point (P1332), coordinates of southernmost point (P1333), coordinates of easternmost point (P1334), coordinates of westernmost point (P1335). I think it looks like those properties can fulfil this purpose!? -- Innocent bystander (talk) 10:41, 16 June 2016 (UTC)
- Please read the discussions linked above where the above properties have been discussed and rejected for this application. Thryduulf (talk) 12:35, 16 June 2016 (UTC)
- @Thryduulf: I have, I was there when the discussions took place! But I do not understand how the objections against P1332/3/4/5 cannot be applied also to this pair of properties.
- The objection: "Extremal points are not always available" (The Anome) How couldn't that also be true about SW/NE-boundaries?
- "'coordinate of northernmost point' etc. are not lat/long values defining a bounding box, they're extremal points." (Same user) How isn't it the same thing?
- I have not added any
{{O}}
with the intension to not shipwreck this proposal at this early moment. I like this proposal, but since I do not see any significant difference to it relative the earlier N/S/E/W-proposal, I have to ask what the problems are and why this proposal do not have the same problems! -- Innocent bystander (talk) 13:58, 16 June 2016 (UTC)- I can't recall who, but someone indicated that bounding box data was available for a good many places/areas. A bounding box requires the coordinates only of two points not four for the N/S/E/W-most points (and any thing less than all four of those cannot be guaranteed to contain whole area). AIUI it's also a (the?) standard way to represent the area covered by maps, etc. Thryduulf (talk) 14:13, 16 June 2016 (UTC)
- The standard way on Wikipedia is NW/SE (probably based on how the coordinates in html are calculated). As long as it works, I
Support! -- Innocent bystander (talk) 14:48, 16 June 2016 (UTC)
- The standard way on Wikipedia is NW/SE (probably based on how the coordinates in html are calculated). As long as it works, I
- I can't recall who, but someone indicated that bounding box data was available for a good many places/areas. A bounding box requires the coordinates only of two points not four for the N/S/E/W-most points (and any thing less than all four of those cannot be guaranteed to contain whole area). AIUI it's also a (the?) standard way to represent the area covered by maps, etc. Thryduulf (talk) 14:13, 16 June 2016 (UTC)
- Please read the discussions linked above where the above properties have been discussed and rejected for this application. Thryduulf (talk) 12:35, 16 June 2016 (UTC)
Supportper my comments in the various discussions that led to this proposal. Thryduulf (talk) 12:35, 16 June 2016 (UTC).- See below. Thryduulf (talk) 08:31, 23 June 2016 (UTC)
- Comment Per comments above, I updated the proposal to allow (SW and NE) or (SE and NW).
--- Jura 13:31, 19 June 2016 (UTC) - @Thryduulf, Innocent bystander: The proposal was changed (see above) and your support votes were based on the previous version of the proposal. Could you review the new version and check that you still support it? (The changes were significant enough to make me change my vote, maybe you also disagree with the changes). - Nikki (talk) 18:52, 22 June 2016 (UTC)
- @Nikki, Jura1: Yes, the modifications makes the property ambiguous. As long as the "box" is rectangular, you can turn a (SW/NE)-pair into a (NW/SE)-pair by simple math. But if you do not know which corner the first property described, it definitely becomes very hard to use. -- Innocent bystander (talk) 20:35, 22 June 2016 (UTC)
- @Innocent bystander: How is the math different between the two aspects? Why would we want to convert things before importing?
--- Jura 09:27, 23 June 2016 (UTC)- If you do not know if the Property:A describe the SW or the NW corner, how do you then know how the box looks like? A box covering Africa has its NW corner somewhere north of the the Canary Islands and the SW somewhere near Tristan da Cunha. But if you do not know if Property A describe the NW or the SW corner, the box could describe either true Africa or an area south from Tristan da Cunha, over the Antarctic, the Pacific, Europe and down to Gibraltar again. The box becomes ambiguous and not well-defined. -- Innocent bystander (talk) 09:51, 23 June 2016 (UTC)
- You compare the two coordinates and, if needed, apply the "simple math".
--- Jura 09:54, 23 June 2016 (UTC)- It is simple transpose matrix (Q223683) to turn a SW/NE-pair into a NW/SE-pair. But if I do not know if the first is SW or NW, the box is ambiguous and you need more information. Earth and most other planets are spherical, not flat. -- Innocent bystander (talk) 11:24, 23 June 2016 (UTC)
- In any case you do need more information: you need both properties.
--- Jura 11:32, 23 June 2016 (UTC)- That is not enough, you need a third property, two corners and a point telling which side of the two options is inside the box. -- Innocent bystander (talk) 11:36, 23 June 2016 (UTC)
- Probably, I'm missing a point. I think the initial proposal had that problem if you concede that it could be the larger box, but I don't see how the current proposal has that. If 1 is north of 2, it's NW, if it's south of 2, it's SW.
--- Jura 11:41, 23 June 2016 (UTC)- For a map of the area around the South Pole is that not obvious. The NW corner could be -85;-85, the SE corner -70;+70 and the NW corner is then North of the SE corner. A map of the Old British Empire could include more than half of the Globe. -- Innocent bystander (talk) 15:10, 23 June 2016 (UTC)
- Can we find this sample somewhere? To cover the pole, I think you'd have 90S. It would be interesting to see if WQS handles that. Maybe we are just expecting too much from bounding boxes.
--- Jura 18:06, 23 June 2016 (UTC)- You'd only have 90S as a bounding coordinate if 90S was on one edge of the map, which will not be true in a polar projection (nor other projections not centred on the equator). If you switch from having East and West coordinates to North and South then you have problems with the international date line. The only way around this is to specify which diagonally opposite corners are being used. Thryduulf (talk) 10:58, 9 July 2016 (UTC)
- None of the samples by Susannaanas above supports bounding boxes that would somehow cross the poles. WQS doesn't do that either. For this type of map a bounding box may not be suitable. @Innocent bystander: can you provide us with a reference for your use case? (A source that uses a bounding box similar to define the scope of a map with parameters similar to the properties we discuss).
--- Jura 18:40, 10 July 2016 (UTC)- I am afraid I do not. The whole proposal is a little alien to me, I then simply need more to convince me! -- Innocent bystander (talk) 04:22, 11 July 2016 (UTC)
- I tried to simulate your sample on WQS: [2]. I couldn't get it to return a meaningful result.
--- Jura 04:27, 11 July 2016 (UTC)
- I tried to simulate your sample on WQS: [2]. I couldn't get it to return a meaningful result.
- I am afraid I do not. The whole proposal is a little alien to me, I then simply need more to convince me! -- Innocent bystander (talk) 04:22, 11 July 2016 (UTC)
- None of the samples by Susannaanas above supports bounding boxes that would somehow cross the poles. WQS doesn't do that either. For this type of map a bounding box may not be suitable. @Innocent bystander: can you provide us with a reference for your use case? (A source that uses a bounding box similar to define the scope of a map with parameters similar to the properties we discuss).
- You'd only have 90S as a bounding coordinate if 90S was on one edge of the map, which will not be true in a polar projection (nor other projections not centred on the equator). If you switch from having East and West coordinates to North and South then you have problems with the international date line. The only way around this is to specify which diagonally opposite corners are being used. Thryduulf (talk) 10:58, 9 July 2016 (UTC)
- Can we find this sample somewhere? To cover the pole, I think you'd have 90S. It would be interesting to see if WQS handles that. Maybe we are just expecting too much from bounding boxes.
- For a map of the area around the South Pole is that not obvious. The NW corner could be -85;-85, the SE corner -70;+70 and the NW corner is then North of the SE corner. A map of the Old British Empire could include more than half of the Globe. -- Innocent bystander (talk) 15:10, 23 June 2016 (UTC)
- Probably, I'm missing a point. I think the initial proposal had that problem if you concede that it could be the larger box, but I don't see how the current proposal has that. If 1 is north of 2, it's NW, if it's south of 2, it's SW.
- That is not enough, you need a third property, two corners and a point telling which side of the two options is inside the box. -- Innocent bystander (talk) 11:36, 23 June 2016 (UTC)
- In any case you do need more information: you need both properties.
- It is simple transpose matrix (Q223683) to turn a SW/NE-pair into a NW/SE-pair. But if I do not know if the first is SW or NW, the box is ambiguous and you need more information. Earth and most other planets are spherical, not flat. -- Innocent bystander (talk) 11:24, 23 June 2016 (UTC)
- You compare the two coordinates and, if needed, apply the "simple math".
- If you do not know if the Property:A describe the SW or the NW corner, how do you then know how the box looks like? A box covering Africa has its NW corner somewhere north of the the Canary Islands and the SW somewhere near Tristan da Cunha. But if you do not know if Property A describe the NW or the SW corner, the box could describe either true Africa or an area south from Tristan da Cunha, over the Antarctic, the Pacific, Europe and down to Gibraltar again. The box becomes ambiguous and not well-defined. -- Innocent bystander (talk) 09:51, 23 June 2016 (UTC)
- @Innocent bystander: How is the math different between the two aspects? Why would we want to convert things before importing?
- @Nikki, Jura1: Likewise I continue to support the original proposal for nw/se and I would also support sw/ne but I do not support the current ambiguous proposal. I have unmarked this as ready based on these last three comments. Thryduulf (talk) 08:31, 23 June 2016 (UTC)
- Comment I think that the change does not bring any advantages, and the original proposal already gained some consensus. It is a UI dilemma for the Wikidata page of how to input the data. Perhaps the data can be input in 4 values, and stored in two coordinate pairs if input as numbers. Or there can be additionally a visual interface to draw the bounding box. Most often data would be read or imported from another source, and formatting is required anyway.
- I would be willing to support using the properties coordinates of northernmost point (P1332), coordinates of southernmost point (P1333), coordinates of easternmost point (P1334) and coordinates of westernmost point (P1335) but I found them first of all semantically confusing, secondly they would need to be misused to represent the data (only one of the two values used for each property. Therefore, I hope, there is a clearly suitable property or properties to represent bounding boxes.
- On another edge, I think more domains should be added in the proposal. / Susannaanas (talk) 06:52, 11 July 2016 (UTC)
- Susannaanas: the initial proposal didn't quite work out for the reasons pointed out by Smalyshev. The revised version with NW/SE corners initially just seem a bit to normative and possibly requiring unneeded transformation of coordinates, but it appears now that it leads some of its supporters to the mistaken assumption that boxes could spread beyond 90° (see discussion with Innocent bystander). This leaves us with the current proposal for W and E.
--- Jura 06:19, 13 July 2016 (UTC)
- Susannaanas: the initial proposal didn't quite work out for the reasons pointed out by Smalyshev. The revised version with NW/SE corners initially just seem a bit to normative and possibly requiring unneeded transformation of coordinates, but it appears now that it leads some of its supporters to the mistaken assumption that boxes could spread beyond 90° (see discussion with Innocent bystander). This leaves us with the current proposal for W and E.
- Phab:T139824 is ready soon. It should support W/E corners. Did someone come up with samples of bounding boxes across poles that we should be supporting or can we go ahead with the current version?
--- Jura 20:46, 31 July 2016 (UTC)- For the reasons expressed above I still oppose West and East, but support NW/SE or NE/SW. Thryduulf (talk) 21:06, 31 July 2016 (UTC)
- Are there any reasons we haven't covered in the discussion with Innocent bystander? The problem with having these is that it seems to mislead us into believing that the box could spread across poles. An ambiguity that doesn't actually exist.
--- Jura 05:32, 1 August 2016 (UTC)- You have not demonstrated that there will never be a box spread across poles, and that was only one of the objections brought up in the discussion (and not just with Innocent bystander). Thryduulf (talk) 11:09, 1 August 2016 (UTC)
- We haven't been able to find a referenced sample in 6 weeks. So let us conclude it doesn't exist. If there are no other remaining reasons, I think this is ready.
--- Jura 06:29, 2 August 2016 (UTC)
- We haven't been able to find a referenced sample in 6 weeks. So let us conclude it doesn't exist. If there are no other remaining reasons, I think this is ready.
- You have not demonstrated that there will never be a box spread across poles, and that was only one of the objections brought up in the discussion (and not just with Innocent bystander). Thryduulf (talk) 11:09, 1 August 2016 (UTC)
- Are there any reasons we haven't covered in the discussion with Innocent bystander? The problem with having these is that it seems to mislead us into believing that the box could spread across poles. An ambiguity that doesn't actually exist.
- For the reasons expressed above I still oppose West and East, but support NW/SE or NE/SW. Thryduulf (talk) 21:06, 31 July 2016 (UTC)
Bounding box with SPARQL:
#Schools between San Jose, CA and Sacramento, CA
#defaultView:Map
SELECT * WHERE {
wd:Q986857 wdt:P625 ?SJloc .
wd:Q17152020 wdt:P625 ?SCloc .
SERVICE wikibase:box {
?place wdt:P625 ?location .
bd:serviceParam wikibase:cornerWest ?SJloc .
bd:serviceParam wikibase:cornerEast ?SCloc .
}
?place wdt:P31/wdt:P279* wd:Q3914 .
}
--- Jura 06:29, 2 August 2016 (UTC)
@Jura1, Susannaanas, Smalyshev (WMF), Nikki, Thryduulf, Innocent bystander: Not done No consensus for the latest iteration. As this discussion shows again, changing a proposal majorly, especially when there is quite an involved discussion, is not a good idea. It's better to withdraw the proposal and make a new proposal. --Srittau (talk) 22:50, 19 August 2016 (UTC)
for use in defining mapping quadrangles
editI've been searching for a way to convey the quadrangles for geologic mapping. I guess this comes closest, but it seems there was never consensus. Too bad. I'd like to set the confines of a map or publication (scholarly article). US Geologic Survey has some really interesting tools putting geologic maps into google earth. I invite you to visit the Caetano tuff at USGS and click on the Google Earth KMZ link and open the file. It displays what to me is a lovely and interesting representation of geology and geography. Who to convey that or the boundaries of the quadrangle? I don't know, but I hope to learn. Trilotat (talk) 01:55, 3 December 2018 (UTC)