projection problem

Ethan Alpert ealpert at DIGITALGLOBE.COM
Wed Dec 15 14:46:23 EST 2004


Have you tried putting the projection BLOCK in the MAP block rather than
the LAYER? 

-e

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Camden Daily
Sent: Wednesday, December 15, 2004 12:11 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] projection problem


Hi all.  I'm working on a mapserver application, and running into issues
with projections.  I have absolutely no background in GIS, but I've
managed to hack together a pretty good map application using tiger/line
data, which I believe is in latlong format.

However, I have a new shapefile I've grabbed for the mass transit in my
city, and it's in a completely different projection, and I have no idea
how to get it to work in mapserver.

When I run ogrinfo on my new shapefile I get the following:

----------------------------------------------------------------
INFO: Open of `CTA_Line.shp'
using driver `ESRI Shapefile' successful.

Layer name: CTA_Line
Geometry: Line String
Feature Count: 186
Extent: (1101584.450000, 1841973.900000) - (1186739.850000,
1969991.020000) Layer SRS WKT:
PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet",
    GEOGCS["GCS_North_American_1983",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",984250.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",-88.33333333333333],
    PARAMETER["Scale_Factor",0.999975],
    PARAMETER["Latitude_Of_Origin",36.66666666666666],
    UNIT["Foot_US",0.3048006096012192]]
CTALINE_ID: Integer (11.0)
ROUTE: String (50.0)
COLOR: String (7.0)
SHAPE_LEN: Real (19.11)
SHAPE_FID: Integer (9.0)
----------------------------------------------------------------

For my mapfile, I'm using:

----------------------------------------------------------------
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 1101584.450000 1841973.900000 1186739.850000 1969991.020000
  UNITS METERS

  WEB
    LOG "/web_system/logs/mapserver.log"
    IMAGEPATH "/web_system/tmp/"
    IMAGEURL "/tmp/"
  END

  LAYER
    NAME "cta_line"
    TYPE LINE
    STATUS ON
    DEBUG ON
    DATA "CTA_Line"
    CLASS
      COLOR 0 0 0
    END
    PROJECTION
      "proj=tmerc"
      "lat_0=36.666666"
      "lon_0=-83.333333"
      "x_0=984250.0"
      "y_0=0.0"
      "k=0.999975"
      "ellps=GRS80"
      "datum=NAD83"
      "to_meter=0.3048006096"
      "no_defs"
    END
  END

END
----------------------------------------------------------------

Of course, no matter how hard I try, my map always comes up blank.  If
anyone can see anything obvious I'm doing wrong, or can point me in the
right direction with how to debug projection issues, I'd greatly
appreciate it.

-Camden Daily



More information about the mapserver-users mailing list