• CommentAuthorJamieW
    • CommentTimeApr 7th 2010
     
    Can someone explain what the query parameters are for the tile.aspx request of the Geostream web service?

    http://localhost/GeoStream/tile.aspx?t=0,0,300,4,1

    What do the 0, 0, 300, 4, and 1 numbers relate to? I thought I'd figured it out, but I found I got distorted tiles (stretched vertically) at higher zoom levels. I can elaborate if need be.

    Thanks in advance.
    • CommentAuthorJamieW
    • CommentTimeApr 7th 2010
     
    I think I've figured most of it out:

    #1 - The tile X coordinate
    #2 - The tile Y coordinate
    #3 - The tile size (width & height)
    #4 - Number of supertiles (not sure what this means?)
    #5 - The zoom level.

    The X and Y coordinates are relative to 0, 0 (Lat, Long). I require 256 x 256 tiles. At low zoom levels, the tiles seem to be fine, but if I zoom in, the map is pushed down more than I think it should be. So I must be doing something wrong. The number of supertiles seems to effect how much the tiles are off, so perhaps the problem is there? I'm using a value of 2 at the moment - the lowest valid value.
    • CommentAuthorJamieW
    • CommentTimeApr 8th 2010
     
    I'm struggling to make sense on the coordinate system. I'm more used to dealing with the format that Bing, Google, and OpenStreetMap uses. This system specifies tile coordinates using just an X, Y, and Z coordinate where:

    Z = The zoom level, where the total number of tiles along the width / height of the map is 2^Z (so, at zoom level 1, there are 2 tiles, at zoom level 2, there are 4, at zoom level 3, there are 8, etc.
    X & Y - The zero-based coordinates of the tile, which is between 0 and 2^Z - 1 and originating on the top-left corner of the map.

    This is the system that I use for my map currently. How can I get the X, Y, TPST, and Z values from that coordinate system?

    Thanks for your reply.
    • CommentAuthorJamieW
    • CommentTimeApr 8th 2010 edited
     
    Not quite. Here's another explanation of the tile coordinate system I use and need to transform into Geostream's...

    The coordinates are based on X, Y, and Z coordinates.
    Z is the zoom level, such that 2^Z represents the number of (256 x 256) tiles in the X and Y direction. For example, at zoom level '3', the map is split into 8 x 8 tiles (since 2^3 = 8).
    The X and Y are zero-based, and (0, 0) represents the top-left tile, and (2^Z - 1, 2^Z - 1) is the bottom-right tile.

    The system isn't exactly complicated, but this link describes the system in much more detail: HERE

    I'd really appreciate some help with this. Thanks for your suggestions so far.
    • CommentAuthorJamieW
    • CommentTimeApr 8th 2010
     
    That is correct! I've been 'almost' there for a while. I'm sure I'm making it more complicated than it actually is. :)
    • CommentAuthorJamieW
    • CommentTimeApr 9th 2010 edited
     
    Your method seems to work fine for Zs 1 - 5, but any higher than that and I get an error, for example:

    http://localhost/GeoStream/tile.aspx?t=-2,-40,256,256,1 or
    http://localhost/GeoStream/tile.aspx?t=-1,-13,256,64,1

    Results in:

    Server Error in '/GeoStream' Application.
    --------------------------------------------------------------------------------

    Max Map Size is 16000
    Parameter name: MapSize

    :(