The OGF research & development department proudly presents our newest tool, the area size calculator:
Just enter the relation ID into the “Relation” field at the bottom left corner, and hit “Enter”. Alternatively, its also possible to enter the ogf:area, ogf:id or ref of a relation. If none of these matches, Nominatim will be queried for the name.
This tool is intended to replace the daily generated area table.
Comment from Luciano on 20 April 2017 at 01:43
It is worth interrupting my sabbatical to comment, for this.
Awesome. I tried building something like this on my little clone of the OGF database last year, but it was beyond my ability.
Comment from Luciano on 20 April 2017 at 02:45
There may be a time-out problem, however, for large relation sets - I tried it for relation id=9002 (Mahhal’s land area, which is quite HUGE because it includes all the islands’ coastlines), the calculation appears to hang unresponsive. I’m pretty sure the relation isn’t “broken” since it has calculated fine on the area table and there have been no recent edits.
Comment from Turnsole80 on 20 April 2017 at 06:50
Yes, it didn’t seem to like route relations either; id=23137 and id=23133 both did nothing.
Comment from histor on 20 April 2017 at 07:46
Wow! Very good function for areas. And if you change a boundary, you not must wait til the new list of areas as before. And the picture of the area after calculation is nice. Thanks.
Can be a further step, to calculate the lenght of an route-relation? With the same input-screen?
Comment from ADB52 on 20 April 2017 at 08:01
That’s a great resource. However, the area of my territory (Utterland) cannot be calculated due to the presence of two open-ended nodes (http://tile.opengeofiction.net/util/relation_area.html?map=12/55.01671/47.76924). What are they, and how do I deal with them? Any help appreciated.
Comment from histor on 20 April 2017 at 08:23
@ ADB52 = Your way 5007248 was not declared as “outer” for your relation 22697 (Utterland). I set it now. After update of my change you can see your area in km²
Comment from Myrcia on 20 April 2017 at 10:33
Terrific work, very useful indeed.
Also, another reminder of how small my country is. It’s only as big as Lancashire, smaller than Norfolk!
(At least it’s 10x the size of the Isle of Wight).
Comment from ADB52 on 20 April 2017 at 12:13
@histor: Thank you, that’s now fixed and I have the surface area as 18715.41 km²
Comment from acubens71 on 20 April 2017 at 12:23
Wow, thanks, this tool is awesome!
Comment from histor on 20 April 2017 at 13:52
And if you get no result, then proof your relation. Are all ways bound in your relation? All ways declaired as “outer”? Has your boundary-relation gaps or forks or isolated ways? To proof the relation, you can ask with “opengeofiction.net/relation/xxx” (xxx = number of the relation) in your browser-adress. Then you see, what can be wrong with your boundary.
If you change your relation, you see you changings immediatly with “opengeofiction.net/relation/xxx” - but if you can calculate new this changeds relation, you must wait some minutes for the update.
By the way = This tool is not only helpful for realations of boundary-type, but too at relations of multipolygon-type.
Comment from dono87 on 20 April 2017 at 16:56
Hello good people of OGF,
What a wonderful tool!
One question though - there appear to be discrepancies between the OGF:Area Table (http://tile.opengeofiction.net/util/area_table.html) and the relation tool above - for relations that I haven’t touched in months
Orléanais Province - Relation 8180 -
Area Table: 4343.09 sqkm
Relation tool: 4332.19
Ardoise Province - Relation 8177 -
Area Table: 4496.37 sqkm
Relation tool: 4485.54 sqkm
Which is more accurate?
Discrepancy seems to increase towards the equator, 0.20% off for my northernmost province and 0.32% off for my southernmost province
Comment from thilo on 20 April 2017 at 19:14
@Luciano: relation 9002 works now. It had nothing to do with the size of the relation, but was a bug that occurred when handling certain edge cases, i.e. polygons with very few nodes.
@Turnsole80: your route relations now show up, too. But because they don’t describe an area, the tool interprets them as broken (ways are displayed red because their role isn’t outer or inner.)
@dono87: the truth is, I don’t know which one is more accurate, or even how accurate they are at all. The computation methods are implemented in different programming languages and use different map projections. Also, lots of multiplication and, through the projection library, use of trigonometric functions, so there’s probably ample occasion for accumulation rounding errors. Those area sizes must be taken with a grain of salt.
Comment from thilo on 20 April 2017 at 22:04
The area calculator now also supports single closed ways. In this case, the ID must be preceded by the character “w”. Also, it’s now possible to supply the query string as an URL parameter, e.g. like this:
Comment from ilikemaps on 21 April 2017 at 02:42
Maybe this tool should be added to the Main Page of the wiki
Comment from zhenkang on 21 April 2017 at 11:05
Wow! This is really useful! However, now my wiki account is blocked so I cannot add in the data of the area of my country, Singkangia, which is 22317.02 km².
Comment from thermo_nuclear on 21 April 2017 at 19:24
Plz tell me what’s wrong with this relation : http://opengeofiction.net/relation/26852#map=7/-59.173/80.695.
thilo’s tool is useful and powerful, but I cannot understand why it doesn’t work with 26852.
Comment from thermo_nuclear on 21 April 2017 at 19:39
UPD: the problem was in undefined roles in relation. Now I can add the landarea of Semer Republic in wiki, thanks!
Comment from ilikemaps on 22 April 2017 at 00:56
@zhenkang when is your wiki account not blocked
Comment from zhenkang on 22 April 2017 at 05:01
@ilikemaps After I had mapped signifacntly in Singkangia first, which probably in the next few months or so (hopefully next month), then I will ask. Please do not overwikified your wiki pages until you mapped your country!!
By the way the land area changes because I made changes to my border.
Comment from No Way on 3 May 2017 at 18:34
Wow this tool is amazing. I have fixed many issues. I can see the skill level change over time as I have mapped. I knew I had a county that was too large but this really puts into perspective.
I wish there was a way to render the area in square miles. I have a spreadsheet to convert the sq km over to sq mi but rendering on the get go would be awesome.
Comment from Duncan on 9 July 2019 at 05:40
A relation that was supposed to be one Canton (admin_level 6) is including the neighboring cantons as well as one huge relation with internal boundaries. How do I fix this?
Comment from thilo on 10 July 2019 at 18:01
@Duncan: please make a new diary post for this question, or post it in the forum. This is an old thread, where only very few people might notice it. Even more important, make sure include a link to the affected relation, such as for example https://opengeofiction.net/relation/123.