Projection/Extent help

Camden Daily cdaily at GMAIL.COM
Thu Dec 16 15:24:59 EST 2004


Ed, that worked great!  Thanks so much!

-Camden Daily


On Thu, 16 Dec 2004 13:08:32 -0500, Ed McNierney <ed at topozone.com> wrote:
> Paul -
>
> First, ALWAYS reply to the entire list.  Just because I was the first to
> answer your question doesn't mean I'm the best to answer the rest of
> your questions, nor am I agreeing to be your personal answer man for
> life <g>.  And it's important for everyone else to learn from your
> questions, and to have them go into the archives.  Thanks!
>
> Well, I guessed wrong - you didn't say whether the layer in your map
> file was the DD layer or the FEET layer.  And I overlooked the
> PROJECTION block in your LAYER definition - sorry about that; I didn't
> scroll down far enough <g>.
>
> Is 26971 incorrect?  Well, it's units are not feet, but meters, as are
> most state plane systems.  Get rid of the UNITS FEET in the LAYER block,
> as it's not going to change your projection for you.  Your coordinates
> appear to be 26971 coordinates converted to feet, so you will need to
> create a custom projection definition that's the equivalent of NAD83
> Illinois East in feet.  Here's the definition of 26971:
>
> NAD83 / Illinois East
>   <26971>
>     proj=tmerc
>     lat_0=36.666666667
>     lon_0=-88.333333333
>     k=0.999975
>     x_0=300000.000
>     y_0=0.000
>     ellps=GRS80
>     datum=NAD83
>     units=m
>     no_defs
>   <>
>
> If you replace the "units=m" statement with "to_meter=0.3048006096" you
> will adjust this projection definition to be in feet.  You will need to
> explicitly describe this projection as:
>
> PROJECTION
>     "proj=tmerc"
>     "lat_0=36.666666667"
>     "lon_0=-88.333333333"
>     "k=0.999975"
>     "x_0=300000.000"
>     "y_0=0.000"
>     "ellps=GRS80"
>     "datum=NAD83"
>     "to_meter=0.3048006096"
>     "no_defs"
> END
>
> This should accurately describe your data layer, and allow MapServer to
> reproject it.
>
>         - Ed
>
> Ed McNierney
> President and Chief Mapmaker
> TopoZone.com / Maps a la carte, Inc.
> 73 Princeton Street, Suite 305
> North Chelmsford, MA  01863
> ed at topozone.com
> (978) 251-4242
>
> -----Original Message-----
> From: Camden Daily [mailto:cdaily at gmail.com]
> Sent: Thursday, December 16, 2004 12:15 PM
> To: Ed McNierney
> Subject: Re: [UMN_MAPSERVER-USERS] Projection/Extent help
>
> Ed,
>
> Thanks for the reply, but I'm still a little confused...
>
> > Your EXTENT and UNITS need to be described in the units of the output
> > projection your map is using.  In your example below, everything is
> > fine.  But if you switch to the two commented EXTENT and UNITS lines,
> > it won't work unless your PROJECTION block is changed to have the map
> > generated in a different projection that uses those units.
>
> The example I posted doesn't work right now.  In fact, the only I way I
> can get it to work is to drop out the mapfile projection and switch to
> the commented out extent in feet, the same units as the layer.
>
> > Leave your EXTENT and UNITS alone, since you want to (I think) still
> > have your output projection be "latlong".  You need to create a new
> > PROJECTION block that's *inside* the LAYER definition block for the
> > new layer that's got units in feet.
>
> I have a projection block within my layer.  Is it incorrect?
>
> > By default MapServer assumes that all LAYERs not otherwise described
> > are in the same projection as the output projection of the image (the
> > one defined by the top-level PROJECTION block).  If that's not the
> > case, MapServer can't guess - you have to tell it that a given layer
> > is in a different projection by including a PROJECTION block inside
> > that layer definition.
> >
> > What is the "other" projection?  You need to know either its name (if
> > it's a common, standard projection) or all the mathematical parameters
>
> > describing it if it's a custom projection.  If you don't know how to
> > describe it accurately, MapServer won't be able to guess for you <g>!
>
> The other projection that I'm trying to merge this with is in latlong,
> which is why I'm trying to get this layer working with the extent in dd
> as opposed to feet.
>
> Thanks,
> -Camden
>
> >         - Ed
> >
> > Ed McNierney
> > President and Chief Mapmaker
> > TopoZone.com / Maps a la carte, Inc.
> > 73 Princeton Street, Suite 305
> > North Chelmsford, MA  01863
> > ed at topozone.com
> > (978) 251-4242
> >
> > -----Original Message-----
> > From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
> > On Behalf Of Camden Daily
> > Sent: Thursday, December 16, 2004 11:30 AM
> > To: MAPSERVER-USERS at LISTS.UMN.EDU
> > Subject: [UMN_MAPSERVER-USERS] Projection/Extent help
> >
> > Hello all.  I'm a mapserver newbie trying to figure something out.
> > Basically, I have two sets of shapefiles in different projections and
> > units.  One has units of dd, and one has units of feet.
> >
> > When I combine the two, I'd like to define my extents for the whole
> > .map file using dd instead of feet.  I've made up a sample .map file
> > where I'm simply trying to display one layer with units of feet while
> > defining the extent using dd.  However, everything I try just gives me
>
> > a blank page.
> >
> > If I define the extent in terms of feet and drop the "proj=latlong"
> > line, it shows up fine.  But I just can't get it to work when I define
>
> > the extent in dd.
> >
> > Any help would be much appreciated!
> > -Camden Daily
> >
> > MAP
> >
> >   NAME Chicago
> >   STATUS ON
> >   DEBUG ON
> >   SIZE 300 300
> >   IMAGETYPE PNG
> >   IMAGECOLOR 240 240 240
> >   SHAPEPATH "/web_system/data"
> >   FONTSET "/web_system/fonts/fonts.list"
> > --------
> >   EXTENT -87.74 41.80 -87.56 41.98
> >   UNITS DD
> >   PROJECTION
> >     "proj=latlong"
> >   END
> > -------
> >   #EXTENT 1101584.450000 1841973.900000 1186739.850000 1969991.020000
> >   #UNITS FEET
> > -------
> >   WEB
> >     LOG "/web_system/logs/mapserver.log"
> >     IMAGEPATH "/web_system/tmp/"
> >     IMAGEURL "/tmp/"
> >   END
> >
> >   LAYER
> >     NAME "cta_line"
> >     TYPE LINE
> >     STATUS DEFAULT
> >     DEBUG ON
> >     DATA "CTA_Line"
> >     CLASS
> >       COLOR 0 0 0
> >     END
> >     PROJECTION
> >        "init=epsg:26971"
> >     END
> >     UNITS FEET
> >   END
> >
> > END
> >
>



More information about the mapserver-users mailing list