Question:How-to Use of ESRI Shape Files

bino_oetomo bino at INDOAKSES-ONLINE.COM
Sun Jun 5 22:56:08 EDT 2005


Hi,

Thanks for your help.
----- Original Message -----
From: "Wim Blanken" <w.blanken at GEON.NL>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Saturday, June 04, 2005 4:11 PM
Subject: Re: [UMN_MAPSERVER-USERS] Question:How-to Use of ESRI Shape Files


> Hi Bino,
>
> There are numerous examples out there of using ESRI Shapefiles with
> Mapserver.
> Have you tried for example the tutorial that uses shapefiles?
>
> http://terrasip.gis.umn.edu/projects/tutorial/section1.html
>

Ok , Here it is.

Using ogrinfo to my polygon.shp, and got

-----Start ogrinfo-----
D:\ms4w\tools\gdal-ogr-utils>ogrinfo -all d:\ms4w\shp\polygon.shp
INFO: Open of `d:\ms4w\shp\polygon.shp'
using driver `ESRI Shapefile' successful.

Layer name: polygon
Geometry: Polygon
Feature Count: 50603
Extent: (109.999930, -10.000030) - (115.000030, -5.000000)
Layer SRS WKT:
(unknown)
type: Integer (5.0)
label: String (80.0)
level: Integer (5.0)
endlevel: Integer (5.0)
-----end ogrinfo-------

I copied map file from
http://terrasip.gis.umn.edu/projects/tutorial/example1-1.html
Below is my map file, i just modified the "extent" .. refer from ogrinfo
------Start - map file--------
MAP
  IMAGETYPE PNG
  EXTENT 110.999930 -10.000030 115.000030 -6.000000
  SIZE 400 300
  SHAPEPATH "d:\ms4w\shp"
  IMAGECOLOR 255 255 255

  PROJECTION
    "proj=laea"
    "ellps=clrk66"
    "lat_0=45"
    "lon_0=-100"
  #
  # Alternatively, you can specify an EPSG code.
  # "init=epsg:2163"
  #
  END

  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
    NAME states
    DATA polygon
    STATUS DEFAULT
    TYPE POLYGON

    PROJECTION
      "init=epsg:4269"
    END

    CLASS
      COLOR 232 232 232
      OUTLINECOLOR 32 32 32
    END
  END # States polygon layer ends here
  # End of LAYER DEFINITIONS -------------------------------
END # end of map file/object
------End - map file----------

I try to access this using :
http://127.0.0.1/cgi-bin/mapserv_46.exe?map=/ms4w/proj/bino/map1.map&mode=ma
p

And got :

getString(): Symbol definition error. Parsing error near (polygon):(line 22)

Question : Is it because wrong "projection" ? How to fix it ?

Regards
-bino-



More information about the mapserver-users mailing list