Map Transformation Issues
I'm having trouble using the map transformation calculator. When I use AbstractZoomifyMapProvider as my base class I get completely messed up row/column coordinates (in the thousands). When I use AbstractImageBaseMap provider like in the BlueMarbleMap example I get the correct column number (I think) but my row number is still in the thousands. Is there something I'm missing to the calculations?
=Ryan
ryan@adobe.com
=Ryan
ryan@adobe.com
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hi Ryan,
Can you give us some hints about your original image?
What are the pixel dimensions of that image? What are the x/y (pixel) lon/lat (degrees) and col/row values you're using?
The calculator can be confusing because it's easy to transpose x/y in one of the values pretty easily. Post some sample values here and we'll take a look! -
Inappropriate?You guys are awesome. My transformation function is this:
var t:Transformation = new Transformation(2351455.484107899, -82927.87532254365, 5077166.3113621175,
54546.97052986512, -2136876.6826171954, 2133211.807148975);
__projection = new MercatorProjection(12, t);
And this is for an image that's 3560 pixels high and 2594 pixels wide. I have the geolocation coordinates for the corners of the map, so originally I'd done that and used (0,0), (3560,0), and (3560,2594) for my row/column info.
Now I'm using (2157,1956), (510,1856), (3105,1083).
When I run it I get jpg requests like this: TileGroup0/2-4957-2084.jpg
So I can't figure out what the deal is.
Thanks a bunch!
=Ryan
ryan@adobe.com -
Inappropriate?The corners are usually easiest to figure out, and there's no reason I can think of why they wouldn't work. What are the lat/lon locations of each corner?
(The first step I'm trying to take is to see if I can reproduce your Transformation using the same input into http://modestmaps.com/calculator.html)
Also, I've just checked in a DynamicZoomifyMapProvider class that might help you debug what's happening:
http://modestmaps.mapstraction.com/tr...
The constructor requires three Locations and three pixel Points, hopefully that should be clearer than the row/col approach. -
Inappropriate?The Lat/Lon and then (row,col):
NW 47.482873,-121.808543 (0,0)
SW 47.4178,-121.808928 (3560,0)
SE 47.417589,-121.739099 (3560,2594)
Let me check out that class. Thanks!! -
Inappropriate?I got this, for linear projection:
var t:Transformation = new Transformation(-9471.323486384998, -3134469.4206051053, 2577500.935703263,
2128379.255868343, -12592.411806740449, 4535285.185185379);
__projection = new LinearProjection(12, t);
And this, for mercator projection:
var t:Transformation = new Transformation(-9465.448690599225, -2119618.8222459042, 1980893.1011223854,
2128379.2794697373, -8515.352840126265, 4532888.373944924);
__projection = new MercatorProjection(12, t);
Do either of those help?
If not, I'm not sure what the solution is... but you certainly shouldn't be getting row/col in the thousands at zoom level 2. -
Inappropriate?For what it's worth, I think something is up with the AS2 library. Everything loads fine in the AS3 world but I'm still getting numbers in the thousands with AS2. I don't know modest maps well enough to figure out what's up but I tried digging around. If I figure it out, I'll let people know.
Thanks for your help! -
Inappropriate?Hmm... wish I could help but I'm really only familiar with as3.
I do remember the as2 version being slightly more sensitive to initial conditions.
If you don't already, try setting and resetting the center/zoom of your map after you change providers. Also, if you don't already, you might try making your custom provider the first provider (supplied to the Map constructor or init method, I forget which). Switching providers that also switch projection can be unreliable IIRC.
Otherwise, you're somewhat on your own with the as2 one since it's unlikely anyone currently working on Modest Maps will work with it again.
Loading Profile...



EMPLOYEE