Re: [OSM-talk] Computing the 12-mile line

2009-03-07 Thread Hakan Tandogan
Roland Olbricht wrote:
 I will give more detailed explanations or run the tool on a particular region 
 if you would like to. But I'm abroad for some days from tomorrow morning. So 
 please ask, I'll try to answer on thursday evening.

Hi,

I want to run your extractors on the Turkey and Cyprus extracts from 
geofabrik (the files from 7.3.2009 to be precise), but report-results 
simply throws a segmentation fault.

I'm not that experienced in debugging c++ code anymore, do you have a 
hint how I could proceed? All I did as to now is to replace the -O3 in 
the compilaton line with a -g, but I don't even get a core file yet.


Regards,
Hakan

-- 
The Key To Immortality Is First Living A Life Worth Remembering.

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Computing the 12-mile line

2009-02-21 Thread Aun Johnsen (via Webmail)
I created control lines perpendicular on the coast and used these to find
the nodes for the 12-nm line, where the distance to other country was less
than 24 nm I used the same technique to find the mereidan line between the
countries. I did this along the entire coast of Brazil. I will need to redo
it with a script and a position database for baseline, 12nm, 24nm and eez

I used JOSM, as I can move around on the map freely, and get lengths of
lines as I create them (12nm = 4m)

--

On Fri, 20 Feb 2009 23:41:26 +, Thomas Wood
grand.edgemas...@gmail.com
wrote:
 I just tagged up the one I found in the database, I attempted to use
 GIS software to create a section where it misses a scottish island,
 but failed after 2-3 days of playing, I can't recall who put the data
 in originally.
 
 I'd be interested in seeing any code put into svn for others to use.
 
 
 On 20/02/2009, Adrian Frith adr...@frith.co.za wrote:
 For those of you who have been adding the 12-mile territorial waters
 line: did you calculate that data by offsetting the coastline/baseline?
 And if so, how did you do it? I mean: what software did you use, and
 how?

 Thanks,
 Adrian


 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk


-- 
Brgds
Aun Johnsen
via Webmail

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Computing the 12-mile line

2009-02-21 Thread Roland Olbricht
 I just tagged up the one I found in the database, I attempted to use
 GIS software to create a section where it misses a scottish island,
 but failed after 2-3 days of playing, I can't recall who put the data
 in originally.

 I'd be interested in seeing any code put into svn for others to use.

 On 20/02/2009, Adrian Frith adrian at frith.co.za wrote:
  For those of you who have been adding the 12-mile territorial waters
  line: did you calculate that data by offsetting the coastline/baseline?
  And if so, how did you do it? I mean: what software did you use, and
  how?

I've generated the source code with a tool handwritten in C++. You can find 
the source code in the file sweep-brim.c on the site
http://wmaz.math.uni-wuppertal.de/olbricht/osm/

The code itself is a mess and far from being user friendly, I wrote it merely 
to use it by myself. I stopped to use it because it fails on quite a lot of 
coastline errors. But I would be glad to reanimate it if you would like to 
use it or understand it. If you would like to get a particular piece of 
coastline, just ask for it.

The basic idea of how to use it:

Feed it a file of coastlines and a file with the resprective nodes. You can 
produce these files with osmosis by filtering for ways tagged 
as natural coastline and the nodes they point at. Or you can use the 
script coastline-extractor from the same site with a .bz2-file as the only 
argument, then use filter-nodes-bbox (compiled from filter-nodes-bbox.c) 
with a bounding box for the four arguments. Finally you can feed the two 
files as arguments to sweep-brim. The compiling flags 
for filter-nodes-bbox.c and sweep-brim.c are given in the 
file coastline-extractor. Unfortenatley, you then have to manually dig the 
right component from all the produced data - the tool produces also junk data 
for the onshore side of a segment and it is pretty hard to find and truncate 
the correct brim automatically. I've done it by hand.

Be aware that the whole process is quite slow. The extraction of the coastline 
can take some hours. The calculation of the brim should take some minutes. 
Then the upload might take quite a lot of time - the coastlines of France and 
Spain were a weekend and the United Kingdom another weekend.

The basic idea of how it works:

Image the planet covered with equidistant scanlines along the latitudes (the 
distance between to scanlines is currently 0.001 degrees of latitude). Now 
you add for every segment of every way from the coastline all the intervals 
of points on each scanline that are less than 12 nm from any point of that 
way (simplified: take into account only the endpoints of the segment and the 
intersections with the scanlines - the inaccuracies won't matter compared to 
the scanline gaps or the projection correction). After the tool has taken the 
union of all those intervals, it spans a way from interval border to interval 
border.

I will give more detailed explanations or run the tool on a particular region 
if you would like to. But I'm abroad for some days from tomorrow morning. So 
please ask, I'll try to answer on thursday evening.

There is also a tool mentioned on 

Regards,
Roland

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


[OSM-talk] Computing the 12-mile line

2009-02-20 Thread Adrian Frith
For those of you who have been adding the 12-mile territorial waters
line: did you calculate that data by offsetting the coastline/baseline?
And if so, how did you do it? I mean: what software did you use, and
how?

Thanks,
Adrian


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] Computing the 12-mile line

2009-02-20 Thread Thomas Wood
I just tagged up the one I found in the database, I attempted to use
GIS software to create a section where it misses a scottish island,
but failed after 2-3 days of playing, I can't recall who put the data
in originally.

I'd be interested in seeing any code put into svn for others to use.


On 20/02/2009, Adrian Frith adr...@frith.co.za wrote:
 For those of you who have been adding the 12-mile territorial waters
 line: did you calculate that data by offsetting the coastline/baseline?
 And if so, how did you do it? I mean: what software did you use, and
 how?

 Thanks,
 Adrian


 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk



-- 
Regards,
Thomas Wood
(Edgemaster)

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk