[Talk-ca] NTS 1/10,000 Tile Proposal
Frank Steggink
steggink at steggink.org
Sat Nov 21 22:37:03 GMT 2009
Hi Adam,
I like this idea too, and I've implemented it on my site: [1]. My
preference goes to a letter for the last identifier as well, in order to
have an alternating pattern of letters and numbers. A slash between the
1:250000 and 1:50000 is now optional, as well as a hyphen between the
1:50000 and the newly appended letter.
In the meantime I also corrected the bug for northern latitudes. The
extra letter should also work here, because the difference between the
northern and southern tiles refer how the first letter in the identifier
should be interpreted.
Another addition is that a WKT string describing the area is shown. This
string is, among other things, used by geobase2osm.py. The SRS
identifier can eventually be omitted, so you only have to copy the
POLYGON((...)) part into the text file which is used.
Regarding the algorithm to determine identifiers of neighboring tiles:
it is easiest to convert the entire identifier to lat/lon (or grid
indexes), calculate the 8 neighboring lat/lon (grid index) values, and
convert those back to the NTS identifier.
By the way, the CanVec data uses the same identifiers.
Frank
[1] http://www.steggink.org/geo/
Adam Dunn wrote:
> The intention was to specify smaller tiles for urban areas, but if it
> was deemed necessary to use this kind of system up north (wooded areas
> and lakes could be complex and dense up there), then one would have to
> put "ifelse" statements into the algorithm, and make the longitude
> sizes .2 degrees wide from 68 to 80 degrees north latitude, and .4
> degrees wide from 80 to 90 degrees north latitude. The latitude sizes
> would remain the same, and the system would retain a 5x5
> configuration. In investigating this matter, I've found that
> http://www.steggink.org/geo/ has a bug for the northern latitudes.
>
> The reason I chose a letter as the final identifier was to continue
> the alternating pattern already existing in NTS tiling (###X/## gets
> extended to ###X/##X), and, more importantly in my opinion, it also
> makes it clear where the final delimiter is in a quick glance or in
> shorthand notations. It's already fairly common to drop the
> solidus/slash between the 1/250K and 1/50K identifiers, so dropping
> the hyphen between the 1/50K and 1/10K could be easily recognized if
> the final identifier is a letter.
>
> As for finding neighbouring tiles, that's just one of the problems
> with the system. This also happens when dealing with 1/250K sheets. On
> a technical note, you actually solved most of the problem, all you
> would have to do is convert the ([x-6,-5,-4],x-1,x+1,[x+4,+5,+6]) or
> similar statement to ascii code with an offset of x into the ascii
> code for the tile in the center of the search square. Of course this
> isn't doable by humans so defeats the purpose of this scheme selecting
> 5x5 tiles to make it easier for humans. Aside: 6, 5, 4 only works as
> an offset for tiles 3, 8, 13 and 18. If you wanted neigbours of 7 or
> 17, then you would need offsets of -2, -3, -4 for the tiles below and
> +6, +7, +8 for tiles above, and other combinations for other tiles.
> The algorithm for finding north-neighbouring tiles is (where x is the
> center tile and % is the modulus operator):
>
> if(x<21)
> north = x + 9 - 2 * ((x-1) % 5)
> //Add decimal value 64 to the result to get the decimal value of the
> ascii character you want
>
> It's just a trade off between pros and cons for whether you want to
> use a letter or a number as the last identifier.
>
> I don't know much about Canvec, but doesn't it use the same tile
> naming system? I should think that it would work.
>
> Adam
>
> On Wed, Nov 18, 2009 at 7:11 AM, Bégin, Daniel
> <Daniel.Begin at rncan-nrcan.gc.ca
> <mailto:Daniel.Begin at rncan-nrcan.gc.ca>> wrote:
>
> A great proposition!
>
> - About NTS tiling: Just take into account in your algorythm that
> the width of NTS tiling double at latitude 68 and 80 (don't use
> fixed longitude values because you will end up with 400 tiles for
> an NTS up north !)
>
>
> - About naming convention, I would propose to use a number as
> suffix instead of a letter. It would be easier (for me) to find
> neighbour tiles.
>
> Example: 021E05-18 (with a 5X5 window)
> Neighbours are 12,13,14,17,19, 22,23,24
> ([18-6,-5,-4],18-1,18+1,[18+4,+5,+6])
>
> Example: 021E05R (with a 5X5 window)
> Neighbours are L,M,N,Q,S,V,W,X (I have no magic to
> do that!)
>
>
> - Is it going to work with Canvec as well?
>
> Cheers,
>
> Daniel
>
> ------------------------------------------------------------------------
> *From:* talk-ca-bounces at openstreetmap.org
> <mailto:talk-ca-bounces at openstreetmap.org>
> [mailto:talk-ca-bounces at openstreetmap.org
> <mailto:talk-ca-bounces at openstreetmap.org>] *On Behalf Of *Adam Dunn
> *Sent:* 18 novembre 2009 01:42
> *To:* talk-ca
> *Subject:* [Talk-ca] NTS 1/10,000 Tile Proposal
>
> This applies only to the band of tiles represented by the 7
> southernmost major tiles. That is to say {00-06, 10-16, 20-26,
> etc}. Once you go north of that, the tile naming scheme changes,
> and the following no longer applies (and is likely no longer needed).
>
> Though many people know how the NTS naming scheme works, it will
> be summarized here. NTS tiles are first given a major number, such
> as 010 or 093, progressing south to north and east to west. Each
> of these tiles is four degrees high (latitude) and eight degrees
> wide (longitude). These tiles are then split up into 16 tiles, the
> so-called 1/250,000 tiles, and given a letter as a name, starting
> from the south-east corner then going west and zig-zagging north.
> Each of these tiles is one degree high (lat) and two degrees wide
> (long). Each of these tiles are split once again into the 16
> 1/50,000 tiles, each with a number, following the same zig-zag
> pattern as the 1/250,000 tiles. These numbered tiles are 0.25
> degrees high and 0.5 degrees wide.
>
> So far, the tile divisions have worked out to nice round numbers.
> For 1/250,000 tiles the least significant digits are:
> lat: {0, 1, 2, 3, ...} and long: {0, 2, 4, 6, 8}
>
> For 1/50,000 tiles, least sig digits are:
> lat: {.00, .25, .50, .75} and long: {.0, .5}
>
> This system works well, but for the purposes of OSM in
> high-density areas it becomes necessary to split NTS tiles up
> further. Splitting the 1/50,000 tiles up into 16 tiles would
> follow the NTS splitting scheme, but would result in very strange
> numbers:
> lat: {.0, .0625, .125, .1875, .25, ...} and long: {.0, .125, .25,
> .375, .5, ...}
> While there's nothing wrong with this and computers could handle
> it easily, it's a little hard on human eyes ;)
>
> If the tiles were instead split into 25 tiles (5x5), the numbers
> would work out a little nicer to the eye:
> lat: {.0, .05, .1, .15, .2, .25, ...} and long: {.0, .1, .2, .3,
> .4, ...}
>
> Thus, the proposal is to split NTS 1/50,000 tiles into 1/10,000
> tiles such that each tile is 0.05 degrees in latitude and 0.1
> degrees in longitude. The naming would take on letters A through
> Y, in a zig-zag pattern similar to the pre-existing NTS scheme,
> starting from the south-east corner. This letter would go in the
> last position of the tile name, eg. 042I/12A or 092H/04Y. Figure 1
> shows an example for 092H/04 (the figure is twice as wide as it is
> tall, following an equirectangular projection. In real life, and
> most projection methods, the length ratios change with latitude.)
>
> Fig 1:
> http://www.mediafire.com/imageview.php?quickkey=mmmymj42yw4&thumb=4
> <http://www.mediafire.com/imageview.php?quickkey=mmmymj42yw4&thumb=4>
>
> Adam
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Talk-ca mailing list
> Talk-ca at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk-ca
>
More information about the Talk-ca
mailing list