Projection Problem

William Hamouz william.hamouz at PHOENIX.GOV
Wed May 11 16:29:02 PDT 2005


Hi, I am new to projections in mapserver and a seem to have something that
is not working right and I am not sure why.  I have striped my example down
to a simple mapfile that has two layers in it.  The ogrinfo for the
hospitals layer, which is in a shape file is as follows:

INFO: Open of `c:\geodata\hospitals.shp'
using driver `ESRI Shapefile' successful.

Layer name: hospitals
Geometry: Point
Feature Count: 24
Extent: (561477.687637, 835697.374886) - (729085.875185, 970068.499747)
Layer SRS WKT:
PROJCS["NAD_1983_HARN_StatePlane_Arizona_Central_FIPS_0202_IntlFeet",
    GEOGCS["GCS_North_American_1983_HARN",
        DATUM["NAD83_High_Accuracy_Regional_Network",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",700000.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",-111.9166666666667],
    PARAMETER["Scale_Factor",0.9999],
    PARAMETER["Latitude_Of_Origin",31.0],
    UNIT["Foot",0.3048]]
OBJECTID: Integer (10.0)
AREA: Real (19.8)
PERIMETER: Real (19.8)
HOSP83_: Integer (10.0)
HOSP83_ID: Integer (10.0)
TYPE: String (11.0)
NAME: String (30.0)
ADDRESS: String (30.0)
CITY: String (30.0)
PHONE: String (8.0)
PRJ_NAME: String (120.0)
PRJ_NOTES: String (200.0)
DQ_NOTES: String (80.0)
POLYGONID: Integer (10.0)
SCALE: Real (19.8)
ANGLE: Integer (10.0)


The second layer is a virtual spatial data layer populated from an access
data base.  The defintion of the incidents.ovf file is as follows:

<OGRVRTDataSource>
 <OGRVRTLayer name="Incidents">
  <SrcDataSource>ODBC:UNITSTATUS</SrcDataSource>
                <SrcLayer>Incidents</SrcLayer>
                <GeometryType>wkbPoint</GeometryType>
                <LayerSRS>WGS84</LayerSRS>
                <GeometryField encoding="PointFromColumns" x="Lat"
y="Long"/>
         </OGRVRTLayer>
</OGRVRTDataSource>

and the orginfo for the incidents layer is as follows:

Had to open data source read-only.
INFO: Open of `c:\firewire\common\pfdmapcontrol\incidents.ovf'
using driver `VRT' successful.

Layer name: Incidents
Geometry: Point
Feature Count: 23
Extent: (33.233066, -112.296726) - (33.643355, -111.835448)
Layer SRS WKT:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9108"]],
    AXIS["Lat",NORTH],
    AXIS["Long",EAST],
    AUTHORITY["EPSG","4326"]]
Disp_Type: String (50.0)
Run_no: String (50.0)
Address: String (90.0)
Add_Info: String (50.0)
Nature: String (50.0)
Nature_Disc: String (50.0)
Resp_Type: String (50.0)
Supp_Txt: String (150.0)
Units: String (0.0)
Time: String (19.0)
Date: String (19.0)
X_Streets: String (125.0)
Lat: String (50.0)
Long: String (50.0)
Inc_Type: String (50.0)
Alarm_Lvl: String (50.0)
Channel: String (50.0)


The map that I am trying to display uses the following mapfile:

MAP
  NAME PFD
  STATUS ON
  SIZE 800 500
  IMAGETYPE PNG
  IMAGECOLOR 240 240 240
  SHAPEPATH "C:\GeoData"
  FONTSET "C:\FireWire\Common\PFDMAPControl\fonts.list"
  EXTENT 576763.692274 832325 697309.177972 1064098
  UNITS FEET

  WEB
    TEMPLATE "PFDMAPImg.html"
    IMAGEPATH "C:\FireWire\Images\MapFiles\"
    IMAGEURL "/Images/MapFiles/"
  END

  SYMBOL
    NAME 'circle'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED TRUE
  END

  PROJECTION
    proj=tmerc
    lat_0=31.000000000
    lon_0=-111.916666667
    x_0=700000
    y_0=0.0
    k=0.999900
    ellps=GRS80
    datum=NAD83
    to_meter=0.3048006096
    no_defs
  END

  LAYER
 NAME "hospitals"
 TYPE POINT
 STATUS ON
 DATA "hospitals"
 CLASS
  NAME "hospitals"
  COLOR 0 0 255
  SIZE 14
         SYMBOL 'circle'
 END
  END

  LAYER
 NAME "incidents"
        TYPE POINT
        STATUS ON
        CONNECTIONTYPE OGR
        CONNECTION "incidents.ovf"
        DATA "incidents"
        PROJECTION
                proj=latlong
  ellps=GRS80
  datum=WGS84
        END
        CLASS
  NAME "incidents"
                COLOR 255 0 0
  SIZE 14
         SYMBOL 'circle'
                END
        END
  END
END


Basically what happens is I do not believe the incidents layer is
projecting correctly because it does not end up in the same general
vacinity with the hospitals layer.  To the best of my limited knowledge, I
think I have all the files configured correctly.  I know that I am getting
the incident data back becuase it renders, just not in the write place.

Thank You in advance for any help.

Sincerely,

Will Hamouz
Phoenix Fire Department



More information about the MapServer-users mailing list