[Mapserver-users] Ccoordinate/projection display problem?

Ann Keane Ann.Keane at noaa.gov
Fri Sep 12 13:19:57 EDT 2003


The short description:

I have two layers, one geotiff, one shape.  The geotiff, a shaded relief 
base map, appears to be in UTM.  The shape, a file of state boundaries, 
appears to be in latlon.  I think I have proj installed properly, but 
I've thought that before.  I've tried many variations of the map file 
with either the shp projection or the raster projection.

In raster projection:
	Raster plots, shape does not.

In shp projection:
	Shape plots, if it is the only layer.
	Plot is totally grey if both layers are included.


Also using the epsg specification instead of the detail never works. 
Would anyone suggest a way to test the proj installation outside of 
mapserver?

Thanks-
Ann


The details:

mapserver
----------------------------------------------
[akeane at pinky ]$ ./mapserv -v
MapServer version 4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ 
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


----------------------------------------------
map file
----------------------------------------------
NAME TEST
#EXTENT -84.0 36.0 -59.0 49.0 # shp extent
# EXTENT -6086629.000 -2784239.000 4279371.000 4488761.000 # full raster 
extent
EXTENT -6629.000 -1084239.000 3079371.000 988761.000 # local raster extent
SIZE 400 300
SHAPEPATH "/httpd/www/programs/2004/neaqs/surface/dyn/data"
DEBUG on

WEB
     LOG "/httpd/www/programs/2004/neaqs/surface/dyn/out.log"
END

#PROJECTION
#   # shp projection
#   "proj=latlong"
#END

PROJECTION
     # raster projection
#    "epsg:4326"
     "proj=longlat"
     "ellps=WGS84"
     "datum=WGS84"
     "no_defs"
END

LAYER # States
   NAME "states"
# source http://nationalatlas.gov/statesm.html
   DATA statesp020
   STATUS DEFAULT
   TYPE POLYGON
  CLASS
     COLOR 220 220 220
     OUTLINECOLOR 255 0 0
   END # end of class object
DEBUG on

PROJECTION
     "proj=latlong"
END


END # end of layer object


LAYER # Shaded Relief Raster
   NAME "relief"
# source http://nationalatlas.gov/shadedm.html
   DATA "/httpd/www/programs/2004/neaqs/surface/dyn/data/shdrlfi020l.tif"
   STATUS DEFAULT
   TYPE RASTER
DEBUG on

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

END

-------------------------------------------------------
Raster file
-------------------------------------------------------

[akeane at pinky data]$ gdalinfo shdrlfi020l.tif
Driver: GTiff/GeoTIFF
Size is 10366, 7273
Coordinate System is:
PROJCS["unnamed",
     GEOGCS["WGS 84",
         DATUM["WGS_1984",
             SPHEROID["WGS 84",6378137,298.2572235629972,
                 AUTHORITY["EPSG","7030"]],
             AUTHORITY["EPSG","6326"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4326"]],
     PROJECTION["Lambert_Azimuthal_Equal_Area"],
     PARAMETER["latitude_of_center",45],
     PARAMETER["longitude_of_center",-100],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]]]
Origin = (-6086629.000000,4488761.000000)
Pixel Size = (1000.000000,-1000.000000)
Metadata:
   TIFFTAG_IMAGEDESCRIPTION=Color shaded relief of North America
   TIFFTAG_SOFTWARE=USGS DRG production software
   TIFFTAG_DATETIME=2003:02:06 13:19:34
Corner Coordinates:
Upper Left  (-6086629.000, 4488761.000) (156d 3'31.10"E, 37d45'55.65"N)
Lower Left  (-6086629.000,-2784239.000) (154d27'44.36"W,  3d 2'12.16"N)
Upper Right ( 4279371.000, 4488761.000) (  4d 0'23.08"W, 53d59'22.66"N)
Lower Right ( 4279371.000,-2784239.000) ( 61d 9'32.19"W, 11d18'12.56"N)
Center      ( -903629.000,  852261.000) (113d12'19.80"W, 51d59'8.84"N)
Band 1 Block=10366x1 Type=Byte, ColorInterp=Red
Band 2 Block=10366x1 Type=Byte, ColorInterp=Green
Band 3 Block=10366x1 Type=Byte, ColorInterp=Blue


---------------------------------------------------
shp file
---------------------------------------------------
[akeane at pinky data]$ ogrinfo statesp020.shp statesp020 | more
INFO: Open of `statesp020.shp'
using driver `ESRI Shapefile' successful.

Layer name: statesp020
Geometry: Polygon
Feature Count: 2895
Extent: (-179.133392, 17.674692) - (179.788208, 71.398048)
Layer SRS WKT:
(unknown)
AREA: Real (12.3)
PERIMETER: Real (12.3)
STATESP020: Integer (11.0)
STATE: String (20.0)
STATE_FIPS: String (2.0)
OGRFeature(statesp020):0

---------------------------------------------------
shp metadata
---------------------------------------------------

Spatial_Reference_Information:

     Horizontal_Coordinate_System_Definition:

         Geographic:

             Latitude_Resolution: 0.000278
             Longitude_Resolution: 0.000278
             Geographic_Coordinate_Units: Decimal degrees

         Geodetic_Model:

             Horizontal_Datum_Name: North American Datum of 1983
             Ellipsoid_Name: GRS1980
             Semi-major_Axis: 6378137
             Denominator_of_Flattening_Ratio: 298.257222





More information about the mapserver-users mailing list