[mapserver-users] Projection Help (Please)

Hankley, Chip Chip.Hankley at GASAI.Com
Wed Sep 18 14:15:08 PDT 2002


Well... that worked. I'm not sure how I screwed that up. But thanks.

chip

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com]
Sent: Wednesday, September 18, 2002 12:34 PM
To: Hankley, Chip
Subject: Re: [mapserver-users] Projection Help (Please)


Hankley, Chip wrote:
> Frank...
> 
> The data set in question (see mapfile below... Layer 'COUNTIES') is a
> shapefile...so I ran OGRINFO against it. For comparison purposes, I ran
> gdalinfo against an image in the same general area (northern Illinois)
that
> was the same projection. Finally, I ran OGRINFO against the tileindex for
> the UTM16 data.

Chip,

I ran the following command to reproject the top left and bottom right
corners
of the LCC vectors to UTM 16, and I see to get an area that overlaps the
area
of the GeoTIFF file and your EXTENTS statement in the mapfile.

warmerda at gdal[155]% cs2cs \
   +proj=lcc +lat_1=45 +lat_2=33 +lat_0=33 +lon_0=-89.5 +x_0=914400 +y_0=0 \
      +datum=NAD27 +to_meter=0.3048006096 \
+to \
   +proj=utm +zone=16 +datum=NAD83 +units=m
2558228.000000 2925475.000000                       (input)
154614.48       4553195.28 0.000                    (output)
3351150. 3450058                                    (input)
401981.41       4706689.38 0.000                    (output)

I think I am using your original PROJ.4 definition from the first email to
the
list for the LCC, but this is quite different than what you emailed me in
your map file.  Notably, ensure that the +x_0 value is 914400.  PROJ.4
always
has false easting and northing values in meters regardless of the units of
the coordinate system.  Also, I tried out with NAD83 and NAD27 and both
seemed
to work OK, with slight difference in the results presumably representing
the datum shift.

If the above definition doesn't work in MapServer then I don't know what the
issue is.  If you are in a position to do so, you should try debugging
within
MapServer.

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