Re: Dislocated Mercator Projection

From: orlando feitosa <snapsurf@hotmail.com>
Date: Sun Mar 24 2002 - 13:57:23 EST

Hi Don,

Thanks for your help, I changed the original ESRIPoly.read method before the
degToRad call, to the following:

                radians[i+1] = ((float)readLEDouble(b, ptr));//x (lon)
                aux = ((int) radians[i+1]);
                radians[i+1] = ((((radians[i+1] - aux) * 60) / 100) + aux);
             // System.out.println("LON: " + radians[i+1]);
                radians[i+1] = ProjMath.degToRad((float)radians[i+1]);
                ptr += 8;

                radians[i] = ((float)readLEDouble(b, ptr));//y (lat)
                aux = ((int) radians[i]);
                radians[i] = ((((radians[i] - aux) * 60) / 100) + aux);
             // System.out.println("LAT: " + radians[i]);
                radians[i] = ProjMath.degToRad((float)radians[i]);
                ptr += 8;

and the map projection appears in right coordinates, SOLVING the problem
with all my Shapefiles, but another problem begun related to the SCALES.
When the scale is around 600,000 or greater (Zoom out) the Map is displayed
on the screen correctly, but when I try to Zoom in the projection, the Map
just disappears from the screen.
I tried to find other related classes or methods involved with this change,
but I haven’t any success.
Do you have an idea how to solve the new problem?

Thank you so much for attention.

Best Regards.

Orlando

>From: Don Dietrick <dietrick@bbn.com>
>To: "orlando feitosa" <snapsurf@hotmail.com>
>CC: openmap-users@bbn.com
>Subject: Re: Dislocated Mercator Projection
>Date: Mon, 18 Mar 2002 19:25:12 -0500
>
>Hi Orlando,
>
>If that is the problem, then you can make some modifications to the shape
>layer package code that reads the data files, and modify them before they
>are used to create OMGraphics. For the com.bbn.openmap.layer.shape
>package, you can look in the ESRIPoly.read method, making the modifications
>before the degToRad() call (and so on, for each shape type you are trying
>to display).
>
>The com.bbn.openmap.DMSLatLonPoint could help you with the conversion, but
>you'd have to do the parsing to load it properly, and you'd also want to
>keep one in the ESRIPoly to reuse for every coordinate, instead of
>allocating one for every coordinate.
>
>Hope this helps,
>
>Don
>
>On Monday, March 18, 2002, at 04:21 PM, orlando feitosa wrote:
>
>>Hi Don,
>>
>>Thanks for your answer, I¥m starting OpenMap with the scale=230.000
>>and I tried to zoom in until scale=7.187 and zoom out until scale=920.000,
>>but the dislocation of the map as whole keeps the same.
>>
>>Talking with Mr.Alexander, he noticed the following:
>>___________________________________________________________________
>>-23.576 --> -23 0.576*60 = -23 34.56
>>-46.745 --> -46 0.745*60 = -46 44.7
>>
>>The guess was that you were trying to compare Lat, Lon in decimal degree
>>with coordinates in Degree.Minute form. What I did is just converted
>>fractional part of degree to minutes.
>>Just double check this. Probably everything works fine and you don't need
>>any correction
>>____________________________________________________________________
>>
>>....the problem is that, I must do something!!!! I don¥t know where and
>>how I can adjust the projection in the right coordinates (slide up the
>>map).
>>
>>This information should helps, for each Shapefile *.shp there is a file
>>called *.prj with following lines:
>>
>>&REM Clark 1866 Lat/Lon, Degrees, -180 ==> +180
>>&REM LL
>>PROJECTION GEOGRAPHIC
>>UNITS DD
>>PARAMETERS
>>
>>Thanks for any help.
>>
>>Best Regards,
>>
>>Orlando
>>
>>
>>
>>>From: Don Dietrick <dietrick@bbn.com>
>>>To: "orlando feitosa" <snapsurf@hotmail.com>
>>>CC: openmap-users@bbn.com
>>>Subject: Re: Dislocated Mercator Projection
>>>Date: Sun, 17 Mar 2002 16:06:33 -0500
>>>
>>>Hi Orlando,
>>>
>>>What scale is the map that you are looking at? Does the error decrease
>>>when you zoom in? You may be seeing the effects of rounding that the
>>>projection is doing at smaller scales, setting a pixel's coordinates to
>>>some value, while rounding other lat/lon values to that closest pixel as
>>>well.
>>>
>>>- Don
>>>
>>>On Saturday, March 16, 2002, at 10:50 PM, orlando feitosa wrote:
>>>
>>>>Hi Friends,
>>>>
>>>>IÌm having a problem with the Mercator Projection, when a map (a
>>>>Shapefile) is rendered using the ShapeLayer, all the projection
>>>>appears dislocated in a wrong LAT/LON coordinates.
>>>>
>>>>Here are differences in a specific coordinate:
>>>>
>>>> Wrong Projection Should be Difference in Decimal Degrees
>>>>LAT -23.576 -23.346 -230
>>>>LON -46.745 -46.445 -300
>>>>
>>>>Is there a kind of adjustment parameter to setup this dislocation?
>>>>
>>>>IÌll appreciate any help.
>>>>
>>>>Best Regards,
>>>>
>>>>Orlando
>>>>
>>>>
>>>>_________________________________________________________________
>>>>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>>>>
>>>>--
>>>>[To unsubscribe to this list send an email to "majdart@bbn.com"
>>>>with the following text in the BODY of the message "unsubscribe
>>>>openmap-users"]
>>>>
>>>>
>
>
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Don Dietrick, dietrick@bbn.com
>BBN Technologies, Cambridge, MA
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>>--
>>>[To unsubscribe to this list send an email to "majdart@bbn.com"
>>>with the following text in the BODY of the message "unsubscribe
>>>openmap-users"]
>>
>>
>>
>>
>>_________________________________________________________________
>>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>>
>>--
>>[To unsubscribe to this list send an email to "majdart@bbn.com"
>>with the following text in the BODY of the message "unsubscribe
>>openmap-users"]
>>
>

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sun Mar 24 14:00:49 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT