Can't split into big tiles

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't split into big tiles

popej
Hi,

I would like to split Germany data into 5 tiles. I have added contour
lines and sea area to OSM data but this probably is not important.

My file has about 200M of nodes. If I split with max-nodes 50M, then I
get about 50 tiles, which is wrong.

If I split with num-tiles=5 then bounding polygon is ignored and I get
tiles with boxes like:

63240002: 2176512,-935424 to 2796288,355584
#       : 46.702881,-20.072021 to 60.001831,7.630005

This is useless for me, since I need true bounding boxes for tiles.

I have used splitter r412. Any solution for this problem?
Temporary I'm going to clip data with osmosis.

--
Best regards,
Andrzej
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Carlos Dávila-2
El 11/10/14 22:54, Andrzej Popowski escribió:

> Hi,
>
> I would like to split Germany data into 5 tiles. I have added contour
> lines and sea area to OSM data but this probably is not important.
>
> My file has about 200M of nodes. If I split with max-nodes 50M, then I
> get about 50 tiles, which is wrong.
>
> If I split with num-tiles=5 then bounding polygon is ignored and I get
> tiles with boxes like:
>
> 63240002: 2176512,-935424 to 2796288,355584
> #       : 46.702881,-20.072021 to 60.001831,7.630005
>
> This is useless for me, since I need true bounding boxes for tiles.
>
> I have used splitter r412. Any solution for this problem?
> Temporary I'm going to clip data with osmosis.
>
Have you tried increasing max-nodes value?. If 50M gives you 50 tiles,
then 500M should will give around 5 tiles.
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

popej
Hi Carlos,

this was my first idea, I thought that I had missed a "0'. With 500M
max-nodes I get 46 tiles.

I tried max-tiles=4 and splitter failed, no solution.

--
Best regards,
Andrzej
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
Hi Andrzej,

now that the cycling season is over (for me)
I'll continue the development of splitter,
hope I can fix this problem.

Gerd

> Date: Sun, 12 Oct 2014 11:24:39 +0200

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [mkgmap-dev] Can't split into big tiles
>
> Hi Carlos,
>
> this was my first idea, I thought that I had missed a "0'. With 500M
> max-nodes I get 46 tiles.
>
> I tried max-tiles=4 and splitter failed, no solution.
>
> --
> Best regards,
> Andrzej
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
In reply to this post by popej
Hi Andrzej,

the combination of a polygon file and the --num-tiles
parameter is likely to create complex cases, as
splitter can only write rectangular tiles.
Please provide your poly file, the densities-out.txt and the splitter.log for
further analyses.

Gerd

> Date: Sun, 12 Oct 2014 11:24:39 +0200

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [mkgmap-dev] Can't split into big tiles
>
> Hi Carlos,
>
> this was my first idea, I thought that I had missed a "0'. With 500M
> max-nodes I get 46 tiles.
>
> I tried max-tiles=4 and splitter failed, no solution.
>
> --
> Best regards,
> Andrzej
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

popej
In reply to this post by Gerd Petermann
Hi Gerd,

maybe it was my fault, I can't repeat the problem with split into 50M
nodes. Now I get 5 tiles which is ok. Probably my previous input data
contained duplicated ID numbers.

As for split with --num-tiles=5, I get info:
"Polygons are ignored because parameter --num-tiles is used"
I guess it is about --polygon-file parameter.

If bounding poly is not used, then tiles can be bigger. I think you
could convert polygon into bounding box to limit area. Without bounding
poly, calculated aspect ratio is of no use for tiles at boundary.

I'm attaching logs for splitting, there was no densities-out.txt.

--
Best regards,
Andrzej

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

split_de.zip (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
Hi Andrzej,

okay, now I see what happens. You feed a map containing a big part of Europe
to splitter, and you want to cut out a rectangular area covering Germany, and this part
should be devided into  5 tiles using the --num-tiles=5 option.
Correct?

So, this is a special case as your bounding polygon is already a rectangle.
I'll see if I can add code to handle this case.

Gerd

Date: Tue, 14 Oct 2014 16:12:44 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [mkgmap-dev] Can't split into big tiles

Hi Gerd,

maybe it was my fault, I can't repeat the problem with split into 50M
nodes. Now I get 5 tiles which is ok. Probably my previous input data
contained duplicated ID numbers.

As for split with --num-tiles=5, I get info:
"Polygons are ignored because parameter --num-tiles is used"
I guess it is about --polygon-file parameter.

If bounding poly is not used, then tiles can be bigger. I think you
could convert polygon into bounding box to limit area. Without bounding
poly, calculated aspect ratio is of no use for tiles at boundary.

I'm attaching logs for splitting, there was no densities-out.txt.

--
Best regards,
Andrzej

_______________________________________________ mkgmap-dev mailing list [hidden email] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

popej
Hi Gerd,

splitter is a good tool and I'm trying to use it for other purposes than
preparing data for mkgmap. In this case I was trying to compile maps for
Locus. That's why I find unusual problems ;)

It's low priority, I think that using some kind of bounding box or poly
for --num-tiles could be usable.

--
Best regards,
Andrzej
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
Hi Andrzej,

attached is a patch which implements this. Please try if it works
for you.

Gerd
useBBoxOfPolygons-v1.patch

popej wrote
Hi Gerd,

splitter is a good tool and I'm trying to use it for other purposes than
preparing data for mkgmap. In this case I was trying to compile maps for
Locus. That's why I find unusual problems ;)

It's low priority, I think that using some kind of bounding box or poly
for --num-tiles could be usable.

--
Best regards,
Andrzej
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

popej
Hi Gerd,

I have applied your patch against r414, I hope correctly. I can see this
message:
Exact map coverage read from input file(s) is
(46.7038893699646,-20.071227550506592) to
(60.539002418518066,28.109700679779053)
Exact map coverage after applying bounding box of polygon-file is
(47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)
Exact map coverage is (47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)

But calculated areas are exactly the same as in original version:
Area 63240012 covers (46.669921875,-20.0830078125) to
(60.029296875,7.646484375) and contains 41151962 nodes (84 %)

I have attached logs from both versions.

--
Best regards,
Andrzej

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

bbox_patch.7z (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
Hi Andrzej,

yes, seems my patch is not working. It changes the bbox
that is used to display the vlaues, but not the one
that is used for the tile calculation :-(
I'll look at it tomorrow.

Gerd

Date: Mon, 3 Nov 2014 21:09:26 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [mkgmap-dev] Can't split into big tiles

Hi Gerd,

I have applied your patch against r414, I hope correctly. I can see this
message:
Exact map coverage read from input file(s) is
(46.7038893699646,-20.071227550506592) to
(60.539002418518066,28.109700679779053)
Exact map coverage after applying bounding box of polygon-file is
(47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)
Exact map coverage is (47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)

But calculated areas are exactly the same as in original version:
Area 63240012 covers (46.669921875,-20.0830078125) to
(60.029296875,7.646484375) and contains 41151962 nodes (84 %)

I have attached logs from both versions.

--
Best regards,
Andrzej

_______________________________________________ mkgmap-dev mailing list [hidden email] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
Hi Andrzej,

sorry, don't know what I tested yesterday, here is the new patch.

Gerd



From: [hidden email]
To: [hidden email]
Date: Mon, 3 Nov 2014 21:25:22 +0100
Subject: Re: [mkgmap-dev] Can't split into big tiles

Hi Andrzej,

yes, seems my patch is not working. It changes the bbox
that is used to display the vlaues, but not the one
that is used for the tile calculation :-(
I'll look at it tomorrow.

Gerd

Date: Mon, 3 Nov 2014 21:09:26 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [mkgmap-dev] Can't split into big tiles

Hi Gerd,

I have applied your patch against r414, I hope correctly. I can see this
message:
Exact map coverage read from input file(s) is
(46.7038893699646,-20.071227550506592) to
(60.539002418518066,28.109700679779053)
Exact map coverage after applying bounding box of polygon-file is
(47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)
Exact map coverage is (47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)

But calculated areas are exactly the same as in original version:
Area 63240012 covers (46.669921875,-20.0830078125) to
(60.029296875,7.646484375) and contains 41151962 nodes (84 %)

I have attached logs from both versions.

--
Best regards,
Andrzej

_______________________________________________ mkgmap-dev mailing list [hidden email] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________ mkgmap-dev mailing list [hidden email] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

useBBoxOfPolygons-v2.patch (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
Hi all,

I just noticed that I did not yet commit patch
useBBoxOfPolygons-v2.patch

Did anybody try it?

Gerd

GerdP wrote
Hi Andrzej,

sorry, don't know what I tested yesterday, here is the new patch.

Gerd


From: [hidden email]
To: [hidden email]
Date: Mon, 3 Nov 2014 21:25:22 +0100
Subject: Re: [mkgmap-dev] Can't split into big tiles




Hi Andrzej,

yes, seems my patch is not working. It changes the bbox
that is used to display the vlaues, but not the one
that is used for the tile calculation :-(
I'll look at it tomorrow.

Gerd

Date: Mon, 3 Nov 2014 21:09:26 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: [mkgmap-dev] Can't split into big tiles

Hi Gerd,
 
I have applied your patch against r414, I hope correctly. I can see this
message:
Exact map coverage read from input file(s) is
(46.7038893699646,-20.071227550506592) to
(60.539002418518066,28.109700679779053)
Exact map coverage after applying bounding box of polygon-file is
(47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)
Exact map coverage is (47.26541519165039,6.1527299880981445) to
(55.147762298583984,15.05077600479126)
 
But calculated areas are exactly the same as in original version:
Area 63240012 covers (46.669921875,-20.0830078125) to
(60.029296875,7.646484375) and contains 41151962 nodes (84 %)
 
I have attached logs from both versions.
 
--
Best regards,
Andrzej

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev     

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev     
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

useBBoxOfPolygons-v2.patch (6K) <http://gis.19327.n5.nabble.com/attachment/5822978/0/useBBoxOfPolygons-v2.patch>
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

popej
Hi Gerd,

sorry, somehow I forgot about this patch. I have tested it now and it
works correctly. See attached picture with tiles without patch - big
area - and with patch - correct area around bounding poly.

--
Best regards,
Andrzej

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

bpoly2.png (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can't split into big tiles

Gerd Petermann
Hi Andrzej,

okay, I've committed that patch now.

Gerd

popej wrote
Hi Gerd,

sorry, somehow I forgot about this patch. I have tested it now and it
works correctly. See attached picture with tiles without patch - big
area - and with patch - correct area around bounding poly.

--
Best regards,
Andrzej

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

bpoly2.png (9K) <http://gis.19327.n5.nabble.com/attachment/5825953/0/bpoly2.png>