Equidistant cylindrical projection
Chris Helm
helmster_99 at YAHOO.COM
Fri Sep 3 10:57:52 PDT 2004
Ben
Try using this definition for projection in your
mapfile projections statements. I use it and it works
fine:
PROJECTION
"proj=eqc"
"ellps=WGS84"
"lon_0=0"
"lat_ts=0"
"no_defs"
END
Look at the Proj4 documentation for an explanation.
Chris
--- Ben Lloyd-Hughes <blh at MSSL.UCL.AC.UK> wrote:
> Hi,
>
> I'm having a terrible time trying to serve an image
> of an ESRI shape
> file. From ogrinfo I get:
>
> $ ogrinfo -so CNTRY95_eqc.SHP CNTRY95_eqc
> INFO: Open of `CNTRY95_eqc.SHP'
> using driver `ESRI Shapefile' successful.
>
> Layer name: CNTRY95_eqc
> Geometry: Polygon
> Feature Count: 258
> Extent: (-10018753.533581, -10006731.666389) -
> (10018753.533581,
> 9308936.146330)
> Layer SRS WKT:
> PROJCS["World_Equidistant_Cylindrical",
> GEOGCS["GCS_WGS_1984",
> DATUM["WGS_1984",
>
> SPHEROID["WGS_1984",6378137.0,298.257223563]],
> PRIMEM["Greenwich",0.0],
> UNIT["Degree",0.0174532925199433]],
> PROJECTION["Equirectangular"],
> PARAMETER["False_Easting",0.0],
> PARAMETER["False_Northing",0.0],
> PARAMETER["Central_Meridian",0.0],
> PARAMETER["Standard_Parallel_1",60.0],
> UNIT["Meter",1.0]]
> FIPS_CNTRY: String (2.0)
> GMI_CNTRY: String (3.0)
> ISO_CNTRY: String (3.0)
> WB_CNTRY: String (3.0)
> CNTRY_NAME: String (40.0)
> EU: String (1.0)
> FAO: String (1.0)
> GA: String (1.0)
> GA_MEMB_YR: Integer (4.0)
> IAEA: String (1.0)
> IBRD: String (1.0)
> IMF: String (1.0)
> OPEC: String (1.0)
> SC: String (1.0)
> UNESCO: String (1.0)
> WHO: String (1.0)
> WMO: String (1.0)
> POP_CNTRY: Integer (10.0)
> SQKM_CNTRY: Real (15.3)
> SQMI_CNTRY: Real (15.3)
>
>
> So far so good - then I have a MAP file:
>
>
> MAP
> IMAGETYPE PNG
> UNITS METERS
> EXTENT -10018753.533581 -10006731.666389
> 10018753.533581 9308936.146330
> SIZE 400 300
> SHAPEPATH "data"
> IMAGECOLOR 255 255 255
>
> PROJECTION
> "proj=eqc"
> "datum=WGS84"
> "elips=WGS84"
> END
>
> # Start of LAYER DEFINITIONS
> --------------------------------------------
> -
> LAYER # States polygon layer begins here
> NAME CNTRY95_eqc
> DATA CNTRY95_eqc
> STATUS DEFAULT
> TYPE POLYGON
> PROJECTION
> "proj=eqc"
> "datum=WGS84"
> "elips=WGS84"
> 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
>
>
> Which is invoked via cgi:
>
http://fuji-bgh.geol.ucl.ac.uk/cgi-bin/mapserv.exe?map=D%3A%2FApache%
>
2FApache2%2Fmywebdocs%2Fmaps%2Fdemos%2Fdrought%2Fdemo.map&mode=map
>
>
> From which I get an internal server error
>
> [Fri Sep 03 17:42:45 2004] [error] [client
> 128.40.78.67] malformed header
> from script. Bad header=\x89PNG: mapserv.exe,
> referer: http://fuji-
> bgh.geol.ucl.ac.uk/maps/demos/drought/demo_init.html
>
> Now the Itasca demo works fine - so I'm pretty sure
> that the installation
> is ok. The problem comes when I try to look at my
> own shape file. I'd be
> very grateful if someone could tell me what I'm
> getting wrong. I am new to
> Mapserver - so apologies if I'm doing some really
> silly.
>
> Cheers, Ben
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the MapServer-users
mailing list