[Mapserver-users] Reading in Projections from layer data files

Frank Warmerdam warmerdam at pobox.com
Mon Apr 26 16:37:08 EDT 2004


Pericles S. Nacionales wrote:
> Tyler, folks,
> 
> I probably shouldn't be the one replying to your message but I'm sure
> Steve L., Frank W., and others will say something if I'm wrong...
> 
> MapServer doesn't really know projections.  If you don't define
> projections, it's assumed that your input and output projections are the
> same.  If you do define an output projection (and input projection),
> MapServer will pass that info to the proj library which does the
> reprojection.
> 
> So, don't define projections unless you have to (if you are implementing
> WMS apps or just need on-the-fly reprojection because you have data in
> different projections).  MapServer will probably create your maps faster
> without it.
> 
> As for ESRI-style .PRJ file, MapServer doesn't know what that is and
> doesn't use it (but perhaps gdal/ogr does).  The raster world file, or
> the GeoTIFF projection info is used for extent information and not
> projection.  It would be nice to have those projection info
> automatically used by MapServer but not if performance suffers
> considerably.
> 
> Anybody else have $0.02 to give away?

Folks,

Perry is mostly right, but there are a few exceptions.  For OGR vector
sources, and GDAL raster sources, you can use the special "AUTO" keyword
in the projection object.  This means that the projection should be
read from the datasource itself if possible.

I see this isn't even described in the mapfile reference, OGR howto or
the raster howto.  Yikes - essentially an invisible feature.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-users mailing list