[ms4w-users] Mapsize

Jeff McKenna jmckenna at dmsolutions.ca
Wed Mar 16 15:52:35 EST 2005


- to check the extents of your shapefile, use the ogrinfo.exe utility 
that comes with MS4W
   - open a command prompt and goto /ms4w/tools/ogr-utils/
   - run the setenv.bat
   - now use ogrinfo:
     e.g.  ogrinfo park.shp park -summary
     (more info on ogrinfo can be found at 
http://mapserver.gis.umn.edu/doc44/ogr-howto.html#ogrinfo or search the 
MapServer list archives)
   - it should return something like:

Layer name: park
Geometry: Polygon
Feature Count: 46
Extent: (-2346804.000000, -67422.421875) - (2840366.000000, 3830124.250000)
...

   - use the extent values here for the mapfile EXTENT parameter

- if your mapfile contains layers in the same projection, no projection 
object is required.  In your case you probably have 1 shapefile layer so 
you don't have to worry about a projection object.  However you must 
specify the correct UNITS in your map object.  If your shapefile is in 
latlong for example, specify 'DD'.  If you have the correct extents and 
have a projection issue, you should probably use the main mapserver list 
(more help is available there).  But my guess is that your extents are 
wrong only.


jeff




Charu Verma wrote:

 > Yeah u r right..I do not have good idea how to verify my projection
 > and extents..Are there defaults that can be used for all ?
 > Also if its the whole map I need to show then why do I need to give
 > projection dimensions ?
 > charu
 >
 >
 > On Tue, 15 Mar 2005 17:56:19 -0500, Jeff McKenna
 > <jmckenna at dmsolutions.ca> wrote:
 >
 >> I would make sure that you have specified the correct extents for your
 >> data (using the ogrinfo utility), as well as the proper projection (if
 >> required).
 >>
 >> my thoughts.
 >>
 >>
 >> jeff
 >>
 >>
 >> Charu Verma wrote:
 >>
 >>> Hi All,
 >>> I have developed a script using php/mapscript and am able to open my
 >>> shapefile from it.But to my surprise the size of the map is very
 >>> minute.When I try to increase the SIze option the backgroun dexpands
 >>> and not the map.Please suggest me a wya to increase the size of teh
 >>> actual map.
 >>> Thanx in advance
 >>> Charu
 >
 >


-- 
Jeff McKenna
DM Solutions Group Inc.
http://www.dmsolutions.ca



More information about the ms4w-users mailing list