Hi, I was looking at the boundaries of latitude longitude on the map and I realized there are some weird lines in the database. As an example, I downloaded the data for Sweden and I realized there are negative longitude values, belonging to something called 'Arctic circle' This example It is a straight line across the globe, I don't want it. How to filter such things out? Best Regards,
This question is marked "community wiki".
asked 13 May '14, 18:19 Aram Azhari |
Hi, the question remains, what do you do if at least one point is outside? Just nudging the point to the boundary might give problems for rendering. The other possibility is to drop the whole line or the polygon. This might be easy to implement. Mark those nodes outside your boundary, then drop all those ways containing them, then in several iterations, drop all relations that contain dropped relations, ways or nodes. Then you end up with structures that completely lay inside your boundaries - but you might get uncharted areas at the border. I did some lat-lon to 3D mapping with coastlines and ended up implementing polygon-cutting for displaying just the near side of "wrapped around horizon" continents. answered 14 May '14, 07:39 MatthiasN |
Hei, you shouldn't. If you download data for a rectangular area, you also need to get the "other" ends of lines and polygons that lay outside that area. Otherwise you end up getting empty space along the border. Since the arctic circle is a long line, the other end can lay far way. If you do you own rendering, you should do "clipping", meaning only draw lines up to the boundary of your area. Furthermore, some polygon-algorithm are quite sensitive to clipped line data. Let your drawing algorithm work with the full lines, but only allow drawing inside a prescribed clipping area. best regards. answered 14 May '14, 06:53 MatthiasN Hi, When you have interpolation from geo location coordinates to another coordinate system (for ex. a 3d single precision coordinate), you need to filter out the data or you'll end up with a shrink map because of even one outlier. So what I ended up doing was that I selected the bounding box of the country for interpolation. It our case, we never encounter having two countries in the view, only one.
(14 May '14, 07:13)
Aram Azhari
|
I notice that since this question someone's noticed the "Artic Circle" and deleted it (presumably because it doesn't relate to a feature "on the ground").
I see. Good thing that we work on an offline version (taken from geofabrik.de).
Given the fact that osm is community collected data, such things may happen again. We should post - process heuristicly to avoid unwanted data.
Btw, is the collaborations moderated or supervised? What if someone goes ahed and delete an entire country? Any links explaining safety and security of osm is appreciated.
Generally speaking, "unwanted deletions" of that sort are fairly rare (and relatively easily reverted by other members of the community). The http://wiki.openstreetmap.org/wiki/Vandalism wiki page and the links from there have a bit of information, but it might be easier just to ask the question on the #osm IRC channel and discuss with people there.