newbie needs help correcting distorted map

Brian Davis bdavis at USGS.GOV
Wed Apr 20 13:48:53 PDT 2005


However, ...... I have been struggling with projection, extents, and size
for a couple of days now.

When I zoom in to a map, the four corner points of my rubber-band box
are the new corners for the data displayed in my 400x200 browser space.
So, if I define an area that is 2:1 in x size to y size, I zoom in
as expected.  But when defining space that is not this 2:1 rectangular
ratio, the data gets stretched/contracted/distorted to fit that space,
because the corners of my new definition become the drawn corners,
instead of extra data in either the x or y direction being used to
fill the the remaining area.

Previously, interfacing to mapserver 4.0.2 on a Windows platform worked
just fine.
Currently, interfacing to mapserver 4.4.1 on a Red Hat Enterprise server
shows these symptoms.
I changed NONE of the html, js, or java, except all I did was point to a
new url with the linux mapserv, and the corresponding new location for
the .map file.

Is there a platform-dependency I am not worrying about correctly?
Is there a version-dependency I am not worrying about correctly?

Perhaps the answer is to point me at the correct discussion thread
dealing with these issues?  I couldn't find anything useful after a few
searches, so thought I would send out a post while I'm still looking.

Thanks!

Here are the relevant snippets from my .map file:

EXTENT -180.000 -90.000 180.000 90.000
SIZE 400 200
TRANSPARENT ON
UNITS DD

PROJECTION
    proj=longlat
    ellps=WGS84
    datum=WGS84
    no_defs
    "init=epsg:4326"
END


On Tue, 12 Oct 2004 17:08:05 -0400, Ed McNierney <ed at TOPOZONE.COM> wrote:

>Mike -
>
>Because MapServer supports projections defined parametrically (i.e. by
specifying the family of projection and its parameters), it - practically
speaking - supports any projection you want.  The European Petroleum Survey
Group (EPSG) maintains a database of projections with a unique integer ID
associated with each (the "EPSG code") and several products (including
MapServer) support this "shorthand" way of describing
projections.  "EPSG:4326" is EPSG code 4326, which is the "decimal degrees,
WGS84 datum" projection.
>
>If YOU don't know what projection you want, it's hard for any of us to
know.  It sounds like you might be best served by just living with
the "geographic" projection you're using for a while, until you better
understand what you want.
>
>Read the MapServer documentation to learn more about extents.  Normally, a
MapServer request will include the extents (in the coordinates of the
output map projection).
>
>Finally, please ALWAYS reply to the group.  This allows others to
participate in the discussion (the first person to answer your first
question may not know the answers to all your questions), allows others to
learn from the information so the question doesn't need to be asked again,
puts the answers in the archives, and prevents the first person to reply
from feeling like they've acquired a personal lifetime support commitment
just because they answered one question <g>.
>
>     - Ed
>
>----- Original Message -----
>From: Mike Jackson <mj at sci.fi>
>To: Ed McNierney <ed at TOPOZONE.COM>
>Sent: Tue, 12 Oct 2004 18:22:06 -0400
>Subject: Re: [UMN_MAPSERVER-USERS] newbie needs help correcting distorted
map
>
>
>> Ed McNierney wrote:
>>
>> >Mike -
>> >
>> >It sounds like nothing's wrong at all, except your choice of output
projection.
>>  The "geographic" projection has MANY limitations, including the fact
that it
>> badly distorts areas far from the Equator.  But all projections have
strong
>> points and weak points - that's why there are several to choose from.
>> >
>> >
>> >
>> How do I tell which projection mapserver is using? Where is the list of
>> supported projections?
>>
>> >You should try to do some research on what a good output projection
would be.
>> If you're particularly interested in northern Europe, then look for the
>> projections that are popular in those countries.  You can then change the
>> MAP-level PROJECTION, UNITS, and EXTENT to reflect the *output*
projection you
>> want, while leaving the LAYER definitions alone, since those do
accurately
>> describe the *input* projection of your source data.
>> >
>> >
>>
>> I researched for a while and came up empty. Perhaps I don't know the
>> keywords to search for.
>>
>> If a shapefile mentions an extent, then how can I know how to determine
>> an arbitrary extent that I would like to see? For example, what would
>> the extent be if I wanted to view Great Britain?
>>
>> Thanks,
>> Mike
>>
>>



More information about the MapServer-users mailing list