[Mapserver-users] projection problems

=?gb2312?q?guoloi=20dou?= douguoli at yahoo.com.cn
Wed Jun 30 20:38:44 EDT 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>&nbsp;</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>&nbsp;&nbsp;&nbsp; GEOGCS["GCS_OSGB_1936",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATUM["OSGB_1936",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPHEROID["Airy_1830",6377563.396,299.3249646]],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PRIMEM["Greenwich",0],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UNIT["Degree",0.017453292519943295]],<BR>&nbsp;&nbsp;&nbsp; PROJECTION["Transverse_Mercator"],<BR>&nbsp;&nbsp;&nbsp; PARAMETER["False_Easting",400000],<BR>&nbsp;&nbsp;&nbsp; PARAMETER["False_Northing",-100000],<BR>&nbsp;&nbsp;&nbsp; PARAMETER["Central_Meridian",-2],<BR>&nbsp;&nbsp;&nbsp; PARAMETER["Scale_Factor",0.999601272],<BR>&nbsp;&nbsp;&nbsp; PARAMETER["Latitude_Of_Origin",49],<BR>&nbsp;&nbsp;&nbsp; UNIT["Meter",1]]</DIV>
<DIV>&nbsp;</DIV>
<DIV>MAPFILE</DIV>
<DIV>MAP<BR>&nbsp; IMAGETYPE PNG<BR>&nbsp; EXTENT 350137.990000 168102.400000 356541.550000 174643.090000<BR>&nbsp; #EXTENT -8000000 300000 5000000 1500000<BR>&nbsp; #EXTENT 24.995716 46.984584 26.008563 47.353092<BR>&nbsp; UNITS METERS<BR>&nbsp; SIZE 1000 1000<BR>&nbsp; IMAGECOLOR 255 255 255<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; #"proj=tmerc"<BR>&nbsp;&nbsp;&nbsp; #"ellps=airy"<BR>&nbsp;&nbsp;&nbsp; #"lat_0=49"<BR>&nbsp;&nbsp;&nbsp; "init=epsg:2163"<BR>&nbsp; END<BR>&nbsp; WEB<BR>&nbsp;&nbsp;&nbsp; IMAGEPATH "/Proj/img/"<BR>&nbsp;&nbsp;&nbsp; IMAGEURL "/img/"<BR>&nbsp; END<BR>&nbsp; # Start of LAYER DEFINITIONS ---------------------------------------------<BR>&nbsp; LAYER # States polygon layer begins here<BR>&nbsp;&nbsp;&nbsp; NAME TopographicArea_area<BR>&nbsp;&nbsp;&nbsp; #CONNECTIONTYPE OGR<BR>&nbsp;&nbsp;&nbsp; #CONNECTION "data/BoundaryLine.tab"<BR>&nbsp;&nbsp;&nbsp; #CONNECTION "D:\Project\tab\LN352890.tab"<BR>&nbsp;&nbsp;&nbsp; DATA
 TopographicArea_area<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; TYPE POLYGON<BR>&nbsp;&nbsp;&nbsp; PROJECTION<BR>&nbsp;"init=epsg:4269"<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 180 180 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 32 32 32<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; END # States polygon layer ends here<BR>&nbsp; # 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