From warmerdam@pobox.com Thu May 1 20:37:48 2003 From: warmerdam@pobox.com (Frank Warmerdam) Date: Thu, 01 May 2003 15:37:48 -0400 Subject: [Mapserver-users] how to define this datum? References: Message-ID: <3EB1778C.7070400@pobox.com> pond bear wrote: > I need to show an image whose SPHEROID is ["unnamed",6370997,0]]. How to > define it in mapfile's projection field? Jing, a=6370997 b=6370997 The 0 inverse flattening means the spheroid is a sphere. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From jnorton@fs.fed.us Thu May 1 00:01:40 2003 From: jnorton@fs.fed.us (John Norton) Date: Wed, 30 Apr 2003 17:01:40 -0600 Subject: [Mapserver-users] Projection on the Fly Problems Message-ID: Thanks Ed, I agree the UTM zone is required for the example I provided. But, actually I grabbed the example from the wrong map file )-: The projection that is causing problems is the latlong which I am trying to convert to aea. So my layers look like... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" , Sent by: cc: mapserver-users-admin@lists. Subject: RE: [Mapserver-users] Projection on the Fly Problems gis.umn.edu 04/30/2003 03:06 PM John - You aren't providing enough information to specify your UTM projections. You need to specify the central meridian (i.e. the UTM zone) each is in. You might find it easier to look up the EPSG codes for each projection and just use the codes. They're more cryptic but less error-prone. You can find them at http://mapserver.gis.umn.edu/doc/proj.html The NAD27 UTM zones are five-digit numbers of the form "267zz" where zz is the two-digit (pad with a leading zero) zone number. So to define a UTM Zone 9, NAD27 projection you can say: PROJECTION "init=epsg:26709" END - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 4:49 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] Projection on the Fly Problems I Have a map file with two layers... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END I am trying to project these using mapscript with code that looks like this... $map = ms_newMapObj($map_path."l48c.map"); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection = $map->getProjection(); No errors, setProjection returns 0 which I guess means the projection didn't take but, when I echo $projection it reports the projection string with commas replace by plus signs. The problem is I get no image. I am using Mapscript... MapServer version 3.6.6-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Same thing happens when I run mapscript as a CGI.... MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PD F OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAP EFILE Is this a units problem my data is in decimal degrees? I think I have PROJ installed correctly it is in c:\proj with a path to the bin directory. I also tried (meaning I added it to the PHP.ini file as an extension) the PHP extension php_proj.dll. Are these conflicting? Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From BBruce@gov.mb.ca Thu May 1 00:54:12 2003 From: BBruce@gov.mb.ca (Bruce, Bob (CON)) Date: Wed, 30 Apr 2003 18:54:12 -0500 Subject: [Mapserver-users] Non-Rectangular Tiles in TILEINDEX ? Message-ID: <67AA2C4FAC30D611A8F600306E1C245101545C8D@WPG001EX11> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C30F73.CC874A60 Content-Type: text/plain; charset="iso-8859-1" I have been experimenting with TILEINDEXs in order to evaluate their functionality for my applications. I have successfully displayed a TILEINDEX of 20 orthophotos in my browser. Next I wanted to try displaying a set of project mapping areas and built an index map of polygons of these areas. I included this index map as a TILEINDEX in my map file and do not get anything displayed, instead I get a blank display. This leads me to wonder if this is because my tile polygons are non-rectangular. Does the Map Server require tiles to be rectangular or can it work with irregularly shaped tiles? I have successfully displayed my dataset that I'm using as a TILEINDEX as a line file, so I know that the server will work with this file. For your reference, I have included the definition of this layer: LAYER # DLS Polys NAME "DLSPolys" TILEINDEX "TilesWWinnipeg_CARIS/TilesWWinnipeg" TILEITEM "MAPKEY" STATUS DEFAULT TYPE POLYGON CLASSITEM "MAPKEY" CLASS # Whole DLS Parcel STATUS ON NAME "WHOLE DLSPOLY" COLOR 255 202 149 OUTLINECOLOR 0 0 0 END # end of Whole DLS Parcel class object END # end of layer object thanks, Bob Bruce **************************************************************************** ****************************** ** Bob Bruce, P.Eng. Geomatics Support Engineer ** bbruce@gov.mb.ca Manitoba Geomatics/Remote Sensing Branch, ** work # (204) 945-6636 1007 Century Street, ** home # (204) 256-4615 Winnipeg, Manitoba, Canada, R3H 0W4 ** FAX # (204) 945-1365 ** ** The Manitoba Centre for: ** Cadastral & Topographical Mapping, and Remote Sensing ** See us on the Web at: http://www.gov.mb.ca/conservation/geomatics/ cada_mapping/index.html ** and: http://www.gov.mb.ca/conservation/geomatics/index.html ** Check out our digital maps at: http:// mli.gov.mb.ca/ **************************************************************************** ****************************** ------_=_NextPart_001_01C30F73.CC874A60 Content-Type: text/html; charset="iso-8859-1"
I have been experimenting with TILEINDEXs in order to evaluate their functionality for my applications.
 
I have successfully displayed a TILEINDEX of 20 orthophotos in my browser.
 
Next I wanted to try displaying a set of project mapping areas and built an index map of polygons of these areas. I included this index map as a TILEINDEX in my map file and do not get anything displayed, instead I get a blank display. This leads me to wonder if this is because my tile polygons are non-rectangular. Does the Map Server require tiles to be rectangular or can it work with irregularly shaped tiles? I have successfully displayed my dataset that I'm using as a TILEINDEX as a line file, so I know that the server will work with this file.
 
For your reference, I have included the definition of this layer:
 
LAYER # DLS Polys
  NAME "DLSPolys"
  TILEINDEX "TilesWWinnipeg_CARIS/TilesWWinnipeg"
  TILEITEM "MAPKEY"
  STATUS DEFAULT
  TYPE POLYGON
  CLASSITEM "MAPKEY"
  CLASS # Whole DLS Parcel
    STATUS ON
    NAME "WHOLE DLSPOLY"
    COLOR 255 202 149
    OUTLINECOLOR 0 0 0
  END # end of Whole DLS Parcel class object
END # end of layer object
thanks,
            Bob Bruce
**********************************************************************************************************
**    Bob Bruce, P.Eng.         Geomatics Support Engineer
**    bbruce@gov.mb.ca          Manitoba Geomatics/Remote Sensing Branch,
**    work # (204) 945-6636             1007 Century Street,
**    home # (204) 256-4615             Winnipeg, Manitoba, Canada, R3H 0W4
**    FAX  # (204) 945-1365            
**
**    The Manitoba Centre for: 
**      Cadastral & Topographical Mapping, and Remote Sensing
**      See us on the Web at: http://www.gov.mb.ca/conservation/geomatics/cada_mapping/index.html

**          and: http://www.gov.mb.ca/conservation/geomatics/index.html
**      Check out our digital maps at: http://mli.gov.mb.ca/
**********************************************************************************************************
 
------_=_NextPart_001_01C30F73.CC874A60-- From collao_andres@hotmail.com Thu May 1 01:01:00 2003 From: collao_andres@hotmail.com (=?iso-8859-1?B?QW5kculzIENvbGxhbw==?=) Date: Thu, 01 May 2003 00:01:00 +0000 Subject: [Mapserver-users] line size Message-ID: problem: I have a layer of axes of streets, which will be drawn with a greater thickness if the used scale between 0.2[km ] and 8[km ]. But when using the line style that brings by default mapserver and several the SIZE, for example, to 20 does not pass anything. In view of the previous thing I decided to define a SYMBOL (a ellipse) draws them well using apache+windows, I can several its size and color, but when taking them to the servant who has apache+linux it happens that in accordance with to be making zoom lens in and zoom lens out the line begins to change by itself of color, even presented/displayed combinations of colors (to enter gray and green) solution: remove symbol and santo remedy asks: as I can change the size of a line according to the zoom lens? you have idea of pq' could happen the previous thing? thanks --------------- Andrés Collao. --------------- collao_andres@hotmail.com andres@mapserver.cl :-- Il peggior nemico del succeso è la pauta del fallimiento :-- El peor enemigo del éxito es el miedo al fracaso _________________________________________________________________ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.yupimsn.com/ From ed@topozone.com Thu May 1 01:22:27 2003 From: ed@topozone.com (Ed McNierney) Date: Wed, 30 Apr 2003 20:22:27 -0400 Subject: [Mapserver-users] Projection on the Fly Problems Message-ID: <13858AA1A74F30419F319ACB66A9D1220196B5@mercator.topozone.com> John - I would recommend "init=epsg:4267", but those should be fine. Can you send the PROJECTION object for the main MAP file, too, along with the EXTENT (either in the mapfile or as a parameter) that you're trying to view? The most common cause of invisible reprojections is data that's reprojected right out of the view frame. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: (978) 251-4242 Fax: (978) 251-1396 ed@topozone.com -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 7:02 PM To: Ed McNierney Cc: mapserver-users@lists.gis.umn.edu; mapserver-users-admin@lists.gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems Thanks Ed, I agree the UTM zone is required for the example I provided. But, actually I grabbed the example from the wrong map file )-: The projection that is causing problems is the latlong which I am trying to convert to aea. So my layers look like... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" , Sent by: cc: mapserver-users-admin@lists. Subject: RE: [Mapserver-users] Projection on the Fly Problems gis.umn.edu 04/30/2003 03:06 PM John - You aren't providing enough information to specify your UTM projections. You need to specify the central meridian (i.e. the UTM zone) each is in. You might find it easier to look up the EPSG codes for each projection and just use the codes. They're more cryptic but less error-prone. You can find them at http://mapserver.gis.umn.edu/doc/proj.html The NAD27 UTM zones are five-digit numbers of the form "267zz" where zz is the two-digit (pad with a leading zero) zone number. So to define a UTM Zone 9, NAD27 projection you can say: PROJECTION "init=epsg:26709" END - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 4:49 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] Projection on the Fly Problems I Have a map file with two layers... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END I am trying to project these using mapscript with code that looks like this... $map = ms_newMapObj($map_path."l48c.map"); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection = $map->getProjection(); No errors, setProjection returns 0 which I guess means the projection didn't take but, when I echo $projection it reports the projection string with commas replace by plus signs. The problem is I get no image. I am using Mapscript... MapServer version 3.6.6-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Same thing happens when I run mapscript as a CGI.... MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PD F OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAP EFILE Is this a units problem my data is in decimal degrees? I think I have PROJ installed correctly it is in c:\proj with a path to the bin directory. I also tried (meaning I added it to the PHP.ini file as an extension) the PHP extension php_proj.dll. Are these conflicting? Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From ed@topozone.com Thu May 1 01:26:21 2003 From: ed@topozone.com (Ed McNierney) Date: Wed, 30 Apr 2003 20:26:21 -0400 Subject: [Mapserver-users] Non-Rectangular Tiles in TILEINDEX ? Message-ID: <13858AA1A74F30419F319ACB66A9D1221F42B2@mercator.topozone.com> This is a multi-part message in MIME format. ------_=_NextPart_001_01C30F78.4A792363 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Bob - =20 Your TILEINDEX should be rectangles. The intent of a TILEINDEX is to allow MapServer to quickly determine whether to examine an input file to see if it has any visible features on the current map request. Rectangular tiles can be very quickly examined to see if they intersect the map viewframe. If so, the source is opened and any files that REALLY intersect the view are drawn. =20 Supporting non-rectangular tiles would be more complex and somewhat slower, and would probably be of rather little benefit in most applications. A good combination of rectangular tile indexes and spatial indexing will produce very good performance. =20 - Ed =20 Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: (978) 251-4242 Fax: (978) 251-1396 ed@topozone.com =20 -----Original Message----- From: Bruce, Bob (CON) [mailto:BBruce@gov.mb.ca]=20 Sent: Wednesday, April 30, 2003 7:54 PM To: 'Mapserver Mailing List' Subject: [Mapserver-users] Non-Rectangular Tiles in TILEINDEX ? =20 I have been experimenting with TILEINDEXs in order to evaluate their functionality for my applications. =20 I have successfully displayed a TILEINDEX of 20 orthophotos in my browser. =20 Next I wanted to try displaying a set of project mapping areas and built an index map of polygons of these areas. I included this index map as a TILEINDEX in my map file and do not get anything displayed, instead I get a blank display. This leads me to wonder if this is because my tile polygons are non-rectangular. Does the Map Server require tiles to be rectangular or can it work with irregularly shaped tiles? I have successfully displayed my dataset that I'm using as a TILEINDEX as a line file, so I know that the server will work with this file. =20 For your reference, I have included the definition of this layer: =20 LAYER # DLS Polys NAME "DLSPolys" TILEINDEX "TilesWWinnipeg_CARIS/TilesWWinnipeg" TILEITEM "MAPKEY" STATUS DEFAULT TYPE POLYGON CLASSITEM "MAPKEY" CLASS # Whole DLS Parcel STATUS ON NAME "WHOLE DLSPOLY" COLOR 255 202 149 OUTLINECOLOR 0 0 0 END # end of Whole DLS Parcel class object END # end of layer object thanks, Bob Bruce ************************************************************************ **********************************=20 ** Bob Bruce, P.Eng. Geomatics Support Engineer=20 ** bbruce@gov.mb.ca Manitoba Geomatics/Remote Sensing Branch,=20 ** work # (204) 945-6636 1007 Century Street,=20 ** home # (204) 256-4615 Winnipeg, Manitoba, Canada, R3H 0W4=20 ** FAX # (204) 945-1365 =20 **=20 ** The Manitoba Centre for: =20 ** Cadastral & Topographical Mapping, and Remote Sensing=20 ** See us on the Web at: http://www.gov.mb.ca/conservation/geomatics/cada_mapping/index.html ** and: http://www.gov.mb.ca/conservation/geomatics/index.html=20 ** Check out our digital maps at: http://mli.gov.mb.ca/=20 ************************************************************************ ********************************** =20 ------_=_NextPart_001_01C30F78.4A792363 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Bob –

 

Your TILEINDEX should be = rectangles.  The intent of a TILEINDEX is to allow MapServer to quickly determine whether = to examine an input file to see if it has any visible features on the = current map request.  Rectangular tiles can be very quickly examined to see if = they intersect the map viewframe.  If so, the source is opened and any = files that REALLY intersect the view are drawn.

 

Supporting non-rectangular tiles = would be more complex and somewhat slower, and would probably be of rather little benefit in most applications.  A good combination of rectangular = tile indexes and spatial indexing will produce very good = performance.

 

      =       - Ed

 

Ed McNierney

President and Chief = Mapmaker

TopoZone.com / Maps a la carte, = Inc.

73 Princeton Street, Suite = 305

North Chelmsford, MA  = 01863

Phone: (978) 251-4242  Fax: = (978) 251-1396

ed@topozone.com

 

-----Original = Message-----
From: Bruce, Bob (CON) [mailto:BBruce@gov.mb.ca]
Sent: Wednesday, April = 30, 2003 7:54 PM
To: 'Mapserver Mailing = List'
Subject: = [Mapserver-users] Non-Rectangular Tiles in TILEINDEX ?

 

I have been experimenting = with TILEINDEXs in order to evaluate their functionality for my = applications.

 

I have successfully = displayed a TILEINDEX of 20 orthophotos in my browser.

 

Next I wanted to try = displaying a set of project mapping areas and built an index map of polygons of these = areas. I included this index map as a TILEINDEX in my map file and do not get = anything displayed, instead I get a blank display. This leads me to wonder if = this is because my tile polygons are non-rectangular. Does the Map Server = require tiles to be rectangular or can it work with irregularly shaped tiles? I have successfully displayed my dataset that I'm using as a TILEINDEX as a = line file, so I know that the server will work with this file.

 

For your reference, I have = included the definition of this layer:

 

LAYER # DLS Polys
  NAME "DLSPolys"
  TILEINDEX "TilesWWinnipeg_CARIS/TilesWWinnipeg"
  TILEITEM "MAPKEY"
  STATUS DEFAULT
  TYPE POLYGON
  CLASSITEM "MAPKEY"
  CLASS # Whole DLS Parcel
    STATUS ON
    NAME "WHOLE DLSPOLY"
    COLOR 255 202 149
    OUTLINECOLOR 0 0 0
  END # end of Whole DLS Parcel class object
END # end of layer object

thanks,

    &nbs= p;       Bob Bruce

******************= *************************************************************************= ***************
**    Bob Bruce, P.Eng.         Geomatics Support = Engineer
**    = bbruce@gov.mb.ca          Manitoba Geomatics/Remote = Sensing Branch,
**    work # (204) 945-6636     =         1007 Century Street,
**    home # (204) 256-4615     =         Winnipeg, Manitoba, Canada, R3H 0W4
**    FAX  # (204) 945-1365     =        
**
**    The Manitoba Centre for: 
**      Cadastral = & Topographical Mapping, and Remote Sensing
**      See us on = the Web at: http://www.gov.mb.ca/conservation/geomatics/cada_mappin= g/index.html
**          = and: http://www.gov.mb.ca/conservation/geomatics/index.html<= /a>
**      Check= out our digital maps at:
http://mli.gov.mb.ca/
*************************************************************************= *********************************

 

=00 ------_=_NextPart_001_01C30F78.4A792363-- From sanjaykumartiwary44@yahoo.co.in Thu May 1 12:19:26 2003 From: sanjaykumartiwary44@yahoo.co.in (=?iso-8859-1?q?sanjay=20tiwary?=) Date: Thu, 1 May 2003 12:19:26 +0100 (BST) Subject: [Mapserver-users] shapefiles Message-ID: <20030501111926.913.qmail@web8202.mail.in.yahoo.com> --0-2000100914-1051787966=:306 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi All I have used examle given on the link http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptRH73which is working fine.Now i want to use the same example with the shape files i am gettingfrom the link http://www.vdstech.com/map_data.htm ( data - india)but the final output is a blank page, nothing is diplyed. How it is happening? I have changed the name of data section in the .map file to include new data.Everything else remains same.How to get that? Sanjay Catch all the cricket action. Download Yahoo! Score tracker --0-2000100914-1051787966=:306 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi All
         I have used examle given on the link http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptRH73
which is working fine.Now i want to use the same example with the shape files i am gettingfrom the link  http://www.vdstech.com/map_data.htm ( data - india)
but the final output is a blank page, nothing is diplyed.
                                   How it is happening? I have changed the name of data section in the .map file to include new data.Everything else remains same.How to get that?
                                         Sanjay

Catch all the cricket action. Download Yahoo! Score tracker --0-2000100914-1051787966=:306-- From schut@sarvision.com Thu May 1 13:09:51 2003 From: schut@sarvision.com (Vincent Schut) Date: Thu, 1 May 2003 14:09:51 +0200 Subject: [Mapserver-users] shapefiles In-Reply-To: <20030501111926.913.qmail@web8202.mail.in.yahoo.com> References: <20030501111926.913.qmail@web8202.mail.in.yahoo.com> Message-ID: <200305011409.51591.schut@sarvision.com> Probably you will have to change the 'extent' parameter in the map file. Try setting it to the boundingbox of the shapes you have. If you don't know this, (i think) you can obtain the bounding box coordinates using the ogrinfo utility that comes with gdal. Eventually change the projection and units also. Regards, Vincent Schut. On Thursday 01 May 2003 13:19, sanjay tiwary wrote: > Hi All I have used examle given on the link > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptRH73which is > working fine.Now i want to use the same example with the shape files i am > gettingfrom the link http://www.vdstech.com/map_data.htm ( data - > india)but the final output is a blank page, nothing is diplyed. > How it is happening? I have changed the name of data > section in the .map file to include new data.Everything else remains > same.How to get that? Sanjay Catch > all the cricket action. Download Yahoo! Score tracker -- ______________________________________ Vincent Schut (schut@sarvision.com) Sarvision B.V. Wageningen, The Netherlands www.sarvision.com From bpicinbono@worldonline.fr Thu May 1 14:38:12 2003 From: bpicinbono@worldonline.fr (=?iso-8859-1?Q?bpicinbono@worldonline.fr?=) Date: Thu, 1 May 2003 15:38:12 +0200 Subject: [Mapserver-users] =?iso-8859-1?Q?label_and_mysql?= Message-ID: label and mysql Hi everybody I am still wondering how to label shapes with datas coming from MySql. Dan gave me a nice example, but, unfortunately, I can't manage to make it work. I am working with MapScript 3.6.2 and I wonder if the problem is that MS 3.6.2 doesn't know the "annotation" type layers ? ? ?. Here are my settings when I hit the phpinfo page : MapScript Version ($Revision: 1.104.2.4 $ $Date: 2002/07/08 20:04:58 $) MapServer version 3.6.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=SHAPEFILE I am using .phtml and .php pages which are working pretty similar to the ones of the "gmap75" demo. Here is the answer that Dan gave me when I first asked the question : <<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>> Blaise, Yes it can be done...here is some simple example code in php/mapscript and the associated map file layer. Dan $map = ms_newMapObj($mapPath.$mapFile); $image=$map->draw(); $testlayer = $map->getLayerByName("labels"); $testpt = ms_newPointObj(); $testpt->setXY( 200, 200 ); $testpt->draw($map, $testlayer, $image, 'labels', 'Hello World'); $testpt2 = ms_newPointObj(); $testpt2->setXY( 300, 200 ); $testpt2->draw($map, $testlayer, $image, 'labels2', 'GoodBye World'); LAYER NAME labels STATUS on TRANSFORM false TYPE annotation CLASS NAME labels LABEL type truetype font verdana-bold bold size 8 antialias true backgroundshadowcolor 51 51 51 backgroundshadowsize 2 2 color 51 51 51 position UR END END CLASS NAME labels2 LABEL type truetype font coopperplate-gothic-bold size 8 antialias true backgroundshadowcolor 51 51 51 backgroundshadowsize 2 2 color 51 51 51 position UR END END END <<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>> I am a bit confused about where to put this piece of php code. As, in my php page, the only $map->draw() command is in the GMapDrawMap function, I put it there. Here is my map file related to the label layer : <<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>> ################################## layer labels ############# LAYER NAME labels STATUS ON TRANSFORM false TYPE annotation CLASS NAME labels LABEL TYPE truetype FONT fritqat SIZE 12 COLOR 0 0 255 POSITION UR END END END # Layer <<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>> and here is the beginning of the GMapDrawMap function where I inserted Dan's code: <<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>> /************************************************************************/ /* function GMapDrawMap() */ /* */ /* Funcion to draw the contains of the map. */ /************************************************************************/ function GMapDrawMap() { GLOBAL $gpoMap, $gbShowQueryResults; GLOBAL $gbIsHtmlMode; GLOBAL $gszCommand, $gszZoomBoxExt; GLOBAL $gAppletImgFmt, $gImagesFmt; GLOBAL $TLayer; // if ($gbShowQueryResults) // $img = $gpoMap->drawQuery(); // else // $img = $gpoMap->draw(); //----------------------------------- test label--------- $map=ms_newMapObj("label_2.map"); $img=$map->draw(); $testlayer=$map->getLayerByName("labels"); $testpt=ms_newPointObj(); $testpt->setXY(100,100); $testpt->draw($map,$testlayer,$img, 'labels', 'Hello World'); //------------------------------- end test label--------- $url = $img->saveWebImage($gAppletImgFmt, 0, 0, -1); echo "\n".$gszZoomBoxExt."\n"; printf("", $gpoMap->extent->minx); printf("", $gpoMap->extent->miny); printf("", $gpoMap->extent->maxx); printf("", $gpoMap->extent->maxy); etc,etc,etc.......... <<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>> As I disabled the $gpoMap variable, I can't zoom in, out,etc anymore, but that's ok until I get my labels on the map. But unfortunately, the label 'Hello World' doesn't show. In the "$testpt->setXY(100,100);" line, I tried to put the X,Y of the middle of my mapextent, tried to comment the " TRANSFORM false" line in my map file, but this doesn't work neither. I am wondering what is wrong, and does the version 3.6.2 of MapServer/MapScript support the annotation type for a layer ? Thanks a lot for your help, and many thanks for the MapServer team who are doing a great job. I am very satisfied with this software. Blaise P.S.: Excuse me for the poor text formating but my company' internet conncetion is rock-age, so I have to fight to put some text on the internet, sorry about that. ************ VITE, C'EST LE MOMENT DE VOUS ABONNER A L'ADSL !!! ********** Du 3 avril au 5 mai, série limitée ADSL 128K, cliquez vite ici : http://register.tiscali.fr/adsl/ Offre promotionnelle soumise à conditions, réservée aux nouveaux abonnés ADSL Tiscali. From fx.gamoy@mapxplore.com Thu May 1 16:24:50 2003 From: fx.gamoy@mapxplore.com (fx gamoy) Date: Thu, 1 May 2003 16:24:50 +0100 Subject: [Mapserver-users] Tileindex and raster image Message-ID: <000c01c30ff5$ce887780$0201a8c0@mapxplore.com> C'est un message de format MIME en plusieurs parties. ------=_NextPart_000_0009_01C30FFE.3045DAA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hello everybody, i have tested successfully the script made by Chip Hankley in order to = break large vector shapefiles into regular-sized shapefiles. Thanks to = him for this very efficient contribution http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VectorTileIndex Now i would like to do the same with large raster image and arcview. So = i am looking for a script working with ARCVIEW or MAPINFO which is able = to generate rastertileindex.. Any idea?? thanks fx gamoy http://www.mapxplore.com/=20 ------=_NextPart_000_0009_01C30FFE.3045DAA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

hello everybody,
i have tested successfully the script = made by Chip=20 Hankley in order to break large vector shapefiles into regular-sized = shapefiles.=20 Thanks to him for this very efficient contribution
htt= p://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VectorTileIndex
 
Now i would like to do the same with = large raster=20 image and arcview. So i am looking for a script working with ARCVIEW or=20 MAPINFO which is able to generate rastertileindex..
Any idea??
 
thanks
fx gamoy
http://www.mapxplore.com/ 
------=_NextPart_000_0009_01C30FFE.3045DAA0-- From jnorton@fs.fed.us Thu May 1 15:52:43 2003 From: jnorton@fs.fed.us (John Norton) Date: Thu, 1 May 2003 08:52:43 -0600 Subject: [Mapserver-users] Projection on the Fly Problems Message-ID: Ed, Thanks! I am a bit confused about the extent issue when reprojecting. I do not have a (re)projection object for the map. The extent is set to... EXTENT -125.32 22.62 -66.98 51.48 Which is appropriate for the projection of the layers which are good with init=epsg:4267. I thought that using this mapscript map method... $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); would change the projection for the map object and set the extent with the appropriate values for the new projection. Anyway here is my entire map file... MAP NAME "Lower 48" STATUS ON EXTENT -125.32 22.62 -66.98 51.48 SIZE 800 600 SHAPEPATH "data/l48/" SYMBOLSET "/msapps/maplab/large_fires/etc/symbols.sym" FONTSET "/msapps/maplab/large_fires/etc/fonts.txt" WEB HEADER lf_header.html TEMPLATE lf.html FOOTER lf_footer.html IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "Burn" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "init=epsg:4267" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "init=epsg:4267" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END END and this the script that I am using to display the map. getProjection(); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection2 = $map->getProjection(); ?> Displaying a map > "."2:".$projection2."
".$result; ?> $projection1 comes up null and $projection2 comes up as : +proj=aea+ellps=clrk66+datum=NAD27+lat_1=29.5+lat_2=45.5+lat_0=23+lon_0 =-96+x_0=0+y_0=0+units=m and result comes up as 0. Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" Sent by: cc: , mapserver-users-admin@lists. gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems 04/30/2003 06:22 PM John - I would recommend "init=epsg:4267", but those should be fine. Can you send the PROJECTION object for the main MAP file, too, along with the EXTENT (either in the mapfile or as a parameter) that you're trying to view? The most common cause of invisible reprojections is data that's reprojected right out of the view frame. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: (978) 251-4242 Fax: (978) 251-1396 ed@topozone.com -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 7:02 PM To: Ed McNierney Cc: mapserver-users@lists.gis.umn.edu; mapserver-users-admin@lists.gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems Thanks Ed, I agree the UTM zone is required for the example I provided. But, actually I grabbed the example from the wrong map file )-: The projection that is causing problems is the latlong which I am trying to convert to aea. So my layers look like... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" , Sent by: cc: mapserver-users-admin@lists. Subject: RE: [Mapserver-users] Projection on the Fly Problems gis.umn.edu 04/30/2003 03:06 PM John - You aren't providing enough information to specify your UTM projections. You need to specify the central meridian (i.e. the UTM zone) each is in. You might find it easier to look up the EPSG codes for each projection and just use the codes. They're more cryptic but less error-prone. You can find them at http://mapserver.gis.umn.edu/doc/proj.html The NAD27 UTM zones are five-digit numbers of the form "267zz" where zz is the two-digit (pad with a leading zero) zone number. So to define a UTM Zone 9, NAD27 projection you can say: PROJECTION "init=epsg:26709" END - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 4:49 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] Projection on the Fly Problems I Have a map file with two layers... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END I am trying to project these using mapscript with code that looks like this... $map = ms_newMapObj($map_path."l48c.map"); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection = $map->getProjection(); No errors, setProjection returns 0 which I guess means the projection didn't take but, when I echo $projection it reports the projection string with commas replace by plus signs. The problem is I get no image. I am using Mapscript... MapServer version 3.6.6-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Same thing happens when I run mapscript as a CGI.... MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PD F OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAP EFILE Is this a units problem my data is in decimal degrees? I think I have PROJ installed correctly it is in c:\proj with a path to the bin directory. I also tried (meaning I added it to the PHP.ini file as an extension) the PHP extension php_proj.dll. Are these conflicting? Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From schut@sarvision.com Thu May 1 15:54:11 2003 From: schut@sarvision.com (Vincent Schut) Date: Thu, 1 May 2003 16:54:11 +0200 Subject: [Mapserver-users] Tileindex and raster image In-Reply-To: <000c01c30ff5$ce887780$0201a8c0@mapxplore.com> References: <000c01c30ff5$ce887780$0201a8c0@mapxplore.com> Message-ID: <200305011654.11482.schut@sarvision.com> See the raster-howto in the docs on the mapserver site: http://mapserver.gis.umn.edu/doc/raster-howto.html (section: rasters and tile indexing). For more info on the gdaltindex utility, see the gdal pages (www.remotesensing.org/gdal ), utility programs. Regards. Vincent Schut. On Thursday 01 May 2003 17:24, fx gamoy wrote: > hello everybody, > i have tested successfully the script made by Chip Hankley in order to > break large vector shapefiles into regular-sized shapefiles. Thanks to him > for this very efficient contribution > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VectorTileIndex > > Now i would like to do the same with large raster image and arcview. So i > am looking for a script working with ARCVIEW or MAPINFO which is able to > generate rastertileindex.. Any idea?? > > thanks > fx gamoy > http://www.mapxplore.com/ -- ______________________________________ Vincent Schut (schut@sarvision.com) Sarvision B.V. Wageningen, The Netherlands www.sarvision.com From babak.tehrani@geosysnet.de Thu May 1 15:34:07 2003 From: babak.tehrani@geosysnet.de (Babak Toloue Tehrani) Date: 01 May 2003 16:34:07 +0200 Subject: [Mapserver-users] Problems with PerlMapscript 3.7 Syntax Message-ID: <1051799644.1950.74.camel@eisbaer.local> Hello, I have still problems with perlmapscript 3.7. The demo below with the syntax of perlmapscript 3.6 is working very fine on my system. shp2img is also working for the mapfile below. >From the WIKI MigrationGuide I Take the syntax for saveImage(): $img->saveImage('test37.png'); and get following output: Can't locate auto/mapscript/imageObj/saveImage.al in @INC (@INC contains: /usr/lib/perl5/5.8.0/i586-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at test37.pl line 7 Then I looked for the string saveImage in the mapscript.pm module and found the function msSaveImage who brings me following output: Usage: msSaveImage(map,img,filename); at test37.pl line 7. I tried: $map->msSaveImage($map,$img,'test37'); and got same errormessage as before. Then I tried to set the set the ImageType with: map->setImageType("png") or die('Unable to setImageType.'); and see that it failed. Here the script and the mapfile: (Does someone now a tool to extract from a perl Module (mapscript.pm) a list of all Classes/Objects, Members and Methods?) Thanks a lot, Babak ========================================================================== #!/usr/bin/perl -w use mapscript; use strict; my $map = new mapscript::mapObj("data/demo37.map") or die('Unable to OPEN mapfile.'); $map->setImageType("png") or die('Unable to setImageType.'); my $img = $map->draw() or die('Unable to DRAW mapfile.'); $map->msSaveImage($map,$img,'test37'); $img->free(); -------------------------------------------------------------------------- NAME DEMO37 STATUS ON SIZE 600 450 EXTENT 5.3 55.5 15.5 46.9 UNITS METERS SHAPEPATH "data" IMAGECOLOR 255 255 255 OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" END LAYER NAME TESTLAYER TYPE POLYGON STATUS DEFAULT DATA lnd01dd.shp CLASS NAME TESTCLASS SYMBOL 0 COLOR 195 195 195 OUTLINECOLOR 102 102 102 END END END -- Babak Toloue Tehrani From ed@topozone.com Thu May 1 16:03:42 2003 From: ed@topozone.com (Ed McNierney) Date: Thu, 1 May 2003 11:03:42 -0400 Subject: [Mapserver-users] Projection on the Fly Problems Message-ID: <13858AA1A74F30419F319ACB66A9D1220196B6@mercator.topozone.com> John - I'm not a MapScript user, so I'll have to let someone else handle this one. The docs say that that setProjection method is supposed to be adjusting your maps' output extents for you (with the MS_TRUE parameter), so your code seems reasonable at first glance. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Thursday, May 01, 2003 10:53 AM To: Ed McNierney Cc: mapserver-users@lists.gis.umn.edu; mapserver-users-admin@lists.gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems Ed, Thanks! I am a bit confused about the extent issue when reprojecting. I do not have a (re)projection object for the map. The extent is set to... EXTENT -125.32 22.62 -66.98 51.48 Which is appropriate for the projection of the layers which are good with init=epsg:4267. I thought that using this mapscript map method... $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); would change the projection for the map object and set the extent with the appropriate values for the new projection. Anyway here is my entire map file... MAP NAME "Lower 48" STATUS ON EXTENT -125.32 22.62 -66.98 51.48 SIZE 800 600 SHAPEPATH "data/l48/" SYMBOLSET "/msapps/maplab/large_fires/etc/symbols.sym" FONTSET "/msapps/maplab/large_fires/etc/fonts.txt" WEB HEADER lf_header.html TEMPLATE lf.html FOOTER lf_footer.html IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "Burn" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "init=epsg:4267" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "init=epsg:4267" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END END and this the script that I am using to display the map. getProjection(); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection2 = $map->getProjection(); ?> Displaying a map > "."2:".$projection2."
".$result; ?> $projection1 comes up null and $projection2 comes up as : +proj=aea+ellps=clrk66+datum=NAD27+lat_1=29.5+lat_2=45.5+lat_0=23+lon_0 =-96+x_0=0+y_0=0+units=m and result comes up as 0. Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" Sent by: cc: , mapserver-users-admin@lists. gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems 04/30/2003 06:22 PM John - I would recommend "init=epsg:4267", but those should be fine. Can you send the PROJECTION object for the main MAP file, too, along with the EXTENT (either in the mapfile or as a parameter) that you're trying to view? The most common cause of invisible reprojections is data that's reprojected right out of the view frame. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: (978) 251-4242 Fax: (978) 251-1396 ed@topozone.com -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 7:02 PM To: Ed McNierney Cc: mapserver-users@lists.gis.umn.edu; mapserver-users-admin@lists.gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems Thanks Ed, I agree the UTM zone is required for the example I provided. But, actually I grabbed the example from the wrong map file )-: The projection that is causing problems is the latlong which I am trying to convert to aea. So my layers look like... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" , Sent by: cc: mapserver-users-admin@lists. Subject: RE: [Mapserver-users] Projection on the Fly Problems gis.umn.edu 04/30/2003 03:06 PM John - You aren't providing enough information to specify your UTM projections. You need to specify the central meridian (i.e. the UTM zone) each is in. You might find it easier to look up the EPSG codes for each projection and just use the codes. They're more cryptic but less error-prone. You can find them at http://mapserver.gis.umn.edu/doc/proj.html The NAD27 UTM zones are five-digit numbers of the form "267zz" where zz is the two-digit (pad with a leading zero) zone number. So to define a UTM Zone 9, NAD27 projection you can say: PROJECTION "init=epsg:26709" END - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 4:49 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] Projection on the Fly Problems I Have a map file with two layers... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END I am trying to project these using mapscript with code that looks like this... $map = ms_newMapObj($map_path."l48c.map"); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection = $map->getProjection(); No errors, setProjection returns 0 which I guess means the projection didn't take but, when I echo $projection it reports the projection string with commas replace by plus signs. The problem is I get no image. I am using Mapscript... MapServer version 3.6.6-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Same thing happens when I run mapscript as a CGI.... MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PD F OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAP EFILE Is this a units problem my data is in decimal degrees? I think I have PROJ installed correctly it is in c:\proj with a path to the bin directory. I also tried (meaning I added it to the PHP.ini file as an extension) the PHP extension php_proj.dll. Are these conflicting? Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From schut@sarvision.com Thu May 1 16:23:38 2003 From: schut@sarvision.com (Vincent Schut) Date: Thu, 1 May 2003 17:23:38 +0200 Subject: [Mapserver-users] Tileindex and raster image In-Reply-To: <001101c30ffb$7fcac930$0201a8c0@mapxplore.com> References: <000c01c30ff5$ce887780$0201a8c0@mapxplore.com> <200305011654.11482.schut@sarvision.com> <001101c30ffb$7fcac930$0201a8c0@mapxplore.com> Message-ID: <200305011723.38250.schut@sarvision.com> fx, I don't know of a direct solution for your question, but there might be some more complex ways to achieve it... Are you on linux? If you know the size of your images, you can write a shell script to use 'gdal_translate -srcwin xoff yoff xsize ysize in.tif out.tif', looping automatically over your raster image using the appropriate window. Even if you don't know the imagesize, you could get that by parsing the gdalinfo output in your script, but that might be a bit more trickier. Another option: If your raster can be saved as a normal tif (or otherwise non-geographic image format), you could use the convert program (coming with imagemagick), it has some automatic tile command, check the docs, I don't know it by heart. You can then after that add geo information with gdal or just by adding world files (which you could generate with a script again :-)). Third option: make a map file with your raster in a layer and write a simple php/mapscript program that loops over the extent of your raster, changes the extent to the tile you want to have, have mapserver draw your image (if you have a recent version of mapserver and gdal, mapserver will even be able to generate geotiff image files (or any image format gdal can write) for you if you set the outputformat section accordingly!), and save it. Hope these ideas help you, Regards, Vincent Schut. On Thursday 01 May 2003 18:05, you wrote: > thanks for your request > but i am looking for a script which is able to break automatically large > georeferenced raster files into smaller ones with arcview or mapinfo. > i have already managed to proccess raster image with mapserver. my problem > is to cut large raster file.. > thanks > fx > > ----- Original Message ----- > From: "Vincent Schut" > To: "fx gamoy" ; > Sent: Thursday, May 01, 2003 3:54 PM > Subject: Re: [Mapserver-users] Tileindex and raster image > > > See the raster-howto in the docs on the mapserver site: > > http://mapserver.gis.umn.edu/doc/raster-howto.html (section: rasters and > > tile > > > indexing). > > For more info on the gdaltindex utility, see the gdal pages > > (www.remotesensing.org/gdal ), utility programs. > > > > Regards. > > Vincent Schut. > > > > On Thursday 01 May 2003 17:24, fx gamoy wrote: > > > hello everybody, > > > i have tested successfully the script made by Chip Hankley in order to > > > break large vector shapefiles into regular-sized shapefiles. Thanks to > > him > > > > for this very efficient contribution > > > http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?VectorTileIndex > > > > > > Now i would like to do the same with large raster image and arcview. So > > i > > > > am looking for a script working with ARCVIEW or MAPINFO which is able > > > to generate rastertileindex.. Any idea?? > > > > > > thanks > > > fx gamoy > > > http://www.mapxplore.com/ > > > > -- > > ______________________________________ > > Vincent Schut (schut@sarvision.com) > > Sarvision B.V. > > Wageningen, The Netherlands > > www.sarvision.com > > _______________________________________________ > > Mapserver-users mailing list > > Mapserver-users@lists.gis.umn.edu > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users -- ______________________________________ Vincent Schut (schut@sarvision.com) Sarvision B.V. Wageningen, The Netherlands www.sarvision.com From cpurvis@asg.sc.edu Thu May 1 16:45:45 2003 From: cpurvis@asg.sc.edu (Charlton Purvis) Date: Thu, 1 May 2003 11:45:45 -0400 Subject: [Mapserver-users] what to do w/ ming swf's? Message-ID: Thanks, Vincent. I should have delved deeper into MapServer source on my own, but after listening to your advice and looking at http://ming.sourceforge.net/docs/index.php?mode=php, things seem clear. At this point I guess it boils down to whether or not our users should be forced to have a plug-in to view the flash animation. GIF's self-containment sure is compelling, but that comes at a cost of limited features. Same argument goes for the rosa applet download, too. But there's no harm in checking it out! Thanks again. -----Original Message----- From: Vincent Schut [mailto:schut@sarvision.com] Sent: Wednesday, April 30, 2003 5:13 AM To: Charlton Purvis Cc: Mapserver Users (E-mail) Subject: Re: [Mapserver-users] what to do w/ ming swf's? Charlton, You could use the same library Mapserver is using to produce it's swf's: ming. It's free, and you can use actionscript. It has a php component too. You can simply program quite complex swf's with that. See the website for more details, api, etc.: http://ming.sourceforge.net/ , and the ming docs at php.net. However, especially when using the php extension (it is a c library originally) be carefull and play around a bit with different versions, cause not every version of ming works with every version of php. And it is still in development, so not everything is working properly. My own experience: though you might want to use ming-cvs (lots of errors fixed and some better functionality) I could not get it to work with php. The version I currently have is ming 0.2a (the tar.gz from the website) which works in combination with the ming extension that comes bundled with php 4.3.1. If you want to use a newer ming, you might have to use it as a c library. Which is very well possible, though, cause you can produce a static swf that dynamically loads a mapserver produced swf on request, like Ryan Grant wrote. However, when using this combination be carefull not to mix ming02.a and ming-cvs (you will need them both I think, cause mapserver depends on 0.2a?). However, with only 0.2a it's quite possible to produce nice mapserver interfaces. You can look at an (very simple) example at http://www.sarvision.nl/mawas/mapserver/ms-mawas.php . It has nothing to do with image sequences, but shows you a bit of the possibilities of ming and building interfaces and integration/communication with mapserver. On Tuesday 29 April 2003 21:00, Grant, Ryan wrote: > As far as I know, there is no way to make ActionScript calls from php. > > So calls such as the one that I used are contained written using the > Macromedia Flash author product. The project files are .fla, which publish > to .swf. I'm not currently aware of any free tools that let you work with > .fla files. > > > To John Arthur: > I haven't experimented with any layers containing labels yet, but that's > next on my list of things to try > > Regards, > > Ryan Grant > > > > -----Original Message----- > From: Charlton Purvis [mailto:cpurvis@asg.sc.edu] > Sent: Tuesday, April 29, 2003 11:44 AM > To: Grant, Ryan > Cc: Mapserver Users (E-mail) > Subject: RE: [Mapserver-users] what to do w/ ming swf's? > > > Thanks for your help, Grant. But I'm afraid that I'm still in the dark. > > I'd like to play w/ flash a bit more even though I'm pretty happy w/ > animated .gif's. > > But I'm missing how my .php and ActionScript are linked. First of all, > it's not free, is it? I'd like to think that I could make ActionScript > calls from w/i my .php, but that ain't so, is it? > > So where and in what type of file are calls like > var mapName = _level10.mapObj.name; > ? > > Thanks again. > > Charlton -- ______________________________________ Vincent Schut (schut@sarvision.com) Sarvision B.V. Wageningen, The Netherlands www.sarvision.com From schut@sarvision.com Thu May 1 16:53:36 2003 From: schut@sarvision.com (Vincent Schut) Date: Thu, 1 May 2003 17:53:36 +0200 Subject: [Mapserver-users] not all labels get rendered In-Reply-To: <200304301253.21338.schut@sarvision.com> References: <200304301253.21338.schut@sarvision.com> Message-ID: <200305011753.36770.schut@sarvision.com> In addition to my previous mail: It seems that mapserver has some problems with some polygons in the shapefile that cause mapserver not to draw the labels of these polygons. The shapefile is produced by arcview, and in av I can't find any weird things. I loaded it into postgres/postgis0.7.5, simplified it using a strk's Douglas Peuker implementation for postgis (tolerance 0.1025 DD), wrote this to shape again, and suddenly some more labels appear. But still not all. I hope that somebody with more knowledge on shapefile/mapserver interaction thinks this interesting enough to have a look at it :-) I will be in Brasil next week and probably won't read email and surely won't be able to test things, so I will put the (simplified) shapefile on the internet where you can download it for testing purposes. You will find the shapefile (and dbf/shx files) at www.sarvision.com/vincent . Thanks! Vincent Schut. On Wednesday 30 April 2003 12:53, Vincent Schut wrote: > Hi all, > > I have a shapefile of the provinces of Indonesia. > I have a map file with 2 layers: one displays the provinces, each with a > unique color (classes are generated on the fly using metadata and php), the > second is the same as the first, but labels the provinces and does not show > anything else then just the labels. It contains only one class, which > contains the label section. Labels are drawn based on the same item used to > class provinces by color. > Now the first layer draws ok, every province is drawn with its according > color. The second layer displays not ok. It shows some labels, some labels > not. I have tried anything I can think of, I have force true in the label > object, etc. etc., but some labels simply do not get drawn. And yes, I do > call drawLabelCache before saveWebImage. I wil attach the generated image > and my mapfile, and a save of the mapobject after creating the classes > (thus the mapfile including the color classes). The image clearly shows > that some provinces get drawn but not labeled. (For those that know their > topo lessons: north-west sumatra (next to Aceh) is missing some, east & > central Sulasesi too...). > > Hope someone can help. > > Regards, > Vincent Schut. -- ______________________________________ Vincent Schut (schut@sarvision.com) Sarvision B.V. Wageningen, The Netherlands www.sarvision.com From ROGERT@gwm.sc.edu Thu May 1 17:01:32 2003 From: ROGERT@gwm.sc.edu (Roger Truesdale) Date: Thu, 01 May 2003 12:01:32 -0400 Subject: [Mapserver-users] Map Server Demo - Download Dialog Box Popping Up Message-ID: I am running the mapserve demo in windows XP with Apache server. It comes up fine the first time and displays the Lakes and Rivers layer in Browse Map mode. Then when I try to do anything else, e.g. just click the Refresh/Query button, I get a file download dialog box indicating it is trying to download a file with a name like CARQIXB3 from the local host. If I select a different layer and click the refresh/query button, the download dialog box comes up with a different file name. The newly selected layers do not display after clearing out the download dialog box. Any ideas on why the download dialog box comes up and why selecting other layers will not display them? Thank you. Roger Truesdale Interactive Site Architect eBusiness Solutions (f.k.a. i2Media) Contractual Services Group Usc Computer Services 1244 Blossom Street, Columbia, SC 29208 Voice: (803) 777-7366 | (803) 777-1900 (fax) rogert@gwm.sc.edu | http://i2alliance.sc.edu From jnorton@fs.fed.us Thu May 1 18:00:07 2003 From: jnorton@fs.fed.us (John Norton) Date: Thu, 1 May 2003 11:00:07 -0600 Subject: [Mapserver-users] Projection on the Fly Problems - Mapscript setprojection problem? Message-ID: Thanks Ed! Looks like your first hunch was right...it is an extent issue. I manually set the extent void setextent(double minx, double miny, double maxx, double maxy) and everything is right now. Looks like I can do a "manual-on-the-fly" change of the extents by pulling up the current extent (for the input projection) and build two point objects with that and re-project those points and use the map method above to set the extent for the output projection. Thanks for the feedback, without it I probably would not of thought of this. Hopefully, the point objects behave as documented. Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" > cc: , 05/01/2003 09:03 Subject: RE: [Mapserver-users] Projection on the Fly Problems AM John - I'm not a MapScript user, so I'll have to let someone else handle this one. The docs say that that setProjection method is supposed to be adjusting your maps' output extents for you (with the MS_TRUE parameter), so your code seems reasonable at first glance. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Thursday, May 01, 2003 10:53 AM To: Ed McNierney Cc: mapserver-users@lists.gis.umn.edu; mapserver-users-admin@lists.gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems Ed, Thanks! I am a bit confused about the extent issue when reprojecting. I do not have a (re)projection object for the map. The extent is set to... EXTENT -125.32 22.62 -66.98 51.48 Which is appropriate for the projection of the layers which are good with init=epsg:4267. I thought that using this mapscript map method... $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); would change the projection for the map object and set the extent with the appropriate values for the new projection. Anyway here is my entire map file... MAP NAME "Lower 48" STATUS ON EXTENT -125.32 22.62 -66.98 51.48 SIZE 800 600 SHAPEPATH "data/l48/" SYMBOLSET "/msapps/maplab/large_fires/etc/symbols.sym" FONTSET "/msapps/maplab/large_fires/etc/fonts.txt" WEB HEADER lf_header.html TEMPLATE lf.html FOOTER lf_footer.html IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "Burn" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "init=epsg:4267" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "init=epsg:4267" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END END and this the script that I am using to display the map. getProjection(); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection2 = $map->getProjection(); ?> Displaying a map > "."2:".$projection2."
".$result; ?> $projection1 comes up null and $projection2 comes up as : +proj=aea+ellps=clrk66+datum=NAD27+lat_1=29.5+lat_2=45.5+lat_0=23+lon_0 =-96+x_0=0+y_0=0+units=m and result comes up as 0. Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" Sent by: cc: , mapserver-users-admin@lists. gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems 04/30/2003 06:22 PM John - I would recommend "init=epsg:4267", but those should be fine. Can you send the PROJECTION object for the main MAP file, too, along with the EXTENT (either in the mapfile or as a parameter) that you're trying to view? The most common cause of invisible reprojections is data that's reprojected right out of the view frame. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: (978) 251-4242 Fax: (978) 251-1396 ed@topozone.com -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 7:02 PM To: Ed McNierney Cc: mapserver-users@lists.gis.umn.edu; mapserver-users-admin@lists.gis.umn.edu Subject: RE: [Mapserver-users] Projection on the Fly Problems Thanks Ed, I agree the UTM zone is required for the example I provided. But, actually I grabbed the example from the wrong map file )-: The projection that is causing problems is the latlong which I am trying to convert to aea. So my layers look like... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=latlong" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ "Ed McNierney" To: "John Norton" , Sent by: cc: mapserver-users-admin@lists. Subject: RE: [Mapserver-users] Projection on the Fly Problems gis.umn.edu 04/30/2003 03:06 PM John - You aren't providing enough information to specify your UTM projections. You need to specify the central meridian (i.e. the UTM zone) each is in. You might find it easier to look up the EPSG codes for each projection and just use the codes. They're more cryptic but less error-prone. You can find them at http://mapserver.gis.umn.edu/doc/proj.html The NAD27 UTM zones are five-digit numbers of the form "267zz" where zz is the two-digit (pad with a leading zero) zone number. So to define a UTM Zone 9, NAD27 projection you can say: PROJECTION "init=epsg:26709" END - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: John Norton [mailto:jnorton@fs.fed.us] Sent: Wednesday, April 30, 2003 4:49 PM To: mapserver-users@lists.gis.umn.edu Subject: [Mapserver-users] Projection on the Fly Problems I Have a map file with two layers... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END I am trying to project these using mapscript with code that looks like this... $map = ms_newMapObj($map_path."l48c.map"); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection = $map->getProjection(); No errors, setProjection returns 0 which I guess means the projection didn't take but, when I echo $projection it reports the projection string with commas replace by plus signs. The problem is I get no image. I am using Mapscript... MapServer version 3.6.6-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Same thing happens when I run mapscript as a CGI.... MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PD F OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAP EFILE Is this a units problem my data is in decimal degrees? I think I have PROJ installed correctly it is in c:\proj with a path to the bin directory. I also tried (meaning I added it to the PHP.ini file as an extension) the PHP extension php_proj.dll. Are these conflicting? Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From pagurekd@agr.gc.ca Thu May 1 18:14:11 2003 From: pagurekd@agr.gc.ca (Debbie Pagurek) Date: Thu, 01 May 2003 13:14:11 -0400 Subject: [Mapserver-users] Projection on the Fly Problems Message-ID: I am not entirely certain that setting the map projection automatically changes the extent so that it is also in the new projection. (I think it doesn't). I have an application that starts with the user picking an country from a pick list, and this passes the country extent in decimal degrees. If the user had also selected another projection, such as Robinson, I have to project the extent rectangle from latlong to Robinson, and I've done it as follows. Maybe this bit of code will help you. $newproj=ms_newprojectionObj("proj=robin,lon_0=0,x_0=0,y_0=0"); $latlon = ms_newprojectionObj("proj=longlat,ellps=GRS80,datum=NAD83,no_defs"); $oldext= ms_newRectObj(); $oldext->setextent($bounds[0],$bounds[1],$bounds[2],$bounds[3]); //the extent in latlong $newextproj = ms_newRectObj(); $newextproj = $oldext->project($latlon,$newproj); //the extent in Robinson $map->setextent($newextproj->minx,$newextproj->miny,$newextproj->maxx,$newextproj->maxy); Debbie Pagurek >>> "John Norton" 04/30/03 04:48pm >>> I Have a map file with two layers... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END I am trying to project these using mapscript with code that looks like this... $map = ms_newMapObj($map_path."l48c.map"); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection = $map->getProjection(); No errors, setProjection returns 0 which I guess means the projection didn't take but, when I echo $projection it reports the projection string with commas replace by plus signs. The problem is I get no image. I am using Mapscript... MapServer version 3.6.6-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Same thing happens when I run mapscript as a CGI.... MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PD F OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAP EFILE Is this a units problem my data is in decimal degrees? I think I have PROJ installed correctly it is in c:\proj with a path to the bin directory. I also tried (meaning I added it to the PHP.ini file as an extension) the PHP extension php_proj.dll. Are these conflicting? Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From ed@topozone.com Thu May 1 18:27:04 2003 From: ed@topozone.com (Ed McNierney) Date: Thu, 1 May 2003 13:27:04 -0400 Subject: [Mapserver-users] Projection on the Fly Problems Message-ID: <13858AA1A74F30419F319ACB66A9D1221F42BD@mercator.topozone.com> Debbie - The MapScript documentation says that if setProjection is called with two arguments and the second is MS_TRUE, that the map's extents and units are automatically recalculated to the new projection. Since I don't use MapScript I can't tell whether that feature actually is working as documented. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: Debbie Pagurek [mailto:pagurekd@agr.gc.ca] Sent: Thursday, May 01, 2003 1:14 PM To: jnorton@fs.fed.us; mapserver-users@lists.gis.umn.edu Subject: Re: [Mapserver-users] Projection on the Fly Problems I am not entirely certain that setting the map projection automatically changes the extent so that it is also in the new projection. (I think it doesn't). I have an application that starts with the user picking an country from a pick list, and this passes the country extent in decimal degrees. If the user had also selected another projection, such as Robinson, I have to project the extent rectangle from latlong to Robinson, and I've done it as follows. Maybe this bit of code will help you. $newproj=ms_newprojectionObj("proj=robin,lon_0=0,x_0=0,y_0=0"); $latlon = ms_newprojectionObj("proj=longlat,ellps=GRS80,datum=NAD83,no_defs"); $oldext= ms_newRectObj(); $oldext->setextent($bounds[0],$bounds[1],$bounds[2],$bounds[3]); //the extent in latlong $newextproj = ms_newRectObj(); $newextproj = $oldext->project($latlon,$newproj); //the extent in Robinson $map->setextent($newextproj->minx,$newextproj->miny,$newextproj->maxx,$newextproj->maxy); Debbie Pagurek >>> "John Norton" 04/30/03 04:48pm >>> I Have a map file with two layers... LAYER NAME "Fires" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "c:/msapps/maplab/large_fires/data/l48/tburn111,3" STATUS ON PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASSITEM "Status" CLASS NAME Burning Expression "502" COLOR 255 0 0 END CLASS NAME Burnt Expression "501" COLOR 255 255 0 END END LAYER NAME "States" STATUS ON DATA "states" TYPE LINE PROJECTION "proj=utm" "ellps=clrk66" "datum=NAD27" END CLASS NAME "Boundary" SYMBOL 14 COLOR 120 120 120 SIZE 1 END END I am trying to project these using mapscript with code that looks like this... $map = ms_newMapObj($map_path."l48c.map"); $result=$map->setProjection ("proj=aea,ellps=clrk66,datum=NAD27,lat_1=29.5,lat_2=45.5,lat_0=23,lon_0 =-96,x_0=0,y_0=0,units=m",MS_TRUE); $image=$map->draw(); $image_url=$image->saveWebImage(MS_PNG,1,1,0); $projection = $map->getProjection(); No errors, setProjection returns 0 which I guess means the projection didn't take but, when I echo $projection it reports the projection string with commas replace by plus signs. The problem is I get no image. I am using Mapscript... MapServer version 3.6.6-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Same thing happens when I run mapscript as a CGI.... MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PD F OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAP EFILE Is this a units problem my data is in decimal degrees? I think I have PROJ installed correctly it is in c:\proj with a path to the bin directory. I also tried (meaning I added it to the PHP.ini file as an extension) the PHP extension php_proj.dll. Are these conflicting? Cheers ------------------------------------------------------ John Norton USDA-RSAC 2222 W 2300 S Salt Lake City, UT 84119 Phone: 801-975-3766 Fax: 801-975-3478 Intranet: fsweb.rsac.fs.fed.us Internet: www.fs.fed.us/eng/rsac/ ------------------------------------------------------ _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users _______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From sgillies@frii.com Thu May 1 18:47:26 2003 From: sgillies@frii.com (Sean Gillies) Date: Thu, 1 May 2003 11:47:26 -0600 Subject: [Mapserver-users] Problems with PerlMapscript 3.7 Syntax In-Reply-To: <1051799644.1950.74.camel@eisbaer.local> Message-ID: Babak, The function you're looking for is save(), not saveImage(). To find out what functions are current in MapScript, you need to look in the mapscript.i file. The documentation is far behind development. To find all symbols in a package, do something like what's illustrated on page 281 of Programming Perl, 2nd edition: foreach $symname (sort keys %main::) { ... } Hope this helps, Sean On Thursday, May 1, 2003, at 08:34 AM, Babak Toloue Tehrani wrote: > Hello, > > I have still problems with perlmapscript 3.7. The demo below with the > syntax of perlmapscript 3.6 is working very fine on my system. shp2img > is also working for the mapfile below. >> From the WIKI MigrationGuide I Take the syntax for saveImage(): > > $img->saveImage('test37.png'); > > and get following output: > > Can't locate auto/mapscript/imageObj/saveImage.al in @INC (@INC > contains: /usr/lib/perl5/5.8.0/i586-linux-thread-multi > /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at test37.pl > line 7 > > Then I looked for the string saveImage in the mapscript.pm module and > found the function msSaveImage who brings me following output: > > Usage: msSaveImage(map,img,filename); at test37.pl line 7. > > I tried: $map->msSaveImage($map,$img,'test37'); > > and got same errormessage as before. Then I tried to set the set the > ImageType with: > > map->setImageType("png") or die('Unable to setImageType.'); > > and see that it failed. Here the script and the mapfile: > > (Does someone now a tool to extract from a perl Module (mapscript.pm) a > list of all Classes/Objects, Members and Methods?) > > Thanks a lot, > > Babak > > ======================================================================= > === > #!/usr/bin/perl -w > use mapscript; > use strict; > > my $map = new mapscript::mapObj("data/demo37.map") or die('Unable to > OPEN mapfile.'); > $map->setImageType("png") or die('Unable to setImageType.'); > my $img = $map->draw() or die('Unable to DRAW mapfile.'); > $map->msSaveImage($map,$img,'test37'); > $img->free(); > ----------------------------------------------------------------------- > --- > NAME DEMO37 > STATUS ON > SIZE 600 450 > EXTENT 5.3 55.5 15.5 46.9 > UNITS METERS > SHAPEPATH "data" > IMAGECOLOR 255 255 255 > > OUTPUTFORMAT > NAME png > DRIVER "GD/PNG" > MIMETYPE "image/png" > IMAGEMODE PC256 > EXTENSION "png" > END > > LAYER > NAME TESTLAYER > TYPE POLYGON > STATUS DEFAULT > DATA lnd01dd.shp > CLASS > NAME TESTCLASS > SYMBOL 0 > COLOR 195 195 195 > OUTLINECOLOR 102 102 102 > END > END > END > > -- Sean Gillies sgillies at frii dot com http://www.frii.com/~sgillies From cpurvis@asg.sc.edu Thu May 1 18:54:35 2003 From: cpurvis@asg.sc.edu (Charlton Purvis) Date: Thu, 1 May 2003 13:54:35 -0400 Subject: [Mapserver-users] bug on PHPDynLegend wiki post? Message-ID: Hi, Chip: Infinite thanks for your dynamic legend PHP post (http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPDynLegend). It's great! I have one thought, though. You draw the map . . . $img = $map->draw(); $url = $img->saveWebImage(MS_PNG, $map->transparent, $map->interlace, 50); . . . at the very beginning of your .php -- before you run down the legend checkboxes where you turn layers on and off. Shouldn't this be toward the end, say, near the . . . include($path_to_legend . "legend.php"); . . . line after you've set the layers in the $map? I might be missing something, but w/o moving the draw(), all I got was whatever the .map file defined. Again, thanks, and apologies if I've goofed. Charlton Charlton Purvis (803) 777-8858 : voice (803) 777-8833 : fax cpurvis@sc.edu Advanced Solutions Group Department of Physics and Astronomy University of South Carolina Columbia, SC 29208 From Prashant Desai" Message-ID: <000701c3100a$a6e8d520$0f00a8c0@MT15> Hi, Is there a known problem in using TrueType symbols in MapServer version 3.6.4? The symbol definition in my mapfile is given below. I tried to debug and found that it is successfully able to recognize type ELLIPSE and VECTOR, but when it comes to TRUETYPE, it stores 0 in the symbol->type Any help on this will be appreciated. Regards, SYMBOL NAME "circle" TYPE ELLIPSE POINTS 1 1 END FILLED TRUE END SYMBOL NAME "triangle" TYPE vector POINTS 0 2 1 0 2 2 0 2 END END SYMBOL NAME "s1" TYPE TRUETYPE FONT arial FILLED true ANTIALIAS true CHARACTER "A" END From lfilak@medinaco.org Thu May 1 19:07:03 2003 From: lfilak@medinaco.org (Lowell Filak) Date: Thu, 01 May 2003 14:07:03 -0400 Subject: [Mapserver-users] Problems with PerlMapscript 3.7 Syntax Message-ID: <200305011806.h41I6sN21401@yogi.medinaco.net> There are a few things here that may be causing the exit during the setting of the image type, ie. "use strict". Have you already tried tuirning on the debugging to see if you receive a better message of what is occuring? Lowell F. The following message was sent by Babak Toloue Tehrani on 01 May 2003 16:34:07 +0200. > Hello, > > I have still problems with perlmapscript 3.7. The demo below with the > syntax of perlmapscript 3.6 is working very fine on my system. shp2img > is also working for the mapfile below. > >From the WIKI MigrationGuide I Take the syntax for saveImage(): > > $img->saveImage('test37.png'); > > and get following output: > > Can't locate auto/mapscript/imageObj/saveImage.al in @INC (@INC > contains: /usr/lib/perl5/5.8.0/i586-linux-thread-multi > /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at test37.pl > line 7 > > Then I looked for the string saveImage in the mapscript.pm module and > found the function msSaveImage who brings me following output: > > Usage: msSaveImage(map,img,filename); at test37.pl line 7. > > I tried: $map->msSaveImage($map,$img,'test37'); > > and got same errormessage as before. Then I tried to set the set the > ImageType with: > > map->setImageType("png") or die('Unable to setImageType.'); > > and see that it failed. Here the script and the mapfile: > > (Does someone now a tool to extract from a perl Module (mapscript.pm) a > list of all Classes/Objects, Members and Methods?) > > Thanks a lot, > > Babak > > ========================================================================== > #!/usr/bin/perl -w > use mapscript; > use strict; > > my $map = new mapscript::mapObj("data/demo37.map") or die('Unable to > OPEN mapfile.'); > $map->setImageType("png") or die('Unable to setImageType.'); > my $img = $map->draw() or die('Unable to DRAW mapfile.'); > $map->msSaveImage($map,$img,'test37'); > $img->free(); > -------------------------------------------------------------------------- > NAME DEMO37 > STATUS ON > SIZE 600 450 > EXTENT 5.3 55.5 15.5 46.9 > UNITS METERS > SHAPEPATH "data" > IMAGECOLOR 255 255 255 > > OUTPUTFORMAT > NAME png > DRIVER "GD/PNG" > MIMETYPE "image/png" > IMAGEMODE PC256 > EXTENSION "png" > END > > LAYER > NAME TESTLAYER > TYPE POLYGON > STATUS DEFAULT > DATA lnd01dd.shp > CLASS > NAME TESTCLASS > SYMBOL 0 > COLOR 195 195 195 > OUTLINECOLOR 102 102 102 > END > END > END > > -- > Babak Toloue Tehrani > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users From Prashant Desai" <000701c3100a$a6e8d520$0f00a8c0@MT15> Message-ID: <001101c3100d$e0b28140$0f00a8c0@MT15> Hi Again, Please ignore my message. I was able to resolve the problem. I traced the parsing code and found that truetype symbols are required to be in a separate symbolset file. Regards, Prashant ----- Original Message ----- From: "Prashant Desai" To: Sent: Thursday, May 01, 2003 1:54 PM Subject: [Mapserver-users] TrueType Symbols > Hi, > > Is there a known problem in using TrueType symbols in MapServer version > 3.6.4? > The symbol definition in my mapfile is given below. I tried to debug and > found that it is successfully able to recognize type ELLIPSE and VECTOR, but > when it comes to TRUETYPE, it stores 0 in the symbol->type > Any help on this will be appreciated. > > Regards, > > SYMBOL > NAME "circle" > TYPE ELLIPSE > POINTS 1 1 END > FILLED TRUE > END > SYMBOL > NAME "triangle" > TYPE vector > POINTS > 0 2 > 1 0 > 2 2 > 0 2 > END > END > SYMBOL > NAME "s1" > TYPE TRUETYPE > FONT arial > FILLED true > ANTIALIAS true > CHARACTER "A" > END > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > From joe@otsys.com Thu May 1 19:23:02 2003 From: joe@otsys.com (Joe Bussell) Date: Thu, 01 May 2003 11:23:02 -0700 Subject: [Mapserver-users] Problems with PerlMapscript 3.7 Syntax In-Reply-To: References: Message-ID: <3EB16606.4000305@otsys.com> Is it just me, or does this function renaming seem unnecesary? I fully understand fixing up the internal code. I do not accept that making function call naming changes from distinctly articulated names like "saveImage()" to its ambiguously named alternative "save()" is at all productive. Could you explain to me the reason that this particular name was changed? Can we agree on a stable interface and concentrate on the real buisiness of the day? Cordially, Joe Bussell On Time Systems www.trafficdodger.com Sean Gillies wrote: > Babak, > > The function you're looking for is save(), not saveImage(). > > To find out what functions are current in MapScript, you need to > look in the mapscript.i file. The documentation is far behind > development. > > To find all symbols in a package, do something like what's > illustrated on page 281 of Programming Perl, 2nd edition: > > foreach $symname (sort keys %main::) { > ... > } > > Hope this helps, > Sean > > On Thursday, May 1, 2003, at 08:34 AM, Babak Toloue Tehrani wrote: > >> Hello, >> >> I have still problems with perlmapscript 3.7. The demo below with the >> syntax of perlmapscript 3.6 is working very fine on my system. shp2img >> is also working for the mapfile below. >> >>> From the WIKI MigrationGuide I Take the syntax for saveImage(): >> >> >> $img->saveImage('test37.png'); >> >> and get following output: >> >> Can't locate auto/mapscript/imageObj/saveImage.al in @INC (@INC >> contains: /usr/lib/perl5/5.8.0/i586-linux-thread-multi >> /usr/lib/perl5/5.8.0 >> /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi >> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at test37.pl >> line 7 >> >> Then I looked for the string saveImage in the mapscript.pm module and >> found the function msSaveImage who brings me following output: >> >> Usage: msSaveImage(map,img,filename); at test37.pl line 7. >> >> I tried: $map->msSaveImage($map,$img,'test37'); >> >> and got same errormessage as before. Then I tried to set the set the >> ImageType with: >> >> map->setImageType("png") or die('Unable to setImageType.'); >> >> and see that it failed. Here the script and the mapfile: >> >> (Does someone now a tool to extract from a perl Module (mapscript.pm) a >> list of all Classes/Objects, Members and Methods?) >> >> Thanks a lot, >> >> Babak >> >> ======================================================================= >> === >> #!/usr/bin/perl -w >> use mapscript; >> use strict; >> >> my $map = new mapscript::mapObj("data/demo37.map") or die('Unable to >> OPEN mapfile.'); >> $map->setImageType("png") or die('Unable to setImageType.'); >> my $img = $map->draw() or die('Unable to DRAW mapfile.'); >> $map->msSaveImage($map,$img,'test37'); >> $img->free(); >> ----------------------------------------------------------------------- >> --- >> NAME DEMO37 >> STATUS ON >> SIZE 600 450 >> EXTENT 5.3 55.5 15.5 46.9 >> UNITS METERS >> SHAPEPATH "data" >> IMAGECOLOR 255 255 255 >> >> OUTPUTFORMAT >> NAME png >> DRIVER "GD/PNG" >> MIMETYPE "image/png" >> IMAGEMODE PC256 >> EXTENSION "png" >> END >> >> LAYER >> NAME TESTLAYER >> TYPE POLYGON >> STATUS DEFAULT >> DATA lnd01dd.shp >> CLASS >> NAME TESTCLASS >> SYMBOL 0 >> COLOR 195 195 195 >> OUTLINECOLOR 102 102 102 >> END >> END >> END >> >> > -- > Sean Gillies > sgillies at frii dot com > http://www.frii.com/~sgillies > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@lists.gis.umn.edu > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > From steve.lime@dnr.state.mn.us Thu May 1 18:55:36 2003 From: steve.lime@dnr.state.mn.us (Steve Lime) Date: Thu, 01 May 2003 12:55:36 -0500 Subject: [Mapserver-users] Non-Rectangular Tiles in TILEINDEX ? Message-ID: Actually there is no pre-requisite for tiles other than that they be polygons. Behind the scenes the decision to process a tile or not is based on the bounding box of that feature (I believe) so there are certain inefficiencies that can occur with irregularly shaped tiles that don't truly intersect the area of interest. I and others have use things like counties or landsat footprints with success in the past. Steve Stephen Lime Data & Applications Manager Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> "Ed McNierney" 04/30/03 07:26PM >>> Bob - Your TILEINDEX should be rectangles. The intent of a TILEINDEX is to allow MapServer to quickly determine whether to examine an input file to see if it has any visible features on the current map request. Rectangular tiles can be very quickly examined to see if they intersect the map viewframe. If so, the source is opened and any files that REALLY intersect the view are drawn. Supporting non-rectangular tiles would be more complex and somewhat slower, and would probably be of rather little benefit in most applications. A good combination of rectangular tile indexes and spatial indexing will produce very good performance. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 Phone: (978) 251-4242 Fax: (978) 251-1396 ed@topozone.com -----Original Message----- From: Bruce, Bob (CON) [mailto:BBruce@gov.mb.ca] Sent: Wednesday, April 30, 2003 7:54 PM To: 'Mapserver Mailing List' Subject: [Mapserver-users] Non-Rectangular Tiles in TILEINDEX ? I have been experimenting with TILEINDEXs in order to evaluate their functionality for my applications. I have successfully displayed a TILEINDEX of 20 orthophotos in my browser. Next I wanted to try displaying a set of project mapping areas and built an index map of polygons of these areas. I included this index map as a TILEINDEX in my map file and do not get anything displayed, instead I get a blank display. This leads me to wonder if this is because my tile polygons are non-rectangular. Does the Map Server require tiles to be rectangular or can it work with irregularly shaped tiles? I have successfully displayed my dataset that I'm using as a TILEINDEX as a line file, so I know that the server will work with this file. For your reference, I have included the definition of this layer: LAYER # DLS Polys NAME "DLSPolys" TILEINDEX "TilesWWinnipeg_CARIS/TilesWWinnipeg" TILEITEM "MAPKEY" STATUS DEFAULT TYPE POLYGON CLASSITEM "MAPKEY" CLASS # Whole DLS Parcel STATUS ON NAME "WHOLE DLSPOLY" COLOR 255 202 149 OUTLINECOLOR 0 0 0 END # end of Whole DLS Parcel class object END # end of layer object thanks, Bob Bruce ************************************************************************ ********************************** ** Bob Bruce, P.Eng. Geomatics Support Engineer ** bbruce@gov.mb.ca Manitoba Geomatics/Remote Sensing Branch, ** work # (204) 945-6636 1007 Century Street, ** home # (204) 256-4615 Winnipeg, Manitoba, Canada, R3H 0W4 ** FAX # (204) 945-1365 ** ** The Manitoba Centre for: ** Cadastral & Topographical Mapping, and Remote Sensing ** See us on the Web at: http://www.gov.mb.ca/conservation/geomatics/cada_mapping/index.html ** and: http://www.gov.mb.ca/conservation/geomatics/index.html ** Check out our digital maps at: http://mli.gov.mb.ca/ ************************************************************************ ********************************** From steve.lime@dnr.state.mn.us Thu May 1 19:01:47 2003 From: steve.lime@dnr.state.mn.us (Steve Lime) Date: Thu, 01 May 2003 13:01:47 -0500 Subject: [Mapserver-users] PERL mapscript undefined symbol woes Message-ID: I've not tried perl 5.8 with Swig. So, if they changed the guts of perl which is where all the undefined symbols live then that could be the issue. Have you tried re-swigging the the interface (cd mapscript/perl; swig -shadow -perl5 mapscript.i) file with a brand new version of Swig? Steve Stephen Lime Data & Applications Manager Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Joe Bussell 04/30/03 05:56PM >>> Greetings Listers, I have a Debian box with PERL5.8 and mapserver-3.6.5. I have had great success in the past with this box, but something in my build went awry. The compile for mapserv and then perl/mapscript completed without error. The object is also generally useful when using dump.pl and even some live map rendering under apache. The symptom that I observed is that whenever the process needs to ca