Question about showing a location in mapserver by longitude/latitude

Frank Warmerdam fwarmerdam at GMAIL.COM
Mon Mar 7 15:04:57 EST 2005


On Mon, 7 Mar 2005 13:47:34 -0600, Karl Lehenbauer <karl-umn at sc.com> wrote:
> OK, so I figured out more about this, and it's gotta be THE dumb
> question y'all are sick of hearing.  So I gotta figure out projections
> and stuff.  I get that.  But that is something mapserver is already
> doing, right?  I have some lat/longs I want to add to my file, I can do
> it with the inline layer.  I'm trying stuff like this:
>
> LAYER
>    NAME "inline_cities"
>    STATUS default
>    DEBUG ON
>    PROJECTION
>                  "proj=merc"
>                  "ellps=GRS80"
>                  "lat_ts=34"
>                  "lon_0=-118"
>                  "no_defs"
>    END
>    TYPE POINT
>      FEATURE
>        POINTS
>          32.42 99.68
>        END
>        TEXT "Abilene"
>      END
> ...etc...
>
> But of course the points are way off from where they need to be.  I
> know I'm over my head here, and I have ordered "the book", but in the
> meantime, is there some cool way to make this go?  I mean, Tiger data
> is lat/long and mapserver groks it.

Karl,

If your data is in latlong, then your layer should also be
declared that way.  Change the PROJECTION declaration to:

PROJECTION
  "+proj=latlong +ellps=GRS80"
END

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list