Using geographic data in the southern hemisphere

Daniel Morissette danmo at videotron.ca
Tue Aug 1 10:34:35 EDT 2000


Tim and Marcelle Sutton wrote:
> 
> The data is in the southern hemisphere (ie. north/south coordinates are negative
> numbers in decimal degrees).
> 
> The initial .map file had know projection section set, and the maps would
> generate,  but the map image would always come up blank. I have set the display
> and scale bar units to decimal degrees (dd) and kilometers respectively. The
> scale bar indicates that the display is zoomed in to a really large scale.
> 

See below the answer to your question #2... there appears to be a
problem with your "DATA" definitions in the .map file.

And BTW, you should see something on your map even without reprojecting
your data.  Just make sure that the "EXTENTS" value in the .map file is
specified in the same units as what is found in the .SHP files (e.g.
degrees if the shape files are in degrees, or meters if the files are in
meters) and then you should see your map.

Then you can start playing with reprojection.

> I have the proj4.4.4.1 rpm installed on the server (running redhat 6.1) and
> when I added the
> 
> Projection
>         "Geographic"
> End
> 
> to my .map file, my web page prints out the following:
> 
> Warning: MapServer Error in loadProjection(): Projection support is not
> available. in /home/httpd/html/Mapserver/cnc/cncmap.php3 on line 34
> 
> Fatal error: Failed to open map file cnc.map in /home/httpd/html/Mapserver/cnc/cncmap.php3 on line 34
> 

This suggests that the php_mapscript.so that you are using was not
compiled with PROJ4 support (--with-proj configure switch).  

Do a phpinfo(); and look for the MapScript module in the list of
extensions.  You should see something like:

 MapScript   MapScript Version 1.0.011 (Jul 12, 2000)
             MapServer Version 3.3.011 -PROJ.4 -FreeType -TIFF -EPPL7
             -JPEG

If you don't see the "-PROJ.4" in the phpinfo() output then your
php_mapscript.so was probably not compiled with the "--with-proj"
configure switch.

BTW, the RH6.1 php_mapscript.so that I placed on our web site for
downloading did include PROJ4 support. Just to make sure, I tried
specifying a PROJECTION in a .map file and it worked, so I suspect that
you are using a different .so that was not compiled with the
"--with-proj" configure switch.

> So my questions are:
> 
> 1) Does mapserver support southern hemispher geographic data?

I can't see why it would not support it.  

> 2) Do I have the correct settings in my .map file (listed below this message)?

Hummmmm... I should have looked at the .MAP before writing that long
reply.  There seems to be a problem with the "DATA" lines in your 2
layer definitions.  They both are set to:

  DATA data/

But the value should be the name of the shp file without the shp
extension and relative to the location of the .map file.

So for layer 1 you should have:

  DATA data/ca_cnc

And for layer 2:

  DATA data/b_wcape_new

You could also have added 'SHAPEPATH "data"' at the top of the .map file
to specify the name of the directory where all the shp files live and
then you would not need to include "data/" in all the DATA values.

> 3) How can I get mapserver to recognise the proj library?

PROJ.4 is not included by default when you compile MapServer.  You have
to pass the "--with-proj" switch when you run configure.  See also the
file README.CONFIGURE in the source code distribution for the list of
configure options.

> 4) Could anyone send me /point me to some sample .php files which demonstrate a
> functional mapserver user inteface (implimenting query, zoom, pan etc)?
> 

See: http://www2.dmsolutions.on.ca/gmap/gmap75.phtml

and you can download the PHP source and data from
http://www2.dmsolutions.on.ca/mapserver/dl/gmap-20000515.tar.gz

-- 
------------------------------------------------------------
 Daniel Morissette                       danmo at videotron.ca
              http://pages.infinit.net/danmo/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list