[Mapserver-users] I'm getting a little frustrated...

Ryan, Adam ARyan at co.linn.or.us
Mon Apr 5 12:42:55 PDT 2004


As a follow-up...ArcMap will reproject on the fly without you even knowing
it.  You can turn that feature off so the data frame will display layers in
their native projection.

Adam Ryan

-----Original Message-----
From: Ed McNierney [mailto:ed at topozone.com] 
Sent: Monday, April 05, 2004 11:09 AM
To: Paul VanDyke; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] I'm getting a little frustrated...


Paul -

ArcMap will read .prj files for each layer (ESRI forgot to include
projection definitions in their earlier file formats) for determining what
projection they're in.  You need to have that information in the PROJECTION
block *inside* each LAYER block in your map file.

Know your data before trying to make it work in MapServer.  Your shapefiles
are likely to be in decimal degrees, but they might not be. ArcMap will
reproject layers into the projection of the current data view, and MapServer
will do the same.

	- 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: Paul VanDyke [mailto:pvandyke at kib.co.kodiak.ak.us] 
Sent: Monday, April 05, 2004 3:05 PM
To: Ed McNierney; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] I'm getting a little frustrated...

Eureka!!!  Success at last!! WOOT!!! 

Ok, using the LISTGEO tool, I was able to find the correct extents to MY
(not the tutorial's) tif image.  I plugged those in on a test map and can
now see a working raster image in mapserver.  Now I have proff that it works
on my system in my environment.  THANK YOU ED!!!

Now, how do I display my raster and my shape files together on the same
page?  When I look at the extents, they don't overlap. However, when I add
them as two layers in ArcMap they mesh perfectly.  I do have a .wld
file for the tif.  Do I need to create/adjust my projections?    All the
files are NAD_27.  Again, this is a learning process for me, so I appreciate
all the help that everyone is giving me.

Here is the new .map file that I'm working with:

MAP
  NAME map7
  IMAGETYPE PNG
  EXTENT 517415 6368214 542392 6403304
  SIZE 800 400
  SHAPEPATH "c:/program files/apache group/apache2/htdocs/data"
  IMAGECOLOR 255 255 255
  DEBUG ON

  WEB
    TEMPLATE  'map6.html'
    IMAGEPATH '/data/tmp/'
    IMAGEURL '/tmp/'
    LOG 'c:\mapserver.log'
  END


  # Start of LAYER DEFINITIONS -----------------------------


  LAYER # water
	NAME water
	DATA kib_boundary
	STATUS DEFAULT
	TYPE POLYGON

	CLASS
	  STYLE
		COLOR 115 207 255
		OUTLINECOLOR 32 32 32
	  END
	END
   END
  


  LAYER # coast
	NAME coast
	DATA kib_coast
	STATUS DEFAULT
	TYPE POLYGON

	CLASS
	  STYLE
		COLOR 0 216 56
		OUTLINECOLOR 32 32 32
	  END
	END
   END


 LAYER # MODIS raster layer begins here
    NAME test123
    DATA raster/kodiakc2.tif
    STATUS DEFAULT
    TYPE RASTER
#    PROCESSING "BANDS=1"
#    OFFSITE 71 74 65
  END # MODIS raster layer ends here



  # End of LAYER DEFINITIONS -------------------------------


END # end of map file/object


Here is the output from the LISTGEO on the kodiakc2.tif file:

C:\Program Files\Apache Group\Apache2\htdocs\data\raster>listgeo
kodiakc2.tif
Geotiff_Information:
   Version: 1
   Key_Revision: 0.2
   Tagged_Information:
      ModelTiepointTag (2,3):
         0                0                0
         517415.363       6403304.71       0
      ModelPixelScaleTag (1,3):
         6.437376         6.437376         0
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      ProjectedCSTypeGeoKey (Short,1): PCS_NAD27_UTM_zone_5N
      PCSCitationGeoKey (Ascii,24): "UTM Zone 5 N with NAD27"
      End_Of_Keys.
   End_Of_Geotiff.

PCS = 26705 (name unknown)
Projection = 16005 ()
Projection Method: CT_TransverseMercator
   ProjNatOriginLatGeoKey: 0.000000 (  0d 0' 0.00"N)
   ProjNatOriginLongGeoKey: -153.000000 (153d 0' 0.00"W)
   ProjScaleAtNatOriginGeoKey: 0.999600
   ProjFalseEastingGeoKey: 500000.000000 m
   ProjFalseNorthingGeoKey: 0.000000 m
GCS: 4267/NAD27
Datum: 6267/North American Datum 1927
Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80) Prime Meridian:
8901/Greenwich (0.000000/  0d 0' 0.00"E)

Corner Coordinates:
Upper Left    ( 517415.363,6403304.706)
Lower Left    ( 517415.363,6368214.569)
Upper Right   ( 542392.381,6403304.706)
Lower Right   ( 542392.381,6368214.569)
Center        ( 529903.872,6385759.638)


Here's the kodiakc2.wld file

21.098407687615669

0.283828823820080900

0.308025501864488020

-21.117268418850411

752488.58435255091

1380675.7577753554



Thanks,

Paul




_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list