[Mapserver-users] projection problems

guoloi dou douguoli at yahoo.com.cn
Wed Jun 30 17:38:44 PDT 2004


--0-1203949747-1088642324=:71588
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit

Hi, I am trying view a .shp file. But only an image with background color defined in the map object is obtained. I'm not sure how to write the projection. Could somebody help me? Below are the info got from ogrinfo and my mapfile. 
 
INFO: Open of `c:\Proj\TopographicArea_area.shp'
using driver `ESRI Shapefile' successful.
Layer name: TopographicArea_area
Geometry: Polygon
Feature Count: 10261
Extent: (350137.990000, 168102.400000) - (356541.550000, 174643.090000)
Layer SRS WKT:
PROJCS["British_National_Grid",
    GEOGCS["GCS_OSGB_1936",
        DATUM["OSGB_1936",
            SPHEROID["Airy_1830",6377563.396,299.3249646]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",400000],
    PARAMETER["False_Northing",-100000],
    PARAMETER["Central_Meridian",-2],
    PARAMETER["Scale_Factor",0.999601272],
    PARAMETER["Latitude_Of_Origin",49],
    UNIT["Meter",1]]
 
MAPFILE
MAP
  IMAGETYPE PNG
  EXTENT 350137.990000 168102.400000 356541.550000 174643.090000
  #EXTENT -8000000 300000 5000000 1500000
  #EXTENT 24.995716 46.984584 26.008563 47.353092
  UNITS METERS
  SIZE 1000 1000
  IMAGECOLOR 255 255 255
  PROJECTION
    #"proj=tmerc"
    #"ellps=airy"
    #"lat_0=49"
    "init=epsg:2163"
  END
  WEB
    IMAGEPATH "/Proj/img/"
    IMAGEURL "/img/"
  END
  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
    NAME TopographicArea_area
    #CONNECTIONTYPE OGR
    #CONNECTION "data/BoundaryLine.tab"
    #CONNECTION "D:\Project\tab\LN352890.tab"
    DATA TopographicArea_area
    STATUS ON
    TYPE POLYGON
    PROJECTION
 "init=epsg:4269"
    END
    CLASS
      COLOR 180 180 0
      OUTLINECOLOR 32 32 32
    END
  END # States polygon layer ends here
  # End of LAYER DEFINITIONS -------------------------------
END # end of map file/object

Regards,
Zhengda Lu




---------------------------------
Do You Yahoo!?
100Õ×ÓÊÏä¹»²»¹»Óã¿ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
--0-1203949747-1088642324=:71588
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit

<DIV>
<DIV>Hi, I am trying view a .shp file. But only an image with background color defined in the map object is obtained. I'm not sure how to write the projection. Could somebody help me? Below are the info got from ogrinfo and my mapfile. </DIV>
<DIV> </DIV>
<DIV>INFO: Open of `c:\Proj\TopographicArea_area.shp'<BR>using driver `ESRI Shapefile' successful.</DIV>
<DIV>Layer name: TopographicArea_area<BR>Geometry: Polygon<BR>Feature Count: 10261<BR>Extent: (350137.990000, 168102.400000) - (356541.550000, 174643.090000)<BR>Layer SRS WKT:<BR>PROJCS["British_National_Grid",<BR>    GEOGCS["GCS_OSGB_1936",<BR>        DATUM["OSGB_1936",<BR>            SPHEROID["Airy_1830",6377563.396,299.3249646]],<BR>        PRIMEM["Greenwich",0],<BR>        UNIT["Degree",0.017453292519943295]],<BR>    PROJECTION["Transverse_Mercator"],<BR>    PARAMETER["False_Easting",400000],<BR>    PARAMETER["False_Northing",-100000],<BR>    PARAMETER["Central_Meridian",-2],<BR>    PARAMETER["Scale_Factor",0.999601272],<BR>    PARAMETER["Latitude_Of_Origin",49],<BR>    UNIT["Meter",1]]</DIV>
<DIV> </DIV>
<DIV>MAPFILE</DIV>
<DIV>MAP<BR>  IMAGETYPE PNG<BR>  EXTENT 350137.990000 168102.400000 356541.550000 174643.090000<BR>  #EXTENT -8000000 300000 5000000 1500000<BR>  #EXTENT 24.995716 46.984584 26.008563 47.353092<BR>  UNITS METERS<BR>  SIZE 1000 1000<BR>  IMAGECOLOR 255 255 255<BR>  PROJECTION<BR>    #"proj=tmerc"<BR>    #"ellps=airy"<BR>    #"lat_0=49"<BR>    "init=epsg:2163"<BR>  END<BR>  WEB<BR>    IMAGEPATH "/Proj/img/"<BR>    IMAGEURL "/img/"<BR>  END<BR>  # Start of LAYER DEFINITIONS ---------------------------------------------<BR>  LAYER # States polygon layer begins here<BR>    NAME TopographicArea_area<BR>    #CONNECTIONTYPE OGR<BR>    #CONNECTION "data/BoundaryLine.tab"<BR>    #CONNECTION "D:\Project\tab\LN352890.tab"<BR>    DATA
 TopographicArea_area<BR>    STATUS ON<BR>    TYPE POLYGON<BR>    PROJECTION<BR> "init=epsg:4269"<BR>    END<BR>    CLASS<BR>      COLOR 180 180 0<BR>      OUTLINECOLOR 32 32 32<BR>    END<BR>  END # States polygon layer ends here<BR>  # End of LAYER DEFINITIONS -------------------------------<BR>END # end of map file/object<BR></DIV>
<DIV>Regards,</DIV>
<DIV>Zhengda Lu</DIV></DIV><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/" target=blank>100Õ×ÓÊÏä¹»²»¹»Óã¿ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡</a>
--0-1203949747-1088642324=:71588--



More information about the MapServer-users mailing list