NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%20Azhari's gravatar image

Aram Azhari
1064511
accept rate: 0%

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").

(14 May '14, 08:52) SomeoneElse ♦

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.

(14 May '14, 09:01) Aram Azhari
1

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.

(14 May '14, 09:14) SomeoneElse ♦

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.

permanent link

answered 14 May '14, 07:39

MatthiasN's gravatar image

MatthiasN
564
accept rate: 0%

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.

permanent link

answered 14 May '14, 06:53

MatthiasN's gravatar image

MatthiasN
564
accept rate: 0%

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×167
×129
×45

question asked: 13 May '14, 18:19

question was seen: 3,344 times

last updated: 14 May '14, 09:14

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum