From jcigar at ulb.ac.be Thu Sep 1 00:55:07 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Thu, 01 Sep 2011 09:55:07 +0200 Subject: [mapserver-users] SLD ignored with mode=map .. ? In-Reply-To: References: <4E5B7A75.8020209@ulb.ac.be> <4E5D0AF0.6000403@mapgears.com> Message-ID: <4E5F3A5B.2050600@ulb.ac.be> On 09/01/2011 06:30, Steve Lime wrote: > This would be a nice addition to standard CGI behavior wouldn't it? > Could a ticket be filed and maybe this added in 6.2? +1 for this..! another thing that would be great (?) is if we could mix a SLD with a Mapfile, or a least some parts > > On Tue, Aug 30, 2011 at 11:08 AM, Daniel Morissette > wrote: >> Yes, that's the expected behavior: SLDs are supported only in WMS requests. >> >> >> On 11-08-29 07:39 AM, Julien Cigar wrote: >>> >>> Hello, >>> >>> everything is in the title :) : I wondered if it's normal that my SLD is >>> ignored when mode=map (it works perfectly with WMS)? >>> >>> I use an URL like: >>> >>> http://home.bebif.be/mapserver?map=/path/to/mapfile.map&layer=metzger&mode=map&SLD=http://some.host.be/nobanis/mysld.xml >>> >>> >>> Thank you, >>> Julien >>> >>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> -- >> Daniel Morissette >> http://www.mapgears.com/ >> Provider of Professional MapServer Support since 2000 >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From mandschulz at googlemail.com Thu Sep 1 08:10:42 2011 From: mandschulz at googlemail.com (Michael Schulz) Date: Thu, 1 Sep 2011 17:10:42 +0200 Subject: [mapserver-users] create hatch symbol with python mapscript? Message-ID: Hi, I just tried to create a hatch type symbol only thru python mapscript, but failed. Could someone have a quick look and discover what I might be missing? ... hatch = mapscript.symbolObj("hatch") hatch.type = mapscript.MS_SYMBOL_HATCH sindex = m.symbolset.appendSymbol(hatch) stylePoly.symbol = sindex stylePoly.width = 5 stylePoly.angle = 45 stylePoly.outlinecolor.setRGB(255,0,0) stylePoly.color.setRGB(0,255,0) lp.opacity = 50 ... The layer is drawn with a complete fill at 50% opacity in green, but no hatching. Thanks, Michael -- ----------------------------------------------------------- Michael Schulz From thomas.bonfort at gmail.com Thu Sep 1 08:54:49 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 1 Sep 2011 17:54:49 +0200 Subject: [mapserver-users] create hatch symbol with python mapscript? In-Reply-To: References: Message-ID: You should also set the style size which is the spacing between hatches. It should be larger than the style width. Thomas Le 1 sept. 2011 17:11, "Michael Schulz" a ?crit : > Hi, > > I just tried to create a hatch type symbol only thru python mapscript, > but failed. Could someone have a quick look and discover what I might > be missing? > > ... > hatch = mapscript.symbolObj("hatch") > hatch.type = mapscript.MS_SYMBOL_HATCH > sindex = m.symbolset.appendSymbol(hatch) > stylePoly.symbol = sindex > stylePoly.width = 5 > stylePoly.angle = 45 > stylePoly.outlinecolor.setRGB(255,0,0) > stylePoly.color.setRGB(0,255,0) > lp.opacity = 50 > ... > > The layer is drawn with a complete fill at 50% opacity in green, but > no hatching. > > Thanks, Michael > > -- > ----------------------------------------------------------- > Michael Schulz > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.boutet at geosys.com Thu Sep 1 02:56:54 2011 From: nicolas.boutet at geosys.com (Nicolas BOUTET) Date: Thu, 1 Sep 2011 11:56:54 +0200 Subject: [mapserver-users] MSVCR fault when using OGR and OCI datasources ? Message-ID: <016201cc688d$7b159070$7140b150$@geosys.com> Hello, Using the 6.0.1 version of MapServer and the 1.8.1 version of GDAL (using Tamas Szekeres binaries ), I got and error when I try to request a WFS layer. This layer get data from an Oracle Database using OGR and OCI. The same layer works well when I use MapServer 5.6 and GDAL 1.7. WMS layers work well, and WFS GetCapabilities requests are working well also. Here is the Windows event registered when the GetFeature request is sent : The Window Event: Faulting application name: mapserv.exe, version: 0.0.0.0, time stamp: 0x4e208c15 Faulting module name: MSVCR80.dll, version: 8.0.50727.4927, time stamp: 0x4a27427d Exception code: 0xc0000005 Fault offset: 0x000000000001e272 Faulting process id: 0xabc Faulting application start time: 0x01cc687fe11d27a6 Faulting application path: D:\wwwRoot\MapServer6\cgi-bin\mapserv.exe Faulting module path: C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_n one_88dce9872fb18caf\MSVCR80.dll Report Id: 1efbc4e2-d473-11e0-9fc6-005056991513 Here are some part of the MapFile (the definition of the WFS layers is in a separate file) : MAP CONFIG PROJ_LIB "D:/MapServerProj/nad/" CONFIG GDAL_DRIVER_PATH "D:/gdalplugins1.8/" CONFIG "MS_ERRORFILE" "D:/MapServerMaps/Errors_MapAgriQuest6.txt" DEBUG 5 .. WEB IMAGEPATH "D:/wwwroot/MapServer6/temp/" IMAGEURL "/temp/" METADATA "ows_enable_request" "*" .. END END .. INCLUDE "MapAgriQuest_Blocks.map" .. END # Map Here is the definition of the layer: LAYER NAME "LOCALIZED_BLOCKS" METADATA "ows_title" "LOCALIZED_BLOCKS" .. END VALIDATION idUser '^[0-9]{1,6}$' # %idUser% must be numeric and between 1 and 6 characters idLanguage '^[0-9]{1,2}$' # %idLanguage% must be numeric and between 1 and 2 characters END TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "OCI:****/****@****" DATA "SELECT .. FROM .. WHERE .." STATUS ON ... END Best regards Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaja0506 at gmail.com Thu Sep 1 17:48:02 2011 From: jaja0506 at gmail.com (jjwang) Date: Thu, 1 Sep 2011 17:48:02 -0700 (PDT) Subject: [mapserver-users] Re: Getfeatureinfo In-Reply-To: <1314887213521-6750153.post@n2.nabble.com> References: <1314887213521-6750153.post@n2.nabble.com> Message-ID: <1314924482736-6752302.post@n2.nabble.com> Hi, Where is that "wms_dataurl_format" from? I think that should be: "wms_feature_info_mime_type" "text/html". You can find the details in the references section on this page. http://mapserver.org/ogc/wms_server.html#reference-section JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Getfeatureinfo-tp6750153p6752302.html Sent from the Mapserver - User mailing list archive at Nabble.com. From HeuerT at landcareresearch.co.nz Thu Sep 1 18:10:41 2011 From: HeuerT at landcareresearch.co.nz (Tim Heuer) Date: Fri, 2 Sep 2011 13:10:41 +1200 Subject: [mapserver-users] MapServer 5 to 6 migration In-Reply-To: <1314924482736-6752302.post@n2.nabble.com> References: <1314887213521-6750153.post@n2.nabble.com> <1314924482736-6752302.post@n2.nabble.com> Message-ID: Hi, We are currently using MapServer 5 for all our WMS and would like to upgrade to MapServer 6. We have a lot of map files for version 5 and need to upgrade those. Since the configuration files have changed a lot from version 5 to 6, this will mean a lot of work for our MapServer specialist, I was hoping that someone has already written a script to automate this process. If there is one of you, who has done this, please let me know and we can get in contact. This would be a great help and very much appreciated. Thanks, Tim Tim-Hinnerk Heuer Landcare Research, Palmerston North Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz From HeuerT at landcareresearch.co.nz Thu Sep 1 18:35:40 2011 From: HeuerT at landcareresearch.co.nz (Tim Heuer) Date: Fri, 2 Sep 2011 13:35:40 +1200 Subject: [mapserver-users] MapServer 5 to 6 migration In-Reply-To: References: <1314887213521-6750153.post@n2.nabble.com> <1314924482736-6752302.post@n2.nabble.com> Message-ID: Hi Greg, Yes, that was what I was aiming at too. Maybe I could even convince my employer that I or someone here can put in the hours to (at least partially) automate this process. Seems like there are more people wanting this. It could be a worthwhile contribution to save a lot of people a lot of time. Any more takers? Kind regards, Tim-Hinnerk Heuer Landcare Research, Palmerston North From: greg.luker at scu.edu.au [mailto:greg.luker at scu.edu.au] Sent: Friday, 2 September 2011 1:30 p.m. To: Tim Heuer Subject: Re: [mapserver-users] MapServer 5 to 6 migration Hi Tim, No help here, I'm afraid. But I was hoping you might be able to let the list know (or just me otherwise) if you find a solution. We're currently running MapServer 5.6.3 but I know we 'll have to upgrade to 6+, it would be nice if that process could be at least partially automated. Thanks, Greg. ----- Original Message ----- From: Tim Heuer Date: Friday, September 2, 2011 11:13 am Subject: [mapserver-users] MapServer 5 to 6 migration To: "mapserver-users at lists.osgeo.org" > We are currently using MapServer 5 for all our WMS and would > like to upgrade to MapServer 6. We have a lot of map files for > version 5 and need to upgrade those. Since the configuration > files have changed a lot from version 5 to 6, this will mean a > lot of work for our MapServer specialist, I was hoping that > someone has already written a script to automate this process. Greg Luker GIS Lab Manager Southern Cross University AUSTRALIA 61 2 66203026 ________________________________ Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaja0506 at gmail.com Thu Sep 1 18:42:26 2011 From: jaja0506 at gmail.com (jjwang) Date: Thu, 1 Sep 2011 18:42:26 -0700 (PDT) Subject: [mapserver-users] WMS getFeatureInfo & WFS getFeature Message-ID: <1314927746041-6752411.post@n2.nabble.com> Hello all, I have some questions about the getFeatureInfo and getFeature request. 1.About getFeatureInfo request: Because the parameter X and Y are compulsory, I'm assuming that it can only return one feature's info responding to that particular point in that BBOX. Is there any way to return all the features' info in a BBOX. 2.About getFeature request: there are two settings under layer level, gml_exclude_items and gml_include_items. They decide the attributes will be returned. The thing I'm not sure is whether 'gml:msGeometry' is an attribute can be disabled. I don't need this info and it's normally very huge. So I want to disable it but it won't work if I set: "gml_exclude_items" "msGeometry". Here is an example of returned feature. -11.018120 136.738210 -11.015520 136.740950 -11.015520 136.738440 -11.015610 136.738800 -11.016480 136.739550 -11.017120 136.740610 -11.017570 136.740950 -11.017790 136.740950 -11.018120 136.740600 -11.017900 136.739800 -11.016310 136.738430 -11.015870 136.738210 -11.015520 136.738440 2.71360016615039E-06 7.86224958640615E-03 8 8 EAST ARNHEM SENSIS 1696200008 I can disable AREA, PERIMETER, SUBURB... but not 'msGeometry'. So is there any way to do this? Actually I have only one purpose for asking above two questions. The response I want should be as simple as the response of getFeatureInfo request (not including geometry info, but it only return one particular feature), like this Layer 'nt' Feature 1009: AREA = '1.65217521538399E+00' PERIMETER = '6.51838520180940E+00' NTX101SB_ = '1011' NTX101SB_I = '1011' SUBURB = 'SANDOVER' UFI = '1696201015' But also it should be a list of features in a BBOX like the response of getFeature request. 3. For both getFeatureInfo and getFeature, as far as I know, they can only return the feature info from shape file. But I want to know is there any way to get the class info (which applied to this feature) I added in the map file as well. It might be hard to understand what I mean. Let's see an example. In map file I added some class control like this: LAYER ... CLASSITEM 'SUBURB' CLASS NAME 'xxx' EXPRESSION 'EAST ARNHEM' STYLE ... END END END I want to get the 'NAME' and 'STYLE' or other kinds of info applied on the feature 'SUBURB' = 'EAST ARNHEM' when request this feature's info. Some one help me. Thanks in advance. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-getFeatureInfo-WFS-getFeature-tp6752411p6752411.html Sent from the Mapserver - User mailing list archive at Nabble.com. From Jukka.Rahkonen at mmmtike.fi Thu Sep 1 21:18:39 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 2 Sep 2011 04:18:39 +0000 Subject: [mapserver-users] WMS getFeatureInfo & WFS getFeature In-Reply-To: <1314927746041-6752411.post@n2.nabble.com> References: <1314927746041-6752411.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301F4DA@suutari.haapa.mmm.fi> Hi, 1. Use big number in parameter FEATURE_COUNT. The default is 1. Mapserver is nice by having the tolerance setting which makes is easy for the users to get feature info also for point features if set reasonably wide. I would believe that the result will come from a round area and not from a box because GetFeatureInfo takes only a point as input. 2. Haven't tried from the server side but user can decide is simply. Compare http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=GetFeature&typename=lv:mml_railway&BBOX=246700,6780800,436400,6924000&propertyname=sahko and http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=GetFeature&typename=lv:mml_railway&BBOX=246700,6780800,436400,6924000&propertyname=sahko,the_geom Have you tried to make a short include_items list without geometry? 3. could be possible to get extra information by using templates and GetFeatureInfo with info_format=text/html. -Jukka Rahkonen- jjwang wrote: > Hello all, > I have some questions about the getFeatureInfo and getFeature request. > 1.About getFeatureInfo request: Because the parameter X and Y are compulsory, I'm assuming that it can only return one feature's info responding to that particular point in that BBOX. Is there any way to return all the features' info in a BBOX. > 2.About getFeature request: there are two settings under layer level, gml_exclude_items and gml_include_items. They decide the attributes will be returned. The thing I'm not sure is whether 'gml:msGeometry' is an attribute can be disabled. I don't need this info and it's normally very huge. So I want to disable it but it won't work if I set: "gml_exclude_items" "msGeometry". Here is an example of returned feature. -11.018120 136.738210 -11.015520 136.740950 -11.015520 136.738440 -11.015610 136.738800 -11.016480 136.739550 -11.017120 136.740610 -11.017570 136.740950 -11.017790 136.740950 -11.018120 136.740600 -11.017900 136.739800 -11.016310 136.738430 -11.015870 136.738210 -11.015520 136.738440 2.71360016615039E-06 7.86224958640615E-03 8 8 EAST ARNHEM SENSIS 1696200008 > I can disable AREA, PERIMETER, SUBURB... but not 'msGeometry'. So is there any way to do this? > Actually I have only one purpose for asking above two questions. The response I want should be as simple as the response of getFeatureInfo request (not including geometry info, but it only return one particular feature), like this Layer 'nt' Feature 1009: AREA = '1.65217521538399E+00' PERIMETER = '6.51838520180940E+00' NTX101SB_ = '1011' NTX101SB_I = '1011' SUBURB = 'SANDOVER' UFI = '1696201015' But also it should be a list of features in a BBOX like the response of getFeature request. > 3. For both getFeatureInfo and getFeature, as far as I know, they can only return the feature info from shape file. But I want to know is there any way to get the class info (which applied to this feature) I added in the map file as well. It might be hard to understand what I mean. Let's see an example. In map file I added some class control like this: LAYER ... CLASSITEM 'SUBURB' CLASS NAME 'xxx' EXPRESSION 'EAST ARNHEM' STYLE ... END END END > I want to get the 'NAME' and 'STYLE' or other kinds of info applied on the feature 'SUBURB' = 'EAST ARNHEM' when request this feature's info. > Some one help me. > Thanks in advance. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-getFeatureInfo-WFS-getFeature-tp6752411p6752411.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From HeuerT at landcareresearch.co.nz Thu Sep 1 21:54:43 2011 From: HeuerT at landcareresearch.co.nz (Tim Heuer) Date: Fri, 2 Sep 2011 16:54:43 +1200 Subject: [mapserver-users] RE: MapServer 5 to 6 migration In-Reply-To: References: <1314887213521-6750153.post@n2.nabble.com> <1314924482736-6752302.post@n2.nabble.com> Message-ID: Hi again, Regarding this issue of transforming map files from version to version, it would be great if we could resolve this sooner rather than later. My boss, Robert Gibb and I have had a brief chat about how this could be done, by who and when. The idea is to put the current map file data into XML. Since it is a format based on indents and key/value pairs, it should be a simple transformation. Then the hard part would be to put together an XSLT transformation to the new format (maybe some further logic is needed, but generally XML is well understood and easy to manipulate) and then convert it back to the indented (new) map file format. With the help of Andrew Cowie (my colleague here at Landcare) and people who are going to be at FOSS4G in a week's time, we can hopefully get together at the code sprint on the 17th of September and at least start, if not finish, writing the code for this or at least make a plan to make it happen. The different parts of the MapServer configuration could be split among the most familiar with MapServer who are keen. So, please, if you are going to be at FOSS4G this year, it would be great if you could help with this if you are interested and want to make life easier for a lot of people. In later versions of MapServer, there might be a benefit too in doing this, so maybe we could set up a transformation framework for files in that format if XML/XSLT is not enough for that. Ideas welcome. XML/XSLT specialists, it would be great to meet up on one of the days there and discuss further details of this (mini-) project. The idea is to make this open source as the whole stack of software at FOSS4G is. Kind regards, Tim-Hinnerk Heuer Landcare Research, Palmerston North -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Tim Heuer Sent: Friday, 2 September 2011 1:11 p.m. To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] MapServer 5 to 6 migration Hi, We are currently using MapServer 5 for all our WMS and would like to upgrade to MapServer 6. We have a lot of map files for version 5 and need to upgrade those. Since the configuration files have changed a lot from version 5 to 6, this will mean a lot of work for our MapServer specialist, I was hoping that someone has already written a script to automate this process. If there is one of you, who has done this, please let me know and we can get in contact. This would be a great help and very much appreciated. Thanks, Tim Tim-Hinnerk Heuer Landcare Research, Palmerston North Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz From list at rdewit.net Thu Sep 1 23:16:03 2011 From: list at rdewit.net (Roald de Wit) Date: Fri, 02 Sep 2011 16:16:03 +1000 Subject: [mapserver-users] RE: MapServer 5 to 6 migration In-Reply-To: References: <1314887213521-6750153.post@n2.nabble.com> <1314924482736-6752302.post@n2.nabble.com> Message-ID: <4E6074A3.8020306@rdewit.net> Hi Tim, You might want to register for the code sprint here: http://wiki.osgeo.org/wiki/FOSS4G_2011_Code_Sprint . That offers a centralised way for people to express their interest in participating. Cheers, Roald On 02/09/11 14:54, Tim Heuer wrote: > Hi again, > > Regarding this issue of transforming map files from version to version, it would be great if we could resolve this sooner rather than later. My boss, Robert Gibb and I have had a brief chat about how this could be done, by who and when. > > The idea is to put the current map file data into XML. Since it is a format based on indents and key/value pairs, it should be a simple transformation. Then the hard part would be to put together an XSLT transformation to the new format (maybe some further logic is needed, but generally XML is well understood and easy to manipulate) and then convert it back to the indented (new) map file format. > > With the help of Andrew Cowie (my colleague here at Landcare) and people who are going to be at FOSS4G in a week's time, we can hopefully get together at the code sprint on the 17th of September and at least start, if not finish, writing the code for this or at least make a plan to make it happen. The different parts of the MapServer configuration could be split among the most familiar with MapServer who are keen. > > So, please, if you are going to be at FOSS4G this year, it would be great if you could help with this if you are interested and want to make life easier for a lot of people. In later versions of MapServer, there might be a benefit too in doing this, so maybe we could set up a transformation framework for files in that format if XML/XSLT is not enough for that. Ideas welcome. > > XML/XSLT specialists, it would be great to meet up on one of the days there and discuss further details of this (mini-) project. > > The idea is to make this open source as the whole stack of software at FOSS4G is. > > Kind regards, > Tim-Hinnerk Heuer > > Landcare Research, Palmerston North > > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Tim Heuer > Sent: Friday, 2 September 2011 1:11 p.m. > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] MapServer 5 to 6 migration > > Hi, > > We are currently using MapServer 5 for all our WMS and would like to upgrade to MapServer 6. We have a lot of map files for version 5 and need to upgrade those. Since the configuration files have changed a lot from version 5 to 6, this will mean a lot of work for our MapServer specialist, I was hoping that someone has already written a script to automate this process. > > If there is one of you, who has done this, please let me know and we can get in contact. > > This would be a great help and very much appreciated. > > Thanks, > Tim > > Tim-Hinnerk Heuer > > Landcare Research, Palmerston North > > Please consider the environment before printing this email > Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. > The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > Please consider the environment before printing this email > Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. > The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From mandschulz at googlemail.com Thu Sep 1 23:54:08 2011 From: mandschulz at googlemail.com (Michael Schulz) Date: Fri, 2 Sep 2011 08:54:08 +0200 Subject: [mapserver-users] create hatch symbol with python mapscript? In-Reply-To: References: Message-ID: Thanks Thomas, that did the trick. Cheers, Michael 2011/9/1 thomas bonfort : > You should also set the style size which is the spacing between hatches. It > should be larger than the style width. > Thomas > > Le 1 sept. 2011 17:11, "Michael Schulz" a > ?crit?: >> Hi, >> >> I just tried to create a hatch type symbol only thru python mapscript, >> but failed. Could someone have a quick look and discover what I might >> be missing? >> >> ... >> hatch = mapscript.symbolObj("hatch") >> hatch.type = mapscript.MS_SYMBOL_HATCH >> sindex = m.symbolset.appendSymbol(hatch) >> stylePoly.symbol = sindex >> stylePoly.width = 5 >> stylePoly.angle = 45 >> stylePoly.outlinecolor.setRGB(255,0,0) >> stylePoly.color.setRGB(0,255,0) >> lp.opacity = 50 >> ... >> >> The layer is drawn with a complete fill at 50% opacity in green, but >> no hatching. >> >> Thanks, Michael >> >> -- >> ----------------------------------------------------------- >> Michael Schulz >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- ----------------------------------------------------------- Michael Schulz Christoph-Mang-Str. 5 D-79100 Freiburg From cheung.jackey at gmail.com Fri Sep 2 03:11:48 2011 From: cheung.jackey at gmail.com (Jackey Cheung) Date: Fri, 2 Sep 2011 18:11:48 +0800 Subject: [mapserver-users] How does SYMBOLSCALEDENOM work on FONTs? Message-ID: I've met a problem while playing around with SYMBOLSCALEDENOM. In attached images, the string on the top without halo is drawn as fixed size 10px in arial. The lower string was drawn with scaling on in verdana. However, as you can see, the scaling seems quite awkward. It doesn't seem to change from 1:10M ~ 1:1M, and suddenly grown to full size on 500K. Did I make something wrong? LAYER ? NAME ? ? ? ? ? ? ?"state" ? STATUS ? ? ? ? ? ?default ? TYPE ? ? ? ? ? ? ?polygon ? #MINSCALEDENOM ? ? 10000 ? MAXSCALEDENOM ? ? 50000000 ? SYMBOLSCALEDENOM ?500000 ? CONNECTIONTYPE ? ?postgis ? CONNECTION ? ? ? ?....... ? PROCESSING ? ? ? ?"CLOSE_CONNECTION=DEFER" ? DATA ? ? ? ? ? ? ?"geom FROM view_render_locality USING UNIQUE oid USING SRID=4326" ? LABELITEM ? ? ? ? "sname" ? CLASS ? ? NAME ? ? ? ? ? ?"State/Province" ? ? LABEL ? ? ? ENCODING ? ? ?"UTF-8" ? ? ? COLOR ? ? ? ? 0 0 0 ? ? ? OUTLINECOLOR ?255 255 255 ? ? ? TYPE ? ? ? ? ?truetype ? ? ? FONT ? ? ? ? ?"verdana" ? ? ? SIZE ? ? ? ? ?16 ? ? ? POSITION ? ? ?auto ? ? ? PARTIALS ? ? ?false ? ? ? MINSIZE ? ? ? 8 ? ? ? MAXSIZE ? ? ? 16 ? ? END ? END END -------------- next part -------------- A non-text attachment was scrubbed... Name: 1M.png Type: image/png Size: 5099 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2M.png Type: image/png Size: 2295 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 10M.png Type: image/png Size: 2467 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 500K.png Type: image/png Size: 5117 bytes Desc: not available URL: From Jukka.Rahkonen at mmmtike.fi Fri Sep 2 04:24:59 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 2 Sep 2011 11:24:59 +0000 Subject: [mapserver-users] Re: Mapserver unnecessary slow with Spatialite In-Reply-To: <201108302228.22815.even.rouault@mines-paris.org> References: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301EBBD@suutari.haapa.mmm.fi> <201108302228.22815.even.rouault@mines-paris.org> Message-ID: <84446DEF76453C439E9E97E438E13A6301F606@suutari.haapa.mmm.fi> > -----Alkuper?inen viesti----- > L?hett?j?: Even Rouault [mailto:even.rouault at mines-paris.org] > L?hetetty: 30. elokuuta 2011 23:28 > Vastaanottaja: mapserver-users at lists.osgeo.org > Kopio: Rahkonen Jukka > Aihe: Re: [mapserver-users] Re: Mapserver unnecessary slow > with Spatialite > > Le mardi 30 ao?t 2011 11:07:57, Rahkonen Jukka a ?crit : > > Hi, > > > > Even Rouault made a fix yesterday into the ogr sqlite > driver. It gave 11 > > times more speed when doing small BBOX selections from a > smallish table > > with 90000 linestrings. These queries are very typical for > Mapserver and > > thus when the gdal version behind Mapserver is updated > people should see > > much more speedy Spatialite rendering. It was also > interesting that with > > the same sample data selecting from Spatialite was 3 times > faster than > > from PostGIS. However, there is probably still one problem. > Even wrote: > > > > " However, there is no gain to expect from the above > change for a request > > such as : ogrinfo OSM_Finland.sqlite -sql "select geometry, osm_id > > ,highway,ref, name, tunnel from osm_line where highway is not null" > > -spat 389116 6677305 389579 6677661 > > > > Indeed, when you specify -sql, the driver (and to my > knowlegde, this is > > true for all other OGR drivers) makes no attempt to merge > the spatial > > filter, so the spatial filter is evaluated on OGR side, > which will be > > rather slow. So, you have 2 possibilities, either use the > "-where highway > > is not null" on a layer so that OGR can merge the attribute > and spatial > > filters, or incorporate at hand the spatial filter inside > the SQL query > > specified with -sql. " > > > > It is very common and handy to define the DATA in Mapserver > mapfile with > > SQL like the one used in the example. If this is going to > lead to slow > > Mapserver-OGR-Spatialite queries also in the future, could > it be possible > > to add some kind of Mapserver processing option that would > force the use > > of Spatialite spatial index table? It might behave so that > if user adds a > > directive PROCESSING "USE_ SPATIALITE_SPATIAL_INDEX=YES" > then Mapserver > > would construct SQL by adding the AND ROWID IN stuff as > described in the > > GDAL ticket http://trac.osgeo.org/gdal/ticket/4212. xmax, > xmin, ymax and > > ymin would be captured from the WMS BBOX. > > I'm not sure how this could be improved in mapserver, but I'm > thinking of an > easier solution that will require no code change. Why not using > sqlite/spatialite views to capture your request ? This way > the view will be > seen as a regular layer by OGR, and if you specify it as the > data in the file, > the spatial filter will be applied to it. > > I've just added support for spatialite views in GDAL trunk > (r23011). Spatial > index of the base table is used to speed up spatial queries > on the view. > > On your example, to create the spatial view : > > ogrinfo berlin.sqlite -sql "create view > osm_line_highway_not_null as select > OGC_FID AS ROWID, GEOMETRY, osm_id ,highway,ref,name, tunnel > from osm_line > where highway is not null" > > ogrinfo berlin.sqlite -sql "INSERT INTO > views_geometry_columns (view_name, > view_geometry, view_rowid, f_table_name, f_geometry_column) VALUES > ('osm_line_highway_not_null', 'GEOMETRY', 'ROWID', > 'osm_line', 'GEOMETRY')" > > Note: you must call the primary key ROWID if you want QGIS to > be able to > display the view on the map. I'm not sure why this is > necessary (the OGR > driver works with other names), may be a limitation of the > qgis spatialite > driver. > > And then you can use osm_line_highway_not_null as a regular > layer for > mapserver. > Alessandro was not totally happy with ogr and your solution. I have noticed that a well working and obviously valid Spatialite databases can be built in two or three steps: 1. Initial import with ogr2ogr 2. Tranform from the database created by ogr2ogr into a new with OpenLite utility http://www.gaia-gis.it/OpenLite/index.html 3. Create views if they are needed with Spatialite-GUI utility OpenLite should be able to convert directly from PostGIS but it has some bugs itself and therefore I had to use ogr2ogr instead. This is what Alessandro wrote: " #1) test DB: Berlin.sqlite (created by ogr2ogr) #2) you already have successfully create a VIEW: CREATE VIEW osm_line_highway_not_null AS SELECT OGC_FID AS ROWID, GEOMETRY, osm_id ,highway, ref,name, tunnel FROM osm_line WHERE highway IS NOT NULL; please note: this is (partially) invalid. when you create some VIEW it's *always* a good practice to explicitly assign an alias-name to each column: CREATE VIEW osm_line_highway_not_null AS SELECT OGC_FID AS ROWID, GEOMETRY AS GEOMETRY, osm_id AS osm_id, highway AS highway, ref AS ref, name AS name, tunnel AS tunnel FROM osm_line WHERE highway IS NOT NULL; more or less the same, a little bit more pedantic: but this simple extra-care will save you some big headaches afterwards (e.g. using the VIEW on QGIS). #3) registering the VIEW on "views_geometry_columns": INSERT INTO views_geometry_columns (view_name, view_geometry, view_rowid, f_table_name, f_geometry_column) VALUES ('osm_line_highway_not_null', 'GEOMETRY', 'ROWID', 'osm_line', 'GEOMETRY'); *** FAILURE *** "SQLite SQL error: foreign key mismatch" attempting to execute yet another time the same identical statement, this time using ogr2ogr, the INSERT will be a successful one. Really puzzling, isn't ? POST MORTEM: ===================== ogr2ogr have created a *broken* "geometry_columns" table: there isn't any Primary Key defined at all :-( this obviously happens because ogr2ogr doesn't invokes (as required) InitSpatialMetadata() in order to correctly initialize the DB: ogr2ogr directly invokes a generic "CREATE TABLE ..." statement of its own: but following this hazardous approach the metadata tables are incorrectly defined. why we'll get a "foreign key mismatch" ? really simple to explain: lacking the corresponding Primary Key, the Foreign Key constraint will inexorably fail on any case. why ogr2ogr will succeed instead ? this too is quite simple to explain: in order to make Primary/Foreign Key constraints effective, an appropriate directive is required to be executed: PRAGMA foreign_keys = 1; obviously ogr2ogr omits to perform this step, thus posing the whole DB referential integrity at serious risk. conclusion: using the current implementation of ogr2ogr in order to create any SpatiaLite DB is a really hazardous option. I've already prepared several patches for OGR: and I hope to be able to release all them ASAP. bye Sandro " -Jukka Rahkonen- From mapcollect at gmx.net Fri Sep 2 04:50:43 2011 From: mapcollect at gmx.net (kaipi) Date: Fri, 2 Sep 2011 04:50:43 -0700 (PDT) Subject: [mapserver-users] Filter Point features from PostGIS Layer Message-ID: <1314964243418-6753585.post@n2.nabble.com> I have a PostGIS database with polygon, line and point features. I want to make a Mapserver layer, that only displays the point features. AFAIK without such filtering Mapserver would render in a Point-Type-Layer also the polygon features as points. How would a FILTER or EXPRESSION look like to tell Mapserver to only query for point features ? Thanks, Harry -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Filter-Point-features-from-PostGIS-Layer-tp6753585p6753585.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jcigar at ulb.ac.be Fri Sep 2 05:02:21 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Fri, 02 Sep 2011 14:02:21 +0200 Subject: [mapserver-users] Filter Point features from PostGIS Layer In-Reply-To: <1314964243418-6753585.post@n2.nabble.com> References: <1314964243418-6753585.post@n2.nabble.com> Message-ID: <4E60C5CD.1060709@ulb.ac.be> couldn't you use WHERE ST_GeometryType(col) = "ST_Point" ? On 09/02/2011 13:50, kaipi wrote: > I have a PostGIS database with polygon, line and point features. I want to > make a Mapserver layer, that only displays the point features. AFAIK without > such filtering Mapserver would render in a Point-Type-Layer also the polygon > features as points. > How would a FILTER or EXPRESSION look like to tell Mapserver to only query > for point features ? > > Thanks, > > Harry > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Filter-Point-features-from-PostGIS-Layer-tp6753585p6753585.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From mapcollect at gmx.net Fri Sep 2 05:06:10 2011 From: mapcollect at gmx.net (kaipi) Date: Fri, 2 Sep 2011 05:06:10 -0700 (PDT) Subject: [mapserver-users] Re: Import of KML In-Reply-To: <1314808073465-6747216.post@n2.nabble.com> References: <1314808073465-6747216.post@n2.nabble.com> Message-ID: <1314965170889-6753628.post@n2.nabble.com> You can do that with EXPRESSION and ANGLE. I am not sure if this works with KML - maybe you need to convert to shapefile before (eg. with ogr2ogr). LAYER NAME WINDS EXTENT -180 -90 180 90 TYPE POINT CONNECTIONTYPE ogr CONNECTION "C:/MapData/maps/KML/wind1.kml" DATA "wind1" CLASS EXPRESSION ([ATTRIBUTE_FIELD] = 'windstyle') # only points with attribute 'windstyle' will be rendered NAME "windstyle" STYLE COLOR 32 32 128 SYMBOL "circle" ANGLE [ROTATION] # if your points have an attribute field "ROTATION" with an angle given in degrees the value will be used to rotate the symbol SIZE 6 END END END -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Import-of-KML-tp6747216p6753628.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jcigar at ulb.ac.be Fri Sep 2 05:15:46 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Fri, 02 Sep 2011 14:15:46 +0200 Subject: [mapserver-users] Filter Point features from PostGIS Layer In-Reply-To: <4E60C5CD.1060709@ulb.ac.be> References: <1314964243418-6753585.post@n2.nabble.com> <4E60C5CD.1060709@ulb.ac.be> Message-ID: <4E60C8F2.7050402@ulb.ac.be> On 09/02/2011 14:02, Julien Cigar wrote: > couldn't you use WHERE ST_GeometryType(col) = "ST_Point" ? also note that to avoid a seqscan you should create an appropriate index: CREATE INDEX your_index ON your_table(ST_GeometryType(geom)) WHERE ST_GeometryType(geom) = 'ST_Point'; > > On 09/02/2011 13:50, kaipi wrote: >> I have a PostGIS database with polygon, line and point features. I >> want to >> make a Mapserver layer, that only displays the point features. AFAIK >> without >> such filtering Mapserver would render in a Point-Type-Layer also the >> polygon >> features as points. >> How would a FILTER or EXPRESSION look like to tell Mapserver to only >> query >> for point features ? >> >> Thanks, >> >> Harry >> >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/Filter-Point-features-from-PostGIS-Layer-tp6753585p6753585.html >> >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From xander at mitre.org Fri Sep 2 05:26:16 2011 From: xander at mitre.org (xander) Date: Fri, 2 Sep 2011 05:26:16 -0700 (PDT) Subject: [mapserver-users] RE: Import of KML In-Reply-To: <1314965170889-6753628.post@n2.nabble.com> References: <1314808073465-6747216.post@n2.nabble.com> <1314965170889-6753628.post@n2.nabble.com> Message-ID: Kaipi, Thanks - that's really helpful. The use of EXPRESSION([ATTRIBUTE_FIELD]] = '...') and ANGLE[ROTATION] will solve half of my problem. It looks like the other half is a GDAL/OGR issue, not Mapserver. The KML "" element of a point appears to be ignored by ogr (and by ogr2ogr). I tried several output formats (including shapefile) and it just isn't there. Ideally I would be able to select the rotation angle from this part of a Placemark: ... 190.... Xander -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Import-of-KML-tp6747216p6753696.html Sent from the Mapserver - User mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mapcollect at gmx.net Fri Sep 2 06:17:32 2011 From: mapcollect at gmx.net (kaipi) Date: Fri, 2 Sep 2011 06:17:32 -0700 (PDT) Subject: [mapserver-users] Re: Filter Point features from PostGIS Layer In-Reply-To: <4E60C8F2.7050402@ulb.ac.be> References: <1314964243418-6753585.post@n2.nabble.com> <4E60C5CD.1060709@ulb.ac.be> <4E60C8F2.7050402@ulb.ac.be> Message-ID: <1314969452502-6753830.post@n2.nabble.com> Thanks Julien, FILTER "ST_GeometryType(wkb_geometry) = 'ST_Point'" seems to do the job !! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Filter-Point-features-from-PostGIS-Layer-tp6753585p6753830.html Sent from the Mapserver - User mailing list archive at Nabble.com. From webturtles at gmail.com Fri Sep 2 07:13:12 2011 From: webturtles at gmail.com (Chris Jackson) Date: Fri, 2 Sep 2011 15:13:12 +0100 Subject: [mapserver-users] IIS and mapfiles and also GDAL Message-ID: Hi I just wanted to check if the only way to parse a mapfile in an IIS environment to use an absolute path to the mapfiles e.g. http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\workshop\itasca.map. I wonder if anyone has had success with rewrite rules (IIS7)? Also how is GDAL triggered when calling the mapfile (in IIS). The scenario is I am trying to use an xml in the mapfile layer which then calls http://tile.openstreetmap.org/ The XML is http://tile.openstreetmap.org/${z}/${x}/${y}.png -20037508.34 20037508.34 20037508.34 -20037508.34 19 1 1 top EPSG:900913 256 256 3 Am I remotely doing this the right way? I am used to calling local data from the mapfile and tiled services is a bit of a new beast, so I thought I would give it a go! Many thanks in advance Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Fri Sep 2 08:04:49 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Fri, 02 Sep 2011 09:04:49 -0600 Subject: [mapserver-users] IIS and mapfiles and also GDAL In-Reply-To: References: Message-ID: <4E60F091.30101@geoanalytic.com> Chris, I've used the Iconic Rewriter with older versions of IIS (the native rewriting capability in IIS7 looks interesting). You may be able to use an environment variable to set the default map file, but this may not be very useful if you have multiple map files. There are a few other options for hiding the mapfile (proxy script, redirect, form post instead of get, etc), put I think the rewrite method is the most effective (the client never gets the map file path), with almost no performance hit. The way I access Mapnik tiles in mapserver is to create a layer in the map file: LAYER DATA "frmt_wms_openstreetmap_MAPNIK.xml" NAME "Mapnik" PROJECTION "proj=merc" "a=6378137" "b=6378137" "lat_ts=0.0" "lon_0=0.0" "x_0=0.0" "y_0=0" "k=1.0" "units=m" "nadgrids=@null" "no_defs" END STATUS ON TYPE RASTER PROCESSING "OVERSAMPLE_RATIO=1" PROCESSING "LOAD_FULL_RES_IMAGE=NO" UNITS METERS END # LAYER and frmt_wms_openstreetmap_MAPNIK.xml XML file of http://tile.openstreetmap.org/${z}/${x}/${y}.png -20037508.34 20037508.34 20037508.34 -20037508.34 19 1 1 top EPSG:900913 256 256 3 Best Regards, Brent Fraser On 9/2/2011 8:13 AM, Chris Jackson wrote: > Hi > > I just wanted to check if the only way to parse a mapfile in an IIS > environment to use an absolute path to the mapfiles e.g. > http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\workshop\itasca.map. > I wonder if anyone has had success with rewrite rules (IIS7)? > > Also how is GDAL triggered when calling the mapfile (in IIS). The > scenario is I am trying to use an xml in the mapfile layer which then > calls http://tile.openstreetmap.org/ > > The XML is > > > > http://tile.openstreetmap.org/${z}/${x}/${y}.png > > > > -20037508.34 > 20037508.34 > 20037508.34 > -20037508.34 > 19 > 1 > 1 > top > > EPSG:900913 > 256 > 256 > 3 > > > > Am I remotely doing this the right way? I am used to calling local > data from the mapfile and tiled services is a bit of a new beast, so I > thought I would give it a go! > > Many thanks in advance > > Chris > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From webturtles at gmail.com Fri Sep 2 08:16:12 2011 From: webturtles at gmail.com (Chris Jackson) Date: Fri, 2 Sep 2011 16:16:12 +0100 Subject: [mapserver-users] IIS and mapfiles and also GDAL In-Reply-To: <4E60F091.30101@geoanalytic.com> References: <4E60F091.30101@geoanalytic.com> Message-ID: Hi Brent Thanks for the quick answers, the new rewriting rules (with reverse proxy) have worked well with Tomcat on port 8080 - no more isapi dlls! What you listed for Mapnik is essentially like mine, what I am not sure is what other GDAL configuration is needed on the box - just an environment variable or some other setting in the mapfile...? Thanks Chris On 2 September 2011 16:04, Brent Fraser wrote: > Chris, > > I've used the Iconic Rewriter with older versions of IIS (the native > rewriting capability in IIS7 looks interesting). You may be able to use an > environment variable to set the default map file, but this may not be very > useful if you have multiple map files. There are a few other options for > hiding the mapfile (proxy script, redirect, form post instead of get, etc), > put I think the rewrite method is the most effective (the client never gets > the map file path), with almost no performance hit. > > The way I access Mapnik tiles in mapserver is to create a layer in the > map file: > > LAYER > DATA "frmt_wms_openstreetmap_MAPNIK.xml" > NAME "Mapnik" > PROJECTION > "proj=merc" "a=6378137" "b=6378137" "lat_ts=0.0" "lon_0=0.0" > "x_0=0.0" "y_0=0" "k=1.0" "units=m" "nadgrids=@null" "no_defs" > END > STATUS ON > TYPE RASTER > PROCESSING "OVERSAMPLE_RATIO=1" > PROCESSING "LOAD_FULL_RES_IMAGE=NO" > UNITS METERS > END # LAYER > > and frmt_wms_openstreetmap_MAPNIK.xml XML file of > > > > http://tile.openstreetmap.org/$ > {z}/${x}/${y}.png > > > -20037508.34 > 20037508.34 > 20037508.34 > -20037508.34 > 19 > 1 > 1 > top > > EPSG:900913 > 256 > 256 > 3 > > > > > Best Regards, > Brent Fraser > > > On 9/2/2011 8:13 AM, Chris Jackson wrote: > > Hi > > I just wanted to check if the only way to parse a mapfile in an IIS > environment to use an absolute path to the mapfiles e.g. > http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\workshop\itasca.map. > I wonder if anyone has had success with rewrite rules (IIS7)? > > Also how is GDAL triggered when calling the mapfile (in IIS). The scenario > is I am trying to use an xml in the mapfile layer which then calls > http://tile.openstreetmap.org/ > > The XML is > > > > http://tile.openstreetmap.org/${z}/${x}/${y}.png > > > -20037508.34 > 20037508.34 > 20037508.34 > -20037508.34 > 19 > 1 > 1 > top > > EPSG:900913 > 256 > 256 > 3 > > > > Am I remotely doing this the right way? I am used to calling local data > from the mapfile and tiled services is a bit of a new beast, so I thought I > would give it a go! > > Many thanks in advance > > Chris > > > _______________________________________________ > mapserver-users mailing listmapserver-users at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/mapserver-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Fri Sep 2 08:28:01 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Fri, 02 Sep 2011 09:28:01 -0600 Subject: [mapserver-users] IIS and mapfiles and also GDAL In-Reply-To: References: <4E60F091.30101@geoanalytic.com> Message-ID: <4E60F601.4090301@geoanalytic.com> Chris, If you have a current version of Mapserver (v5,v6?), then should be GDAL compiled in. The GDAL library needs to find projection definition files so I usually include the following in all my map files: CONFIG "PROJ_LIB" "\ms4w\proj\nad" CONFIG "GDAL_DATA" "\ms4w\gdaldata" Another potential problem you may be having is with EPSG:900913. It is not included in GDAL/PROJ's epsg file so I add the following to \ms4w\proj\nad\epsg: <900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <> Best Regards, Brent Fraser On 9/2/2011 9:16 AM, Chris Jackson wrote: > Hi Brent > > Thanks for the quick answers, the new rewriting rules (with reverse > proxy) have worked well with Tomcat on port 8080 - no more isapi > dlls! What you listed for Mapnik is essentially like mine, what I am > not sure is what other GDAL configuration is needed on the box - just > an environment variable or some other setting in the mapfile...? > > Thanks > > Chris > > On 2 September 2011 16:04, Brent Fraser > wrote: > > Chris, > > I've used the Iconic Rewriter with older versions of IIS (the > native rewriting capability in IIS7 looks interesting). You may > be able to use an environment variable to set the default map > file, but this may not be very useful if you have multiple map > files. There are a few other options for hiding the mapfile > (proxy script, redirect, form post instead of get, etc), put I > think the rewrite method is the most effective (the client never > gets the map file path), with almost no performance hit. > > The way I access Mapnik tiles in mapserver is to create a layer > in the map file: > > LAYER > DATA "frmt_wms_openstreetmap_MAPNIK.xml" > NAME "Mapnik" > PROJECTION > "proj=merc" "a=6378137" "b=6378137" "lat_ts=0.0" "lon_0=0.0" > "x_0=0.0" "y_0=0" "k=1.0" "units=m" "nadgrids=@null" "no_defs" > END > STATUS ON > TYPE RASTER > PROCESSING "OVERSAMPLE_RATIO=1" > PROCESSING "LOAD_FULL_RES_IMAGE=NO" > UNITS METERS > END # LAYER > > and frmt_wms_openstreetmap_MAPNIK.xml XML file of > > > > http://tile.openstreetmap.org/${z}/${x}/${y}.png > > > -20037508.34 > 20037508.34 > 20037508.34 > -20037508.34 > 19 > 1 > 1 > top > > EPSG:900913 > 256 > 256 > 3 > > > > > Best Regards, > Brent Fraser > > > On 9/2/2011 8:13 AM, Chris Jackson wrote: >> Hi >> >> I just wanted to check if the only way to parse a mapfile in an >> IIS environment to use an absolute path to the mapfiles e.g. >> http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\workshop\itasca.map. >> I wonder if anyone has had success with rewrite rules (IIS7)? >> >> Also how is GDAL triggered when calling the mapfile (in IIS). >> The scenario is I am trying to use an xml in the mapfile layer >> which then calls http://tile.openstreetmap.org/ >> >> The XML is >> >> >> >> http://tile.openstreetmap.org/${z}/${x}/${y}.png >> >> >> >> -20037508.34 >> 20037508.34 >> 20037508.34 >> -20037508.34 >> 19 >> 1 >> 1 >> top >> >> EPSG:900913 >> 256 >> 256 >> 3 >> >> >> >> Am I remotely doing this the right way? I am used to calling >> local data from the mapfile and tiled services is a bit of a new >> beast, so I thought I would give it a go! >> >> Many thanks in advance >> >> Chris >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From francesco.dalesio at r3-gis.com Fri Sep 2 08:49:52 2011 From: francesco.dalesio at r3-gis.com (Francesco D'Alesio) Date: Fri, 02 Sep 2011 17:49:52 +0200 Subject: [mapserver-users] Problem with mapfile FILTER and WFS non spatial filter Message-ID: <4E60FB20.9020900@r3-gis.com> Hello, I have a problem using a WFS filter on a non spatial attribute: when I use a WFS filter on a non-spatial attribute, it ignores the filter set in mapfile. This is the mapfile filter. FILTER "lang_id='de'" This is the WFS filter. attribute_1test In this case, it ignores lang_id='de'. Using this other filter, the_geom723607.84958682 5175592.8275148723614.37390473 5175597.3352253 it uses, correctly, both the mapfile filter and the BBOX WFS filter. If I use both BBOX and attribute, it ignores the mapfile filter. Other (maybe) useful information: MapServer 5.6.7 and MapServer 5.6.5 CONNECTIONTYPE POSTGIS Tried both WFS version 1.1.0 and 1.0.0 Tried gml/wfs_in/exclude_items for lang_id Anyone noticed this behaviour before? Thank you Best Regards, Francesco francesco.dalesio at r3-gis.com -- From even.rouault at mines-paris.org Fri Sep 2 10:39:25 2011 From: even.rouault at mines-paris.org (Even Rouault) Date: Fri, 2 Sep 2011 19:39:25 +0200 Subject: [mapserver-users] Re: Mapserver unnecessary slow with Spatialite In-Reply-To: <84446DEF76453C439E9E97E438E13A6301F606@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> <201108302228.22815.even.rouault@mines-paris.org> <84446DEF76453C439E9E97E438E13A6301F606@suutari.haapa.mmm.fi> Message-ID: <201109021939.25134.even.rouault@mines-paris.org> > conclusion: using the current implementation of > ogr2ogr in order to create any SpatiaLite DB > is a really hazardous option. > I've already prepared several patches for OGR: > and I hope to be able to release all them ASAP. yeah, I'm aware (actually Sandro let me know some time ago) that there are issues in the way the spatialite DB is built by the OGR driver. I'd be happy to integrate his patches when he'll have some time to submit them. > -Jukka Rahkonen- From punk.kish at gmail.com Sat Sep 3 16:48:03 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 3 Sep 2011 18:48:03 -0500 Subject: [mapserver-users] questions re. MapScript Message-ID: for you MapScript mavens -- A few things have me puzzled about MapScript. I have the following code, and it works -- my $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$dbhost;port=$dbport", $dbuser, $dbpswd); my $msh = "host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpswd"; my $map = new mapscript::mapObj(); my $classOutline = new mapscript::colorObj; $classOutline->setHex('#444444'); ######### Layer One my $layer_one = new mapscript::layerObj($map); $layer_one->{name} = 'Layer One'; $layer_one->{status} = $mapscript::MS_ON; $layer_one->{type} = $mapscript::MS_LAYER_POLYGON; $layer_one->setConnectionType($mapscript::MS_POSTGIS, ''); $layer_one->{connection} = $msh; $layer_one->{data} = 'the_geom FROM (SELECT gid, class_name, the_geom FROM table1) foo USING UNIQUE gid'; $layer_one->setFilter('gid NOT IN (.. bunch of gids ..)'); $layer_one->{classitem} = 'class_name'; my $sth = $dbh->prepare("SELECT class_name, class_color FROM color_table"); $sth->execute; while (my ($class_name, $class_color) = $sth->fetchrow_array) { my $classObj = new mapscript::classObj( $layer_one ); $classObj->{name} = $class_name; $classObj->setExpression( $class_name ); my $styleObj = new mapscript::styleObj($classObj); my $classFill = new mapscript::colorObj; $classFill->setHex($class_color); $styleObj->{color} = $classFill; $styleObj->{outlinecolor} = $classOutline; } Question 0: Is there are more efficient way to accomplish the above? Question 1: I am assuming there is no way I can reuse the same db handle above, once for MapServer, and the other time to make my own queries. Neverthless, I would like to confirm. Question 2: I tried to add a WHERE clause in the "data" value, but that caused error. I am assuming that is not allowed, but I would like to confirm. Now, here is a really puzzling thing. If I add another layer, exactly after the above pattern, for example, see the code below, MapServer crashes with the message "prepareImage() error: Can't call method 'save on an undefined value." Seems like there is an error somewhere, and $map gets all messsed up. ######### Layer Two my $layer_two = new mapscript::layerObj($map); $layer_two->{name} = 'Layer Two'; $layer_two->{status} = $mapscript::MS_ON; $layer_two->{type} = $mapscript::MS_LAYER_POLYGON; $layer_two->setConnectionType($mapscript::MS_POSTGIS, ''); $layer_two->{connection} = $msh; $layer_two->{data} = 'the_geom FROM (SELECT gid, class_id, the_geom FROM table2) bar USING UNIQUE gid'; $layer_two->{classitem} = 'class_id'; $sth = $dbh->prepare("SELECT class_id, class_color FROM another_color_table"); $sth->execute; while (my ($class_id, $class_color) = $sth->fetchrow_array) { my $classObj = new mapscript::classObj( $layer_two ); $classObj->{name} = $class_name; $classObj->setExpression( $class_name ); my $styleObj = new mapscript::styleObj($classObj); my $classFill = new mapscript::colorObj; $classFill->setHex($class_color); $styleObj->{color} = $classFill; $styleObj->{outlinecolor} = $classOutline; } How do I get MapServer to write out detailed error messages? There seems to be an `errorObj` that allows inspection of the MapServer error stack. "Only needed for the Perl module as the other language modules expose the error stack through exceptions." Alright, but there is no constructor for this object. How do I use this? -- Puneet Kishor From punk.kish at gmail.com Sat Sep 3 17:18:18 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 3 Sep 2011 19:18:18 -0500 Subject: [mapserver-users] why doesn't a view work in the data string? Message-ID: Another oddity about MapScript. I have the PostGIS functions and definitions installed in the public schema of my db. I have moved the data tables to different schema to keep things tidy. I modified the search_path like so ALTER DATABASE mydb SET search_path = public, data1, data2; The following works fine, which is strange because I would expect it to require the schema prefix (in spite of having modified the search_path, I require the prefix in other clients, such as pgAdmin3) -- $layer_one->{data} = 'the_geom FROM (SELECT gid, class_name, class_color, the_geom FROM table) a_view USING UNIQUE gid'; $layer_one->setFilter('gid NOT IN ( .. a bunch of gids .. )'); Yet, if I make a view with the above logic like so CREATE VIEW data1.a_view AS SELECT gid, class_name, class_color, the_geom FROM data1.table WHERE gid NOT IN ( .. a bunch of gids .. ); and use that to access the data with the following code, I get a crash "prepareImage() error: Can't call method 'save' on an undefined value" $layer_one->{data} = 'the_geom FROM a_view USING UNIQUE did'; -- Puneet Kishor From punk.kish at gmail.com Sat Sep 3 17:21:40 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 3 Sep 2011 19:21:40 -0500 Subject: [mapserver-users] questions re. MapScript In-Reply-To: References: Message-ID: <2B7CD2AD-11A5-4E7A-82CF-FC90A7997887@gmail.com> Thanks Cristiano, for your replies. The most puzzling and show-stopping for me is that as soon as I add another layer, MapServer crashes. See the very end of my original post below. On Sep 3, 2011, at 7:12 PM, Cristiano Sumariva wrote: > Question 0: well I do not think it is too much overhead to set some > variables in memory for the mapserver objects. > But you can do all you need at the file with extension .map and only update > what you need in the programming language. > So you can call > new mapObject = mapscript::map( 'path/file.map' ); > // load all your parameters that not change ( or do not change often ) // > // update only the snippets you need // > // need to set up first layer data to a sql assembled at runtime // > // so only grab the reference to the layer you want set // > layer = mapObject->getLayer( index /* start on zero */ ) > // and update only that property // > layer->set( 'data', 'the_geom FROM ( SELECT att FROM table WHERE att OP > 'value' ) AS TableFromWhere USING UNIQUE att USING SRID ). > > You maybe doing something like a did in past. Creating all mapfile > configuration at application using forms and storing it inside database > schema. > That is not much hard to create an manager to do that. You need a couple of > tables on some schema/db and create some checks for mapserver enumerations. > The most benefits of this strategy is to have a system that will be error > free on mapfile syntax and have a very fast mapserver configuration for > users that want create > map collections from a shared pool of features. > > Question 2 is on the sample above. You need to wrap the where at a sub query > so mapserver can see it like a one entire new table. > > Question 1: I not much sure but I guess you can not share database > descriptors. If you having low speed due to database stuff you can try use a > persistent > connection for your script so you only open one for mapserver. I guess that > mapserver can also use a shared database connection for him but do not > remember a sample case for it. > > Hope you enjoying your map rendering engine. > > Most times low speed is due to databases not properly indexed. > > 2011/9/3 Mr. Puneet Kishor > >> for you MapScript mavens -- >> >> >> A few things have me puzzled about MapScript. I have the following code, >> and it works -- >> >> my $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$dbhost;port=$dbport", >> $dbuser, $dbpswd); >> my $msh = "host=$dbhost port=$dbport dbname=$dbname user=$dbuser >> password=$dbpswd"; >> >> my $map = new mapscript::mapObj(); >> >> my $classOutline = new mapscript::colorObj; >> $classOutline->setHex('#444444'); >> >> ######### Layer One >> my $layer_one = new mapscript::layerObj($map); >> $layer_one->{name} = 'Layer One'; >> $layer_one->{status} = $mapscript::MS_ON; >> $layer_one->{type} = $mapscript::MS_LAYER_POLYGON; >> $layer_one->setConnectionType($mapscript::MS_POSTGIS, ''); >> $layer_one->{connection} = $msh; >> $layer_one->{data} = 'the_geom FROM (SELECT gid, class_name, the_geom FROM >> table1) foo USING UNIQUE gid'; >> $layer_one->setFilter('gid NOT IN (.. bunch of gids ..)'); >> $layer_one->{classitem} = 'class_name'; >> >> my $sth = $dbh->prepare("SELECT class_name, class_color FROM color_table"); >> $sth->execute; >> while (my ($class_name, $class_color) = $sth->fetchrow_array) { >> my $classObj = new mapscript::classObj( $layer_one ); >> $classObj->{name} = $class_name; >> $classObj->setExpression( $class_name ); >> >> my $styleObj = new mapscript::styleObj($classObj); >> >> my $classFill = new mapscript::colorObj; >> $classFill->setHex($class_color); >> >> $styleObj->{color} = $classFill; >> $styleObj->{outlinecolor} = $classOutline; >> } >> >> Question 0: Is there are more efficient way to accomplish the above? >> >> Question 1: I am assuming there is no way I can reuse the same db handle >> above, >> once for MapServer, and the other time to make my own queries. Neverthless, >> I >> would like to confirm. >> >> Question 2: I tried to add a WHERE clause in the "data" value, but that >> caused >> error. I am assuming that is not allowed, but I would like to confirm. >> >> Now, here is a really puzzling thing. If I add another layer, exactly after >> the >> above pattern, for example, see the code below, MapServer crashes with the >> message "prepareImage() error: Can't call method 'save on an undefined >> value." >> Seems like there is an error somewhere, and $map gets all messsed up. >> >> ######### Layer Two >> my $layer_two = new mapscript::layerObj($map); >> $layer_two->{name} = 'Layer Two'; >> $layer_two->{status} = $mapscript::MS_ON; >> $layer_two->{type} = $mapscript::MS_LAYER_POLYGON; >> $layer_two->setConnectionType($mapscript::MS_POSTGIS, ''); >> $layer_two->{connection} = $msh; >> $layer_two->{data} = 'the_geom FROM (SELECT gid, class_id, the_geom FROM >> table2) bar USING UNIQUE gid'; >> $layer_two->{classitem} = 'class_id'; >> >> $sth = $dbh->prepare("SELECT class_id, class_color FROM >> another_color_table"); >> $sth->execute; >> while (my ($class_id, $class_color) = $sth->fetchrow_array) { >> my $classObj = new mapscript::classObj( $layer_two ); >> $classObj->{name} = $class_name; >> $classObj->setExpression( $class_name ); >> >> my $styleObj = new mapscript::styleObj($classObj); >> >> my $classFill = new mapscript::colorObj; >> $classFill->setHex($class_color); >> >> $styleObj->{color} = $classFill; >> $styleObj->{outlinecolor} = $classOutline; >> } >> >> >> How do I get MapServer to write out detailed error messages? >> >> There seems to be an `errorObj` that allows inspection of the MapServer >> error >> stack. "Only needed for the Perl module as the other language modules >> expose >> the error stack through exceptions." Alright, but there is no constructor >> for >> this object. How do I use this? >> >> >> -- >> Puneet Kishor _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> From punk.kish at gmail.com Sat Sep 3 19:19:12 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 3 Sep 2011 21:19:12 -0500 Subject: [mapserver-users] could MapServer be closing connection to Pg prematurely? Message-ID: I have the following code $layer_gmna->{name} = 'gmna'; $layer_gmna->{status} = $mapscript::MS_ON; $layer_gmna->{type} = $mapscript::MS_LAYER_POLYGON; $layer_gmna->{connection} = "host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpswd"; $layer_gmna->setConnectionType($mapscript::MS_POSTGIS, ''); $layer_gmna->{data} = 'the_geom FROM ..'; $layer_gmna->{classitem} = 'interval_name'; my $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$dbhost;port=$dbport", $dbuser, $dbpswd); >>> my $sth = $dbh->prepare("SELECT interval_name, color_hex FROM intervals_old"); $sth->execute or debug $sth->errstr; while (my ($interval_name, $color_hex) = $sth->fetchrow_array) { my $classObj = new mapscript::classObj( $layer_gmna ); $classObj->{name} = $interval_name; $classObj->setExpression( $interval_name ); my $styleObj = styleObj(classObj => $classObj, colorObj => colorObj('hex' => $color_hex)); } By the time I reach the line marked with '>>>', the db connection is closed. I get the following message: "DBD::Pg::st execute failed: server closed the connection unexpectedly. This probably means the server terminated abnormally before or while processing the request. at /Users/punkish/Documents/www/geomaps/lib/geomaps.pm line 1225." Maybe MapServer has nothing to do with it, but, is it possible that MapServer efficiently closes all DB connections after it has pulled in the data from the tables? If so, is there a way I can stop it from doing so? From punk.kish at gmail.com Sat Sep 3 19:42:54 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 3 Sep 2011 21:42:54 -0500 Subject: [mapserver-users] Re: could MapServer be closing connection to Pg prematurely? In-Reply-To: References: Message-ID: the following is solved by adding ` {InactiveDestroy => 1}` to the $dbh On Sep 3, 2011, at 9:19 PM, Mr. Puneet Kishor wrote: > I have the following code > > $layer_gmna->{name} = 'gmna'; > $layer_gmna->{status} = $mapscript::MS_ON; > $layer_gmna->{type} = $mapscript::MS_LAYER_POLYGON; > $layer_gmna->{connection} = "host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpswd"; > $layer_gmna->setConnectionType($mapscript::MS_POSTGIS, ''); > $layer_gmna->{data} = 'the_geom FROM ..'; > $layer_gmna->{classitem} = 'interval_name'; > > my $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$dbhost;port=$dbport", $dbuser, $dbpswd); >>>> my $sth = $dbh->prepare("SELECT interval_name, color_hex FROM intervals_old"); > $sth->execute or debug $sth->errstr; > while (my ($interval_name, $color_hex) = $sth->fetchrow_array) { > my $classObj = new mapscript::classObj( $layer_gmna ); > $classObj->{name} = $interval_name; > $classObj->setExpression( $interval_name ); > my $styleObj = styleObj(classObj => $classObj, colorObj => colorObj('hex' => $color_hex)); > } > > > By the time I reach the line marked with '>>>', the db connection is closed. I get the following message: "DBD::Pg::st execute failed: server closed the connection unexpectedly. This probably means the server terminated abnormally before or while processing the request. at /Users/punkish/Documents/www/geomaps/lib/geomaps.pm line 1225." > > Maybe MapServer has nothing to do with it, but, is it possible that MapServer efficiently closes all DB connections after it has pulled in the data from the tables? If so, is there a way I can stop it from doing so? From armin.burger at gmx.net Sun Sep 4 09:33:18 2011 From: armin.burger at gmx.net (Armin Burger) Date: Sun, 04 Sep 2011 18:33:18 +0200 Subject: [mapserver-users] Raster parameter PROCESSING "BANDS=..." and ECW files Message-ID: <4E63A84E.7060205@gmx.net> Hi all I noticed a strange behaviour of MapServer (5.6.7 and 6.0.1) when defining for a raster layer based on an ECW file a processing parameter for the bands order like PROCESSING "BANDS=3,2,1" The order of the bands does not have any effect. The image is always displayed in the original band order 1,2,3, whatever I define for the BANDS value. If I just define a single band, like "BANDS=3" or "BANDS=1" then it's displaying it correctly using the right band. This problem seems just to appear for ECW files, not e.g. for Tiff files. If I wrap a VRT image around the ECW and use this VRT in the DATA tag of the map file then the BANDS order is taken into account, just not when defining the DATA using the pure ECW file. Any ideas what's going wrong? Thanks for any hints Armin From warmerdam at pobox.com Sun Sep 4 10:07:56 2011 From: warmerdam at pobox.com (Frank Warmerdam) Date: Sun, 04 Sep 2011 10:07:56 -0700 Subject: [mapserver-users] Raster parameter PROCESSING "BANDS=..." and ECW files In-Reply-To: <4E63A84E.7060205@gmx.net> References: <4E63A84E.7060205@gmx.net> Message-ID: <4E63B06C.4020903@pobox.com> On 11-09-04 09:33 AM, Armin Burger wrote: > Hi all > > I noticed a strange behaviour of MapServer (5.6.7 and 6.0.1) when defining for > a raster layer based on an ECW file a processing parameter for the bands order > like > > PROCESSING "BANDS=3,2,1" > > The order of the bands does not have any effect. The image is always displayed > in the original band order 1,2,3, whatever I define for the BANDS value. If I > just define a single band, like > "BANDS=3" or "BANDS=1" > then it's displaying it correctly using the right band. > > This problem seems just to appear for ECW files, not e.g. for Tiff files. If I > wrap a VRT image around the ECW and use this VRT in the DATA tag of the map > file then the BANDS order is taken into account, just not when defining the > DATA using the pure ECW file. > > Any ideas what's going wrong? Armin, I suspect that the special interleaved read method in the GDAL ECW driver is not properly honouring the list of bands passed in to it. If this is the problem then it might not have come up with earlier mapserver versions that didn't do such reads in one interleaved request. If this is the issue then please test with GDAL "trunk" and if the problem persists file a ticket against GDAL. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/warmerda and watch the world go round - Rush | Geospatial Software Developer From michael.gajda at tu-dortmund.de Sun Sep 4 10:35:06 2011 From: michael.gajda at tu-dortmund.de (Michael G.) Date: Sun, 04 Sep 2011 19:35:06 +0200 Subject: [mapserver-users] Coloring vectordata by features/infos Message-ID: <4E63B6CA.8090908@tu-dortmund.de> Hello, I am rendering vectordata from a PostGIS database which works like a charm. My layer definition looks like this: LAYER NAME "vector" METADATA "wms_include_items" "all" "wms_title" "dortmund_basic" END TEMPLATE gfi.html TYPE POLYGON ## Should be inherited from MAP level, but is good practice to have here, too: ##(or not? <.<) #PROJECTION # "init=epsg:900913" #END DUMP true CONNECTIONTYPE postgis CONNECTION "host=x dbname=x user=x password=x port=5432" DATA "the_geom FROM x" CLASS STYLE COLOR 200 50 50 OUTLINECOLOR 60 60 60 #SYMBOL 0 ANTIALIAS true OPACITY 80 # in percent END END END Right now, I have not fully grasped how features/information is saved along with the vector data in the PostGIS database, but I am also not maintaining it. Supposingly we will have a float-value saved along with every vector. Can someone explain or give me hints, how I could map such a value which is saved along into a color? Like a brighter shade of red the higher the value is? Sincerely Michael Gajda From armin.burger at gmx.net Sun Sep 4 10:52:33 2011 From: armin.burger at gmx.net (Armin Burger) Date: Sun, 04 Sep 2011 19:52:33 +0200 Subject: [mapserver-users] Raster parameter PROCESSING "BANDS=..." and ECW files In-Reply-To: <4E63B06C.4020903@pobox.com> References: <4E63A84E.7060205@gmx.net> <4E63B06C.4020903@pobox.com> Message-ID: <4E63BAE1.8010308@gmx.net> On 04/09/2011 19:07, Frank Warmerdam wrote: > On 11-09-04 09:33 AM, Armin Burger wrote: >> Hi all >> >> I noticed a strange behaviour of MapServer (5.6.7 and 6.0.1) when >> defining for >> a raster layer based on an ECW file a processing parameter for the >> bands order >> like >> >> PROCESSING "BANDS=3,2,1" >> >> The order of the bands does not have any effect. The image is always >> displayed >> in the original band order 1,2,3, whatever I define for the BANDS >> value. If I >> just define a single band, like >> "BANDS=3" or "BANDS=1" >> then it's displaying it correctly using the right band. >> >> This problem seems just to appear for ECW files, not e.g. for Tiff >> files. If I >> wrap a VRT image around the ECW and use this VRT in the DATA tag of >> the map >> file then the BANDS order is taken into account, just not when >> defining the >> DATA using the pure ECW file. >> >> Any ideas what's going wrong? > > Armin, > > I suspect that the special interleaved read method in the GDAL ECW driver > is not properly honouring the list of bands passed in to it. If this is > the problem then it might not have come up with earlier mapserver versions > that didn't do such reads in one interleaved request. > > If this is the issue then please test with GDAL "trunk" and if the problem > persists file a ticket against GDAL. > > Best regards, Frank, thanks for the quick reply. I tested the same configuration using the GDAL trunk from today and the problem persists. I filed a ticket for it on GDAL Trac (#4234). Armin From jaja0506 at gmail.com Sun Sep 4 17:11:55 2011 From: jaja0506 at gmail.com (jjwang) Date: Sun, 4 Sep 2011 17:11:55 -0700 (PDT) Subject: [mapserver-users] Re: WMS getFeatureInfo & WFS getFeature In-Reply-To: <84446DEF76453C439E9E97E438E13A6301F4DA@suutari.haapa.mmm.fi> References: <1314927746041-6752411.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A6301F4DA@suutari.haapa.mmm.fi> Message-ID: <1315181515334-6759479.post@n2.nabble.com> Thank you for your reply. But I still don't know how to get extra information by using templates. Could you give me an example? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-getFeatureInfo-WFS-getFeature-tp6752411p6759479.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jaja0506 at gmail.com Sun Sep 4 19:10:38 2011 From: jaja0506 at gmail.com (jjwang) Date: Sun, 4 Sep 2011 19:10:38 -0700 (PDT) Subject: [mapserver-users] How can I set the output format of WFS getfeature request to text/html? Message-ID: <1315188638127-6759614.post@n2.nabble.com> The default output format is gml. How can I set the output format of WFS getfeature request to text/html? I tried to add "outputformat=text/html" to the query string. But I got an error message "msWFSGetFeature(): WFS server error. 'text/html' is not a permitted output format for layer 'nt', review wfs_formats setting." So I added *"wfs_formats" "text/html"* to the map file both map level and layer level. Still doesn't work. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-can-I-set-the-output-format-of-WFS-getfeature-request-to-text-html-tp6759614p6759614.html Sent from the Mapserver - User mailing list archive at Nabble.com. From qazi.iqbal at gmail.com Sun Sep 4 20:39:03 2011 From: qazi.iqbal at gmail.com (qazi iqbal) Date: Sun, 4 Sep 2011 23:39:03 -0400 Subject: [mapserver-users] google map Message-ID: Is it possible that we can use google maps as a base map (for personal use - not for commercial applications). If we can, I need a sample of map file which shows configuration of google map layer in the map file. Appreciate your input Thanks -- Qazi M. Iqbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal.sredl at gmail.com Sun Sep 4 23:33:37 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Mon, 5 Sep 2011 08:33:37 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: Hi Steve, may be you are right, because when I replace epsg:102067 with epsg:3035 it works fine Cheers, Michal 2011/8/29 Steve Lime : > Looking at the code the correct projection work is done. I wonder if > there's something funky projecting the globe (-180 -90 180 90) to > epsg:102067. > > Steve > > 2011/8/26 Steve Lime : >> Ok, definitely a bug here... Will take a look. Steve >> >> 2011/8/26 Michal ?r?dl : >>> Hi Steve, >>> >>> for epsg:4326 and url >>> >>> http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>> >>> it says >>> >>> msQueryByAttributes(): Search returned no results. No matching >>> record(s) found, layer and area of interest do not overlap. >>> >>> Cheers, >>> >>> Mike >>> >>> 2011/8/26 Steve Lime : >>>> You must have a default mapfile set in apache, that's cool. Use the second URL. >>>> >>>> Change qstring_validation to qstring_validation_pattern from my first >>>> message, my mistake. >>>> >>>> Steve >>>> >>>> 2011/8/26 Michal ?r?dl : >>>>> Hi Steve, >>>>> >>>>> regardless of the projection settings, I get the following result: >>>>> >>>>> For >>>>> >>>>> ?http://localhost//cgi-bin/ows?map=mapfile&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>>> >>>>> I see >>>>> >>>>> ?msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN >>>>> validation failed. msEvalRegex(): Regular expression error. String >>>>> failed expression test. >>>>> >>>>> And for >>>>> >>>>> ?http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>>> >>>>> I see >>>>> >>>>> ?mapserv(): Web application error. Parameter 'qstring' value fails to >>>>> validate. msValidateParameter(): Regular expression error. Parameter >>>>> pattern validation failed. >>>>> >>>>> Cheers, >>>>> >>>>> Michal >>>>> >>>>> >>>>> 2011/8/26 Steve Lime : >>>>>> I would agree this sounds like a bug. The map extent *should* be >>>>>> projected to the layer extent and that's what's used to identify >>>>>> candidate features. Can you check what happens with a native mapserver >>>>>> attribute query in this case? If possible try this: >>>>>> >>>>>> 1) set your MAP projection back to geographic, and restore your >>>>>> geographic map extent. >>>>>> 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' >>>>>> 3) go to the following URL: >>>>>> >>>>>> ?http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>>>> >>>>>> and see what happens. >>>>>> >>>>>> This will run a different query function msQueryByAttributes() that's >>>>>> not new to 6.0.x. >>>>>> >>>>>> Steve >>>>>> >>>>>> 2011/8/26 Michal ?r?dl : >>>>>>> Hi Jukka, >>>>>>> >>>>>>> the current settings returns expected result with &srsName=EPSG:4326 >>>>>>> as well. The original settings doesn't work neither with >>>>>>> &srsName=EPSG:4326 nor &srsName=EPSG::102067. >>>>>>> >>>>>>> Yes, it looks like there would be a problem in case of several WFS >>>>>>> layers with different projections of the source data. >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> 2011/8/26 Rahkonen Jukka : >>>>>>>> Hi, >>>>>>>> >>>>>>>> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >>>>>>>> >>>>>>>> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >>>>>>>> >>>>>>>> -Jukka Rahkonen. >>>>>>>> >>>>>>>> Michal ?r?dl wrote: >>>>>>>> >>>>>>>> >>>>>>>>> Hi all, >>>>>>>> >>>>>>>>> problem solved. I needed to set: >>>>>>>> >>>>>>>>> EXTENT -905000 -1230000 -400000 -900000 >>>>>>>> >>>>>>>> and >>>>>>>> >>>>>>>> PROJECTION >>>>>>>> ## ?"init=epsg:4326" >>>>>>>> ?"init=epsg:102067" >>>>>>>> END >>>>>>>> >>>>>>>> (Epsg 102067 is the projection of the layer being filtered.) >>>>>>>> >>>>>>>> Thank you very much again, >>>>>>>> >>>>>>>> Michal >>>>>>>> >>>>>>>> >>>>>>>> 2011/8/25 Michal ?r?dl : >>>>>>>>> Hi Steve, >>>>>>>>> >>>>>>>>> Thanks a lot. The extent should be large enough to encompass all the >>>>>>>>> features. Here comes the whole mapfile: >>>>>>>>> >>>>>>>>> MAP >>>>>>>>> NAME "MIS WFS Server" >>>>>>>>> STATUS ON >>>>>>>>> SIZE 500 500 >>>>>>>>> EXTENT -180 -90 180 90 >>>>>>>>> SHAPEPATH "data/" >>>>>>>>> IMAGECOLOR 255 255 255 >>>>>>>>> CONFIG MS_ERRORFILE "log/mapserv.log" >>>>>>>>> DEBUG 5 >>>>>>>>> >>>>>>>>> WEB >>>>>>>>> ?IMAGEPATH "/var/www/tmp/" >>>>>>>>> ?IMAGEURL "/tmp/" >>>>>>>>> ?METADATA >>>>>>>>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>>>>>>>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>>>>>>>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>>>>>>>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>>>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>>>> ? ?"ows_enable_request" "*" >>>>>>>>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>>>>>>>> ?END >>>>>>>>> END >>>>>>>>> >>>>>>>>> PROJECTION >>>>>>>>> ?"init=epsg:4326" >>>>>>>>> END >>>>>>>>> >>>>>>>>> LAYER >>>>>>>>> ?NAME "typ" >>>>>>>>> ?METADATA >>>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>>> ? ?"wfs_include_items" "all" >>>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>>> ? ?"gml_types" "auto" >>>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>>> ?END >>>>>>>>> ?DATA typ.shp >>>>>>>>> ?TYPE POLYGON >>>>>>>>> ?STATUS ON >>>>>>>>> ?PROJECTION >>>>>>>>> ? ?"init=epsg:102067" >>>>>>>>> ?END >>>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>>> ?CLASS >>>>>>>>> ? ?NAME "Typ" >>>>>>>>> ? ?STYLE >>>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>>> ? ?END >>>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>>> ?END >>>>>>>>> ?DEBUG 5 >>>>>>>>> END # Layer >>>>>>>>> >>>>>>>>> LAYER >>>>>>>>> ? ?NAME "hsrs" >>>>>>>>> ? ?TYPE RASTER >>>>>>>>> ? ?STATUS ON >>>>>>>>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>>>>>>>> ? ?DEBUG ON >>>>>>>>> ? ?CONNECTIONTYPE WMS >>>>>>>>> ? ?METADATA >>>>>>>>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>>>>>>>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>>>>>>>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>>>>>>>> ? ? ? ?"wms_server_version" ?"1.1.1" >>>>>>>>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>>>>>>>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>>>>>>>> ? ?END >>>>>>>>> END >>>>>>>>> >>>>>>>>> END # Map File >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> >>>>>>>>> Michal >>>>>>>>> >>>>>>>>> 2011/8/25 Steve Lime : >>>>>>>>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>>>>>>>> >>>>>>>>>> Sent from my iPad >>>>>>>>>> >>>>>>>>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>>>>>>>> >>>>>>>>>>> Hi all, >>>>>>>>>>> >>>>>>>>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>>>>>>>> thought I should get one. >>>>>>>>>>> >>>>>>>>>>> In my browser, I request >>>>>>>>>>> >>>>>>>>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>>>>>>>> >>>>>>>>>>> and get >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>>>>>>>> xmlns:gml="http://www.opengis.net/gml" >>>>>>>>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>>>>>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>>>>>>>> http://www.opengis.net/wfs >>>>>>>>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>>>>>>>> >>>>>>>>>>> missing >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> even though I do know, that features with ZVER=2 do exist. >>>>>>>>>>> >>>>>>>>>>> In the mapserver log file, I get >>>>>>>>>>> >>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>>>>>>>> no results. No matching record(s) found. >>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>>>>>>>> (msLoadMap not incl.): 0.002s >>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>>>>>>>> >>>>>>>>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>>>>>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>>>>>>>> simple template: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ?[lrn] >>>>>>>>>>> ?[ZVER] >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> but with no effect. >>>>>>>>>>> >>>>>>>>>>> In the mapfile, there is >>>>>>>>>>> >>>>>>>>>>> LAYER >>>>>>>>>>> ?NAME "typ" >>>>>>>>>>> ?METADATA >>>>>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>>>>> ? ?"gml_types" "auto" >>>>>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>>>>> ?END >>>>>>>>>>> ?DATA typ.shp >>>>>>>>>>> ?TYPE POLYGON >>>>>>>>>>> ?STATUS ON >>>>>>>>>>> ?PROJECTION >>>>>>>>>>> ? ?"init=epsg:102067" >>>>>>>>>>> ?END >>>>>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>>>>> ?CLASS >>>>>>>>>>> ? ?NAME "Typ" >>>>>>>>>>> ? ?STYLE >>>>>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>>>>> ? ?END >>>>>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>>>>> ?END >>>>>>>>>>> ?DEBUG 5 >>>>>>>>>>> END # Layer >>>>>>>>>>> >>>>>>>>>>> What is wrong with my FES filter? How can I make it to run? >>>>>>>>>>> >>>>>>>>>>> Thanks a lot, >>>>>>>>>>> >>>>>>>>>>> Michal >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>> >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> mapserver-users mailing list >>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > From jaja0506 at gmail.com Sun Sep 4 23:44:20 2011 From: jaja0506 at gmail.com (jjwang) Date: Sun, 4 Sep 2011 23:44:20 -0700 (PDT) Subject: [mapserver-users] template in class Message-ID: <1315205060712-6759942.post@n2.nabble.com> Hi all, In mapfile, under the class level, you can define a 'template'. What's this used for? And how to write the template? I'm assuming it's relevant to the getFeature request. I want the class info to be included in the response of the getFeature request. How can I do this? Best show me some examples? Thanks in advance. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/template-in-class-tp6759942p6759942.html Sent from the Mapserver - User mailing list archive at Nabble.com. From lucho1524 at gmail.com Fri Sep 2 06:28:30 2011 From: lucho1524 at gmail.com (Lucho) Date: Fri, 2 Sep 2011 08:28:30 -0500 Subject: [mapserver-users] WMS/WFS Mapserver Projection Error Message-ID: Hi List, I have a problem with some data when I'm publishing a WMS and then, publish the same data in a WFS service. Everithing is ok speaking about attending requests, but when I get the data with some clients, it seems that WFS has a total different projection. The image attached explain better the situation. In Quantum GIS the two services working well, but in other clients I have this problem. The data are in EPSG:4326 Any ideas? Best regards, -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: projection.png Type: image/png Size: 35940 bytes Desc: not available URL: From jaja0506 at gmail.com Mon Sep 5 03:33:29 2011 From: jaja0506 at gmail.com (JIAJIA WANG) Date: Mon, 5 Sep 2011 20:33:29 +1000 Subject: [mapserver-users] template in class In-Reply-To: <4E647A17.70203@umb.no> References: <1315205060712-6759942.post@n2.nabble.com> <4E647A17.70203@umb.no> Message-ID: Yes, I have. But I still don't understand why define a template under class level. I just wonder when it can be used if you defined a template under class level. The template defined under layer level will be used when request GetFeature service. But how about the one under class level. JJ On Mon, Sep 5, 2011 at 5:28 PM, Havard Tveite wrote: > Have you had a look at http://mapserver.org/mapfile/**template.html? > > H?vard > > > On 9/5/2011 8:44 AM, jjwang wrote: > >> Hi all, >> >> In mapfile, under the class level, you can define a 'template'. >> What's this used for? >> And how to write the template? >> I'm assuming it's relevant to the getFeature request. >> I want the class info to be included in the response of the getFeature >> request. >> How can I do this? >> Best show me some examples? >> >> Thanks in advance. >> >> JJ >> >> -- >> View this message in context: http://osgeo-org.1803224.n2.** >> nabble.com/template-in-class-**tp6759942p6759942.html >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> ______________________________**_________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.**org >> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users >> >> > -- > H?vard Tveite > Department of Mathematical Sciences and Technology, UMB > Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY > Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Mon Sep 5 03:37:45 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 5 Sep 2011 10:37:45 +0000 Subject: VS: [mapserver-users] WMS/WFS Mapserver Projection Error In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301FAD8@suutari.haapa.mmm.fi> Hi, Your failing client is most probably sending WFS 1.1.0 version GetFeature request and therefore Mapserver is sending the coordinates in Latitude-Longitude order. This is how the WFS 1.1.0 says it should be. According to the WFS 1.1.0 standard your client is doing it wrong. Lots of people have said that the WFS 1.1.0 standard is stupid. If your client supports WFS 1.0.0 use that and the map will look good. Have a try with your browser and you will see what I mean http://your_server/cgi-bin/mapserv?service=WFS&version=1.0.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile http://your_server/cgi-bin/mapserv?service=WFS&version=1.1.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile -Jukka Rahkonen- Lucho wrote: Hi List, I have a problem with some data when I'm publishing a WMS and then, publish the same data in a WFS service. Everithing is ok speaking about attending requests, but when I get the data with some clients, it seems that WFS has a total different projection. The image attached explain better the situation. In Quantum GIS the two services working well, but in other clients I have this problem. The data are in EPSG:4326 Any ideas? Best regards, -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Mon Sep 5 04:01:52 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 5 Sep 2011 11:01:52 +0000 Subject: [mapserver-users] How can I set the output format of WFS getfeature request to text/html? In-Reply-To: <1315188638127-6759614.post@n2.nabble.com> References: <1315188638127-6759614.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301FAF7@suutari.haapa.mmm.fi> Hi, Probably the best I could do for you would be to encourage you do your own homeworks and read some basic documents about WFS and WMS, but ok, take these advice for free. Text/html is not WFS outputformat. It is WMS GetFeatureInfo outputformat. Default outputformat for WFS is GML but additional ones can be added with OGR Output http://mapserver.org/output/ogr_output.html In another question you asked about templates. They exist for configuring text/html output, for example WMS GetFeatureInfo when request is done with outputformat=text/html. It may be that configuring a text/html output for GetFeatureInso is not extremely well documented so you here is an example that is not tested but should be close to a working set. Mapfile LAYER NAME "GetFeatureInfo_layer" TYPE POLYGON STATUS ON DATA "GetFeatureInfo.shp" UNITS METERS DUMP TRUE DEBUG 5 SIZEUNITS PIXELS TOLERANCE 3 HEADER "\data\template\GetFeatureInfo_header.html" TEMPLATE "\data\template\GetFeatureInfo_template.html" FOOTER "\data\template\GetFeatureInfo_footer.html" TOLERANCEUNITS PIXELS METADATA "wms_include_items" "GetFeatureInfo_items" "wms_title" "GetFeatureInfo_layer" "wms_srs" "EPSG:4326" END PROJECTION "init=epsg:4326" END END Header template Maisemapiirrehaun tulos Body template Footer template
GetFeatureInfo Report
Title for ATTR1 Title for ATTR2 Title for ATTR3 Title for ATTR4
[item name=ATTR1 format="$value" escape=none] [item name=ATTR2 format="$value" escape=none] [item name=ATTR3 format="$value" escape=none] [item name=ATTR4 format="$value" escape=none]
-Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta jjwang > L?hetetty: 5. syyskuuta 2011 5:11 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] How can I set the output format of > WFS getfeature request to text/html? > > The default output format is gml. > How can I set the output format of WFS getfeature request to > text/html? > I tried to add "outputformat=text/html" to the query string. > But I got an error message "msWFSGetFeature(): WFS server > error. 'text/html' > is not a permitted output format for layer 'nt', review wfs_formats > setting." > So I added *"wfs_formats" "text/html"* to the map file both > map level and > layer level. > Still doesn't work. > > JJ > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/How-can-I-set-the-outpu > t-format-of-WFS-getfeature-request-to-text-html-tp6759614p6759614.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Mon Sep 5 05:28:10 2011 From: sdlime at gmail.com (Steve Lime) Date: Mon, 5 Sep 2011 07:28:10 -0500 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: You could try defining a smaller bbox in lat/lon,something tighter to your actual AOI. -Steve 2011/9/5 Michal ?r?dl : > Hi Steve, > > may be you are right, because when I replace epsg:102067 with > epsg:3035 it works fine > > Cheers, > > Michal > > 2011/8/29 Steve Lime : >> Looking at the code the correct projection work is done. I wonder if >> there's something funky projecting the globe (-180 -90 180 90) to >> epsg:102067. >> >> Steve >> >> 2011/8/26 Steve Lime : >>> Ok, definitely a bug here... Will take a look. Steve >>> >>> 2011/8/26 Michal ?r?dl : >>>> Hi Steve, >>>> >>>> for epsg:4326 and url >>>> >>>> http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>> >>>> it says >>>> >>>> msQueryByAttributes(): Search returned no results. No matching >>>> record(s) found, layer and area of interest do not overlap. >>>> >>>> Cheers, >>>> >>>> Mike >>>> >>>> 2011/8/26 Steve Lime : >>>>> You must have a default mapfile set in apache, that's cool. Use the second URL. >>>>> >>>>> Change qstring_validation to qstring_validation_pattern from my first >>>>> message, my mistake. >>>>> >>>>> Steve >>>>> >>>>> 2011/8/26 Michal ?r?dl : >>>>>> Hi Steve, >>>>>> >>>>>> regardless of the projection settings, I get the following result: >>>>>> >>>>>> For >>>>>> >>>>>> ?http://localhost//cgi-bin/ows?map=mapfile&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>>>> >>>>>> I see >>>>>> >>>>>> ?msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN >>>>>> validation failed. msEvalRegex(): Regular expression error. String >>>>>> failed expression test. >>>>>> >>>>>> And for >>>>>> >>>>>> ?http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>>>> >>>>>> I see >>>>>> >>>>>> ?mapserv(): Web application error. Parameter 'qstring' value fails to >>>>>> validate. msValidateParameter(): Regular expression error. Parameter >>>>>> pattern validation failed. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Michal >>>>>> >>>>>> >>>>>> 2011/8/26 Steve Lime : >>>>>>> I would agree this sounds like a bug. The map extent *should* be >>>>>>> projected to the layer extent and that's what's used to identify >>>>>>> candidate features. Can you check what happens with a native mapserver >>>>>>> attribute query in this case? If possible try this: >>>>>>> >>>>>>> 1) set your MAP projection back to geographic, and restore your >>>>>>> geographic map extent. >>>>>>> 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' >>>>>>> 3) go to the following URL: >>>>>>> >>>>>>> ?http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>>>>> >>>>>>> and see what happens. >>>>>>> >>>>>>> This will run a different query function msQueryByAttributes() that's >>>>>>> not new to 6.0.x. >>>>>>> >>>>>>> Steve >>>>>>> >>>>>>> 2011/8/26 Michal ?r?dl : >>>>>>>> Hi Jukka, >>>>>>>> >>>>>>>> the current settings returns expected result with &srsName=EPSG:4326 >>>>>>>> as well. The original settings doesn't work neither with >>>>>>>> &srsName=EPSG:4326 nor &srsName=EPSG::102067. >>>>>>>> >>>>>>>> Yes, it looks like there would be a problem in case of several WFS >>>>>>>> layers with different projections of the source data. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> >>>>>>>> Mike >>>>>>>> >>>>>>>> 2011/8/26 Rahkonen Jukka : >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >>>>>>>>> >>>>>>>>> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >>>>>>>>> >>>>>>>>> -Jukka Rahkonen. >>>>>>>>> >>>>>>>>> Michal ?r?dl wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hi all, >>>>>>>>> >>>>>>>>>> problem solved. I needed to set: >>>>>>>>> >>>>>>>>>> EXTENT -905000 -1230000 -400000 -900000 >>>>>>>>> >>>>>>>>> and >>>>>>>>> >>>>>>>>> PROJECTION >>>>>>>>> ## ?"init=epsg:4326" >>>>>>>>> ?"init=epsg:102067" >>>>>>>>> END >>>>>>>>> >>>>>>>>> (Epsg 102067 is the projection of the layer being filtered.) >>>>>>>>> >>>>>>>>> Thank you very much again, >>>>>>>>> >>>>>>>>> Michal >>>>>>>>> >>>>>>>>> >>>>>>>>> 2011/8/25 Michal ?r?dl : >>>>>>>>>> Hi Steve, >>>>>>>>>> >>>>>>>>>> Thanks a lot. The extent should be large enough to encompass all the >>>>>>>>>> features. Here comes the whole mapfile: >>>>>>>>>> >>>>>>>>>> MAP >>>>>>>>>> NAME "MIS WFS Server" >>>>>>>>>> STATUS ON >>>>>>>>>> SIZE 500 500 >>>>>>>>>> EXTENT -180 -90 180 90 >>>>>>>>>> SHAPEPATH "data/" >>>>>>>>>> IMAGECOLOR 255 255 255 >>>>>>>>>> CONFIG MS_ERRORFILE "log/mapserv.log" >>>>>>>>>> DEBUG 5 >>>>>>>>>> >>>>>>>>>> WEB >>>>>>>>>> ?IMAGEPATH "/var/www/tmp/" >>>>>>>>>> ?IMAGEURL "/tmp/" >>>>>>>>>> ?METADATA >>>>>>>>>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>>>>>>>>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>>>>>>>>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>>>>>>>>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>>>>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>>>>> ? ?"ows_enable_request" "*" >>>>>>>>>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>>>>>>>>> ?END >>>>>>>>>> END >>>>>>>>>> >>>>>>>>>> PROJECTION >>>>>>>>>> ?"init=epsg:4326" >>>>>>>>>> END >>>>>>>>>> >>>>>>>>>> LAYER >>>>>>>>>> ?NAME "typ" >>>>>>>>>> ?METADATA >>>>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>>>> ? ?"wfs_include_items" "all" >>>>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>>>> ? ?"gml_types" "auto" >>>>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>>>> ?END >>>>>>>>>> ?DATA typ.shp >>>>>>>>>> ?TYPE POLYGON >>>>>>>>>> ?STATUS ON >>>>>>>>>> ?PROJECTION >>>>>>>>>> ? ?"init=epsg:102067" >>>>>>>>>> ?END >>>>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>>>> ?CLASS >>>>>>>>>> ? ?NAME "Typ" >>>>>>>>>> ? ?STYLE >>>>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>>>> ? ?END >>>>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>>>> ?END >>>>>>>>>> ?DEBUG 5 >>>>>>>>>> END # Layer >>>>>>>>>> >>>>>>>>>> LAYER >>>>>>>>>> ? ?NAME "hsrs" >>>>>>>>>> ? ?TYPE RASTER >>>>>>>>>> ? ?STATUS ON >>>>>>>>>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>>>>>>>>> ? ?DEBUG ON >>>>>>>>>> ? ?CONNECTIONTYPE WMS >>>>>>>>>> ? ?METADATA >>>>>>>>>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>>>>>>>>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>>>>>>>>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>>>>>>>>> ? ? ? ?"wms_server_version" ?"1.1.1" >>>>>>>>>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>>>>>>>>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>>>>>>>>> ? ?END >>>>>>>>>> END >>>>>>>>>> >>>>>>>>>> END # Map File >>>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> >>>>>>>>>> Michal >>>>>>>>>> >>>>>>>>>> 2011/8/25 Steve Lime : >>>>>>>>>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>>>>>>>>> >>>>>>>>>>> Sent from my iPad >>>>>>>>>>> >>>>>>>>>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi all, >>>>>>>>>>>> >>>>>>>>>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>>>>>>>>> thought I should get one. >>>>>>>>>>>> >>>>>>>>>>>> In my browser, I request >>>>>>>>>>>> >>>>>>>>>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>>>>>>>>> >>>>>>>>>>>> and get >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>>>>>>>>> xmlns:gml="http://www.opengis.net/gml" >>>>>>>>>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>>>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>>>>>>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>>>>>>>>> http://www.opengis.net/wfs >>>>>>>>>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>>>>>>>>> >>>>>>>>>>>> missing >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> even though I do know, that features with ZVER=2 do exist. >>>>>>>>>>>> >>>>>>>>>>>> In the mapserver log file, I get >>>>>>>>>>>> >>>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>>>>>>>>> no results. No matching record(s) found. >>>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>>>>>>>>> (msLoadMap not incl.): 0.002s >>>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>>>>>>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>>>>>>>>> >>>>>>>>>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>>>>>>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>>>>>>>>> simple template: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> ?[lrn] >>>>>>>>>>>> ?[ZVER] >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> but with no effect. >>>>>>>>>>>> >>>>>>>>>>>> In the mapfile, there is >>>>>>>>>>>> >>>>>>>>>>>> LAYER >>>>>>>>>>>> ?NAME "typ" >>>>>>>>>>>> ?METADATA >>>>>>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>>>>>> ? ?"gml_types" "auto" >>>>>>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>>>>>> ?END >>>>>>>>>>>> ?DATA typ.shp >>>>>>>>>>>> ?TYPE POLYGON >>>>>>>>>>>> ?STATUS ON >>>>>>>>>>>> ?PROJECTION >>>>>>>>>>>> ? ?"init=epsg:102067" >>>>>>>>>>>> ?END >>>>>>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>>>>>> ?CLASS >>>>>>>>>>>> ? ?NAME "Typ" >>>>>>>>>>>> ? ?STYLE >>>>>>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>>>>>> ? ?END >>>>>>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>>>>>> ?END >>>>>>>>>>>> ?DEBUG 5 >>>>>>>>>>>> END # Layer >>>>>>>>>>>> >>>>>>>>>>>> What is wrong with my FES filter? How can I make it to run? >>>>>>>>>>>> >>>>>>>>>>>> Thanks a lot, >>>>>>>>>>>> >>>>>>>>>>>> Michal >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> mapserver-users mailing list >>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > From jfuch at indec.mecon.gov.ar Mon Sep 5 06:18:38 2011 From: jfuch at indec.mecon.gov.ar (Fuchs Juan Carlos) Date: Mon, 5 Sep 2011 10:18:38 -0300 Subject: [mapserver-users] Re: Invalid SRS given: SRS must be valid fo r all requested layers. EPSG 23030 Message-ID: Estimada Amalia: si no entiendo mal lo que Rahkonen Jukka est? tratando de decirte es que el "extend" del mapa tiene n?mero muy extra?os si el sistema EPSG:23030 tiene unidades en metros algo tipo -82.65algo 29.43algo -82.05algo 29.94algo da muy chiquito tal vez son valores de un sistema en grados como el 4326? Lat. Long.?? Deber?as pasar los valores en metros tal como lo despliega el GV sig en pantalla cuando despliegas tu cartografia. Saludos JC -----Mensaje original----- De: Mr. Puneet Kishor [mailto:punk.kish at gmail.com] Enviado el: Martes, 30 de Agosto de 2011 01:59 p.m. Para: Amalia Carolina Canavire CC: Rahkonen Jukka; mapserver-users at lists.osgeo.org; Lista de Usuarios de gvSIG Asunto: Re: [mapserver-users] Re: Invalid SRS given: SRS must be valid for all requested layers. EPSG 23030 On Aug 30, 2011, at 11:21 AM, Amalia Carolina Canavire wrote: > hi ,I don't good speak english, but i don't understand you, when you say > "Projection must be in meters which seem to be the unit for the EPSG:23030 > units", you can specify in where may correction in this code, please. thank > for you time and helping. Your declared projection "EPSG:23030" uses meters, but your extent `EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614` is definitely not in meters (unless, you are plotting a very tiny and strange area of the world that is only a few centimeters wide and long). Make sure your extent and projection units match. > > 2011/8/30 Rahkonen Jukka > >> Hi, >> >> I do not understand Spanish but it looks like you have something wrong with >> projections. >> >> MAP >> EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 >> PROJECTION >> "init=epsg:23030" >> END >> >> Projection must be in meters which seem to be the unit for the EPSG:23030 >> units >> >> http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:cr s:EPSG::23030&reportDetail=short&style=urn:uuid:report-style:default-with-co de&style_name=OGP%20Default%20With%20Code&title= >> >> The same with "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 >> 29.943614" >> use extents in the EPSG:23030 system and units. >> >> -Jukka Rahkonen- >> >> >> ________________________________ >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org [ >> mapserver-users-bounces at lists.osgeo.org] k?ytt?j?n Amalia Carolina >> Canavire [acarolinagc at gmail.com] puolesta >> L?hetetty: 30. elokuuta 2011 16:55 >> Vastaanottaja: Lista de Usuarios de gvSIG; mapserver-users at lists.osgeo.org >> Aihe: [mapserver-users] msWMSLoadGetMapParams(): WMS server error. Invalid >> SRS given: SRS must be valid for all requested layers. EPSG 23030 >> >> Hola gente, una duda usando gvsig para poder generar una vista desde un >> .shp debo seleccionar una proyecci?n epsg 23030, porque no me reconece epsg >> 4326 (con esta opci?n mi vista es vacia , a que se debe? >> Estoy usando gvsig 1.1 por la extensi?n de publicaci?n, sobre ubuntu. >> Debido a ello , por las dudas, respeto esta proyecci?n epsg 23030, cuando >> utilizo vista desde wms, me muestra sin problema, ahora cuando lo hago para >> web, me sale el error de : >> msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be >> valid for all requested layers . >> >> Si cambio la proyeccion a 4326, no sale el error pero no me muestra nada. >> Mi codigo es el sgte: >> >> >> >> MAP >> NAME map_generated_by_gvsig >> SIZE 600 400 >> EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 >> SYMBOLSET "dmwms1.sym" >> FONTSET "fonts.txt" >> LEGEND >> IMAGECOLOR -1 -1 -1 >> LABEL >> FONT "vera" >> ANGLE FOLLOW >> COLOR 0 0 0 >> ENCODING "UTF-8" >> TYPE truetype >> SIZE 8 >> END >> STATUS ON >> TRANSPARENT ON >> END >> WEB >> METADATA >> "wms_encoding" "UTF-8" >> "wms_title" "Mapserver WMS" >> "wms_abstract" "" >> "wms_srs" " EPSG:23030" >> "wms_onlineresource" " >> http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisParcelsFL%2Fmap%2Fdmw ms1.map >> " >> END >> END >> PROJECTION >> "init=epsg:23030" >> END >> LAYER >> NAME "tl_2010_12001_roads.shp" >> STATUS ON >> TYPE LINE >> DATA >> "/var/www/gisParcelsFL/tl_2010_12001_roads/tl_2010_12001_roads.shp" >> MAXSCALE -1.0 >> MINSCALE -1.0 >> TRANSPARENCY 100 >> SIZEUNITS pixels >> LABELITEM "FULLNAME" >> PROJECTION >> "init=epsg:23030" >> END >> CLASS >> STYLE >> COLOR 153 153 153 >> WIDTH 1 >> END >> NAME "default" >> LABEL >> FONT "vera" >> ANGLE FOLLOW >> COLOR 0 0 0 >> TYPE truetype >> SIZE 7.0 >> END >> END >> METADATA >> "wms_title" "tl_2010_12001_roads.shp" >> "wms_abstract" "generated by gvSIG" >> "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 >> 29.943614" >> "gml_include_items" "all" >> END >> END # Layer >> END # Map File >> >> -- >> >> ************** :) sonrei que te queda lindo :):):):): amy cgc >> ************************** >> >> > > > -- > > *************** * :) *sonrei que te queda lindo :):):):): **amy **cgc > ************************** > * > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From sdlime at gmail.com Mon Sep 5 07:57:27 2011 From: sdlime at gmail.com (Steve Lime) Date: Mon, 5 Sep 2011 09:57:27 -0500 Subject: [mapserver-users] template in class In-Reply-To: References: <1315205060712-6759942.post@n2.nabble.com> <4E647A17.70203@umb.no> Message-ID: A class template basically allows you to change the output presentation for one class versus another. For example I might want to display data for a "forest" landuse type totally different from a "prairie" type. Or I might want to make only one class queryable and not others. It's a lightly used option to be sure... Steve On Mon, Sep 5, 2011 at 5:33 AM, JIAJIA WANG wrote: > Yes, I have. > But I still don't understand why define a template under class level. > I just wonder when it can be used if you defined a template under class > level. > The template defined under layer level will be used when request GetFeature > service. > But how about the one under class level. > JJ > On Mon, Sep 5, 2011 at 5:28 PM, Havard Tveite wrote: >> >> Have you had a look at http://mapserver.org/mapfile/template.html ? >> >> H?vard >> >> On 9/5/2011 8:44 AM, jjwang wrote: >>> >>> Hi all, >>> >>> In mapfile, under the class level, you can define a 'template'. >>> What's this used for? >>> And how to write the template? >>> I'm assuming it's relevant to the getFeature request. >>> I want the class info to be included in ?the response of the getFeature >>> request. >>> How can I do this? >>> Best show me some examples? >>> >>> Thanks in advance. >>> >>> JJ >>> >>> -- >>> View this message in context: >>> http://osgeo-org.1803224.n2.nabble.com/template-in-class-tp6759942p6759942.html >>> Sent from the Mapserver - User mailing list archive at Nabble.com. >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >> >> -- >> H?vard Tveite >> Department of Mathematical Sciences and Technology, UMB >> Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY >> Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From webturtles at gmail.com Mon Sep 5 14:53:35 2011 From: webturtles at gmail.com (Chris Jackson) Date: Mon, 5 Sep 2011 22:53:35 +0100 Subject: [mapserver-users] Mapscript and wms client Message-ID: Hi I am trying to use a remote WMS service in my mapfile and am not having any luck. I resorted to the MapServer tutorial example and still had no luck: LAYER # MODIS WMS map from JPL NAME modis_jpl TYPE RASTER OFFSITE 0 0 0 STATUS On CONNECTIONTYPE WMS CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?" METADATA "wms_srs" "EPSG:4326" "wms_name" "modis" "wms_server_version" "1.1.1" "wms_format" "image/jpeg" END PROJECTION "init=epsg:4326" END END # Modis WMS image ends here Mapscript has wms client enabled so am I missing another setting required in the mapfile? Thanks Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucho1524 at gmail.com Mon Sep 5 15:05:03 2011 From: lucho1524 at gmail.com (Lucho) Date: Mon, 5 Sep 2011 17:05:03 -0500 Subject: [mapserver-users] Re: WMS/WFS Mapserver Projection Error Message-ID: Thanks, list... As Jukka said, the problem was in the way of how the WFS 1.1.0 standard works with the BBOX Envelope. I've changed the order of the variables in which the coordinate values were captured on my web client, using the order given by the GetFeature request on WFS 1.0.0, and that's it!!! It works now. Unfortunately, i do not know if there is any form of specify the version of WFS service in the metadata of my mapfile. Best wishes, On 5 September 2011 05:37, Rahkonen Jukka wrote: > ** > Hi, > > Your failing client is most probably sending WFS 1.1.0 version GetFeature > request and therefore Mapserver is sending the coordinates in > Latitude-Longitude order. This is how the WFS 1.1.0 says it should > be. According to the WFS 1.1.0 standard your client is doing it wrong. Lots > of people have said that the WFS 1.1.0 standard is stupid. > If your client supports WFS 1.0.0 use that and the map will look good. > Have a try with your browser and you will see what I mean > > > http://your_server/cgi-bin/mapserv?service=WFS&version=1.0.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile > > http://your_server/cgi-bin/mapserv?service=WFS&version=1.1.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile > > -Jukka Rahkonen- > > Lucho wrote: > > > > Hi List, > > I have a problem with some data when I'm publishing a WMS and then, publish > the same data in a WFS service. Everithing is ok speaking about attending > requests, but when I get the data with some clients, it seems that WFS has a > total different projection. > > The image attached explain better the situation. > > In Quantum GIS the two services working well, but in other clients I have > this problem. The data are in EPSG:4326 > > Any ideas? > > Best regards, > > -- > LUIS FERNANDO ORTIZ REYES > INGENIERO DE SISTEMAS > UNIVERSIDAD DISTRITAL > > -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Mon Sep 5 15:06:37 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Mon, 05 Sep 2011 16:06:37 -0600 Subject: [mapserver-users] Mapscript and wms client In-Reply-To: References: Message-ID: <4E6547ED.7020605@geoanalytic.com> Chris, I don't think NASA's JPL is serving data anymore (although it does return a GetCapapabilies XML). Best Regards, Brent Fraser On 9/5/2011 3:53 PM, Chris Jackson wrote: > Hi > > I am trying to use a remote WMS service in my mapfile and am not > having any luck. I resorted to the MapServer tutorial example and > still had no luck: > > LAYER # MODIS WMS map from JPL > NAME modis_jpl > TYPE RASTER > OFFSITE 0 0 0 > STATUS On > CONNECTIONTYPE WMS > CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?" > > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "modis" > "wms_server_version" "1.1.1" > "wms_format" "image/jpeg" > END > > PROJECTION > "init=epsg:4326" > END > END # Modis WMS image ends here > > Mapscript has wms client enabled so am I missing another setting > required in the mapfile? > > Thanks > Chris > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From armin.burger at gmx.net Mon Sep 5 15:15:38 2011 From: armin.burger at gmx.net (Armin Burger) Date: Tue, 06 Sep 2011 00:15:38 +0200 Subject: [mapserver-users] Mapscript and wms client In-Reply-To: References: Message-ID: <4E654A0A.2000706@gmx.net> Chris Is it just this specific WMS or any other as well? I think the NASA JPL is very often not working or responding (it currently returns HTTP error 403 for getCapalities). It's even more like I cannot remember anymore when it was working... Maybe the URL has just changed... Armin On 05/09/2011 23:53, Chris Jackson wrote: > Hi > > I am trying to use a remote WMS service in my mapfile and am not having > any luck. I resorted to the MapServer tutorial example and still had no > luck: > > LAYER # MODIS WMS map from JPL > NAME modis_jpl > TYPE RASTER > OFFSITE 0 0 0 > STATUS On > CONNECTIONTYPE WMS > CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?" > > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "modis" > "wms_server_version" "1.1.1" > "wms_format" "image/jpeg" > END > > PROJECTION > "init=epsg:4326" > END > END # Modis WMS image ends here > > Mapscript has wms client enabled so am I missing another setting > required in the mapfile? > > Thanks > Chris > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From michael.gajda at tu-dortmund.de Mon Sep 5 16:10:45 2011 From: michael.gajda at tu-dortmund.de (Michael G.) Date: Tue, 06 Sep 2011 01:10:45 +0200 Subject: [mapserver-users] Coloring vectordata by features/infos In-Reply-To: <4E63B6CA.8090908@tu-dortmund.de> References: <4E63B6CA.8090908@tu-dortmund.de> Message-ID: <4E6556F5.9050008@tu-dortmund.de> Hmm, any hints for what I should search for? Am 04.09.2011 19:35, schrieb Michael G.: > Hello, > > I am rendering vectordata from a PostGIS database which works like a charm. > My layer definition looks like this: > LAYER > NAME "vector" > METADATA > "wms_include_items" "all" > "wms_title" "dortmund_basic" > END > TEMPLATE gfi.html > TYPE POLYGON > ## Should be inherited from MAP level, but is good practice to have > here, too: ##(or not? <.<) > #PROJECTION > # "init=epsg:900913" > #END > DUMP true > > CONNECTIONTYPE postgis > CONNECTION "host=x dbname=x user=x password=x port=5432" > DATA "the_geom FROM x" > > CLASS > STYLE > COLOR 200 50 50 > OUTLINECOLOR 60 60 60 > #SYMBOL 0 > ANTIALIAS true > OPACITY 80 # in percent > END > END > END > > Right now, I have not fully grasped how features/information is saved along > with the vector data in the PostGIS database, but I am also not maintaining > it. Supposingly we will have a float-value saved along with every vector. > Can someone explain or give me hints, how I could map such a value which is > saved along into a color? Like a brighter shade of red the higher the value is? > > Sincerely > Michael Gajda > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From Robert.Sanson at asurequality.com Mon Sep 5 16:21:53 2011 From: Robert.Sanson at asurequality.com (Robert Sanson) Date: Tue, 06 Sep 2011 11:21:53 +1200 Subject: [mapserver-users] Coloring vectordata by features/infos In-Reply-To: <4E6556F5.9050008@tu-dortmund.de> References: <4E63B6CA.8090908@tu-dortmund.de> <4E6556F5.9050008@tu-dortmund.de> Message-ID: <4E660251.379F.0037.1@asurequality.com> Hi Michael Take a look at CLASS and EXPRESSION: http://mapserver.org/mapfile/class.html Here is an example from one of my map files: LAYER NAME rivers GROUP "Topos" TYPE LINE STATUS ON DATA ../data/aus/rivers PROJECTION "init=epsg:4283" END MAXSCALE 10000000 MINSCALE 75000 CLASSITEM "PERENNIAL" CLASS EXPRESSION /1/ NAME "Permanent" STYLE WIDTH 2 COLOR 115 178 255 END END CLASS EXPRESSION /2/ NAME "Seasonal" STYLE WIDTH 1 COLOR 115 178 255 END END #CLASS END Regards, Robert >>> "Michael G." 6/09/2011 11:10 a.m. >>> Hmm, any hints for what I should search for? Am 04.09.2011 19:35, schrieb Michael G.: > Hello, > > I am rendering vectordata from a PostGIS database which works like a charm. > My layer definition looks like this: > LAYER > NAME "vector" > METADATA > "wms_include_items" "all" > "wms_title" "dortmund_basic" > END > TEMPLATE gfi.html > TYPE POLYGON > ## Should be inherited from MAP level, but is good practice to have > here, too: ##(or not? <.<) > #PROJECTION > # "init=epsg:900913" > #END > DUMP true > > CONNECTIONTYPE postgis > CONNECTION "host=x dbname=x user=x password=x port=5432" > DATA "the_geom FROM x" > > CLASS > STYLE > COLOR 200 50 50 > OUTLINECOLOR 60 60 60 > #SYMBOL 0 > ANTIALIAS true > OPACITY 80 # in percent > END > END > END > > Right now, I have not fully grasped how features/information is saved along > with the vector data in the PostGIS database, but I am also not maintaining > it. Supposingly we will have a float-value saved along with every vector. > Can someone explain or give me hints, how I could map such a value which is > saved along into a color? Like a brighter shade of red the higher the value is? > > Sincerely > Michael Gajda > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system. This message has been scanned for Malware and Viruses by Websense Hosted Security. www.websense.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Mon Sep 5 20:53:35 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 6 Sep 2011 03:53:35 +0000 Subject: [mapserver-users] Re: WMS/WFS Mapserver Projection Error In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301FD2A@suutari.haapa.mmm.fi> Hi, Have a try with "wfs_getcapabilities_version" metadata that is mentioned in http://mapserver.org/ogc/wfs_server.html -Jukka Rahkonen- ________________________________ L?hett?j?: Lucho [mailto:lucho1524 at gmail.com] L?hetetty: 6. syyskuuta 2011 1:05 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users at lists.osgeo.org Aihe: Re: WMS/WFS Mapserver Projection Error Thanks, list... As Jukka said, the problem was in the way of how the WFS 1.1.0 standard works with the BBOX Envelope. I've changed the order of the variables in which the coordinate values were captured on my web client, using the order given by the GetFeature request on WFS 1.0.0, and that's it!!! It works now. Unfortunately, i do not know if there is any form of specify the version of WFS service in the metadata of my mapfile. Best wishes, On 5 September 2011 05:37, Rahkonen Jukka > wrote: Hi, Your failing client is most probably sending WFS 1.1.0 version GetFeature request and therefore Mapserver is sending the coordinates in Latitude-Longitude order. This is how the WFS 1.1.0 says it should be. According to the WFS 1.1.0 standard your client is doing it wrong. Lots of people have said that the WFS 1.1.0 standard is stupid. If your client supports WFS 1.0.0 use that and the map will look good. Have a try with your browser and you will see what I mean http://your_server/cgi-bin/mapserv?service=WFS&version=1.0.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile http://your_server/cgi-bin/mapserv?service=WFS&version=1.1.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile -Jukka Rahkonen- Lucho wrote: Hi List, I have a problem with some data when I'm publishing a WMS and then, publish the same data in a WFS service. Everithing is ok speaking about attending requests, but when I get the data with some clients, it seems that WFS has a total different projection. The image attached explain better the situation. In Quantum GIS the two services working well, but in other clients I have this problem. The data are in EPSG:4326 Any ideas? Best regards, -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -------------- next part -------------- An HTML attachment was scrubbed... URL: From webturtles at gmail.com Mon Sep 5 22:57:07 2011 From: webturtles at gmail.com (Chris Jackson) Date: Tue, 6 Sep 2011 06:57:07 +0100 Subject: [mapserver-users] Mapscript and wms client In-Reply-To: <4E6547ED.7020605@geoanalytic.com> References: <4E6547ED.7020605@geoanalytic.com> Message-ID: Hi Brent and Armin The GetCapapabilies bit threw me! Well the one I am trying to load is GEBCO which I think is up. Having said that I have just changed the wms_name and reloaded the map and it works (maybe it just needed some sleep)..! Out of interest how do you specify a given layer from the WMS in the mapfile code and is the wms_name just a friendly name you use or specific to the WMS too? Separately Google maps layers, mapfiles and GDAL, from what I read loading tiles this way this breaks Google's T&C because it bypasses their APIs, anyone have a view....? My GEBCO code is: LAYER # GEBCO WMS map NAME 'gebco' TYPE RASTER OFFSITE 0 0 0 STATUS On CONNECTIONTYPE WMS CONNECTION " http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv ?" METADATA "wms_srs" "EPSG:4326" "wms_name" "gebco_08_grid" "wms_server_version" "1.1.1" "wms_format" "image/jpeg" END PROJECTION "init=epsg:4326" END END Cheers Chris On 5 September 2011 23:06, Brent Fraser wrote: > Chris, > > I don't think NASA's JPL is serving data anymore (although it does return > a GetCapapabilies XML). > > Best Regards, > Brent Fraser > > > On 9/5/2011 3:53 PM, Chris Jackson wrote: > > Hi > > I am trying to use a remote WMS service in my mapfile and am not having > any luck. I resorted to the MapServer tutorial example and still had no > luck: > > LAYER # MODIS WMS map from JPL > NAME modis_jpl > TYPE RASTER > OFFSITE 0 0 0 > STATUS On > CONNECTIONTYPE WMS > CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?" > > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "modis" > "wms_server_version" "1.1.1" > "wms_format" "image/jpeg" > END > > PROJECTION > "init=epsg:4326" > END > END # Modis WMS image ends here > > Mapscript has wms client enabled so am I missing another setting required > in the mapfile? > > Thanks > Chris > > > _______________________________________________ > mapserver-users mailing listmapserver-users at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/mapserver-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Tue Sep 6 02:01:51 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 6 Sep 2011 09:01:51 +0000 Subject: [mapserver-users] How to use Spatialite as a TILEINDEX Message-ID: <84446DEF76453C439E9E97E438E13A6301FDA9@suutari.haapa.mmm.fi> Hi, The mapfile document http://mapserver.org/mapfile/layer.html is a little bit unclear about raster tileindex. It made me believe that shapefile tileindex is the only possibility. "TILEINDEX [filename|layername] Name of the tileindex file or layer. A tileindex is similar to an ArcInfo library index. The tileindex contains polygon features for each tile. The item that contains the location of the tiled data is given using the TILEITEM parameter. When a file is used as the tileindex for shapefile or raster layers, the tileindex should be a shapefile. For CONNECTIONTYPE OGR layers, any OGR supported datasource can be a tileindex. Normally the location should contain the path to the tile file relative to the shapepath, not relative to the tileindex itself. If the DATA parameter contains a value then it is added to the end of the location. When a tileindex layer is used, it works similarly to directly referring to a file, but any supported feature source can be used (ie. postgres, oracle)." However, I remembered vaguely that I had read something about storing tileindex in PostGIS (perhaps it was Armin). After reading old mails and a few trials and errors I managed to use Spatialite as a tileindex. Only after that I understood that the "layername" and "timeindex layer" mean the name of another layer in the mapfile. and found this document http://mapserver.org/ogc/wms_time.html#example-of-wms-t-with-postgis-tile-index-for-raster-imagery An example like this somewhere linked with the tileindex item in the documentation could save some time for others. LAYER NAME "MS_tileindex_layer" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "tileindex.sqlite" DATA "Spatialite_tileindex_layer" END LAYER NAME "raster_layer" STATUS ON TYPE RASTER TILEINDEX "MS_tileindex_layer" ... Side effect with using the tileindex layer is that it will be included in the WMS layers but obviously there is no way to hide it. -Jukka Rahkonen- -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcigar at ulb.ac.be Tue Sep 6 04:50:15 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Tue, 06 Sep 2011 13:50:15 +0200 Subject: [mapserver-users] how to use STYLES .. ? Message-ID: <4E6608F7.1010306@ulb.ac.be> Hello, I have the following layer http://www.pastie.org/2490986 with the following SLD http://www.pastie.org/2490993 Is it possible to mix a SLD= with a STYLES= .. ? Any idea why with the following request (STYLES=bar): http://my.server/mapserver?map=/my/mapfile.map&LAYERS=eea&TRANSPARENT=TRUE&FORMAT=image/png&SLD=http://my.server/mysld&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=foo&SRS=EPSG:3857&BBOX=-9378667.0980278,1061783.1742937,13163529.784472,15737692.603004&WIDTH=1152&HEIGHT=750 Mapserver outputs: msWMSLoadGetMapParams(): WMS server error. Style (foo) not defined on layer. If I understood well STYLES should override the CLASSGROUP, so I don't understand why it doesn't work .. Thanks, Julien -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From jcigar at ulb.ac.be Tue Sep 6 05:23:07 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Tue, 06 Sep 2011 14:23:07 +0200 Subject: [mapserver-users] how to use STYLES .. ? In-Reply-To: <4E6608F7.1010306@ulb.ac.be> References: <4E6608F7.1010306@ulb.ac.be> Message-ID: <4E6610AB.7050907@ulb.ac.be> OK.. it looks like I cannot use STYLES= and SLD= at the same time .. Does anyone have an idea how to put a simple text constant (copyright) and a graphic image (logo) at the bottom of a map (*in SLD*)? Thanks, Julien On 09/06/2011 13:50, Julien Cigar wrote: > Hello, > > I have the following layer http://www.pastie.org/2490986 with the > following SLD http://www.pastie.org/2490993 > Is it possible to mix a SLD= with a STYLES= .. ? > > Any idea why with the following request (STYLES=bar): > http://my.server/mapserver?map=/my/mapfile.map&LAYERS=eea&TRANSPARENT=TRUE&FORMAT=image/png&SLD=http://my.server/mysld&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=foo&SRS=EPSG:3857&BBOX=-9378667.0980278,1061783.1742937,13163529.784472,15737692.603004&WIDTH=1152&HEIGHT=750 > > > Mapserver outputs: msWMSLoadGetMapParams(): WMS server error. Style > (foo) not defined on layer. > > If I understood well STYLES should override the CLASSGROUP, so I don't > understand why it doesn't work .. > > Thanks, > Julien > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From Jukka.Rahkonen at mmmtike.fi Tue Sep 6 06:44:14 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 6 Sep 2011 13:44:14 +0000 Subject: [mapserver-users] Re: WMS/WFS Mapserver Projection Error In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301FD2A@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A6301FED8@suutari.haapa.mmm.fi> Hi, What client are you using? If you add "wfs_getcapabilities_version" "1.0.0" into your mapfile, does Mapserver still advertise WFS 1.1.0 in its supported formats in the WFS GetCapabilities document? Somehow normal WFS client behaviour is to send first GetCapabilities without version and capture the highest version number from the document for further requests. GvSIG at least is doing so but probably and hopefully they will add the version selector in the future. -Jukka Rahkonen- ________________________________ L?hett?j?: Lucho [mailto:lucho1524 at gmail.com] L?hetetty: 6. syyskuuta 2011 16:37 Vastaanottaja: Rahkonen Jukka Aihe: Re: WMS/WFS Mapserver Projection Error Hi Jukka, I'd tried adding this parameter before changing the parameters on my client, but it doesn't work at all. Any other idea? On 5 September 2011 22:53, Rahkonen Jukka > wrote: Hi, Have a try with "wfs_getcapabilities_version" metadata that is mentioned in http://mapserver.org/ogc/wfs_server.html -Jukka Rahkonen- ________________________________ L?hett?j?: Lucho [mailto:lucho1524 at gmail.com] L?hetetty: 6. syyskuuta 2011 1:05 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users at lists.osgeo.org Aihe: Re: WMS/WFS Mapserver Projection Error Thanks, list... As Jukka said, the problem was in the way of how the WFS 1.1.0 standard works with the BBOX Envelope. I've changed the order of the variables in which the coordinate values were captured on my web client, using the order given by the GetFeature request on WFS 1.0.0, and that's it!!! It works now. Unfortunately, i do not know if there is any form of specify the version of WFS service in the metadata of my mapfile. Best wishes, On 5 September 2011 05:37, Rahkonen Jukka > wrote: Hi, Your failing client is most probably sending WFS 1.1.0 version GetFeature request and therefore Mapserver is sending the coordinates in Latitude-Longitude order. This is how the WFS 1.1.0 says it should be. According to the WFS 1.1.0 standard your client is doing it wrong. Lots of people have said that the WFS 1.1.0 standard is stupid. If your client supports WFS 1.0.0 use that and the map will look good. Have a try with your browser and you will see what I mean http://your_server/cgi-bin/mapserv?service=WFS&version=1.0.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile http://your_server/cgi-bin/mapserv?service=WFS&version=1.1.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile -Jukka Rahkonen- Lucho wrote: Hi List, I have a problem with some data when I'm publishing a WMS and then, publish the same data in a WFS service. Everithing is ok speaking about attending requests, but when I get the data with some clients, it seems that WFS has a total different projection. The image attached explain better the situation. In Quantum GIS the two services working well, but in other clients I have this problem. The data are in EPSG:4326 Any ideas? Best regards, -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Tue Sep 6 06:48:09 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Tue, 06 Sep 2011 07:48:09 -0600 Subject: [mapserver-users] Mapscript and wms client In-Reply-To: References: <4E6547ED.7020605@geoanalytic.com> Message-ID: <4E662499.5070609@geoanalytic.com> Chris, Yes, last time I looked at the Google Maps TOS, you must use Google's API to use their map tiles. Best Regards, Brent Fraser On 9/5/2011 11:57 PM, Chris Jackson wrote: > Hi Brent and Armin > > The GetCapapabilies bit threw me! Well the one I am trying to load is > GEBCO which I think is up. Having said that I have just changed the > wms_name and reloaded the map and it works (maybe it just needed some > sleep)..! > > Out of interest how do you specify a given layer from the WMS in the > mapfile code and is the wms_name just a friendly name you use or > specific to the WMS too? > > Separately Google maps layers, mapfiles and GDAL, from what I read > loading tiles this way this breaks Google's T&C because it bypasses > their APIs, anyone have a view....? > > My GEBCO code is: > > LAYER # GEBCO WMS map > NAME 'gebco' > TYPE RASTER > OFFSITE 0 0 0 > STATUS On > CONNECTIONTYPE WMS > CONNECTION > "http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?" > > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "gebco_08_grid" > "wms_server_version" "1.1.1" > "wms_format" "image/jpeg" > END > > PROJECTION > "init=epsg:4326" > END > END > > > Cheers > Chris > > On 5 September 2011 23:06, Brent Fraser > wrote: > > Chris, > > I don't think NASA's JPL is serving data anymore (although it does > return a GetCapapabilies XML). > > Best Regards, > Brent Fraser > > > On 9/5/2011 3:53 PM, Chris Jackson wrote: >> Hi >> >> I am trying to use a remote WMS service in my mapfile and am not >> having any luck. I resorted to the MapServer tutorial example >> and still had no luck: >> >> LAYER # MODIS WMS map from JPL >> NAME modis_jpl >> TYPE RASTER >> OFFSITE 0 0 0 >> STATUS On >> CONNECTIONTYPE WMS >> CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?" >> >> METADATA >> "wms_srs" "EPSG:4326" >> "wms_name" "modis" >> "wms_server_version" "1.1.1" >> "wms_format" "image/jpeg" >> END >> >> PROJECTION >> "init=epsg:4326" >> END >> END # Modis WMS image ends here >> >> Mapscript has wms client enabled so am I missing another setting >> required in the mapfile? >> >> Thanks >> Chris >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Tue Sep 6 06:57:02 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 6 Sep 2011 13:57:02 +0000 Subject: [mapserver-users] Re: WMS/WFS Mapserver Projection Error In-Reply-To: <84446DEF76453C439E9E97E438E13A6301FED8@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301FD2A@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301FED8@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A6301FEF0@suutari.haapa.mmm.fi> Hi, I just confirmed with Mapserver 6.0 that if I use "wfs_getcapabilities_version" "1.0.0" in WEB - METADATA then I get back WFS 1.0.0 version of GetCapabilities document with the plain service=WFS&request=GetCapabilities. However, if I add &version=1.1.0 I get back the version 1.1.0 document. That's also what the documentation suggests. It might be good to have an option to switch off WFS version 1.1.0 totally as long as there are clients sending requests with the highest supported WFS version but without knowing what to do with the GML3 they are getting back if the axis order is reversed. -Jukka Rahkonen- ________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Rahkonen Jukka L?hetetty: 6. syyskuuta 2011 16:44 Vastaanottaja: 'Lucho' Kopio: 'mapserver-users at lists.osgeo.org' Aihe: [mapserver-users] Re: WMS/WFS Mapserver Projection Error Hi, What client are you using? If you add "wfs_getcapabilities_version" "1.0.0" into your mapfile, does Mapserver still advertise WFS 1.1.0 in its supported formats in the WFS GetCapabilities document? Somehow normal WFS client behaviour is to send first GetCapabilities without version and capture the highest version number from the document for further requests. GvSIG at least is doing so but probably and hopefully they will add the version selector in the future. -Jukka Rahkonen- ________________________________ L?hett?j?: Lucho [mailto:lucho1524 at gmail.com] L?hetetty: 6. syyskuuta 2011 16:37 Vastaanottaja: Rahkonen Jukka Aihe: Re: WMS/WFS Mapserver Projection Error Hi Jukka, I'd tried adding this parameter before changing the parameters on my client, but it doesn't work at all. Any other idea? On 5 September 2011 22:53, Rahkonen Jukka > wrote: Hi, Have a try with "wfs_getcapabilities_version" metadata that is mentioned in http://mapserver.org/ogc/wfs_server.html -Jukka Rahkonen- ________________________________ L?hett?j?: Lucho [mailto:lucho1524 at gmail.com] L?hetetty: 6. syyskuuta 2011 1:05 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users at lists.osgeo.org Aihe: Re: WMS/WFS Mapserver Projection Error Thanks, list... As Jukka said, the problem was in the way of how the WFS 1.1.0 standard works with the BBOX Envelope. I've changed the order of the variables in which the coordinate values were captured on my web client, using the order given by the GetFeature request on WFS 1.0.0, and that's it!!! It works now. Unfortunately, i do not know if there is any form of specify the version of WFS service in the metadata of my mapfile. Best wishes, On 5 September 2011 05:37, Rahkonen Jukka > wrote: Hi, Your failing client is most probably sending WFS 1.1.0 version GetFeature request and therefore Mapserver is sending the coordinates in Latitude-Longitude order. This is how the WFS 1.1.0 says it should be. According to the WFS 1.1.0 standard your client is doing it wrong. Lots of people have said that the WFS 1.1.0 standard is stupid. If your client supports WFS 1.0.0 use that and the map will look good. Have a try with your browser and you will see what I mean http://your_server/cgi-bin/mapserv?service=WFS&version=1.0.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile http://your_server/cgi-bin/mapserv?service=WFS&version=1.1.0&request=GetFeature&typeName=your_typename&maxFeatures=1&map=your_mapfile -Jukka Rahkonen- Lucho wrote: Hi List, I have a problem with some data when I'm publishing a WMS and then, publish the same data in a WFS service. Everithing is ok speaking about attending requests, but when I get the data with some clients, it seems that WFS has a total different projection. The image attached explain better the situation. In Quantum GIS the two services working well, but in other clients I have this problem. The data are in EPSG:4326 Any ideas? Best regards, -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -------------- next part -------------- An HTML attachment was scrubbed... URL: From a1hunter at ucsd.edu Tue Sep 6 10:14:20 2011 From: a1hunter at ucsd.edu (aphunter) Date: Tue, 6 Sep 2011 10:14:20 -0700 (PDT) Subject: [mapserver-users] New to mapserver. Cannot render TIFF Message-ID: <1315329260805-6764772.post@n2.nabble.com> Hello. I am new to MapServer and I am having some trouble. I've got a sample MAP file that I created from some examples (and modified based on this thread: http://osgeo-org.1803224.n2.nabble.com/Cannot-display-raster-MS4W-shows-white-rectangle-instead-td4996020.html) however, I am still getting blank images when using shp2img. In my mapfile, if I change overview3.tif to overview3.png (which I manually converted to a PNG), the images show up just fine. I made sure my extent was setup properly as well based on the gdalinfo (below). Can anybody please help me figure out why I get a blank image when using a TIF file, but not a PNG as the input? MapServer was compiled using GDAL as opposed to the native TIFF support as the readme said it was more efficient. Thank You! -- GDALINFO Driver: GTiff/GeoTIFF Files: overview3.tif Size is 2222, 2459 Coordinate System is: PROJCS["NAD83 / UTM zone 11N", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26911"]] Origin = (222400.000000000000000,4210380.000000000000000) Pixel Size = (250.000000000000000,-250.000000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 222400.000, 4210380.000) (120d 9'40.96"W, 37d59'55.05"N) Lower Left ( 222400.000, 3595630.000) (119d57'12.04"W, 32d27'47.78"N) Upper Right ( 777900.000, 4210380.000) (113d50'6.76"W, 37d59'54.72"N) Lower Right ( 777900.000, 3595630.000) (114d 2'36.48"W, 32d27'47.51"N) Center ( 500150.000, 3903005.000) (116d59'54.06"W, 35d16'12.63"N) Band 1 Block=2222x1 Type=Byte, ColorInterp=Red Mask Flags: PER_DATASET ALPHA Band 2 Block=2222x1 Type=Byte, ColorInterp=Green Mask Flags: PER_DATASET ALPHA Band 3 Block=2222x1 Type=Byte, ColorInterp=Blue Mask Flags: PER_DATASET ALPHA Band 4 Block=2222x1 Type=Byte, ColorInterp=Alpha -- MAPFILE (Thanks to Kresh in the previous post) MAP NAME Industri IMAGETYPE JPEG EXTENT 222400 222400 421000 421000 STATUS ON UNITS METERS # satuan meter, UTM SIZE 600 400 SHAPEPATH "C:\mapfiles\shp" IMAGECOLOR 255 255 255 WEB IMAGEPATH '/var/www/docs_maps/tmp/' IMAGEURL '/docs_maps/tmp/' TEMPLATE '/var/www/workshop-5.4/itasca_basic.html' END # # Mulai pendefinisian layers # LAYER NAME global-raster TYPE RASTER STATUS DEFAULT DATA "/var/www/docs_maps/tmp/overview3.tif" #<--- changing this to the PNG works great CLASS NAME 'global-raster' END END # LEGEND STATUS ON KEYSIZE 18 12 KEYSPACING 2 3 TRANSPARENT OFF LABEL TYPE BITMAP COLOR 0 0 0 SIZE SMALL END TEMPLATE '/var/www/workshop-5.4/itasca_basic.html' END END -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/New-to-mapserver-Cannot-render-TIFF-tp6764772p6764772.html Sent from the Mapserver - User mailing list archive at Nabble.com. From juanrapoport at suremptec.com.ar Tue Sep 6 13:59:04 2011 From: juanrapoport at suremptec.com.ar (Juan Rapoport) Date: Tue, 6 Sep 2011 17:59:04 -0300 Subject: [mapserver-users] WCS GetCoverage error Message-ID: Hello list, I have a raster datasource in epsg:900913. I make a GetCoverage request using WCS standard 1.1.0, using this parameters: -SERVICE=WCS&VERSION=1.1.0&REQUEST=GetCoverage&IDENTIFIER=ImagenSatelitalbajares&FORMAT=image/tiff&BOUNDINGBOX=-36,-60,-34,-56,urn:ogc:def:crs:EPSG::4326 the resulting image is one pixel only. Changing the BOUNDINGBOX to miny, minx, maxy, maxx (BOUNDINGBOX=-60,-36,-56,-34,urn:ogc:def:crs:EPSG::4326), makes this error: WCS server error. Requested BBOX (-4007501.66855785,-7558415.65608178,-4007501.66855785,21542212.205083) is outside requested coverage BBOX (-8688253.27640932,-7822332.37194489,-5635586.68352614,-1988107.35315028) Seems that the upper tight coordinate is not taken into account. Is Mapserver misunderstanding the boundingbox parameters? Using Mapserver 5.6. Thanks in advance. -- Juan Rapoport -------------- next part -------------- An HTML attachment was scrubbed... URL: From warmerdam at pobox.com Tue Sep 6 20:40:50 2011 From: warmerdam at pobox.com (Frank Warmerdam) Date: Tue, 06 Sep 2011 20:40:50 -0700 Subject: [mapserver-users] New to mapserver. Cannot render TIFF In-Reply-To: <1315329260805-6764772.post@n2.nabble.com> References: <1315329260805-6764772.post@n2.nabble.com> Message-ID: <4E66E7C2.7080608@pobox.com> On 11-09-06 10:14 AM, aphunter wrote: > Hello. I am new to MapServer and I am having some trouble. I've got a sample > MAP file that I created from some examples (and modified based on this > thread: > http://osgeo-org.1803224.n2.nabble.com/Cannot-display-raster-MS4W-shows-white-rectangle-instead-td4996020.html) > however, I am still getting blank images when using shp2img. > > In my mapfile, if I change overview3.tif to overview3.png (which I manually > converted to a PNG), the images show up just fine. I made sure my extent was > setup properly as well based on the gdalinfo (below). Can anybody please > help me figure out why I get a blank image when using a TIF file, but not a > PNG as the input? MapServer was compiled using GDAL as opposed to the native > TIFF support as the readme said it was more efficient. ... > Upper Left ( 222400.000, 4210380.000) (120d 9'40.96"W, 37d59'55.05"N) > Lower Left ( 222400.000, 3595630.000) (119d57'12.04"W, 32d27'47.78"N) > Upper Right ( 777900.000, 4210380.000) (113d50'6.76"W, 37d59'54.72"N) > Lower Right ( 777900.000, 3595630.000) (114d 2'36.48"W, 32d27'47.51"N) > Center ( 500150.000, 3903005.000) (116d59'54.06"W, 35d16'12.63"N) ... > EXTENT 222400 222400 421000 421000 A.P. Hunter, The Y coordinate range in your EXTENT line does not intersect the Y range of the image. Try adjusting your EXTENT line accordingly. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/warmerda and watch the world go round - Rush | Geospatial Software Developer From Keith.Moss at landgate.wa.gov.au Wed Sep 7 01:18:10 2011 From: Keith.Moss at landgate.wa.gov.au (Keith Moss) Date: Wed, 7 Sep 2011 01:18:10 -0700 (PDT) Subject: [mapserver-users] ERS temp files from WCS Message-ID: <1315383490146-6766945.post@n2.nabble.com> Hi all, We're using WCS to subset imagery in a variety of formats. When we request a GDAL/ERS outputformat the raw data file is returned, but we need to also access the .ers header file. We've noticed that the header file is created in our temp directory but the file name is inconvenient. e.g. 4e67272e_19c_1.img.tmp.ers We would like to be able to zip the header file up with the raw data file, so we need be able to either specify the name or predict what it will be. Can anyone provide any insight? Here's our output format: OUTPUTFORMAT NAME ERS DRIVER "GDAL/ERS" MIMETYPE "image/ers" IMAGEMODE INT16 END -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/ERS-temp-files-from-WCS-tp6766945p6766945.html Sent from the Mapserver - User mailing list archive at Nabble.com. From qazi.iqbal at gmail.com Wed Sep 7 04:49:30 2011 From: qazi.iqbal at gmail.com (qazi iqbal) Date: Wed, 7 Sep 2011 07:49:30 -0400 Subject: [mapserver-users] Projection of different layers Message-ID: Hello I am having a mapfile with output projection set to my base layer as PROJECTION init=epsg:4326' END As long as i add a layer in the same projection, it works ok, but I added one layer with the projection PROJECTION 'init=epsg:2240' END I do not see this layer being projected on fly to output projection. I want this layer to be projected to my base layer projection on fly. What am I missing? Thanks Qazi Iqbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.l.h.hartmann at uva.nl Wed Sep 7 06:29:15 2011 From: j.l.h.hartmann at uva.nl (Jan Hartmann) Date: Wed, 07 Sep 2011 15:29:15 +0200 Subject: [mapserver-users] Line numbers of error messages in mapfiles with includes Message-ID: <4E6771AB.7080009@uva.nl> Sometimes it's difficult to find the location of an error in a Mapfile, when that Mapfiles includes another Mapfile. In that case the line number is that of the combined files. Would it be possible to set the line-counter to the actual file Mapserver is parsing? Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: From a1hunter at ucsd.edu Wed Sep 7 08:00:52 2011 From: a1hunter at ucsd.edu (aphunter) Date: Wed, 7 Sep 2011 08:00:52 -0700 (PDT) Subject: [mapserver-users] Re: New to mapserver. Cannot render TIFF In-Reply-To: <4E66E7C2.7080608@pobox.com> References: <1315329260805-6764772.post@n2.nabble.com> <4E66E7C2.7080608@pobox.com> Message-ID: <1315407652477-6768086.post@n2.nabble.com> Thanks for the reply Frank. I adjusted the EXTENT, but still no go. The weird thing though is that when I use a PNG of the same image, things work great. I can't get any TIF, no matter how large or how small to work. In fact I tested a 200MB GeoTiff and Mapserver immediately spit out a white image with almost no disk activity. It's almost ignoring my DATA line when a TIF is provided.... Any other thoughts? This is really frustrating :(. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/New-to-mapserver-Cannot-render-TIFF-tp6764772p6768086.html Sent from the Mapserver - User mailing list archive at Nabble.com. From warmerdam at pobox.com Wed Sep 7 08:10:27 2011 From: warmerdam at pobox.com (Frank Warmerdam) Date: Wed, 07 Sep 2011 08:10:27 -0700 Subject: [mapserver-users] Re: New to mapserver. Cannot render TIFF In-Reply-To: <1315407652477-6768086.post@n2.nabble.com> References: <1315329260805-6764772.post@n2.nabble.com> <4E66E7C2.7080608@pobox.com> <1315407652477-6768086.post@n2.nabble.com> Message-ID: <4E678963.5000408@pobox.com> On 11-09-07 08:00 AM, aphunter wrote: > Thanks for the reply Frank. I adjusted the EXTENT, but still no go. The weird > thing though is that when I use a PNG of the same image, things work great. > I can't get any TIF, no matter how large or how small to work. > > In fact I tested a 200MB GeoTiff and Mapserver immediately spit out a white > image with almost no disk activity. It's almost ignoring my DATA line when a > TIF is provided.... > > Any other thoughts? This is really frustrating :(. A.P. Hunter, If you provide a mapfile + tiff + shp2img commandline you are using to me I can investigate a bit for you. Contact me off list. Nothing else obvious came to mind. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/warmerda and watch the world go round - Rush | Geospatial Software Developer From a1hunter at ucsd.edu Wed Sep 7 08:14:09 2011 From: a1hunter at ucsd.edu (aphunter) Date: Wed, 7 Sep 2011 08:14:09 -0700 (PDT) Subject: [mapserver-users] Re: New to mapserver. Cannot render TIFF In-Reply-To: <4E678963.5000408@pobox.com> References: <1315329260805-6764772.post@n2.nabble.com> <4E66E7C2.7080608@pobox.com> <1315407652477-6768086.post@n2.nabble.com> <4E678963.5000408@pobox.com> Message-ID: <1315408449559-6768142.post@n2.nabble.com> Frank, I take it back. It was the extent. I modified the extent and things are good. I was confused because I had some bogus coordinates in my URL request to the mapserver CGI, but using shp2img I was able to debug it. So far the MapServer community seems pretty nice! Thanks again, Aaron -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/New-to-mapserver-Cannot-render-TIFF-tp6764772p6768142.html Sent from the Mapserver - User mailing list archive at Nabble.com. From webturtles at gmail.com Wed Sep 7 08:59:45 2011 From: webturtles at gmail.com (Chris Jackson) Date: Wed, 7 Sep 2011 16:59:45 +0100 Subject: [mapserver-users] character encoding Message-ID: Hi all I am having some issues with special characters in my application (sure I am not the first!) and wondered what the best way is to 'clean up' the data so I know it is specifically in a given format say UTF-8 or ISO. My source data was from KML -> shp using ArcGIS 10 (though who knows what the kml format was!). One would assume if using ArcMap on a UK machine would give you an ISO output.... Should I copy the characters back into the attribute table via ArcGIS (but what program should I use to copy the characters from - Word...). I did use the ArcGIS export registry setting to export my supposed ISO shapfile to UTF-8 format (but the label rendering is wrong). Any ideas would be much appreciated! Many thanks Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Wed Sep 7 09:22:49 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 07 Sep 2011 13:22:49 -0300 Subject: [mapserver-users] character encoding In-Reply-To: References: Message-ID: <4E679A59.4090200@gatewaygeomatics.com> On 11-09-07 12:59 PM, Chris Jackson wrote: > Hi all > > I am having some issues with special characters in my application (sure > I am not the first!) and wondered what the best way is to 'clean up' the > data so I know it is specifically in a given format say UTF-8 or ISO. My > source data was from KML -> shp using ArcGIS 10 (though who knows what > the kml format was!). One would assume if using ArcMap on a UK machine > would give you an ISO output.... Should I copy the characters back into > the attribute table via ArcGIS (but what program should I use to copy > the characters from - Word...). I did use the ArcGIS export registry > setting to export my supposed ISO shapfile to UTF-8 format (but the > label rendering is wrong). Any ideas would be much appreciated! Hi Chris, My quick thoughts are: - use ogr2ogr (the GDAL/OGR library) to do your conversion from KML to shp (if you are on Windows, the MS4W product can help you with that http://www.maptools.org/ms4w/index.phtml?page=downloads.html) - another option is to use the KML in its native format with MapServer (http://www.mapserver.org/input/vector/kml.html), which is also possible with MS4W - if by "application" problems you mean map label problems with encoded characters, this howto should help you: http://www.mapserver.org/mapfile/labelencoding.html Hope that helps. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From Steve.Toutant at inspq.qc.ca Wed Sep 7 10:32:44 2011 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Wed, 7 Sep 2011 13:32:44 -0400 Subject: [mapserver-users] label problem since MS6 Message-ID: I have a label rendering problem since I migrated to MS6. Please see attached image generated with shp2img. See that the labels are not clear. It was fine with MS5.6 The problem is TRANSPARENT ON. If I remove it the labels are clean. I read this document http://mapserver.org/MIGRATION_GUIDE.html#mapserver-5-6-to-6-0-migration but didn't find the solution Is there something wrong with these definitions below? thank you OUTPUTFORMAT NAME gif DRIVER "GD/GIF" MIMETYPE "image/gif" IMAGEMODE PC256 EXTENSION "gif" TRANSPARENT ON END IMAGETYPE gif LABEL TYPE TRUETYPE FONT "arialbd" SIZE 7 POSITION cc COLOR 51 153 0 MINDISTANCE 100000 PARTIALS FALSE ANTIALIAS true END -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: shp2img.gif Type: image/gif Size: 3939 bytes Desc: not available URL: From posthumusb at AGR.GC.CA Wed Sep 7 11:06:42 2011 From: posthumusb at AGR.GC.CA (Brad Posthumus) Date: Wed, 7 Sep 2011 11:06:42 -0700 (PDT) Subject: [mapserver-users] Re: label problem since MS6 In-Reply-To: References: Message-ID: <1315418802826-6768934.post@n2.nabble.com> I had the same problem using PC256 with the GD driver, which sounds like it isn't well supported. I was using PNG's, so switching to the AGG driver was an option (with new challenges, as I'm about to post...) but it doesn't sound like it is with GIF's. Here's the post I had earlier regarding this problem. I never did log a bug report but if other users are having the same issue maybe it's worth it to do so. http://osgeo-org.1803224.n2.nabble.com/Font-rendering-in-MapServer-6-0-td6555935.html -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/label-problem-since-MS6-tp6768768p6768934.html Sent from the Mapserver - User mailing list archive at Nabble.com. From webturtles at gmail.com Wed Sep 7 11:40:45 2011 From: webturtles at gmail.com (Chris Jackson) Date: Wed, 7 Sep 2011 19:40:45 +0100 Subject: [mapserver-users] Re character encoding Message-ID: Hi Jeff I may well try that! The trouble is I have a stack of attributes in a Access db which I was joining onto the KML data. I need the complete dataset for an ArcGIS Server data service anyway so a shapefile seemed to be a good way to join it all and assist with that (will end up in SDE) and my mapfile dataset too. I had already read the page you mentioned and all is in place (I am using the MS4W PHP/mapscript set-up on IIS) and my original ISO flavoured version labels up nicely - it just breaks some of the query functionality (though it shouldn't - which is why I wonder if some of the characters are badly formed)! Thanks for the advice Chris Hi Chris, > My quick thoughts are: > - use ogr2ogr (the GDAL/OGR library) to do your conversion from KML to > shp (if you are on Windows, the MS4W product can help you with that > http://www.maptools.org/ms4w/index.phtml?page=downloads.html) > - another option is to use the KML in its native format with MapServer > (http://www.mapserver.org/input/vector/kml.html), which is also possible > with MS4W > - if by "application" problems you mean map label problems with encoded > characters, this howto should help you: > http://www.mapserver.org/mapfile/labelencoding.html > Hope that helps. > -jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From posthumusb at AGR.GC.CA Wed Sep 7 11:47:49 2011 From: posthumusb at AGR.GC.CA (Brad Posthumus) Date: Wed, 7 Sep 2011 11:47:49 -0700 (PDT) Subject: [mapserver-users] Rendering with a single transparent colours in MapServer 6 Message-ID: <1315421269559-6769109.post@n2.nabble.com> We need to create 8-bit PNG images in MS 6.0 that have one single colour (white) designated as transparent with all other colours as 100% opaque. Using the GD driver with PC256 works well with vectors but not with fonts (see http://osgeo-org.1803224.n2.nabble.com/Font-rendering-in-MapServer-6-0-td6555935.html ). Using the AGG driver with quantization creates nice images but with semi-transparent colours, a feature Internet Explorer 6 tends to butcher. Is there another option? As an example, right now we're using this as our output format to create the image that follows: OUTPUTFORMAT NAME png8 DRIVER "AGG/PNG8" MIMETYPE "image/png; mode=8bit" IMAGEMODE RGBA EXTENSION "png" FORMATOPTION "INTERLACE=off" FORMATOPTION "QUANTIZE_FORCE=on" FORMATOPTION "QUANTIZE_COLORS=256" TRANSPARENT ON END http://osgeo-org.1803224.n2.nabble.com/file/n6769109/comparingAGGQuantization.png What we need is the following image (created using GD and PC256): http://osgeo-org.1803224.n2.nabble.com/file/n6769109/comparingGDPc256.png Is this possible in MS 6.0? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Rendering-with-a-single-transparent-colours-in-MapServer-6-tp6769109p6769109.html Sent from the Mapserver - User mailing list archive at Nabble.com. From sdlime at gmail.com Wed Sep 7 12:52:37 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 7 Sep 2011 14:52:37 -0500 Subject: [mapserver-users] Line numbers of error messages in mapfiles with includes In-Reply-To: <4E6771AB.7080009@uva.nl> References: <4E6771AB.7080009@uva.nl> Message-ID: Which version are you using? For some reason I thought this was in place in the 6.0 release. Steve On Wed, Sep 7, 2011 at 8:29 AM, Jan Hartmann wrote: > Sometimes it's difficult to find the location of an error in a Mapfile, when > that Mapfiles includes another Mapfile. In that case the line number is that > of the combined files. Would it be possible to set the line-counter to the > actual file Mapserver is parsing? > > Jan > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From Stuart.Harlan at modot.mo.gov Wed Sep 7 13:30:24 2011 From: Stuart.Harlan at modot.mo.gov (Stuart.Harlan at modot.mo.gov) Date: Wed, 7 Sep 2011 15:30:24 -0500 Subject: [mapserver-users] Crash on Labeling Message-ID: I am labeling roads. I have a class using the TEXT directive like so: TEXT 'Bus [NAME]' This is for a business loop and labels in the map correctly with the highway name in the place of [NAME]. I also have other "Loop"s. I tried this for the other loops: TEXT 'Loop [NAME]' ...and I get the following label in the map: Loop [NAME] ...just like you see it, with brackets and all. Then I did some experimenting. When I try this in the config file: TEXT 'q [NAME]' ...the entire process crashes. Yes, that's simply a 'q'. Are there labeling issues in MapServer 6.0.1? Because, I think I may have found some. I'm using a custom built binary (MSVC 10) on Windows 7. Stuart Harlan -------------- next part -------------- An HTML attachment was scrubbed... URL: From armin.burger at gmx.net Wed Sep 7 14:10:20 2011 From: armin.burger at gmx.net (Armin Burger) Date: Wed, 07 Sep 2011 23:10:20 +0200 Subject: [mapserver-users] character encoding In-Reply-To: References: Message-ID: <4E67DDBC.6@gmx.net> QGIS has quite nice possibilities to select the encoding when opening and writing the various supported vector data formats (including e.g. shape and KML). armin On 07/09/2011 17:59, Chris Jackson wrote: > Hi all > > I am having some issues with special characters in my application (sure > I am not the first!) and wondered what the best way is to 'clean up' the > data so I know it is specifically in a given format say UTF-8 or ISO. My > source data was from KML -> shp using ArcGIS 10 (though who knows what > the kml format was!). One would assume if using ArcMap on a UK machine > would give you an ISO output.... Should I copy the characters back into > the attribute table via ArcGIS (but what program should I use to copy > the characters from - Word...). I did use the ArcGIS export registry > setting to export my supposed ISO shapfile to UTF-8 format (but the > label rendering is wrong). Any ideas would be much appreciated! > > Many thanks > > Chris > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From thomas.bonfort at gmail.com Wed Sep 7 14:23:41 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 7 Sep 2011 23:23:41 +0200 Subject: [mapserver-users] Crash on Labeling In-Reply-To: References: Message-ID: Stuart, please open a ticket and attach a minimal mapfile/testcase that reproduces the issue. -- thomas On Wed, Sep 7, 2011 at 22:30, wrote: > I am labeling roads. ?I have a class using the TEXT directive like so: > > TEXT 'Bus [NAME]' > > This is for a business loop and labels in the map correctly with the highway > name in the place of [NAME]. ?I also have other "Loop"s. ?I tried this for > the other loops: > > TEXT 'Loop [NAME]' > > ...and I get the following label in the map: > > Loop [NAME] > > ...just like you see it, with brackets and all. ?Then I did some > experimenting. ?When I try this in the config file: > > TEXT 'q [NAME]' > > ...the entire process crashes. ?Yes, that's simply a 'q'. ?Are there > labeling issues in MapServer 6.0.1? ?Because, I think I may have found some. > ?I'm using a custom built binary (MSVC 10) on Windows 7. > > Stuart Harlan > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From punk.kish at gmail.com Wed Sep 7 15:49:23 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 7 Sep 2011 17:49:23 -0500 Subject: [mapserver-users] MapScript WMS request Message-ID: I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. my $map = undef; $map = mapObj(name => 'mymap') unless defined $map; my $req = new mapscript::OWSRequest(); $req->setParameter( "SERVICE", "WMS" ); $req->setParameter( "VERSION", "1.1.0" ); $req->setParameter( "REQUEST", "GetCapabilities" ); mapscript::msIO_installStdoutToBuffer(); my $dispatch_out = $map->OWSDispatch( $req ); printf "%s\n", mapscript::msIO_getStdoutBufferString(); Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? -- Puneet Kishor From punk.kish at gmail.com Wed Sep 7 16:12:55 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 7 Sep 2011 18:12:55 -0500 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: References: Message-ID: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: > I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. > > my $map = undef; > $map = mapObj(name => 'mymap') unless defined $map; > > my $req = new mapscript::OWSRequest(); > $req->setParameter( "SERVICE", "WMS" ); > $req->setParameter( "VERSION", "1.1.0" ); > $req->setParameter( "REQUEST", "GetCapabilities" ); I changed the above line to $req->setParameter( "REQUEST", "GetMap"); but, still no improvement. > > mapscript::msIO_installStdoutToBuffer(); > my $dispatch_out = $map->OWSDispatch( $req ); > printf "%s\n", mapscript::msIO_getStdoutBufferString(); > > Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? > > > -- > Puneet Kishor From sdlime at gmail.com Wed Sep 7 16:29:58 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 7 Sep 2011 18:29:58 -0500 Subject: [mapserver-users] Projection of different layers In-Reply-To: References: Message-ID: <42D09575-982A-436A-9A6A-7C1850357E37@gmail.com> Any error message? Is the layer on? How are requesting a map, WMS, straight CGI? Basically you need to be more specific... Steve Sent from my iPad On Sep 7, 2011, at 6:49 AM, qazi iqbal wrote: > Hello > I am having a mapfile with output projection set to my base layer as > PROJECTION > init=epsg:4326' > END > > As long as i add a layer in the same projection, it works ok, but I added one layer with the projection > > PROJECTION > 'init=epsg:2240' > END > > I do not see this layer being projected on fly to output projection. I want this layer to be projected to my base layer projection on fly. What am I missing? > > Thanks > > Qazi Iqbal > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Wed Sep 7 20:18:11 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 7 Sep 2011 22:18:11 -0500 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> Message-ID: <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- my $new_extent = $map->{extent}; my $req = new mapscript::OWSRequest(); $req->setParameter( "SERVICE", "WMS" ); $req->setParameter( "VERSION", "1.1.0" ); $req->setParameter( "REQUEST", "GetMap" ); $req->setParameter( "BBOX", "-180,-90,180,90" ); $req->setParameter( "LAYERS", "layer_name"); $req->setParameter( "SRS", "-1"); $req->setParameter( "WIDTH", "1200"); $req->setParameter( "HEIGHT", "600"); my $dispatch_out = $map->OWSDispatch( $req ); my $img = $map->draw(); my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; $img->save("/path/to/$map_img"); return send_file("/path/to/$map_img"); Comments? Corrections? On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: > > On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: > >> I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. >> >> my $map = undef; >> $map = mapObj(name => 'mymap') unless defined $map; >> >> my $req = new mapscript::OWSRequest(); >> $req->setParameter( "SERVICE", "WMS" ); >> $req->setParameter( "VERSION", "1.1.0" ); >> $req->setParameter( "REQUEST", "GetCapabilities" ); > > I changed the above line to > > $req->setParameter( "REQUEST", "GetMap"); > > but, still no improvement. > > >> >> mapscript::msIO_installStdoutToBuffer(); >> my $dispatch_out = $map->OWSDispatch( $req ); >> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >> >> Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? >> >> >> -- >> Puneet Kishor > From warmerdam at pobox.com Wed Sep 7 20:29:52 2011 From: warmerdam at pobox.com (Frank Warmerdam) Date: Wed, 07 Sep 2011 20:29:52 -0700 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> Message-ID: <4E6836B0.5090602@pobox.com> On 11-09-07 08:18 PM, Mr. Puneet Kishor wrote: > I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. > > So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. > > Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- > > my $new_extent = $map->{extent}; > > my $req = new mapscript::OWSRequest(); > $req->setParameter( "SERVICE", "WMS" ); > $req->setParameter( "VERSION", "1.1.0" ); > $req->setParameter( "REQUEST", "GetMap" ); > $req->setParameter( "BBOX", "-180,-90,180,90" ); > $req->setParameter( "LAYERS", "layer_name"); > $req->setParameter( "SRS", "-1"); > $req->setParameter( "WIDTH", "1200"); > $req->setParameter( "HEIGHT", "600"); > > my $dispatch_out = $map->OWSDispatch( $req ); > my $img = $map->draw(); > my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; > $img->save("/path/to/$map_img"); > return send_file("/path/to/$map_img"); > > > Comments? Corrections? Puneet, I rarely use PHP and it is possible something is broken now with PHP OWS dispatching. But it should work like: http://mapserver.org/ogc/mapscript.html#php-example Alternatively if you don't install the stdout redirection the OWSDispatch call should produce the image to stdout. Note that if you want things handled properly as a WMS request you should not be calling draw(). The ticket you reference long predates the WxS MapScript services effort. I suspect you are not really setting all the environment variables needed to make the WMS handler kick in during OWSDispatch though I'd have to play around with it to be sure. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/warmerda and watch the world go round - Rush | Geospatial Software Developer From matt at wildwalks.com Wed Sep 7 21:15:09 2011 From: matt at wildwalks.com (Matt McClelland) Date: Thu, 8 Sep 2011 14:15:09 +1000 Subject: [mapserver-users] .MAP file for New Zealand topo50 Message-ID: Hi All Just wondering if anyone has a .MAP file for the New Zealand Topo50 map series I have download the shp files from their website http://www.linz.govt.nz/topography/topo-maps/topo50 I am hoping someone else has done the hard work of putting a .map file together. Thanks Matt :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaja0506 at gmail.com Wed Sep 7 22:46:58 2011 From: jaja0506 at gmail.com (jjwang) Date: Wed, 7 Sep 2011 22:46:58 -0700 (PDT) Subject: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this case? Message-ID: <1315460818303-6770598.post@n2.nabble.com> I want to define classes according to the proportion between two attributes of the feature. How to do this? For example: feature has two attributes 'PopulationOver65' and 'PopulationTotal'. They are both numbers. I want the color of this feature: green if PopulationOver65/PopulationTotal <10%, yellow if 10% -30%, red if 30%. Anyway to do this? JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-define-the-CLASSITEM-and-EXPRESSION-in-this-case-tp6770598p6770598.html Sent from the Mapserver - User mailing list archive at Nabble.com. From j.l.h.hartmann at uva.nl Thu Sep 8 01:39:25 2011 From: j.l.h.hartmann at uva.nl (Jan Hartmann) Date: Thu, 08 Sep 2011 10:39:25 +0200 Subject: [mapserver-users] Line numbers of error messages in mapfiles with includes In-Reply-To: References: <4E6771AB.7080009@uva.nl> Message-ID: <4E687F3D.3060507@uva.nl> Yes, it was under 5.7. I tested it under 6 and there it works OK. Thanks, Jan On 09/07/2011 09:52 PM, Steve Lime wrote: > Which version are you using? For some reason I thought this was in > place in the 6.0 release. > > Steve > > On Wed, Sep 7, 2011 at 8:29 AM, Jan Hartmann wrote: >> Sometimes it's difficult to find the location of an error in a Mapfile, when >> that Mapfiles includes another Mapfile. In that case the line number is that >> of the combined files. Would it be possible to set the line-counter to the >> actual file Mapserver is parsing? >> >> Jan >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From dejan.gambin at coin.hr Thu Sep 8 03:12:24 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Thu, 8 Sep 2011 12:12:24 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng Message-ID: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> Hi, After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. Here is the error I get: ./libmapserver.a(mapimageio.o): In function `savePalettePNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' ./libmapserver.a(mapimageio.o): In function `saveAsPNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' ./libmapserver.a(mapimageio.o): In function `readPNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' collect2: ld returned 1 exit status Here is my configure: ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. Am I doing something wrong? Thank you very much for any useful info regards, dejan From sdlime at gmail.com Thu Sep 8 07:22:24 2011 From: sdlime at gmail.com (Steve Lime) Date: Thu, 8 Sep 2011 09:22:24 -0500 Subject: [mapserver-users] Line numbers of error messages in mapfiles with includes In-Reply-To: <4E687F3D.3060507@uva.nl> References: <4E6771AB.7080009@uva.nl> <4E687F3D.3060507@uva.nl> Message-ID: Changes are restricted to maplexer.l if you felt the need to patch 5.7. Let me know if you need assistance... Steve On Thu, Sep 8, 2011 at 3:39 AM, Jan Hartmann wrote: > Yes, it was under 5.7. I tested it under 6 and there it works OK. > > Thanks, > > Jan > > On 09/07/2011 09:52 PM, Steve Lime wrote: > > Which version are you using? For some reason I thought this was in > place in the 6.0 release. > > Steve > > On Wed, Sep 7, 2011 at 8:29 AM, Jan Hartmann wrote: > > Sometimes it's difficult to find the location of an error in a Mapfile, when > that Mapfiles includes another Mapfile. In that case the line number is that > of the combined files. Would it be possible to set the line-counter to the > actual file Mapserver is parsing? > > Jan > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > From david.fawcett at state.mn.us Thu Sep 8 08:22:08 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Thu, 8 Sep 2011 10:22:08 -0500 Subject: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this case? In-Reply-To: <1315460818303-6770598.post@n2.nabble.com> References: <1315460818303-6770598.post@n2.nabble.com> Message-ID: Have you looked at this page in the documentation? http://mapserver.org/mapfile/expressions.html#arithmetic-operations-and-functions-that-return-a-number You should be able to do this. You wouldn't use a CLASSITEM, just an expression. Create individual classes for green, yellow, and red. The expression for green would be something like: EXPRESSION ([PopulationOver65] / [PopulationTotal] * 100 < 10) David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of jjwang Sent: Thursday, September 08, 2011 12:47 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this case? I want to define classes according to the proportion between two attributes of the feature. How to do this? For example: feature has two attributes 'PopulationOver65' and 'PopulationTotal'. They are both numbers. I want the color of this feature: green if PopulationOver65/PopulationTotal <10%, yellow if 10% -30%, red if 30%. Anyway to do this? JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-define-the-CLASSITEM-and-EXPRESSION-in-this-case-tp6770598p6770598.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From j.l.h.hartmann at uva.nl Thu Sep 8 08:34:05 2011 From: j.l.h.hartmann at uva.nl (Jan Hartmann) Date: Thu, 08 Sep 2011 17:34:05 +0200 Subject: [mapserver-users] Line numbers of error messages in mapfiles with includes In-Reply-To: References: <4E6771AB.7080009@uva.nl> <4E687F3D.3060507@uva.nl> Message-ID: <4E68E06D.4050402@uva.nl> Tanks Steve, not necessary. Better spend my time on updating everything to 6 ... Jan On 09/08/2011 04:22 PM, Steve Lime wrote: > Changes are restricted to maplexer.l if you felt the need to patch > 5.7. Let me know if you need assistance... > > Steve > > On Thu, Sep 8, 2011 at 3:39 AM, Jan Hartmann wrote: >> Yes, it was under 5.7. I tested it under 6 and there it works OK. >> >> Thanks, >> >> Jan >> >> On 09/07/2011 09:52 PM, Steve Lime wrote: >> >> Which version are you using? For some reason I thought this was in >> place in the 6.0 release. >> >> Steve >> >> On Wed, Sep 7, 2011 at 8:29 AM, Jan Hartmann wrote: >> >> Sometimes it's difficult to find the location of an error in a Mapfile, when >> that Mapfiles includes another Mapfile. In that case the line number is that >> of the combined files. Would it be possible to set the line-counter to the >> actual file Mapserver is parsing? >> >> Jan >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Thu Sep 8 09:27:40 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 11:27:40 -0500 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <4E6836B0.5090602@pobox.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <4E6836B0.5090602@pobox.com> Message-ID: <8C37F2CA-BB7E-4579-999D-C9959B5F0E82@gmail.com> On Sep 7, 2011, at 10:29 PM, Frank Warmerdam wrote: > On 11-09-07 08:18 PM, Mr. Puneet Kishor wrote: >> I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. >> >> So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. >> >> Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- >> >> my $new_extent = $map->{extent}; >> >> my $req = new mapscript::OWSRequest(); >> $req->setParameter( "SERVICE", "WMS" ); >> $req->setParameter( "VERSION", "1.1.0" ); >> $req->setParameter( "REQUEST", "GetMap" ); >> $req->setParameter( "BBOX", "-180,-90,180,90" ); >> $req->setParameter( "LAYERS", "layer_name"); >> $req->setParameter( "SRS", "-1"); >> $req->setParameter( "WIDTH", "1200"); >> $req->setParameter( "HEIGHT", "600"); >> >> my $dispatch_out = $map->OWSDispatch( $req ); >> my $img = $map->draw(); >> my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; >> $img->save("/path/to/$map_img"); >> return send_file("/path/to/$map_img"); >> >> >> Comments? Corrections? > > Puneet, > > I rarely use PHP and it is possible something is broken now with PHP > OWS dispatching. But it should work like: > > http://mapserver.org/ogc/mapscript.html#php-example > > Alternatively if you don't install the stdout redirection the OWSDispatch > call should produce the image to stdout. > > Note that if you want things handled properly as a WMS request you should > not be calling draw(). The ticket you reference long predates the WxS > MapScript services effort. > > I suspect you are not really setting all the environment variables needed > to make the WMS handler kick in during OWSDispatch though I'd have to > play around with it to be sure. > Frank, The above code was for (ahem) Perl MapScript. I am sure you are correct that I am not setting all the environment variables. I am hoping for a tutorial or code fragment that shows how to do it correctly. The one in the documentation that I am following doesn't seem to have any more than what I am setting. The following is the entirety of my non-working code (simplified bit for brevity, and also available with syntax highlighting at [http://pastebin.com/fz6MCXpm]) -- use DBI; use mapscript; my $map = new mapscript::mapObj() or warn "error: $mapscript::ms_error->{message}\n"; $map->{name} = 'mymap'; $map->{status} = $mapscript::MS_ON; $map->{units} = $mapscript::MS_DD; $map->setImageType('png'); my $imageColor = new mapscript::colorObj; $imageColor->setHex('#FFFFFF'); $map->{imagecolor} = $imageColor; $map->setSize(1200, 600); $map->setExtent(-180, -90, 180, 90); $map->selectOutputFormat('png'); $map->setProjection("proj=latlong"); my $outputFormatObj = new mapscript::outputFormatObj('AGG/PNG'); $outputFormatObj->setExtension('png'); $outputFormatObj->setMimetype('image/png'); $outputFormatObj->{imagemode} = $mapscript::MS_IMAGEMODE_RGB; $map->setOutputFormat( $outputFormatObj ); my $layerOne = new mapscript::layerObj($map); $layerOne->{name} = "layer one"; $layerOne->{status} = $mapscript::MS_ON; $layerOne->{type} = $mapscript::MS_LAYER_POLYGON; $layerOne->{opacity} = 100; $layerOne->{connection} = 'host=localhost port=5432 dbname=mydb user=dbuser password=dbpasswd'; $layerOne->setConnectionType($mapscript::MS_POSTGIS, ''); $layerOne->{data} = 'the_geom FROM (SELECT class_name, the_geom FROM t1) a_view USING UNIQUE gid USING srid=-1'; $layerOne->{classitem} = 'class_name'; $layerOne->setProjection("proj=latlong"); my $classOutlineColor = new mapscript::colorObj; $classOutlineColor->setHex('#444444'); my $sth = database->prepare('SELECT class_name, class_color FROM t2'); $sth->execute; while (my ($class_name, $class_color) = $sth->fetchrow_array) { my $classObj = new mapscript::classObj($layerOne); $classObj->{name} = $class_name; $classObj->setExpression("$class_name"); my $classFillColor = new mapscript::colorObj; $classFillColor->setHex($class_color); my $styleObj = new mapscript::styleObj($classObj); $styleObj->{color} = $classFillColor; $styleObj->{outlinecolor} = $classOutlineColor; } $sth->finish; my $req = new mapscript::OWSRequest(); $req->setParameter( "SERVICE", "WMS" ); $req->setParameter( "VERSION", "1.1.0" ); $req->setParameter( "REQUEST", "GetMap" ); $req->setParameter( "BBOX", "-173.537,35.8775,-11.9603,83.8009" ); $req->setParameter( "LAYERS", "layer one"); $req->setParameter( "SRS", "-1"); $req->setParameter( "WIDTH", "1200"); $req->setParameter( "HEIGHT", "600"); my $io = mapscript::msIO_installStdoutToBuffer(); my $dispatch_out = $map->OWSDispatch( $req ); printf "%s\n", mapscript::msIO_getStdoutBufferString(); Anything stand out that I am doing wrong above? Or, stuff that I am missing? Many thanks in advance, Puneet. From vaibhavkumargarg at gmail.com Thu Sep 8 10:47:40 2011 From: vaibhavkumargarg at gmail.com (vaibhavgarg) Date: Thu, 8 Sep 2011 10:47:40 -0700 (PDT) Subject: [mapserver-users] Re: Getting blank tiles in google maps In-Reply-To: <1315502481631-6772814.post@n2.nabble.com> References: <1315502481631-6772814.post@n2.nabble.com> Message-ID: <1315504060525-6772946.post@n2.nabble.com> (retrying message) Hi all, I am new to MapServer. I have downloaded and setup MS4W and was able to overlay the example Bath and other map data on google maps. I then created my own .map file using QGIS and supplied my data but the served tiles are completely blank(transparant or white when I select RGB). My data set is .GML and I also tried converting it to .SHP format. I have checked that my setup is ok by doing is on two different computers. When I use shp2img.exe then it renders the layers properly. c:\> shp2img.exe -m hampshire.map -o hampshire.png -s 2048 2048 I am using this URL scheme: http://localhost:8088/cgi-bin/mapserv.exe?map=C:/ms4w/apps/gmap/htdocs/hampshire.map&layers=HampshireAreas&mode=tile&tilemode=gmap&tile=[x]+[y]+[z] I have attached all the relevant files. (2 sets, one is .SHP and the other is .GML, both cases I get transparent empty tiles) Can anyone please help me identify the reason why the generated tiles are transparent and how I can fix it. (7MB total, 1MB pieces, sorry if this is large, I am new to mailing lists too, please use 7Z to unzip) SHP: Hampshire.map Hampshire.7z.001...006 GML: Hampshire-gml.map Hampshire-gml.7z Download links here: (7z, 7mb total) http://osgeo-org.1803224.n2.nabble.com/Getting-blank-tiles-in-google-maps-td6746323.html Alternate download (zip format, 14mb) http://www.megaupload.com/?d=DAD6SR5P Thanks you very much. Vaibhav G -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Getting-blank-tiles-in-google-maps-tp6772814p6772946.html Sent from the Mapserver - User mailing list archive at Nabble.com. From punk.kish at gmail.com Thu Sep 8 10:48:17 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 12:48:17 -0500 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> Message-ID: a bit more investigation on producing a WMS response via Perl MapScript reveals the following error msWMSDispatch(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings. So, it seems I have to somehow, somewhere enable 'ows_enable_request'. Looking at the documentation, seems like if I had a map file, I could add the following line to do so ows_enable_request '*' However, I am not using a map file at all. Not finding any documentation on this setting, I tried the following to no avail $map->{ows_enable_request} = '*'; Suggestions, anyone? On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: > I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. > > So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. > > Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- > > my $new_extent = $map->{extent}; > > my $req = new mapscript::OWSRequest(); > $req->setParameter( "SERVICE", "WMS" ); > $req->setParameter( "VERSION", "1.1.0" ); > $req->setParameter( "REQUEST", "GetMap" ); > $req->setParameter( "BBOX", "-180,-90,180,90" ); > $req->setParameter( "LAYERS", "layer_name"); > $req->setParameter( "SRS", "-1"); > $req->setParameter( "WIDTH", "1200"); > $req->setParameter( "HEIGHT", "600"); > > my $dispatch_out = $map->OWSDispatch( $req ); > my $img = $map->draw(); > my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; > $img->save("/path/to/$map_img"); > return send_file("/path/to/$map_img"); > > > Comments? Corrections? > > > On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: > >> >> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >> >>> I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. >>> >>> my $map = undef; >>> $map = mapObj(name => 'mymap') unless defined $map; >>> >>> my $req = new mapscript::OWSRequest(); >>> $req->setParameter( "SERVICE", "WMS" ); >>> $req->setParameter( "VERSION", "1.1.0" ); >>> $req->setParameter( "REQUEST", "GetCapabilities" ); >> >> I changed the above line to >> >> $req->setParameter( "REQUEST", "GetMap"); >> >> but, still no improvement. >> >> >>> >>> mapscript::msIO_installStdoutToBuffer(); >>> my $dispatch_out = $map->OWSDispatch( $req ); >>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>> >>> Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? >>> >>> >>> -- >>> Puneet Kishor >> > From thomas.bonfort at gmail.com Thu Sep 8 11:03:08 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 8 Sep 2011 20:03:08 +0200 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> Message-ID: it goes in map->web->metadata On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor wrote: > a bit more investigation on producing a WMS response via Perl MapScript reveals the following error > > ? > ? > ? > ? > ?msWMSDispatch(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings. > ? > ? > > So, it seems I have to somehow, somewhere enable 'ows_enable_request'. Looking at the documentation, seems like if I had a map file, I could add the following line to do so > > ?ows_enable_request '*' > > However, I am not using a map file at all. Not finding any documentation on this setting, I tried the following to no avail > > ?$map->{ows_enable_request} = '*'; > > > Suggestions, anyone? > > > On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: > >> I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. >> >> So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. >> >> Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- >> >> ? ?my $new_extent = $map->{extent}; >> >> ? ?my $req = new mapscript::OWSRequest(); >> ? ?$req->setParameter( "SERVICE", "WMS" ); >> ? ?$req->setParameter( "VERSION", "1.1.0" ); >> ? ?$req->setParameter( "REQUEST", "GetMap" ); >> ? ?$req->setParameter( "BBOX", "-180,-90,180,90" ); >> ? ?$req->setParameter( "LAYERS", "layer_name"); >> ? ?$req->setParameter( "SRS", "-1"); >> ? ?$req->setParameter( "WIDTH", "1200"); >> ? ?$req->setParameter( "HEIGHT", "600"); >> >> ? ?my $dispatch_out = $map->OWSDispatch( $req ); >> ? ?my $img = $map->draw(); >> ? ?my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; >> ? ?$img->save("/path/to/$map_img"); >> ? ?return send_file("/path/to/$map_img"); >> >> >> Comments? Corrections? >> >> >> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >> >>> >>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>> >>>> I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. >>>> >>>> my $map = undef; >>>> $map = mapObj(name => 'mymap') unless defined $map; >>>> >>>> my $req = new mapscript::OWSRequest(); >>>> $req->setParameter( "SERVICE", "WMS" ); >>>> $req->setParameter( "VERSION", "1.1.0" ); >>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>> >>> I changed the above line to >>> >>> ?$req->setParameter( "REQUEST", "GetMap"); >>> >>> but, still no improvement. >>> >>> >>>> >>>> mapscript::msIO_installStdoutToBuffer(); >>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>> >>>> Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? >>>> >>>> >>>> -- >>>> Puneet Kishor >>> >> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From punk.kish at gmail.com Thu Sep 8 11:05:15 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 13:05:15 -0500 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> Message-ID: <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> On Sep 8, 2011, at 1:03 PM, thomas bonfort wrote: > it goes in map->web->metadata > I guessed as much, but I can't fathom the syntax. The webObj doesn't seem to have any constructor, and I don't see any documentation. Could you please point me to an example? > > On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor wrote: >> a bit more investigation on producing a WMS response via Perl MapScript reveals the following error >> >> >> >> >> >> msWMSDispatch(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings. >> >> >> >> So, it seems I have to somehow, somewhere enable 'ows_enable_request'. Looking at the documentation, seems like if I had a map file, I could add the following line to do so >> >> ows_enable_request '*' >> >> However, I am not using a map file at all. Not finding any documentation on this setting, I tried the following to no avail >> >> $map->{ows_enable_request} = '*'; >> >> >> Suggestions, anyone? >> >> >> On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: >> >>> I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. >>> >>> So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. >>> >>> Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- >>> >>> my $new_extent = $map->{extent}; >>> >>> my $req = new mapscript::OWSRequest(); >>> $req->setParameter( "SERVICE", "WMS" ); >>> $req->setParameter( "VERSION", "1.1.0" ); >>> $req->setParameter( "REQUEST", "GetMap" ); >>> $req->setParameter( "BBOX", "-180,-90,180,90" ); >>> $req->setParameter( "LAYERS", "layer_name"); >>> $req->setParameter( "SRS", "-1"); >>> $req->setParameter( "WIDTH", "1200"); >>> $req->setParameter( "HEIGHT", "600"); >>> >>> my $dispatch_out = $map->OWSDispatch( $req ); >>> my $img = $map->draw(); >>> my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; >>> $img->save("/path/to/$map_img"); >>> return send_file("/path/to/$map_img"); >>> >>> >>> Comments? Corrections? >>> >>> >>> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >>> >>>> >>>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>>> >>>>> I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. >>>>> >>>>> my $map = undef; >>>>> $map = mapObj(name => 'mymap') unless defined $map; >>>>> >>>>> my $req = new mapscript::OWSRequest(); >>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>>> >>>> I changed the above line to >>>> >>>> $req->setParameter( "REQUEST", "GetMap"); >>>> >>>> but, still no improvement. >>>> >>>> >>>>> >>>>> mapscript::msIO_installStdoutToBuffer(); >>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>>> >>>>> Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? >>>>> >>>>> >>>>> -- >>>>> Puneet Kishor >>>> >>> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> From forums at craniumjuice.com Thu Sep 8 11:07:54 2011 From: forums at craniumjuice.com (forums) Date: Thu, 8 Sep 2011 13:07:54 -0500 Subject: [mapserver-users] Re: Getting blank tiles in google maps In-Reply-To: <1315504060525-6772946.post@n2.nabble.com> References: <1315502481631-6772814.post@n2.nabble.com> <1315504060525-6772946.post@n2.nabble.com> Message-ID: Have you verified that the map will display when not in tile mode? http://localhost:8088/cgi-bin/mapserv.exe?map=C:/ms4w/apps/gmap/htdocs/hampshire.map&layers=HampshireAreas&mode=map On Thu, Sep 8, 2011 at 12:47 PM, vaibhavgarg wrote: > (retrying message) > > Hi all, I am new to MapServer. > > I have downloaded and setup MS4W and was able to overlay the example Bath > and other map data on google maps. > > I then created my own .map file using QGIS and supplied my data but the > served tiles are completely blank(transparant or white when I select RGB). > > My data set is .GML and I also tried converting it to .SHP format. I have > checked that my setup is ok by doing is on two different computers. > > When I use shp2img.exe then it renders the layers properly. > c:\> shp2img.exe -m hampshire.map -o hampshire.png -s 2048 2048 > > I am using this URL scheme: > > http://localhost:8088/cgi-bin/mapserv.exe?map=C:/ms4w/apps/gmap/htdocs/hampshire.map&layers=HampshireAreas&mode=tile&tilemode=gmap&tile=[x]+[y]+[z] > > I have attached all the relevant files. (2 sets, one is .SHP and the other > is .GML, both cases I get transparent empty tiles) > > Can anyone please help me identify the reason why the generated tiles are > transparent and how I can fix it. > > (7MB total, 1MB pieces, sorry if this is large, I am new to mailing lists > too, please use 7Z to unzip) > SHP: Hampshire.map Hampshire.7z.001...006 > GML: Hampshire-gml.map Hampshire-gml.7z > > Download links here: (7z, 7mb total) > > http://osgeo-org.1803224.n2.nabble.com/Getting-blank-tiles-in-google-maps-td6746323.html > > Alternate download (zip format, 14mb) > http://www.megaupload.com/?d=DAD6SR5P > > Thanks you very much. > > Vaibhav G > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Getting-blank-tiles-in-google-maps-tp6772814p6772946.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- A computer without Windows is like chocolate cake without mustard. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Thu Sep 8 11:07:49 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 8 Sep 2011 20:07:49 +0200 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> Message-ID: someone else might, I don't use mapscript On Thu, Sep 8, 2011 at 20:05, Mr. Puneet Kishor wrote: > > On Sep 8, 2011, at 1:03 PM, thomas bonfort wrote: > >> it goes in map->web->metadata >> > > I guessed as much, but I can't fathom the syntax. The webObj doesn't seem to have any constructor, and I don't see any documentation. Could you please point me to an example? > > > >> >> On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor wrote: >>> a bit more investigation on producing a WMS response via Perl MapScript reveals the following error >>> >>> ? >>> ? >>> ? >>> ? >>> ?msWMSDispatch(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings. >>> ? >>> ? >>> >>> So, it seems I have to somehow, somewhere enable 'ows_enable_request'. Looking at the documentation, seems like if I had a map file, I could add the following line to do so >>> >>> ?ows_enable_request '*' >>> >>> However, I am not using a map file at all. Not finding any documentation on this setting, I tried the following to no avail >>> >>> ?$map->{ows_enable_request} = '*'; >>> >>> >>> Suggestions, anyone? >>> >>> >>> On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: >>> >>>> I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. >>>> >>>> So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. >>>> >>>> Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- >>>> >>>> ? ?my $new_extent = $map->{extent}; >>>> >>>> ? ?my $req = new mapscript::OWSRequest(); >>>> ? ?$req->setParameter( "SERVICE", "WMS" ); >>>> ? ?$req->setParameter( "VERSION", "1.1.0" ); >>>> ? ?$req->setParameter( "REQUEST", "GetMap" ); >>>> ? ?$req->setParameter( "BBOX", "-180,-90,180,90" ); >>>> ? ?$req->setParameter( "LAYERS", "layer_name"); >>>> ? ?$req->setParameter( "SRS", "-1"); >>>> ? ?$req->setParameter( "WIDTH", "1200"); >>>> ? ?$req->setParameter( "HEIGHT", "600"); >>>> >>>> ? ?my $dispatch_out = $map->OWSDispatch( $req ); >>>> ? ?my $img = $map->draw(); >>>> ? ?my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; >>>> ? ?$img->save("/path/to/$map_img"); >>>> ? ?return send_file("/path/to/$map_img"); >>>> >>>> >>>> Comments? Corrections? >>>> >>>> >>>> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >>>> >>>>> >>>>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>>>> >>>>>> I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. >>>>>> >>>>>> my $map = undef; >>>>>> $map = mapObj(name => 'mymap') unless defined $map; >>>>>> >>>>>> my $req = new mapscript::OWSRequest(); >>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>>>> >>>>> I changed the above line to >>>>> >>>>> ?$req->setParameter( "REQUEST", "GetMap"); >>>>> >>>>> but, still no improvement. >>>>> >>>>> >>>>>> >>>>>> mapscript::msIO_installStdoutToBuffer(); >>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>>>> >>>>>> Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? >>>>>> >>>>>> >>>>>> -- >>>>>> Puneet Kishor >>>>> >>>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> > > From armin.burger at gmx.net Thu Sep 8 11:15:41 2011 From: armin.burger at gmx.net (Armin Burger) Date: Thu, 08 Sep 2011 20:15:41 +0200 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> Message-ID: <4E69064D.5070501@gmx.net> in PHP MapScript should be something like $map->setMetaData("ows_enable_request", "*"); in Python: map.setMetaData("ows_enable_request", "*") armin On 08/09/2011 20:05, Mr. Puneet Kishor wrote: > > On Sep 8, 2011, at 1:03 PM, thomas bonfort wrote: > >> it goes in map->web->metadata >> > > I guessed as much, but I can't fathom the syntax. The webObj doesn't seem to have any constructor, and I don't see any documentation. Could you please point me to an example? > > > >> >> On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor wrote: >>> a bit more investigation on producing a WMS response via Perl MapScript reveals the following error >>> >>> >>> >>> >>> >>> msWMSDispatch(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings. >>> >>> >>> >>> So, it seems I have to somehow, somewhere enable 'ows_enable_request'. Looking at the documentation, seems like if I had a map file, I could add the following line to do so >>> >>> ows_enable_request '*' >>> >>> However, I am not using a map file at all. Not finding any documentation on this setting, I tried the following to no avail >>> >>> $map->{ows_enable_request} = '*'; >>> >>> >>> Suggestions, anyone? >>> >>> >>> On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: >>> >>>> I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. >>>> >>>> So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. >>>> >>>> Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- >>>> >>>> my $new_extent = $map->{extent}; >>>> >>>> my $req = new mapscript::OWSRequest(); >>>> $req->setParameter( "SERVICE", "WMS" ); >>>> $req->setParameter( "VERSION", "1.1.0" ); >>>> $req->setParameter( "REQUEST", "GetMap" ); >>>> $req->setParameter( "BBOX", "-180,-90,180,90" ); >>>> $req->setParameter( "LAYERS", "layer_name"); >>>> $req->setParameter( "SRS", "-1"); >>>> $req->setParameter( "WIDTH", "1200"); >>>> $req->setParameter( "HEIGHT", "600"); >>>> >>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>> my $img = $map->draw(); >>>> my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; >>>> $img->save("/path/to/$map_img"); >>>> return send_file("/path/to/$map_img"); >>>> >>>> >>>> Comments? Corrections? >>>> >>>> >>>> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >>>> >>>>> >>>>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>>>> >>>>>> I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. >>>>>> >>>>>> my $map = undef; >>>>>> $map = mapObj(name => 'mymap') unless defined $map; >>>>>> >>>>>> my $req = new mapscript::OWSRequest(); >>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>>>> >>>>> I changed the above line to >>>>> >>>>> $req->setParameter( "REQUEST", "GetMap"); >>>>> >>>>> but, still no improvement. >>>>> >>>>> >>>>>> >>>>>> mapscript::msIO_installStdoutToBuffer(); >>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>>>> >>>>>> Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? >>>>>> >>>>>> >>>>>> -- >>>>>> Puneet Kishor >>>>> >>>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From armin.burger at gmx.net Thu Sep 8 11:20:54 2011 From: armin.burger at gmx.net (Armin Burger) Date: Thu, 08 Sep 2011 20:20:54 +0200 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> Message-ID: <4E690786.9070604@gmx.net> Puneet if you're interested in general in some sample code using PHP or Python MapScript for OWS request handling, please find some classes here: http://p-ows.pmapper.net/trac/browser/p-ows/trunk armin On 08/09/2011 20:05, Mr. Puneet Kishor wrote: > > On Sep 8, 2011, at 1:03 PM, thomas bonfort wrote: > >> it goes in map->web->metadata >> > > I guessed as much, but I can't fathom the syntax. The webObj doesn't seem to have any constructor, and I don't see any documentation. Could you please point me to an example? > > > >> >> On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor wrote: >>> a bit more investigation on producing a WMS response via Perl MapScript reveals the following error >>> >>> >>> >>> >>> >>> msWMSDispatch(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings. >>> >>> >>> >>> So, it seems I have to somehow, somewhere enable 'ows_enable_request'. Looking at the documentation, seems like if I had a map file, I could add the following line to do so >>> >>> ows_enable_request '*' >>> >>> However, I am not using a map file at all. Not finding any documentation on this setting, I tried the following to no avail >>> >>> $map->{ows_enable_request} = '*'; >>> >>> >>> Suggestions, anyone? >>> >>> >>> On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: >>> >>>> I would really appreciate insight from someone well-versed in the ins and outs of WMS via MapScript. Looking at the discussion at [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` step seems to be a crucial part of drawing the image. >>>> >>>> So, I added `my $img = $map->draw();` to my code below, and indeed, the image was drawn and sent back to the browser. >>>> >>>> Is this something that should be added to the examples in the documentation? Is this the right way to do things? In any case, I am not write to STDOUT, and sending the buffer directly. Instead, my code is very much like a regular request (and it works) -- >>>> >>>> my $new_extent = $map->{extent}; >>>> >>>> my $req = new mapscript::OWSRequest(); >>>> $req->setParameter( "SERVICE", "WMS" ); >>>> $req->setParameter( "VERSION", "1.1.0" ); >>>> $req->setParameter( "REQUEST", "GetMap" ); >>>> $req->setParameter( "BBOX", "-180,-90,180,90" ); >>>> $req->setParameter( "LAYERS", "layer_name"); >>>> $req->setParameter( "SRS", "-1"); >>>> $req->setParameter( "WIDTH", "1200"); >>>> $req->setParameter( "HEIGHT", "600"); >>>> >>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>> my $img = $map->draw(); >>>> my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . '.png'; >>>> $img->save("/path/to/$map_img"); >>>> return send_file("/path/to/$map_img"); >>>> >>>> >>>> Comments? Corrections? >>>> >>>> >>>> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >>>> >>>>> >>>>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>>>> >>>>>> I am trying to convert my MapScript program to a WMS responder. I create my $map where I set all the layers and classes and colors, etc, just like for a normal, non-WMS request that works perfectly correctly. >>>>>> >>>>>> my $map = undef; >>>>>> $map = mapObj(name => 'mymap') unless defined $map; >>>>>> >>>>>> my $req = new mapscript::OWSRequest(); >>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>>>> >>>>> I changed the above line to >>>>> >>>>> $req->setParameter( "REQUEST", "GetMap"); >>>>> >>>>> but, still no improvement. >>>>> >>>>> >>>>>> >>>>>> mapscript::msIO_installStdoutToBuffer(); >>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>>>> >>>>>> Except, the above doesn't really do anything for me. I get nothing in my browser. Suggestions? >>>>>> >>>>>> >>>>>> -- >>>>>> Puneet Kishor >>>>> >>>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From warmerdam at pobox.com Thu Sep 8 11:22:04 2011 From: warmerdam at pobox.com (Frank Warmerdam) Date: Thu, 8 Sep 2011 11:22:04 -0700 Subject: [mapserver-users] Re: MapScript WMS request In-Reply-To: <4E69064D.5070501@gmx.net> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> Message-ID: Puneet, I would add that there is a lot of other metadata that you need to set on a map in order to get WxS services like WMS working. If you haven't done that either you are going to be frustrated. I would suggest getting your script working initially with an actual mapfile and then if you really want to construct the map programmatically use that as a guide. Best regards, On Thu, Sep 8, 2011 at 11:15 AM, Armin Burger wrote: > in PHP MapScript should be something like > ?$map->setMetaData("ows_enable_request", "*"); > > in Python: > ?map.setMetaData("ows_enable_request", "*") > > armin > > > On 08/09/2011 20:05, Mr. Puneet Kishor wrote: >> >> On Sep 8, 2011, at 1:03 PM, thomas bonfort wrote: >> >>> it goes in map->web->metadata >>> >> >> I guessed as much, but I can't fathom the syntax. The webObj doesn't seem >> to have any constructor, and I don't see any documentation. Could you please >> point me to an example? >> >> >> >>> >>> On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor >>> ?wrote: >>>> >>>> a bit more investigation on producing a WMS response via Perl MapScript >>>> reveals the following error >>>> >>>> ? >>>> ?>>> "http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd"> >>>> ? >>>> ? >>>> ?msWMSDispatch(): WMS server error. WMS request not enabled. Check >>>> wms/ows_enable_request settings. >>>> ? >>>> ? >>>> >>>> So, it seems I have to somehow, somewhere enable 'ows_enable_request'. >>>> Looking at the documentation, seems like if I had a map file, I could add >>>> the following line to do so >>>> >>>> ?ows_enable_request '*' >>>> >>>> However, I am not using a map file at all. Not finding any documentation >>>> on this setting, I tried the following to no avail >>>> >>>> ?$map->{ows_enable_request} = '*'; >>>> >>>> >>>> Suggestions, anyone? >>>> >>>> >>>> On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: >>>> >>>>> I would really appreciate insight from someone well-versed in the ins >>>>> and outs of WMS via MapScript. Looking at the discussion at >>>>> [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` >>>>> step seems to be a crucial part of drawing the image. >>>>> >>>>> So, I added `my $img = $map->draw();` to my code below, and indeed, the >>>>> image was drawn and sent back to the browser. >>>>> >>>>> Is this something that should be added to the examples in the >>>>> documentation? Is this the right way to do things? In any case, I am not >>>>> write to STDOUT, and sending the buffer directly. Instead, my code is very >>>>> much like a regular request (and it works) -- >>>>> >>>>> ? ?my $new_extent = $map->{extent}; >>>>> >>>>> ? ?my $req = new mapscript::OWSRequest(); >>>>> ? ?$req->setParameter( "SERVICE", "WMS" ); >>>>> ? ?$req->setParameter( "VERSION", "1.1.0" ); >>>>> ? ?$req->setParameter( "REQUEST", "GetMap" ); >>>>> ? ?$req->setParameter( "BBOX", "-180,-90,180,90" ); >>>>> ? ?$req->setParameter( "LAYERS", "layer_name"); >>>>> ? ?$req->setParameter( "SRS", "-1"); >>>>> ? ?$req->setParameter( "WIDTH", "1200"); >>>>> ? ?$req->setParameter( "HEIGHT", "600"); >>>>> >>>>> ? ?my $dispatch_out = $map->OWSDispatch( $req ); >>>>> ? ?my $img = $map->draw(); >>>>> ? ?my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . >>>>> '.png'; >>>>> ? ?$img->save("/path/to/$map_img"); >>>>> ? ?return send_file("/path/to/$map_img"); >>>>> >>>>> >>>>> Comments? Corrections? >>>>> >>>>> >>>>> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >>>>> >>>>>> >>>>>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>>>>> >>>>>>> I am trying to convert my MapScript program to a WMS responder. I >>>>>>> create my $map where I set all the layers and classes and colors, etc, just >>>>>>> like for a normal, non-WMS request that works perfectly correctly. >>>>>>> >>>>>>> my $map = undef; >>>>>>> $map = mapObj(name => ?'mymap') unless defined $map; >>>>>>> >>>>>>> my $req = new mapscript::OWSRequest(); >>>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>>>>> >>>>>> I changed the above line to >>>>>> >>>>>> ?$req->setParameter( "REQUEST", "GetMap"); >>>>>> >>>>>> but, still no improvement. >>>>>> >>>>>> >>>>>>> >>>>>>> mapscript::msIO_installStdoutToBuffer(); >>>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>>>>> >>>>>>> Except, the above doesn't really do anything for me. I get nothing in >>>>>>> my browser. Suggestions? >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Puneet Kishor >>>>>> >>>>> >>>> >>>> _______________________________________________ >>>> mapserver-users mailing list >>>> mapserver-users at lists.osgeo.org >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up?? | Frank Warmerdam, warmerdam at pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush? ? | Geospatial Software Developer From vaibhavkumargarg at gmail.com Thu Sep 8 11:41:52 2011 From: vaibhavkumargarg at gmail.com (vaibhavgarg) Date: Thu, 8 Sep 2011 11:41:52 -0700 (PDT) Subject: [mapserver-users] Re: Getting blank tiles in google maps In-Reply-To: References: <1315502481631-6772814.post@n2.nabble.com> <1315504060525-6772946.post@n2.nabble.com> Message-ID: <1315507312276-6773174.post@n2.nabble.com> Thanks for replying. I am new to mapserver so I did now know we can do that. Anyway, yes I was able to use that url to generate the map: http://osgeo-org.1803224.n2.nabble.com/file/n6773174/MapImage.png It looks just like the result of shp2img.exe How do I identify and specify the right projections, which really confuses me and I am guessing that that is the problem.. Can you have a look at the sample .SHP data please? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Getting-blank-tiles-in-google-maps-tp6772814p6773174.html Sent from the Mapserver - User mailing list archive at Nabble.com. From forums at craniumjuice.com Thu Sep 8 12:30:39 2011 From: forums at craniumjuice.com (forums) Date: Thu, 8 Sep 2011 14:30:39 -0500 Subject: [mapserver-users] Re: Getting blank tiles in google maps In-Reply-To: <1315507312276-6773174.post@n2.nabble.com> References: <1315502481631-6772814.post@n2.nabble.com> <1315504060525-6772946.post@n2.nabble.com> <1315507312276-6773174.post@n2.nabble.com> Message-ID: Doesn't look like you have SRS on the shapefiles. ogrinfo info shows you what you need to know about the shapefiles: ogrinfo -so -al HampshireLines.shp ogrinfo -so -al HampshirePoints.shp ogrinfo -so -al HampshireAreas.shp All three currently have: Layer SRS WKT: (unknown) I've had good luck using ogr2ogr to add SRS. For example to add EPSG:4326 (What google uses) ogr2ogr -a_srs EPSG:4326 HampshireAreas2 HampshireAreas.shp ogr2ogr -a_srs EPSG:4326 HampshirePoints2 HampshirePoints.shp ogr2ogr -a_srs EPSG:4326 HampshireLines2 HampshireLines.shp Ends up with: Layer SRS WKT: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]] Hope that helps. On Thu, Sep 8, 2011 at 1:41 PM, vaibhavgarg wrote: > Thanks for replying. I am new to mapserver so I did now know we can do > that. > > Anyway, yes I was able to use that url to generate the map: > http://osgeo-org.1803224.n2.nabble.com/file/n6773174/MapImage.png > > It looks just like the result of shp2img.exe > > How do I identify and specify the right projections, which really confuses > me and I am guessing that that is the problem.. > > Can you have a look at the sample .SHP data please? > > > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Getting-blank-tiles-in-google-maps-tp6772814p6773174.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- A computer without Windows is like chocolate cake without mustard. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jk.chen at sdl.usu.edu Thu Sep 8 14:05:19 2011 From: jk.chen at sdl.usu.edu (JK Chen) Date: Thu, 8 Sep 2011 21:05:19 +0000 Subject: [mapserver-users] how to specify the location of projection library, how to do it not in map file? Message-ID: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DBF2@Mercury.usurf.usu.edu> Hi, I specify the location proj library in the map file, which points to apache cgin-bin dirs.. Because we have 32 bit and 64 bit machines, and the paths of the apache software on those two types machines are not the same, I end up having two map files. That creates installation problems for us. I'm wondering if there is more elegant way to specify the path to proj library? In basegn.x32.map CONFIG "PROJ_LIB" "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" In basegn.x64.map CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/" Thanks. JK From woodbri at swoodbridge.com Thu Sep 8 14:02:27 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Thu, 08 Sep 2011 17:02:27 -0400 Subject: [mapserver-users] how to specify the location of projection library, how to do it not in map file? In-Reply-To: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DBF2@Mercury.usurf.usu.edu> References: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DBF2@Mercury.usurf.usu.edu> Message-ID: <4E692D63.2030906@swoodbridge.com> On 9/8/2011 5:05 PM, JK Chen wrote: > Hi, > > I specify the location proj library in the map file, which points to apache cgin-bin dirs.. Because we have 32 bit and 64 bit machines, and the paths of the apache software on those two types machines are not the same, I end up having two map files. > That creates installation problems for us. I'm wondering if there is more elegant way to specify the path to proj library? > > In basegn.x32.map > CONFIG "PROJ_LIB" "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" > In basegn.x64.map > CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/" I believe you can set this up as an environment variable in each apache instance so so it points to the correct file. You would have to do this in the apache config file(s). -Steve W From woodbri at swoodbridge.com Thu Sep 8 14:05:57 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Thu, 08 Sep 2011 17:05:57 -0400 Subject: [mapserver-users] how to specify the location of projection library, how to do it not in map file? In-Reply-To: <4E692D63.2030906@swoodbridge.com> References: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DBF2@Mercury.usurf.usu.edu> <4E692D63.2030906@swoodbridge.com> Message-ID: <4E692E35.9030906@swoodbridge.com> On 9/8/2011 5:02 PM, Stephen Woodbridge wrote: > On 9/8/2011 5:05 PM, JK Chen wrote: >> Hi, >> >> I specify the location proj library in the map file, which points to >> apache cgin-bin dirs.. Because we have 32 bit and 64 bit machines, and >> the paths of the apache software on those two types machines are not >> the same, I end up having two map files. >> That creates installation problems for us. I'm wondering if there is >> more elegant way to specify the path to proj library? >> >> In basegn.x32.map >> CONFIG "PROJ_LIB" "C:/Program Files/Apache Software >> Foundation/Apache2.2/cgi-bin/" >> In basegn.x64.map >> CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software >> Foundation/Apache2.2/cgi-bin/" > > I believe you can set this up as an environment variable in each apache > instance so so it points to the correct file. You would have to do this > in the apache config file(s). See: http://trac.osgeo.org/mapserver/wiki/EnvironmentVariables If you can do it in the apache config because you do not have access to it, you could write a simple wrapper script the exports the enviroment variable and then executes mapserver. -Steve W From forums at craniumjuice.com Thu Sep 8 14:14:54 2011 From: forums at craniumjuice.com (forums) Date: Thu, 8 Sep 2011 16:14:54 -0500 Subject: [mapserver-users] how to specify the location of projection library, how to do it not in map file? In-Reply-To: <4E692D63.2030906@swoodbridge.com> References: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DBF2@Mercury.usurf.usu.edu> <4E692D63.2030906@swoodbridge.com> Message-ID: Any chance you can just install Apache to same locations? Just override the installation directory to C:/Program Files/ on both. On Thu, Sep 8, 2011 at 4:02 PM, Stephen Woodbridge wrote: > On 9/8/2011 5:05 PM, JK Chen wrote: > >> Hi, >> >> I specify the location proj library in the map file, which points to >> apache cgin-bin dirs.. Because we have 32 bit and 64 bit machines, and the >> paths of the apache software on those two types machines are not the same, I >> end up having two map files. >> That creates installation problems for us. I'm wondering if there is more >> elegant way to specify the path to proj library? >> >> In basegn.x32.map >> CONFIG "PROJ_LIB" "C:/Program Files/Apache Software >> Foundation/Apache2.2/cgi-bin/" >> In basegn.x64.map >> CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software >> Foundation/Apache2.2/cgi-bin/" >> > > I believe you can set this up as an environment variable in each apache > instance so so it points to the correct file. You would have to do this in > the apache config file(s). > > -Steve W > > ______________________________**_________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.**org > http://lists.osgeo.org/**mailman/listinfo/mapserver-**users > -- A computer without Windows is like chocolate cake without mustard. -------------- next part -------------- An HTML attachment was scrubbed... URL: From posthumusb at AGR.GC.CA Thu Sep 8 14:24:32 2011 From: posthumusb at AGR.GC.CA (Brad Posthumus) Date: Thu, 8 Sep 2011 14:24:32 -0700 (PDT) Subject: [mapserver-users] Re: label problem since MS6 In-Reply-To: <1315418802826-6768934.post@n2.nabble.com> References: <1315418802826-6768934.post@n2.nabble.com> Message-ID: <1315517072449-6773845.post@n2.nabble.com> I logged a bug regarding the issue with PNGs. Oddly enough, when I switch it to GIF it appears to work normally for me, so I'm not sure what's happening in your case. http://trac.osgeo.org/mapserver/ticket/4013 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/label-problem-since-MS6-tp6768768p6773845.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jk.chen at sdl.usu.edu Thu Sep 8 14:40:47 2011 From: jk.chen at sdl.usu.edu (JK Chen) Date: Thu, 8 Sep 2011 21:40:47 +0000 Subject: [mapserver-users] how to specify the location of projection library, how to do it not in map file? In-Reply-To: <4E692E35.9030906@swoodbridge.com> References: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DBF2@Mercury.usurf.usu.edu> <4E692D63.2030906@swoodbridge.com> <4E692E35.9030906@swoodbridge.com> Message-ID: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DC2F@Mercury.usurf.usu.edu> Hi Steve, How to do it via Apache configuration? What is the syntax? Is it like this: "PROJ_LIB" "./cgi-bin/" Nope, we can't over-write the path names. Thanks for your helps. JK -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Thursday, September 08, 2011 3:06 PM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] how to specify the location of projection library, how to do it not in map file? On 9/8/2011 5:02 PM, Stephen Woodbridge wrote: > On 9/8/2011 5:05 PM, JK Chen wrote: >> Hi, >> >> I specify the location proj library in the map file, which points to >> apache cgin-bin dirs.. Because we have 32 bit and 64 bit machines, >> and the paths of the apache software on those two types machines are >> not the same, I end up having two map files. >> That creates installation problems for us. I'm wondering if there is >> more elegant way to specify the path to proj library? >> >> In basegn.x32.map >> CONFIG "PROJ_LIB" "C:/Program Files/Apache Software >> Foundation/Apache2.2/cgi-bin/" >> In basegn.x64.map >> CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software >> Foundation/Apache2.2/cgi-bin/" > > I believe you can set this up as an environment variable in each > apache instance so so it points to the correct file. You would have to > do this in the apache config file(s). See: http://trac.osgeo.org/mapserver/wiki/EnvironmentVariables If you can do it in the apache config because you do not have access to it, you could write a simple wrapper script the exports the enviroment variable and then executes mapserver. -Steve W _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From woodbri at swoodbridge.com Thu Sep 8 15:28:21 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Thu, 08 Sep 2011 18:28:21 -0400 Subject: [mapserver-users] how to specify the location of projection library, how to do it not in map file? In-Reply-To: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DC2F@Mercury.usurf.usu.edu> References: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DBF2@Mercury.usurf.usu.edu> <4E692D63.2030906@swoodbridge.com> <4E692E35.9030906@swoodbridge.com> <75E6E48D29E14B4C93DA8ADFCA6D205A11C2DC2F@Mercury.usurf.usu.edu> Message-ID: <4E694185.9030602@swoodbridge.com> I would try something like the following in: /etc/apache2/sites-enabled/000-default ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AddHandler fastcgi-script .fcgi SetEnv PROJ_LIB "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all I have not tried this. Probably a good idea to read about it in the apache docs. Oh and since I copy and pasted the above block from a Linux system and than added your windows path I'm sure the above will not work verbatim on either system ;) but it will hopefully give you a guide. -Steve W On 9/8/2011 5:40 PM, JK Chen wrote: > Hi Steve, > > How to do it via Apache configuration? What is the syntax? Is it like this: > "PROJ_LIB" "./cgi-bin/" > > Nope, we can't over-write the path names. > > Thanks for your helps. > > JK > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen Woodbridge > Sent: Thursday, September 08, 2011 3:06 PM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] how to specify the location of projection library, how to do it not in map file? > > On 9/8/2011 5:02 PM, Stephen Woodbridge wrote: >> On 9/8/2011 5:05 PM, JK Chen wrote: >>> Hi, >>> >>> I specify the location proj library in the map file, which points to >>> apache cgin-bin dirs.. Because we have 32 bit and 64 bit machines, >>> and the paths of the apache software on those two types machines are >>> not the same, I end up having two map files. >>> That creates installation problems for us. I'm wondering if there is >>> more elegant way to specify the path to proj library? >>> >>> In basegn.x32.map >>> CONFIG "PROJ_LIB" "C:/Program Files/Apache Software >>> Foundation/Apache2.2/cgi-bin/" >>> In basegn.x64.map >>> CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software >>> Foundation/Apache2.2/cgi-bin/" >> >> I believe you can set this up as an environment variable in each >> apache instance so so it points to the correct file. You would have to >> do this in the apache config file(s). > > See: > > http://trac.osgeo.org/mapserver/wiki/EnvironmentVariables > > If you can do it in the apache config because you do not have access to it, you could write a simple wrapper script the exports the enviroment variable and then executes mapserver. > > -Steve W > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Thu Sep 8 16:14:55 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 18:14:55 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> Message-ID: <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> top posting, as most of the relevant info is self-contained in this email -- Ok, with the help of the suggestions from many of you, and by adding the following lines to my program, I am no longer getting any error. .. $map->setMetaData("ows_enable_request", "*"); .. $map->setProjection("init=epsg:4326"); .. $layerOne->setProjection("init=epsg:4326"); .. my $req = new mapscript::OWSRequest(); $req->setParameter("SERVICE", "WMS" ); $req->setParameter("VERSION", "1.1.0" ); $req->setParameter("REQUEST", "GetMap" ); $req->setParameter("BBOX", "-180,-90,180,90" ); $req->setParameter("LAYERS", "mylayer"); $req->setParameter("SRS", "EPSG:4326"); $req->setParameter("WIDTH", "1200"); $req->setParameter("HEIGHT", "600"); $req->setParameter("FORMAT", "image/png"); my $io = mapscript::msIO_installStdoutToBuffer(); my $dispatch_out = $map->OWSDispatch( $req ); printf "%s\n", mapscript::msIO_getStdoutBufferString(); The only problem is -- I am getting an image with nothing in it. This implies that I have likely got all the params for WMS correct, but now I am screwing up with some step in the layer creation. The interesting thing is, this is the same code that works fine as a regular MapServer request; makes an image fast and quick and correct. Is there a way I can add error logging to my WMS program to see what is going on at every step? Perhaps capture the database query being made, etc. On Sep 8, 2011, at 1:22 PM, Frank Warmerdam wrote: > Puneet, > > I would add that there is a lot of other metadata that you need to set on a > map in order to get WxS services like WMS working. If you haven't done > that either you are going to be frustrated. > > I would suggest getting your script working initially with an actual mapfile > and then if you really want to construct the map programmatically use > that as a guide. > > Best regards, > > On Thu, Sep 8, 2011 at 11:15 AM, Armin Burger wrote: >> in PHP MapScript should be something like >> $map->setMetaData("ows_enable_request", "*"); >> >> in Python: >> map.setMetaData("ows_enable_request", "*") >> >> armin >> >> >> On 08/09/2011 20:05, Mr. Puneet Kishor wrote: >>> >>> On Sep 8, 2011, at 1:03 PM, thomas bonfort wrote: >>> >>>> it goes in map->web->metadata >>>> >>> >>> I guessed as much, but I can't fathom the syntax. The webObj doesn't seem >>> to have any constructor, and I don't see any documentation. Could you please >>> point me to an example? >>> >>> >>> >>>> >>>> On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor >>>> wrote: >>>>> >>>>> a bit more investigation on producing a WMS response via Perl MapScript >>>>> reveals the following error >>>>> >>>>> >>>>> >>>> "http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd"> >>>>> >>>>> >>>>> msWMSDispatch(): WMS server error. WMS request not enabled. Check >>>>> wms/ows_enable_request settings. >>>>> >>>>> >>>>> >>>>> So, it seems I have to somehow, somewhere enable 'ows_enable_request'. >>>>> Looking at the documentation, seems like if I had a map file, I could add >>>>> the following line to do so >>>>> >>>>> ows_enable_request '*' >>>>> >>>>> However, I am not using a map file at all. Not finding any documentation >>>>> on this setting, I tried the following to no avail >>>>> >>>>> $map->{ows_enable_request} = '*'; >>>>> >>>>> >>>>> Suggestions, anyone? >>>>> >>>>> >>>>> On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: >>>>> >>>>>> I would really appreciate insight from someone well-versed in the ins >>>>>> and outs of WMS via MapScript. Looking at the discussion at >>>>>> [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` >>>>>> step seems to be a crucial part of drawing the image. >>>>>> >>>>>> So, I added `my $img = $map->draw();` to my code below, and indeed, the >>>>>> image was drawn and sent back to the browser. >>>>>> >>>>>> Is this something that should be added to the examples in the >>>>>> documentation? Is this the right way to do things? In any case, I am not >>>>>> write to STDOUT, and sending the buffer directly. Instead, my code is very >>>>>> much like a regular request (and it works) -- >>>>>> >>>>>> my $new_extent = $map->{extent}; >>>>>> >>>>>> my $req = new mapscript::OWSRequest(); >>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>> $req->setParameter( "REQUEST", "GetMap" ); >>>>>> $req->setParameter( "BBOX", "-180,-90,180,90" ); >>>>>> $req->setParameter( "LAYERS", "layer_name"); >>>>>> $req->setParameter( "SRS", "-1"); >>>>>> $req->setParameter( "WIDTH", "1200"); >>>>>> $req->setParameter( "HEIGHT", "600"); >>>>>> >>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>> my $img = $map->draw(); >>>>>> my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . >>>>>> '.png'; >>>>>> $img->save("/path/to/$map_img"); >>>>>> return send_file("/path/to/$map_img"); >>>>>> >>>>>> >>>>>> Comments? Corrections? >>>>>> >>>>>> >>>>>> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >>>>>> >>>>>>> >>>>>>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>>>>>> >>>>>>>> I am trying to convert my MapScript program to a WMS responder. I >>>>>>>> create my $map where I set all the layers and classes and colors, etc, just >>>>>>>> like for a normal, non-WMS request that works perfectly correctly. >>>>>>>> >>>>>>>> my $map = undef; >>>>>>>> $map = mapObj(name => 'mymap') unless defined $map; >>>>>>>> >>>>>>>> my $req = new mapscript::OWSRequest(); >>>>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>>>>>> >>>>>>> I changed the above line to >>>>>>> >>>>>>> $req->setParameter( "REQUEST", "GetMap"); >>>>>>> >>>>>>> but, still no improvement. >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> mapscript::msIO_installStdoutToBuffer(); >>>>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>>>>>> >>>>>>>> Except, the above doesn't really do anything for me. I get nothing in >>>>>>>> my browser. Suggestions? >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Puneet Kishor >>>>>>> >>>>>> From punk.kish at gmail.com Thu Sep 8 16:19:30 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 18:19:30 -0500 Subject: [mapserver-users] advice on best practice for MapServer layer in OL/Gmaps Message-ID: <96CF124D-13BA-41F9-830C-B8E574CE9FC2@gmail.com> In another tortured thread I am seeking advice on WMS with MapScript. My ultimate intent is to provide MapServer layers in OL/Gmaps/(some_other) web app. I need to use MapScript because of the flexibility and freedom it gives me in querying my datasources, and in constructing the map. Do I have to use WMS? What, if any, are the alternative? I notice that MapServer now has a `mode=tile` that is designed with Gmaps kinda app in mind. Is that a better mode? Would that work with OL as well? Or with Leaflet or some other client-side web mapping framework? Its been a while since I have used MapServer extensively for creating a full-fledged app, but the time to do is coming up now. I would really appreciate any advice on this front. Puneet. From dmorissette at mapgears.com Thu Sep 8 16:27:43 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 08 Sep 2011 19:27:43 -0400 Subject: [mapserver-users] MapScript WMS request In-Reply-To: <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> Message-ID: <4E694F6F.6010802@mapgears.com> Hi Puneet, A few things to try: 1- Reduce your map to a single layer if that's not already the case for your first round of tests. 2- Try a GetCapabilities instead of GetMap, and make sure your layer shows up properly and with no WARNING in the GetCapabilities XML output. Make sure the name of the layer is not changed: if you have multiple layers with the same name then the WMS handler will rename them to make them unique (WMS spec requirement) 3- Enable DEBUG at the map and layer level and look for any hints as to why nothing shows up. Compare the debug output between your WMS requests and the regular MapServer requests (the one that you say works fine) (see http://mapserver.org/optimization/debugging.html) 4- Frank's earlier suggestion to start by making things work from a regular mapfile first and then converting/moving stuff to mapscript progressively still stands as a great option. Daniel On 11-09-08 07:14 PM, Mr. Puneet Kishor wrote: > top posting, as most of the relevant info is self-contained in this email -- > > Ok, with the help of the suggestions from many of you, and by adding the following lines to my program, I am no longer getting any error. > > .. > $map->setMetaData("ows_enable_request", "*"); > > .. > $map->setProjection("init=epsg:4326"); > > .. > $layerOne->setProjection("init=epsg:4326"); > > .. > my $req = new mapscript::OWSRequest(); > $req->setParameter("SERVICE", "WMS" ); > $req->setParameter("VERSION", "1.1.0" ); > $req->setParameter("REQUEST", "GetMap" ); > $req->setParameter("BBOX", "-180,-90,180,90" ); > $req->setParameter("LAYERS", "mylayer"); > $req->setParameter("SRS", "EPSG:4326"); > $req->setParameter("WIDTH", "1200"); > $req->setParameter("HEIGHT", "600"); > $req->setParameter("FORMAT", "image/png"); > > my $io = mapscript::msIO_installStdoutToBuffer(); > my $dispatch_out = $map->OWSDispatch( $req ); > printf "%s\n", mapscript::msIO_getStdoutBufferString(); > > The only problem is -- I am getting an image with nothing in it. This implies that I have likely got all the params for WMS correct, but now I am screwing up with some step in the layer creation. The interesting thing is, this is the same code that works fine as a regular MapServer request; makes an image fast and quick and correct. Is there a way I can add error logging to my WMS program to see what is going on at every step? Perhaps capture the database query being made, etc. > > > On Sep 8, 2011, at 1:22 PM, Frank Warmerdam wrote: > >> Puneet, >> >> I would add that there is a lot of other metadata that you need to set on a >> map in order to get WxS services like WMS working. If you haven't done >> that either you are going to be frustrated. >> >> I would suggest getting your script working initially with an actual mapfile >> and then if you really want to construct the map programmatically use >> that as a guide. >> >> Best regards, >> >> On Thu, Sep 8, 2011 at 11:15 AM, Armin Burger wrote: >>> in PHP MapScript should be something like >>> $map->setMetaData("ows_enable_request", "*"); >>> >>> in Python: >>> map.setMetaData("ows_enable_request", "*") >>> >>> armin >>> >>> >>> On 08/09/2011 20:05, Mr. Puneet Kishor wrote: >>>> >>>> On Sep 8, 2011, at 1:03 PM, thomas bonfort wrote: >>>> >>>>> it goes in map->web->metadata >>>>> >>>> >>>> I guessed as much, but I can't fathom the syntax. The webObj doesn't seem >>>> to have any constructor, and I don't see any documentation. Could you please >>>> point me to an example? >>>> >>>> >>>> >>>>> >>>>> On Thu, Sep 8, 2011 at 19:48, Mr. Puneet Kishor >>>>> wrote: >>>>>> >>>>>> a bit more investigation on producing a WMS response via Perl MapScript >>>>>> reveals the following error >>>>>> >>>>>> >>>>>> >>>>> "http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd"> >>>>>> >>>>>> >>>>>> msWMSDispatch(): WMS server error. WMS request not enabled. Check >>>>>> wms/ows_enable_request settings. >>>>>> >>>>>> >>>>>> >>>>>> So, it seems I have to somehow, somewhere enable 'ows_enable_request'. >>>>>> Looking at the documentation, seems like if I had a map file, I could add >>>>>> the following line to do so >>>>>> >>>>>> ows_enable_request '*' >>>>>> >>>>>> However, I am not using a map file at all. Not finding any documentation >>>>>> on this setting, I tried the following to no avail >>>>>> >>>>>> $map->{ows_enable_request} = '*'; >>>>>> >>>>>> >>>>>> Suggestions, anyone? >>>>>> >>>>>> >>>>>> On Sep 7, 2011, at 10:18 PM, Mr. Puneet Kishor wrote: >>>>>> >>>>>>> I would really appreciate insight from someone well-versed in the ins >>>>>>> and outs of WMS via MapScript. Looking at the discussion at >>>>>>> [http://trac.osgeo.org/mapserver/ticket/670], the `img = wms_map.draw()` >>>>>>> step seems to be a crucial part of drawing the image. >>>>>>> >>>>>>> So, I added `my $img = $map->draw();` to my code below, and indeed, the >>>>>>> image was drawn and sent back to the browser. >>>>>>> >>>>>>> Is this something that should be added to the examples in the >>>>>>> documentation? Is this the right way to do things? In any case, I am not >>>>>>> write to STDOUT, and sending the buffer directly. Instead, my code is very >>>>>>> much like a regular request (and it works) -- >>>>>>> >>>>>>> my $new_extent = $map->{extent}; >>>>>>> >>>>>>> my $req = new mapscript::OWSRequest(); >>>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>>> $req->setParameter( "REQUEST", "GetMap" ); >>>>>>> $req->setParameter( "BBOX", "-180,-90,180,90" ); >>>>>>> $req->setParameter( "LAYERS", "layer_name"); >>>>>>> $req->setParameter( "SRS", "-1"); >>>>>>> $req->setParameter( "WIDTH", "1200"); >>>>>>> $req->setParameter( "HEIGHT", "600"); >>>>>>> >>>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>>> my $img = $map->draw(); >>>>>>> my $map_img = 'test_' . sprintf("%0.10d", rand(1000000000)) . >>>>>>> '.png'; >>>>>>> $img->save("/path/to/$map_img"); >>>>>>> return send_file("/path/to/$map_img"); >>>>>>> >>>>>>> >>>>>>> Comments? Corrections? >>>>>>> >>>>>>> >>>>>>> On Sep 7, 2011, at 6:12 PM, Mr. Puneet Kishor wrote: >>>>>>> >>>>>>>> >>>>>>>> On Sep 7, 2011, at 5:49 PM, Mr. Puneet Kishor wrote: >>>>>>>> >>>>>>>>> I am trying to convert my MapScript program to a WMS responder. I >>>>>>>>> create my $map where I set all the layers and classes and colors, etc, just >>>>>>>>> like for a normal, non-WMS request that works perfectly correctly. >>>>>>>>> >>>>>>>>> my $map = undef; >>>>>>>>> $map = mapObj(name => 'mymap') unless defined $map; >>>>>>>>> >>>>>>>>> my $req = new mapscript::OWSRequest(); >>>>>>>>> $req->setParameter( "SERVICE", "WMS" ); >>>>>>>>> $req->setParameter( "VERSION", "1.1.0" ); >>>>>>>>> $req->setParameter( "REQUEST", "GetCapabilities" ); >>>>>>>> >>>>>>>> I changed the above line to >>>>>>>> >>>>>>>> $req->setParameter( "REQUEST", "GetMap"); >>>>>>>> >>>>>>>> but, still no improvement. >>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>> mapscript::msIO_installStdoutToBuffer(); >>>>>>>>> my $dispatch_out = $map->OWSDispatch( $req ); >>>>>>>>> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >>>>>>>>> >>>>>>>>> Except, the above doesn't really do anything for me. I get nothing in >>>>>>>>> my browser. Suggestions? >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Puneet Kishor >>>>>>>> >>>>>>> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From punk.kish at gmail.com Thu Sep 8 16:44:04 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 18:44:04 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: <4E694F6F.6010802@mapgears.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> Message-ID: Great suggestions Daniel. Here is what I have to report -- On Sep 8, 2011, at 6:27 PM, Daniel Morissette wrote: > Hi Puneet, > > A few things to try: > > 1- Reduce your map to a single layer if that's not already the case for your first round of tests. It is already reduced to a single layer. > > 2- Try a GetCapabilities instead of GetMap, and make sure your layer shows up properly and with no WARNING in the GetCapabilities XML output. Make sure the name of the layer is not changed: if you have multiple layers with the same name then the WMS handler will rename them to make them unique (WMS spec requirement) That was very useful. No errors, but I do notice the following funky issue (see below) gmna gmna EPSG:4326 Where the heck did that (+-)2.5e+07 business get into the BoundingBox? I didn't add that. All I did was query in lat/lon. Maybe that is where my error remains now. > .. > > 4- Frank's earlier suggestion to start by making things work from a regular mapfile first and then converting/moving stuff to mapscript progressively still stands as a great option. > .. Indeed, a great suggestion. Actually, that is exactly how I started. Got everything working with a Mapfile, then migrated to MapScript (I am touching MapScript after many years now, perhaps half a decade), got that working, and am now on to WMS. Anyway, I seem to be close to a resolution. Something is going on with my BoundingBox. Puneet. From punk.kish at gmail.com Thu Sep 8 16:46:28 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 18:46:28 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> Message-ID: fwiw, here is the pastebin link to the XML response to my GetCapabilities request. http://pastebin.com/zu8kjNDX On Sep 8, 2011, at 6:44 PM, Mr. Puneet Kishor wrote: > Great suggestions Daniel. Here is what I have to report -- > > > On Sep 8, 2011, at 6:27 PM, Daniel Morissette wrote: > >> Hi Puneet, >> >> A few things to try: >> >> 1- Reduce your map to a single layer if that's not already the case for your first round of tests. > > > It is already reduced to a single layer. > > >> >> 2- Try a GetCapabilities instead of GetMap, and make sure your layer shows up properly and with no WARNING in the GetCapabilities XML output. Make sure the name of the layer is not changed: if you have multiple layers with the same name then the WMS handler will rename them to make them unique (WMS spec requirement) > > > That was very useful. No errors, but I do notice the following funky issue (see below) > > > gmna > gmna > EPSG:4326 > > minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07" /> > > > > Where the heck did that (+-)2.5e+07 business get into the BoundingBox? I didn't add that. All I did was query in lat/lon. Maybe that is where my error remains now. > > >> .. >> >> 4- Frank's earlier suggestion to start by making things work from a regular mapfile first and then converting/moving stuff to mapscript progressively still stands as a great option. >> .. > > Indeed, a great suggestion. Actually, that is exactly how I started. Got everything working with a Mapfile, then migrated to MapScript (I am touching MapScript after many years now, perhaps half a decade), got that working, and am now on to WMS. > > Anyway, I seem to be close to a resolution. Something is going on with my BoundingBox. > > Puneet. > From dmorissette at mapgears.com Thu Sep 8 16:52:48 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 08 Sep 2011 19:52:48 -0400 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> Message-ID: <4E695550.9090207@mapgears.com> On 11-09-08 07:44 PM, Mr. Puneet Kishor wrote: > >> >> 2- Try a GetCapabilities instead of GetMap, and make sure your layer shows up properly and with no WARNING in the GetCapabilities XML output. Make sure the name of the layer is not changed: if you have multiple layers with the same name then the WMS handler will rename them to make them unique (WMS spec requirement) > > > That was very useful. No errors, but I do notice the following funky issue (see below) > > > gmna > gmna > EPSG:4326 > > minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07" /> > > > > Where the heck did that (+-)2.5e+07 business get into the BoundingBox? I didn't add that. All I did was query in lat/lon. Maybe that is where my error remains now. > What is your data? a Shapefile? What is the source projection of the data? I suspect the BoundingBox is invalid because the layer projection is not set to the right value. Those funky numbers look like values in meters, so presumably your data is in a projected coordinate system. In your script you set: $layerOne->setProjection("init=epsg:4326"); This will work only if your data is in EPSG:4326. If that's not the case then you need to set the layer projection to match the source data. -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From punk.kish at gmail.com Thu Sep 8 17:16:33 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 19:16:33 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: <4E695550.9090207@mapgears.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> Message-ID: <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> On Sep 8, 2011, at 6:52 PM, Daniel Morissette wrote: > On 11-09-08 07:44 PM, Mr. Puneet Kishor wrote: >> >>> >>> 2- Try a GetCapabilities instead of GetMap, and make sure your layer shows up properly and with no WARNING in the GetCapabilities XML output. Make sure the name of the layer is not changed: if you have multiple layers with the same name then the WMS handler will rename them to make them unique (WMS spec requirement) >> >> >> That was very useful. No errors, but I do notice the following funky issue (see below) >> >> >> gmna >> gmna >> EPSG:4326 >> >> > minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07" /> >> >> >> >> Where the heck did that (+-)2.5e+07 business get into the BoundingBox? I didn't add that. All I did was query in lat/lon. Maybe that is where my error remains now. >> > > What is your data? a Shapefile? What is the source projection of the data? PostGIS. lat/lng. SRID 4326 > > I suspect the BoundingBox is invalid because the layer projection is not set to the right value. Those funky numbers look like values in meters, so presumably your data is in a projected coordinate system. > > In your script you set: > $layerOne->setProjection("init=epsg:4326"); Already have that line in both $mapObj and in the $layerObj $map->setProjection("init=epsg:4326"); .. $layerOne->setProjection("init=epsg:4326"); > > This will work only if your data is in EPSG:4326. If that's not the case then you need to set the layer projection to match the source data. > punkish at lucknow$/opt/local/lib/postgresql90/bin/psql -U postgres -d macromap psql (9.0.4) Type "help" for help. macromap=# SELECT ST_SRID(the_geom) FROM gmna LIMIT 1; st_srid --------- 4326 (1 row) macromap=# SELECT * FROM geometry_columns WHERE f_table_name = 'gmna'; f_table_catalog | f_table_schema | f_table_name | f_geometry_column | coord_dimension | srid | type -----------------+----------------+--------------+-------------------+-----------------+------+-------------- | gmna | gmna | the_geom | 2 | 4326 | MULTIPOLYGON (1 row) macromap=# From punk.kish at gmail.com Thu Sep 8 17:40:32 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 19:40:32 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> Message-ID: On Sep 8, 2011, at 7:16 PM, Mr. Puneet Kishor wrote: > > On Sep 8, 2011, at 6:52 PM, Daniel Morissette wrote: > >> On 11-09-08 07:44 PM, Mr. Puneet Kishor wrote: >>> >>>> >>>> 2- Try a GetCapabilities instead of GetMap, and make sure your layer shows up properly and with no WARNING in the GetCapabilities XML output. Make sure the name of the layer is not changed: if you have multiple layers with the same name then the WMS handler will rename them to make them unique (WMS spec requirement) >>> >>> >>> That was very useful. No errors, but I do notice the following funky issue (see below) >>> >>> >>> gmna >>> gmna >>> EPSG:4326 >>> >>> >> minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07" /> >>> >>> >>> >>> Where the heck did that (+-)2.5e+07 business get into the BoundingBox? I didn't add that. All I did was query in lat/lon. Maybe that is where my error remains now. >>> >> >> What is your data? a Shapefile? What is the source projection of the data? > > PostGIS. lat/lng. SRID 4326 > >> >> I suspect the BoundingBox is invalid because the layer projection is not set to the right value. Those funky numbers look like values in meters, so presumably your data is in a projected coordinate system. >> >> In your script you set: >> $layerOne->setProjection("init=epsg:4326"); > > Already have that line in both $mapObj and in the $layerObj > > $map->setProjection("init=epsg:4326"); > .. > $layerOne->setProjection("init=epsg:4326"); > > >> >> This will work only if your data is in EPSG:4326. If that's not the case then you need to set the layer projection to match the source data. >> > > punkish at lucknow$/opt/local/lib/postgresql90/bin/psql -U postgres -d macromap > psql (9.0.4) > Type "help" for help. > > macromap=# SELECT ST_SRID(the_geom) FROM gmna LIMIT 1; > st_srid > --------- > 4326 > (1 row) > > macromap=# SELECT * FROM geometry_columns WHERE f_table_name = 'gmna'; > f_table_catalog | f_table_schema | f_table_name | f_geometry_column | coord_dimension | srid | type > -----------------+----------------+--------------+-------------------+-----------------+------+-------------- > | gmna | gmna | the_geom | 2 | 4326 | MULTIPOLYGON > (1 row) > > macromap=# > > I should have also added the following macromap=# SELECT ST_AsText(the_geom) FROM gmna LIMIT 1; MULTIPOLYGON(((170.095660072181 65.6251237164987,170.158707739831 65.6269635224645,170.173265447057 65.6291258974802,170.2497277762 65.6357072803021,170.257074956711 65.6372005203368,170.267729454865 65.6409199441452,170.283323865029 65.6476938262634,170.301827075555 65.657286936117,170.370058904075 65.6852127397289,170.394158265237 65.6971816353387,170.45719236517 65.7228758026517,170.477794791157 65.7331303689249,170.501440218163 65.7431659781412,170.506165498289 65.745957239196,170.509550359131 65.74948784687,170.517163313193 65.7692852345393,170.523452830315 65.7856156337451,170.527911709329 65.7872471861488,170.564509940928 65.8002968138894,170.605805308438 65.815184809157,17.... As you can see, everything is in lat/lng. From dmorissette at mapgears.com Thu Sep 8 17:43:31 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 08 Sep 2011 20:43:31 -0400 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> Message-ID: <4E696133.3060807@mapgears.com> On 11-09-08 08:40 PM, Mr. Puneet Kishor wrote: > > On Sep 8, 2011, at 7:16 PM, Mr. Puneet Kishor wrote: >> >> PostGIS. lat/lng. SRID 4326 >> >>> [...] > > > I should have also added the following > > macromap=# SELECT ST_AsText(the_geom) FROM gmna LIMIT 1; > MULTIPOLYGON(((170.095660072181 65.6251237164987,170.158707739831 65.6269635224645,170.173265447057 65.6291258974802,170.2497277762 65.6357072803021,170.257074956711 65.6372005203368,170.267729454865 65.6409199441452,170.283323865029 65.6476938262634,170.301827075555 65.657286936117,170.370058904075 65.6852127397289,170.394158265237 65.6971816353387,170.45719236517 65.7228758026517,170.477794791157 65.7331303689249,170.501440218163 65.7431659781412,170.506165498289 65.745957239196,170.509550359131 65.74948784687,170.517163313193 65.7692852345393,170.523452830315 65.7856156337451,170.527911709329 65.7872471861488,170.564509940928 65.8002968138894,170.605805308438 65.815184809157,17.... > > > As you can see, everything is in lat/lng. > > Thanks. That rules out the possibility of a data problem. With PostGIS, the WMS extents reported for a layer cannot be derived from the data. In the shapefile case we use the shapefile's extents, but this is not readily available with postgis, so unless I'm mistaken, MapServer looks up the wms/ows_extent metadata in the layer, and if not found then it falls back on the map's EXTENT for the mandatory BoundingBox and LatLonBoundingBox elements. Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From punk.kish at gmail.com Thu Sep 8 18:02:33 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 20:02:33 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: <4E696133.3060807@mapgears.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> Message-ID: <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: > On 11-09-08 08:40 PM, Mr. Puneet Kishor wrote: >> >> On Sep 8, 2011, at 7:16 PM, Mr. Puneet Kishor wrote: >>> >>> PostGIS. lat/lng. SRID 4326 >>> >>>> > [...] >> >> >> I should have also added the following >> >> macromap=# SELECT ST_AsText(the_geom) FROM gmna LIMIT 1; >> MULTIPOLYGON(((170.095660072181 65.6251237164987,170.158707739831 65.6269635224645,170.173265447057 65.6291258974802,170.2497277762 65.6357072803021,170.257074956711 65.6372005203368,170.267729454865 65.6409199441452,170.283323865029 65.6476938262634,170.301827075555 65.657286936117,170.370058904075 65.6852127397289,170.394158265237 65.6971816353387,170.45719236517 65.7228758026517,170.477794791157 65.7331303689249,170.501440218163 65.7431659781412,170.506165498289 65.745957239196,170.509550359131 65.74948784687,170.517163313193 65.7692852345393,170.523452830315 65.7856156337451,170.527911709329 65.7872471861488,170.564509940928 65.8002968138894,170.605805308438 65.815184809157,17.... >> >> >> As you can see, everything is in lat/lng. >> >> > > Thanks. That rules out the possibility of a data problem. > > With PostGIS, the WMS extents reported for a layer cannot be derived from the data. In the shapefile case we use the shapefile's extents, but this is not readily available with postgis, so unless I'm mistaken, MapServer looks up the wms/ows_extent metadata in the layer, and if not found then it falls back on the map's EXTENT for the mandatory BoundingBox and LatLonBoundingBox elements. > > Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... > wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. Puneet. From dmorissette at mapgears.com Thu Sep 8 18:28:16 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 08 Sep 2011 21:28:16 -0400 Subject: [mapserver-users] MapScript WMS request In-Reply-To: <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> Message-ID: <4E696BB0.7020705@mapgears.com> On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: > > On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >> >> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... >> > > wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. > I was able to reproduce the issue with the copy of the mapfile you sent off-list. It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} ...and then it returns MS_SUCCESS. I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. A quick search indicates an open ticket about the issue: http://trac.osgeo.org/mapserver/ticket/3585 You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. The short term fix for you would be to set the "ows_extent" metadata in your layer: METADATA "ows_extent" "-180 -90 180 90" ... END -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From punk.kish at gmail.com Thu Sep 8 19:31:40 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 21:31:40 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: <4E696BB0.7020705@mapgears.com> References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> <4E696BB0.7020705@mapgears.com> Message-ID: On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: > On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: >> >> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >>> >>> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... >>> >> >> wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. >> > > I was able to reproduce the issue with the copy of the mapfile you sent off-list. > > It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return > > {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} > > ...and then it returns MS_SUCCESS. > > I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. > > A quick search indicates an open ticket about the issue: > > http://trac.osgeo.org/mapserver/ticket/3585 > > You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. > > The short term fix for you would be to set the "ows_extent" metadata in your layer: > > METADATA > "ows_extent" "-180 -90 180 90" > ... > END > Thanks Daniel. I will bump the ticket. For now, see below -- Using the "my.map" file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&STYLES=&FORMAT=image/png&TRANSPARENT=true] Note, no further modifications is required, that is, not even the "ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get a good image. However, if I use the following program to access the same map file, I get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000" in the GetCapabilities. Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer METADATA in the "my.map" file, the GetCapabilities returns the correct bounds now, however, the image is still blank. #!/opt/local/bin/perl use strict; use mapscript; my $wms = new mapscript::OWSRequest(); $wms->setParameter("SERVICE", "WMS" ); $wms->setParameter("VERSION", "1.1.1" ); $wms->setParameter("REQUEST", "GetMap" ); $wms->setParameter("BBOX", "-180,-90,180,90" ); $wms->setParameter("LAYERS", "gmna"); $wms->setParameter("SRS", "EPSG:4326"); $wms->setParameter("WIDTH", "1200"); $wms->setParameter("HEIGHT", "600"); $wms->setParameter("FORMAT", "image/png"); $wms->setParameter("TRANSPARENT", "true"); my $map = new mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); if(!$map) { warn "New mapObj() error: $mapscript::ms_error->{message}\n"; } my $io = mapscript::msIO_installStdoutToBuffer(); my $dispatch_out = $map->OWSDispatch( $wms ); printf "%s\n", mapscript::msIO_getStdoutBufferString(); I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. Puneet. From punk.kish at gmail.com Thu Sep 8 20:23:03 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 8 Sep 2011 22:23:03 -0500 Subject: [mapserver-users] mode=tile and MapScript Message-ID: <619EBE40-091A-4876-ADBD-2794C326B90A@gmail.com> I am trying out mode=tile as detailed at [http://mapserver.org/output/tile_mode.html], and actually, it works great! Might be able to avoid the pains of WMS completely. However, it works great with MapServer CGI. What if I want to use MapScript? In other words, instead of var urlTemplate = 'http://localhost/cgi-bin/myapp?'; urlTemplate += 'layers=layer1 layer2&'; urlTemplate += 'mode=tile&'; urlTemplate += 'tilemode=gmap&'; urlTemplate += 'tile={X}+{Y}+{Z}'; I have var urlTemplate = 'http://localhost/myapp.cgi?'; urlTemplate += 'tile={X}+{Y}+{Z}'; and I add mode=tile and tilemode=gmap on the server side. My question is -- one, will the above work? and, how do I pass mode=tile and tilemode=gmap and the tile={X}+{Y}+{Z} parameters to the program? I didn't see any MapScript documentation for these parameters. I need to translate a call such as [http://localhost/cgi-bin/myapp?layers=layer1&mode=tile&tilemode=gmap&tile=30+46+7] into a MapScript request. Puneet. From hawk at aamdal.com Thu Sep 8 06:07:33 2011 From: hawk at aamdal.com (Hawk AA) Date: Thu, 8 Sep 2011 15:07:33 +0200 Subject: [mapserver-users] Mapserver and MapScript performance issue Message-ID: <002301cc6e28$461fd420$d25f7c60$@aamdal.com> Hi, First of all, thank you for Mapserver and all of the documentation. It?s really a great product. I?m having some performance issues when querying on a column in MapScript. I use the following code: $oResult = @$oLayerObject->queryByAttributes($strField, $strSearchString, MS_SINGLE); Where $strField can for instance be ?Point_ID? and $strSearchString can be something like ?HEG1? . I only need one result, as the column is the primary key for the table, and is unique. The tables I?m searching through is of MapInfo *.tab format, has about 50?000 records, and the actual columns are indexed. Each lookup with PHP MapScript takes about 1.5 seconds. I?ve uploaded the data into a PostGIS-database, and I can find the actual record in about 0.03 seconds. My mapfile definition of the layers looks like this: LAYER NAME Traseer PROJECTION "init=epsg:32632" END GROUP TelMe METADATA "wfs_title" "Traseer" "wfs_srs" "EPSG:32632" "gml_featureid" "Trace_ID" "gml_include_items" "Trace_ID,Type" END TYPE LINE CONNECTIONTYPE OGR CONNECTION "TM_Nett/TM_Traces.TAB" STYLEITEM "AUTO" maxscaledenom 300000 TEMPLATE "ttt_query.html" DUMP TRUE CLASS NAME "Traseer" SYMBOL "default-circle" COLOR 255 0 0 #SIZE 6 END END # Layer LAYER NAME Punkter GROUP TelMe METADATA "wfs_title" "Punkter" "wfs_srs" "EPSG:32632" "gml_featureid" "Point_ID" "gml_include_items" "all" "gml_exclude_items" "rowid#" "wms_title" "Punkter" "wms_srs" "EPSG:32632" END PROJECTION "init=epsg:32632" END DUMP TRUE TYPE POINT CONNECTIONTYPE OGR CONNECTION "TM_Nett/TM_Points.TAB" CLASSITEM "Type" CLASS maxscaledenom 1000 TEMPLATE "ttt_query.html" EXPRESSION "TRASE SPLIT" NAME "Trasedeling" STYLE SYMBOL 'circle' SIZE 8 COLOR -1 -1 -1 #Usynlig END END CLASS maxscaledenom 3000 TEMPLATE "ttt_query.html" EXPRESSION /NEXANS WTC*/ NAME "WTC-Bokser" STYLE SYMBOL 'square' SIZE 12 COLOR 255 128 0 #Orange OUTLINECOLOR 0 0 0 END END CLASS maxscaledenom 10000 TEMPLATE "ttt_query.html" EXPRESSION /NODE*/ NAME "Node" STYLE SYMBOL 'house' SIZE 16 COLOR 255 128 0 #Orange OUTLINECOLOR 0 0 0 END END CLASS maxscaledenom 1000 TEMPLATE "ttt_query.html" NAME "TelMe_Punkter" STYLE SYMBOL 'circle' SIZE 6 COLOR 255 128 0 #ORANGE OUTLINECOLOR 0 0 0 END END END # Layer My question would be: Why is MapScript not taking the advantage of the existing index on the MapInfo *.tab files, and takes 50 times longer than the PostGIS queries? Thanks in advance, H?kon -------------- next part -------------- An HTML attachment was scrubbed... URL: From jt at mapmedia.de Fri Sep 9 03:01:15 2011 From: jt at mapmedia.de (=?ISO-8859-15?Q?J=F6rg_Thomsen?=) Date: Fri, 09 Sep 2011 12:01:15 +0200 Subject: [mapserver-users] getFeatureInfo html with special characters in datasource Message-ID: <4E69E3EB.1070408@mapmedia.de> hi, I'd like to get a html-feature-info like Niedersachsen 167 I get both, 'Niedersachsen' and '167' from the same table-column of the database and I need the line break between them. When I use 'Niedersachsen
167' in the Atrributes, mapserver changes the brackets into the html-entities and i get 'Niedersachsen<br>167' which is shown as 'Niedersachsen
167' in the browser-window. Are there any special-characters I can use in the database or is there an other solution? J?rg From Jukka.Rahkonen at mmmtike.fi Fri Sep 9 04:10:47 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 9 Sep 2011 11:10:47 +0000 Subject: [mapserver-users] Re: Mapserver unnecessary slow with Spatialite In-Reply-To: <201108302228.22815.even.rouault@mines-paris.org> References: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301EBBD@suutari.haapa.mmm.fi> <201108302228.22815.even.rouault@mines-paris.org> Message-ID: <84446DEF76453C439E9E97E438E13A63021331@suutari.haapa.mmm.fi> Even Rouault wrote: > 30. August 2011 23:28 > I've just added support for spatialite views in GDAL trunk > (r23011). Spatial > index of the base table is used to speed up spatial queries > on the view. > > On your example, to create the spatial view : > > ogrinfo berlin.sqlite -sql "create view > osm_line_highway_not_null as select > OGC_FID AS ROWID, GEOMETRY, osm_id ,highway,ref,name, tunnel > from osm_line > where highway is not null" > > ogrinfo berlin.sqlite -sql "INSERT INTO > views_geometry_columns (view_name, > view_geometry, view_rowid, f_table_name, f_geometry_column) VALUES > ('osm_line_highway_not_null', 'GEOMETRY', 'ROWID', > 'osm_line', 'GEOMETRY')" > > Note: you must call the primary key ROWID if you want QGIS to > be able to > display the view on the map. I'm not sure why this is > necessary (the OGR > driver works with other names), may be a limitation of the > qgis spatialite > driver. > > And then you can use osm_line_highway_not_null as a regular > layer for > mapserver. I have done some speed tests with fresh Mapserver Windows build (date 09.09.2011) installed from http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1500-gdal-mapserver.zip and the gdal binaries from the same package. Results are somehow baffling. Good news is that with the new build does support the use of Spatialite views as Mapserver layers that the views are really a bit faster to use than having DATA as "SELECT...FROM...WHERE.." in the mapfile. Feels good so far. But when I switched back to standard MS4W I measured that Mapserver was more than two times faster with the old binaries than with the new ones. A closer analysis showed that new binaries were considerably faster in rendering the most heavy layer "roadsclose_03" but much slower with all the othet layers. Results with MS4W ================= rendering using outputformat named png (AGG/PNG). WMS/WFS set-up and query, 0.000s Layer 0 (landuse_layer1), 0.531s Layer 1 (landuse_layer2), 0.481s Layer 2 (landuse_layer3), 0.501s Layer 3 (landuse_layer4), 0.550s Layer 4 (landuse_layer5), 0.491s Layer 5 (landuse_layer6), 0.281s Layer 7 (sports), 0.430s Layer 10 (railways_03), 0.301s Layer 18 (roadsclose_03), 5.398s Layer 27 (places_01), 0.250s Drawing Label Cache, 0.010s total time: 9.244s Results with the dev-binaries ============================= rendering using outputformat named png (AGG/PNG). WMS/WFS set-up and query, 0.000s Layer 0 (landuse_layer1), 1.753s Layer 1 (landuse_layer2), 2.554s Layer 2 (landuse_layer3), 1.762s Layer 3 (landuse_layer4), 1.733s Layer 4 (landuse_layer5), 2.543s Layer 5 (landuse_layer6), 1.793s Layer 7 (sports), 2.163s Layer 10 (railways_03), 1.732s Layer 18 (roadsclose_03), 1.753s Layer 27 (places_01), 1.732s Drawing Label Cache, 0.000s total time: 19.518s I can mail a link for downloading the whole test set-up with data and mapfiles if someone gets interested. -Jukka Rahkonen- From arnd.wippermann at web.de Fri Sep 9 04:25:25 2011 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Fri, 9 Sep 2011 13:25:25 +0200 Subject: AW: [mapserver-users] getFeatureInfo html with special characters indatasource In-Reply-To: <4E69E3EB.1070408@mapmedia.de> References: <4E69E3EB.1070408@mapmedia.de> Message-ID: Hi, Perhaps you can use [yourFIELD_raw]. It shouldn't encode HTML. http://mapserver.org/mapfile/template.html [attribute name],[attrribute name_esc],[attribute item name_raw] Or you can use javascript in your templates to solve this Arnd -----Urspr?ngliche Nachricht----- Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von J?rg Thomsen Gesendet: Freitag, 9. September 2011 12:01 An: mapserver-users at lists.osgeo.org Betreff: [mapserver-users] getFeatureInfo html with special characters indatasource hi, I'd like to get a html-feature-info like Niedersachsen 167 I get both, 'Niedersachsen' and '167' from the same table-column of the database and I need the line break between them. When I use 'Niedersachsen
167' in the Atrributes, mapserver changes the brackets into the html-entities and i get 'Niedersachsen<br>167' which is shown as 'Niedersachsen
167' in the browser-window. Are there any special-characters I can use in the database or is there an other solution? J?rg _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From jt at mapmedia.de Fri Sep 9 04:40:10 2011 From: jt at mapmedia.de (=?ISO-8859-1?Q?J=F6rg_Thomsen?=) Date: Fri, 09 Sep 2011 13:40:10 +0200 Subject: [mapserver-users] getFeatureInfo html with special characters indatasource In-Reply-To: References: <4E69E3EB.1070408@mapmedia.de> Message-ID: <4E69FB1A.7090003@mapmedia.de> hello Arne, Am 09.09.2011 13:25, schrieb Arnd Wippermann: > Hi, > > Perhaps you can use [yourFIELD_raw]. It shouldn't encode HTML. > > http://mapserver.org/mapfile/template.html > [attribute name],[attrribute name_esc],[attribute item name_raw] this works fine, thanks! J?rg > > Or you can use javascript in your templates to solve this > > > > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von J?rg Thomsen > Gesendet: Freitag, 9. September 2011 12:01 > An: mapserver-users at lists.osgeo.org > Betreff: [mapserver-users] getFeatureInfo html with special characters > indatasource > > hi, > > I'd like to get a html-feature-info like > > Niedersachsen > 167 > > I get both, 'Niedersachsen' and '167' from the same table-column of the > database and I need the line break between them. When I use > 'Niedersachsen
167' in the Atrributes, mapserver changes the brackets > into the html-entities and i get 'Niedersachsen<br>167' > which is shown as 'Niedersachsen
167' in the browser-window. > > Are there any special-characters I can use in the database or is there an > other solution? > > J?rg > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Aufwind durch Wissen! Qualifizierte Open Source Schulungen bei der http://www.foss-akademie.de/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _________________________________________________ MapMedia Kartographie und raumbezogene Informationssysteme Gillweg 3, 14193 Berlin fon: +49 30 89 06 82-70 fax: +49 30 89 09 53-21 mail: jt at mapmedia.de net: www.mapmedia.de _________________________________________________ Gesch?ftsf?hrer: G. v. Tschirnhaus, J. Thomsen, P. Stamm Registergericht, Berlin - Amtsgericht Charlottenburg, HRB 89625, Umsatzsteuer-Identnummer: DE 813794062 From mmypost at yandex.ru Fri Sep 9 06:24:41 2011 From: mmypost at yandex.ru (mmypost mmypost) Date: Fri, 09 Sep 2011 17:24:41 +0400 Subject: [mapserver-users] proj4js and Azimuthal Equidistant projection Message-ID: <400051315574681@web114.yandex.ru> ?i! Sorry for my bad English. I use proj4js library in my web project. I have a problem with the use of method transform the library. Proj4js.defs["AEQP"] = "+proj=aeqd +lat_0=50 +lon_0=105 +ellps=WGS84 +datum=WGS84 +zone=36 +units=m +north +no_defs"; Proj4js.defs["EPSG:4236"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"; var aeqp = new Proj4js.Proj("AEQP"); var wgs = new Proj4js.Proj("EPSG:4236"); var p = new Proj4js.Point(-3601412.8999, 2529733.63814); Proj4js.transform(aeqp , wgs, p); Point "p" have values x=37.4703 and y 55.6884 after Proj4js.transform If I use SWING library of mapscript for .Net (method pointObj.project()) with same values of point ( x=-3601412.8999 and y= 2529733.63814 ) the method pointObj.project() return point with values x=37.60263 and y=55.72719. The difference in the values ??of a few minutes! For Example: 37.4703 = 37grad and 28 min .... and 37.60263 = 37grad and 36 min .... Please help solve this problem. Maybe proj4js contains errors for Azimuthal Equidistant projection? Are there any library similar to Proj4js? From david.fawcett at state.mn.us Fri Sep 9 06:39:54 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Fri, 9 Sep 2011 08:39:54 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> <4E696BB0.7020705@mapgears.com> Message-ID: Puneet, As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Thursday, September 08, 2011 9:32 PM To: Daniel Morissette Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: > On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: >> >> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >>> >>> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... >>> >> >> wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. >> > > I was able to reproduce the issue with the copy of the mapfile you sent off-list. > > It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return > > {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} > > ...and then it returns MS_SUCCESS. > > I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. > > A quick search indicates an open ticket about the issue: > > http://trac.osgeo.org/mapserver/ticket/3585 > > You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. > > The short term fix for you would be to set the "ows_extent" metadata in your layer: > > METADATA > "ows_extent" "-180 -90 180 90" > ... > END > Thanks Daniel. I will bump the ticket. For now, see below -- Using the "my.map" file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&STYLES=&FORMAT=image/png&TRANSPARENT=true] Note, no further modifications is required, that is, not even the "ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get a good image. However, if I use the following program to access the same map file, I get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000" in the GetCapabilities. Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer METADATA in the "my.map" file, the GetCapabilities returns the correct bounds now, however, the image is still blank. #!/opt/local/bin/perl use strict; use mapscript; my $wms = new mapscript::OWSRequest(); $wms->setParameter("SERVICE", "WMS" ); $wms->setParameter("VERSION", "1.1.1" ); $wms->setParameter("REQUEST", "GetMap" ); $wms->setParameter("BBOX", "-180,-90,180,90" ); $wms->setParameter("LAYERS", "gmna"); $wms->setParameter("SRS", "EPSG:4326"); $wms->setParameter("WIDTH", "1200"); $wms->setParameter("HEIGHT", "600"); $wms->setParameter("FORMAT", "image/png"); $wms->setParameter("TRANSPARENT", "true"); my $map = new mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); if(!$map) { warn "New mapObj() error: $mapscript::ms_error->{message}\n"; } my $io = mapscript::msIO_installStdoutToBuffer(); my $dispatch_out = $map->OWSDispatch( $wms ); printf "%s\n", mapscript::msIO_getStdoutBufferString(); I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. Puneet. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Michael.Smith at usace.army.mil Fri Sep 9 06:52:55 2011 From: Michael.Smith at usace.army.mil (Smith, Michael ERDC-CRREL-NH) Date: Fri, 9 Sep 2011 13:52:55 +0000 Subject: [mapserver-users] MapScript WMS request In-Reply-To: Message-ID: I use this type of OpenLayers layer (OpenLayers.Layer.MapServer) all the time and it works great. As an old school cgi user, I find the MapServer interface more flexible than the WMS one. Mike -- Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers On 9/9/11 9:39 AM, "Fawcett, David (MPCA)" wrote: >Puneet, > >As far as I know, OpenLayers still has support for a layer based on >MapServer CGI. Because MapServer can also serve up WMS well, this layer >type isn't necessarily recommended or as well supported. > >http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html > >David. > >-----Original Message----- >From: mapserver-users-bounces at lists.osgeo.org >[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet >Kishor >Sent: Thursday, September 08, 2011 9:32 PM >To: Daniel Morissette >Cc: mapserver-users at lists.osgeo.org >Subject: Re: [mapserver-users] MapScript WMS request > > >On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: > >> On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: >>> >>> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >>>> >>>> Maybe call $map->save("/tmp/my.map") in your script after the map and >>>>layer have been populated and paste the result... that may give us a >>>>hint... >>>> >>> >>> wow! this is a super-awesome debugging technique. I have sent you the >>>map file off list to not pollute the entire list serve. >>> >> >> I was able to reproduce the issue with the copy of the mapfile you sent >>off-list. >> >> It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded >>to always return >> >> {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} >> >> ...and then it returns MS_SUCCESS. >> >> I think this function should either be left unimplemented (this way >>MapServer would fallback on other mechanisms), or return MS_FAILURE to >>indicate to the calling code that it didn't do anything useful. >> >> A quick search indicates an open ticket about the issue: >> >> http://trac.osgeo.org/mapserver/ticket/3585 >> >> You could bump the ticket and hope someone works on it at the FOSS4G >>code sprint next week. >> >> The short term fix for you would be to set the "ows_extent" metadata in >>your layer: >> >> METADATA >> "ows_extent" "-180 -90 180 90" >> ... >> END >> > > >Thanks Daniel. I will bump the ticket. For now, see below -- > >Using the "my.map" file I sent you, with no further modifications to it, >I am able to successfully get an image back via >[http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=Get >Map&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&S >TYLES=&FORMAT=image/png&TRANSPARENT=true] > >Note, no further modifications is required, that is, not even the >"ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get >a good image. > > >However, if I use the following program to access the same map file, I >get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, >maxy = 25000000" in the GetCapabilities. > >Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer >METADATA in the "my.map" file, the GetCapabilities returns the correct >bounds now, however, the image is still blank. > > #!/opt/local/bin/perl > > use strict; > use mapscript; > > my $wms = new mapscript::OWSRequest(); > $wms->setParameter("SERVICE", "WMS" ); > $wms->setParameter("VERSION", "1.1.1" ); > $wms->setParameter("REQUEST", "GetMap" ); > $wms->setParameter("BBOX", "-180,-90,180,90" ); > $wms->setParameter("LAYERS", "gmna"); > $wms->setParameter("SRS", "EPSG:4326"); > $wms->setParameter("WIDTH", "1200"); > $wms->setParameter("HEIGHT", "600"); > $wms->setParameter("FORMAT", "image/png"); > $wms->setParameter("TRANSPARENT", "true"); > > my $map = new >mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); > > if(!$map) { > warn "New mapObj() error: $mapscript::ms_error->{message}\n"; > } > > my $io = mapscript::msIO_installStdoutToBuffer(); > my $dispatch_out = $map->OWSDispatch( $wms ); > printf "%s\n", mapscript::msIO_getStdoutBufferString(); > >I have now spent an enormous amount of time on this, and for now, I have >to move on. This is just not working out. Maybe I will try some other >technique, perhaps this mode=tile to see if I can get MapServer powered >maps in my apps. > >Thanks much for your help. If you (or anyone else) can come up with a >bright idea, I will be happy to try it. > >Puneet. > >_______________________________________________ >mapserver-users mailing list >mapserver-users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users > > >_______________________________________________ >mapserver-users mailing list >mapserver-users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Fri Sep 9 07:35:07 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Fri, 9 Sep 2011 09:35:07 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> <4E696BB0.7020705@mapgears.com> Message-ID: On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote: > Puneet, > > As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. > > http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html Indeed David. Because, going by the docs, the MapServer CGI calls are discouraged (or so it seems), I'd rather not invest in that path. This is a long term project that I am working on, so the foundations have to be very robust. Besides, I may or may not use OL. While I like OL a lot, I am also looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to decouple the backend from the front-end as much as possible. I have no issues with using WMS, but I just am unable to get MapServer WMS to work via MapScript. And, yes, I do have to use MapScript if I can help it -- my layer classification is generated on demand, and MapScript is the easiest way I can think of for doing that. I did find yesterday that `mode=tile` works really well, but I am trying to make that work with MapScript. A separate email thread for that question. > > David. > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor > Sent: Thursday, September 08, 2011 9:32 PM > To: Daniel Morissette > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] MapScript WMS request > > > On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: > >> On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: >>> >>> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >>>> >>>> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... >>>> >>> >>> wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. >>> >> >> I was able to reproduce the issue with the copy of the mapfile you sent off-list. >> >> It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return >> >> {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} >> >> ...and then it returns MS_SUCCESS. >> >> I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. >> >> A quick search indicates an open ticket about the issue: >> >> http://trac.osgeo.org/mapserver/ticket/3585 >> >> You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. >> >> The short term fix for you would be to set the "ows_extent" metadata in your layer: >> >> METADATA >> "ows_extent" "-180 -90 180 90" >> ... >> END >> > > > Thanks Daniel. I will bump the ticket. For now, see below -- > > Using the "my.map" file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&STYLES=&FORMAT=image/png&TRANSPARENT=true] > > Note, no further modifications is required, that is, not even the "ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get a good image. > > > However, if I use the following program to access the same map file, I get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000" in the GetCapabilities. > > Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer METADATA in the "my.map" file, the GetCapabilities returns the correct bounds now, however, the image is still blank. > > #!/opt/local/bin/perl > > use strict; > use mapscript; > > my $wms = new mapscript::OWSRequest(); > $wms->setParameter("SERVICE", "WMS" ); > $wms->setParameter("VERSION", "1.1.1" ); > $wms->setParameter("REQUEST", "GetMap" ); > $wms->setParameter("BBOX", "-180,-90,180,90" ); > $wms->setParameter("LAYERS", "gmna"); > $wms->setParameter("SRS", "EPSG:4326"); > $wms->setParameter("WIDTH", "1200"); > $wms->setParameter("HEIGHT", "600"); > $wms->setParameter("FORMAT", "image/png"); > $wms->setParameter("TRANSPARENT", "true"); > > my $map = new mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); > > if(!$map) { > warn "New mapObj() error: $mapscript::ms_error->{message}\n"; > } > > my $io = mapscript::msIO_installStdoutToBuffer(); > my $dispatch_out = $map->OWSDispatch( $wms ); > printf "%s\n", mapscript::msIO_getStdoutBufferString(); > > I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. > > Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. > > Puneet. > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From xander at mitre.org Fri Sep 9 07:28:38 2011 From: xander at mitre.org (Enzmann, Alexander R.) Date: Fri, 9 Sep 2011 10:28:38 -0400 Subject: [mapserver-users] Use EXTENT to crop an image within a map file Message-ID: Is it possible to only use a subset of an image that is referenced in a mapfile? In the mapfile below there are two FAA sectional charts. There are borders on the charts that I don't want on the final composite image. If the "EXTENT" actually clipped the image before rendering, I could get what I'm looking for, but it only seems to be used to determine overlap with the bounds of the output image (and not always then). I'm sure I could use something like gdal_translate to preprocess all of the charts, but that a really tedious sort of task and results in extra images lying around. Would prefer to use source images and have the mapfile pull the correct bits out of them. The charts are available at: http://aeronav.faa.gov/index.asp?xml=aeronav/applications/VFR/chartlist_sect Xander # # MapServer map file for FAA Sectional Raster charts (test case w/ only two charts) # MAP NAME "FAA Sectional Raster" IMAGETYPE PNG SIZE 256 256 DEBUG OFF UNITS DD SHAPEPATH "/MapData/FAA/SectionalRaster" PROJECTION "init=epsg:4269" END WEB METADATA "wms_srs" "EPSG:900913 EPSG:4326" "ows_enable_request" "*" END END LAYER NAME "LA North" DATA "Los Angeles 89 North.tif" STATUS ON TYPE RASTER DUMP TRUE PROJECTION "auto" END END LAYER NAME "LA South" DATA "Los Angeles 89 South.tif" STATUS ON TYPE RASTER DUMP TRUE PROJECTION "+proj=lcc +lat_1=38.66667 +lat_2=33.33333 +lat_0=34.16667 +lon_0=-118.5" END EXTENT -122 32 -119 34 END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.fawcett at state.mn.us Fri Sep 9 07:47:54 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Fri, 9 Sep 2011 09:47:54 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> <4E696BB0.7020705@mapgears.com> Message-ID: Puneet, Using MapServer CGI and layer.MapServer would not set you up well for other client libraries, so I see your point. It can be viable though. In this app (just an imagemap, not OL), there are no attribute values associated with the spatial data. The classes are generated on-the-fly and the county id's for each class are passed in as URL vars. Same thing for the legend. This allows flexibility for compounds who's emissions may vary from tens of pounds to millions of pounds. This approach may not work for your case, but it is another way to slice it... http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Friday, September 09, 2011 9:35 AM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote: > Puneet, > > As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. > > http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html Indeed David. Because, going by the docs, the MapServer CGI calls are discouraged (or so it seems), I'd rather not invest in that path. This is a long term project that I am working on, so the foundations have to be very robust. Besides, I may or may not use OL. While I like OL a lot, I am also looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to decouple the backend from the front-end as much as possible. I have no issues with using WMS, but I just am unable to get MapServer WMS to work via MapScript. And, yes, I do have to use MapScript if I can help it -- my layer classification is generated on demand, and MapScript is the easiest way I can think of for doing that. I did find yesterday that `mode=tile` works really well, but I am trying to make that work with MapScript. A separate email thread for that question. > > David. > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor > Sent: Thursday, September 08, 2011 9:32 PM > To: Daniel Morissette > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] MapScript WMS request > > > On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: > >> On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: >>> >>> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >>>> >>>> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... >>>> >>> >>> wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. >>> >> >> I was able to reproduce the issue with the copy of the mapfile you sent off-list. >> >> It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return >> >> {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} >> >> ...and then it returns MS_SUCCESS. >> >> I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. >> >> A quick search indicates an open ticket about the issue: >> >> http://trac.osgeo.org/mapserver/ticket/3585 >> >> You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. >> >> The short term fix for you would be to set the "ows_extent" metadata in your layer: >> >> METADATA >> "ows_extent" "-180 -90 180 90" >> ... >> END >> > > > Thanks Daniel. I will bump the ticket. For now, see below -- > > Using the "my.map" file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&STYLES=&FORMAT=image/png&TRANSPARENT=true] > > Note, no further modifications is required, that is, not even the "ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get a good image. > > > However, if I use the following program to access the same map file, I get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000" in the GetCapabilities. > > Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer METADATA in the "my.map" file, the GetCapabilities returns the correct bounds now, however, the image is still blank. > > #!/opt/local/bin/perl > > use strict; > use mapscript; > > my $wms = new mapscript::OWSRequest(); > $wms->setParameter("SERVICE", "WMS" ); > $wms->setParameter("VERSION", "1.1.1" ); > $wms->setParameter("REQUEST", "GetMap" ); > $wms->setParameter("BBOX", "-180,-90,180,90" ); > $wms->setParameter("LAYERS", "gmna"); > $wms->setParameter("SRS", "EPSG:4326"); > $wms->setParameter("WIDTH", "1200"); > $wms->setParameter("HEIGHT", "600"); > $wms->setParameter("FORMAT", "image/png"); > $wms->setParameter("TRANSPARENT", "true"); > > my $map = new mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); > > if(!$map) { > warn "New mapObj() error: $mapscript::ms_error->{message}\n"; > } > > my $io = mapscript::msIO_installStdoutToBuffer(); > my $dispatch_out = $map->OWSDispatch( $wms ); > printf "%s\n", mapscript::msIO_getStdoutBufferString(); > > I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. > > Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. > > Puneet. > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Fri Sep 9 07:59:57 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Fri, 9 Sep 2011 09:59:57 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> <4E696BB0.7020705@mapgears.com> Message-ID: David, On Sep 9, 2011, at 9:47 AM, Fawcett, David (MPCA) wrote: > Puneet, > > Using MapServer CGI and layer.MapServer would not set you up well for other client libraries, so I see your point. It can be viable though. > > In this app (just an imagemap, not OL), there are no attribute values associated with the spatial data. The classes are generated on-the-fly and the county id's for each class are passed in as URL vars. Same thing for the legend. This allows flexibility for compounds who's emissions may vary from tens of pounds to millions of pounds. > > This approach may not work for your case, but it is another way to slice it... Possibly. See, it is crucially important for me to be able to generate classes on the fly, and with a lot of flexibility. Not just that, the criteria for generating the classes can change. So, what I am doing actually is setting up a separate application that does nothing but respond with class information. The mapping application (and, any other application, for that matter), would query this class generating application and make the classes as per the latest information. Hence, my need for MapScripting. Well, there are other reasons as well, but this is an important one. > > http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html By the way, the app above is not working. I get broken images, and the following errors in the web inspector (that might help you troubleshoot) ---- GET http://www.pca.state.mn.us/oea/css/master.css 404 (Not Found) emissions.cfm:28 ReferenceError: Can't find variable: urchinTracker GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. GET http://cf.pca.state.mn.us/data/edaAir/artwork/edaP2results_edaAmbientResultsPollutantsJuly_04.gif 404 (Not Found) master-print.cssGET http://www.pca.state.mn.us/oea/css/master-print.css 404 (Not Found) ---- > > David. > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor > Sent: Friday, September 09, 2011 9:35 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] MapScript WMS request > > > On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote: > >> Puneet, >> >> As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. >> >> http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html > > > > Indeed David. Because, going by the docs, the MapServer CGI calls are discouraged (or so it seems), I'd rather not invest in that path. This is a long term project that I am working on, so the foundations have to be very robust. Besides, I may or may not use OL. While I like OL a lot, I am also looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to decouple the backend from the front-end as much as possible. > > I have no issues with using WMS, but I just am unable to get MapServer WMS to work via MapScript. And, yes, I do have to use MapScript if I can help it -- my layer classification is generated on demand, and MapScript is the easiest way I can think of for doing that. > > I did find yesterday that `mode=tile` works really well, but I am trying to make that work with MapScript. A separate email thread for that question. > > > > >> >> David. >> >> -----Original Message----- >> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor >> Sent: Thursday, September 08, 2011 9:32 PM >> To: Daniel Morissette >> Cc: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] MapScript WMS request >> >> >> On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: >> >>> On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: >>>> >>>> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >>>>> >>>>> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... >>>>> >>>> >>>> wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. >>>> >>> >>> I was able to reproduce the issue with the copy of the mapfile you sent off-list. >>> >>> It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return >>> >>> {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} >>> >>> ...and then it returns MS_SUCCESS. >>> >>> I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. >>> >>> A quick search indicates an open ticket about the issue: >>> >>> http://trac.osgeo.org/mapserver/ticket/3585 >>> >>> You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. >>> >>> The short term fix for you would be to set the "ows_extent" metadata in your layer: >>> >>> METADATA >>> "ows_extent" "-180 -90 180 90" >>> ... >>> END >>> >> >> >> Thanks Daniel. I will bump the ticket. For now, see below -- >> >> Using the "my.map" file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&STYLES=&FORMAT=image/png&TRANSPARENT=true] >> >> Note, no further modifications is required, that is, not even the "ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get a good image. >> >> >> However, if I use the following program to access the same map file, I get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000" in the GetCapabilities. >> >> Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer METADATA in the "my.map" file, the GetCapabilities returns the correct bounds now, however, the image is still blank. >> >> #!/opt/local/bin/perl >> >> use strict; >> use mapscript; >> >> my $wms = new mapscript::OWSRequest(); >> $wms->setParameter("SERVICE", "WMS" ); >> $wms->setParameter("VERSION", "1.1.1" ); >> $wms->setParameter("REQUEST", "GetMap" ); >> $wms->setParameter("BBOX", "-180,-90,180,90" ); >> $wms->setParameter("LAYERS", "gmna"); >> $wms->setParameter("SRS", "EPSG:4326"); >> $wms->setParameter("WIDTH", "1200"); >> $wms->setParameter("HEIGHT", "600"); >> $wms->setParameter("FORMAT", "image/png"); >> $wms->setParameter("TRANSPARENT", "true"); >> >> my $map = new mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); >> >> if(!$map) { >> warn "New mapObj() error: $mapscript::ms_error->{message}\n"; >> } >> >> my $io = mapscript::msIO_installStdoutToBuffer(); >> my $dispatch_out = $map->OWSDispatch( $wms ); >> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >> >> I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. >> >> Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. >> >> Puneet. >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From david.fawcett at state.mn.us Fri Sep 9 09:44:25 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Fri, 9 Sep 2011 11:44:25 -0500 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> <4E696BB0.7020705@mapgears.com> Message-ID: DNS issue, should be fixed by Monday... ; (' -----Original Message----- From: Mr. Puneet Kishor [mailto:punk.kish at gmail.com] Sent: Friday, September 09, 2011 10:00 AM To: Fawcett, David (MPCA) Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] MapScript WMS request David, On Sep 9, 2011, at 9:47 AM, Fawcett, David (MPCA) wrote: > Puneet, > > Using MapServer CGI and layer.MapServer would not set you up well for other client libraries, so I see your point. It can be viable though. > > In this app (just an imagemap, not OL), there are no attribute values associated with the spatial data. The classes are generated on-the-fly and the county id's for each class are passed in as URL vars. Same thing for the legend. This allows flexibility for compounds who's emissions may vary from tens of pounds to millions of pounds. > > This approach may not work for your case, but it is another way to slice it... Possibly. See, it is crucially important for me to be able to generate classes on the fly, and with a lot of flexibility. Not just that, the criteria for generating the classes can change. So, what I am doing actually is setting up a separate application that does nothing but respond with class information. The mapping application (and, any other application, for that matter), would query this class generating application and make the classes as per the latest information. Hence, my need for MapScripting. Well, there are other reasons as well, but this is an important one. > > http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html By the way, the app above is not working. I get broken images, and the following errors in the web inspector (that might help you troubleshoot) ---- GET http://www.pca.state.mn.us/oea/css/master.css 404 (Not Found) emissions.cfm:28 ReferenceError: Can't find variable: urchinTracker GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. GET http://cf.pca.state.mn.us/data/edaAir/artwork/edaP2results_edaAmbientResultsPollutantsJuly_04.gif 404 (Not Found) master-print.cssGET http://www.pca.state.mn.us/oea/css/master-print.css 404 (Not Found) ---- > > David. > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor > Sent: Friday, September 09, 2011 9:35 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] MapScript WMS request > > > On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote: > >> Puneet, >> >> As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. >> >> http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html > > > > Indeed David. Because, going by the docs, the MapServer CGI calls are discouraged (or so it seems), I'd rather not invest in that path. This is a long term project that I am working on, so the foundations have to be very robust. Besides, I may or may not use OL. While I like OL a lot, I am also looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to decouple the backend from the front-end as much as possible. > > I have no issues with using WMS, but I just am unable to get MapServer WMS to work via MapScript. And, yes, I do have to use MapScript if I can help it -- my layer classification is generated on demand, and MapScript is the easiest way I can think of for doing that. > > I did find yesterday that `mode=tile` works really well, but I am trying to make that work with MapScript. A separate email thread for that question. > > > > >> >> David. >> >> -----Original Message----- >> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor >> Sent: Thursday, September 08, 2011 9:32 PM >> To: Daniel Morissette >> Cc: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] MapScript WMS request >> >> >> On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: >> >>> On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: >>>> >>>> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: >>>>> >>>>> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... >>>>> >>>> >>>> wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. >>>> >>> >>> I was able to reproduce the issue with the copy of the mapfile you sent off-list. >>> >>> It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return >>> >>> {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} >>> >>> ...and then it returns MS_SUCCESS. >>> >>> I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. >>> >>> A quick search indicates an open ticket about the issue: >>> >>> http://trac.osgeo.org/mapserver/ticket/3585 >>> >>> You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. >>> >>> The short term fix for you would be to set the "ows_extent" metadata in your layer: >>> >>> METADATA >>> "ows_extent" "-180 -90 180 90" >>> ... >>> END >>> >> >> >> Thanks Daniel. I will bump the ticket. For now, see below -- >> >> Using the "my.map" file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&STYLES=&FORMAT=image/png&TRANSPARENT=true] >> >> Note, no further modifications is required, that is, not even the "ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get a good image. >> >> >> However, if I use the following program to access the same map file, I get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000" in the GetCapabilities. >> >> Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer METADATA in the "my.map" file, the GetCapabilities returns the correct bounds now, however, the image is still blank. >> >> #!/opt/local/bin/perl >> >> use strict; >> use mapscript; >> >> my $wms = new mapscript::OWSRequest(); >> $wms->setParameter("SERVICE", "WMS" ); >> $wms->setParameter("VERSION", "1.1.1" ); >> $wms->setParameter("REQUEST", "GetMap" ); >> $wms->setParameter("BBOX", "-180,-90,180,90" ); >> $wms->setParameter("LAYERS", "gmna"); >> $wms->setParameter("SRS", "EPSG:4326"); >> $wms->setParameter("WIDTH", "1200"); >> $wms->setParameter("HEIGHT", "600"); >> $wms->setParameter("FORMAT", "image/png"); >> $wms->setParameter("TRANSPARENT", "true"); >> >> my $map = new mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); >> >> if(!$map) { >> warn "New mapObj() error: $mapscript::ms_error->{message}\n"; >> } >> >> my $io = mapscript::msIO_installStdoutToBuffer(); >> my $dispatch_out = $map->OWSDispatch( $wms ); >> printf "%s\n", mapscript::msIO_getStdoutBufferString(); >> >> I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. >> >> Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. >> >> Puneet. >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From mapserver at geoworld.de Sat Sep 10 00:04:48 2011 From: mapserver at geoworld.de (Nicol Hermann) Date: Sat, 10 Sep 2011 09:04:48 +0200 Subject: [mapserver-users] MapScript WMS request In-Reply-To: References: <9EE85E3F-5695-4DF3-B03B-5D8FAD118FDC@gmail.com> <3C9360AE-544D-41F0-8C0E-88A242C06D5F@gmail.com> <6143E246-E68F-4502-A757-DB663A7C326C@gmail.com> <4E69064D.5070501@gmx.net> <6127EF99-1F79-4667-84CF-72DEBC27E1B1@gmail.com> <4E694F6F.6010802@mapgears.com> <4E695550.9090207@mapgears.com> <3B0A7DF5-CA1A-4573-B5E0-ADE668ACF8BB@gmail.com> <4E696133.3060807@mapgears.com> <9FD9B664-535E-4438-9EF1-56D1F4FB896C@gmail.com> <4E696BB0.7020705@mapgears.com> Message-ID: <1315638288.30431.3.camel@mobil.geoworld.de> Hello, I did some tests with the WXS warpper in PHP Mapscript as well. I used MapServer version 6.0.0 Base is a working map file (datasource is a postgresql database) which produces maps and capability documents using plain WMS requests like http://localhost/cgi-bin/mapserv_600?map=postgis.map&REQUEST=GetMAP&SERVICE=WMS&version=1.1.1&SRS=EPSG:4326&WIDTH=600&HEIGHT=600&LAYERS=geobilder&STYLES=&FORMAT=image/png&TRANSPARENT=true&BBOX=5.86628568,47.27360151,15.0486318,55.05826185 If I am trying to send a GetMap request with the WXS Mapscript wrapper I run into trouble as well. I am able to request the Capability document but never managed to get a Map request working Therefore one question. If I print out the members of the OWSRequestObj (http://mapserver.org/mapscript/php/index.html#owsrequestobj) what would be the expected values? My sample script shows: printf('numparams: %d - type: %s', $owsRequest-> numparams, $owsRequest->type ); numparams: 10 - type: 4294967295 ^^^^^ The number of parameters are correct, but according to the documentation (int type (read-only): MS_GET_REQUEST or MS_POST_REQUEST) I would expect something like 0 or 1 for the 'type' member var_dump( MS_GET_REQUEST ); int(0) var_dump( MS_POST_REQUEST); int(1) Could it be that something is going wrong here? Thanks. Best regards Nicol Am Freitag, den 09.09.2011, 11:44 -0500 schrieb Fawcett, David (MPCA): > DNS issue, should be fixed by Monday... ; (' > > -----Original Message----- > From: Mr. Puneet Kishor [mailto:punk.kish at gmail.com] > Sent: Friday, September 09, 2011 10:00 AM > To: Fawcett, David (MPCA) > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] MapScript WMS request > > David, > > > On Sep 9, 2011, at 9:47 AM, Fawcett, David (MPCA) wrote: > > > Puneet, > > > > Using MapServer CGI and layer.MapServer would not set you up well for other client libraries, so I see your point. It can be viable though. > > > > In this app (just an imagemap, not OL), there are no attribute values associated with the spatial data. The classes are generated on-the-fly and the county id's for each class are passed in as URL vars. Same thing for the legend. This allows flexibility for compounds who's emissions may vary from tens of pounds to millions of pounds. > > > > This approach may not work for your case, but it is another way to slice it... > > > Possibly. See, it is crucially important for me to be able to generate classes on the fly, and with a lot of flexibility. Not just that, the criteria for generating the classes can change. So, what I am doing actually is setting up a separate application that does nothing but respond with class information. The mapping application (and, any other application, for that matter), would query this class generating application and make the classes as per the latest information. Hence, my need for MapScripting. Well, there are other reasons as well, but this is an important one. > > > > > > http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html > > > > By the way, the app above is not working. I get broken images, and the following errors in the web inspector (that might help you troubleshoot) > > ---- > GET http://www.pca.state.mn.us/oea/css/master.css 404 (Not Found) > > emissions.cfm:28 ReferenceError: Can't find variable: urchinTracker > > GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. > > GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the specified hostname could not be found. > > GET http://cf.pca.state.mn.us/data/edaAir/artwork/edaP2results_edaAmbientResultsPollutantsJuly_04.gif 404 (Not Found) > > master-print.cssGET http://www.pca.state.mn.us/oea/css/master-print.css 404 (Not Found) > ---- > > > > > > > David. > > > > -----Original Message----- > > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor > > Sent: Friday, September 09, 2011 9:35 AM > > To: mapserver-users at lists.osgeo.org > > Subject: Re: [mapserver-users] MapScript WMS request > > > > > > On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote: > > > >> Puneet, > >> > >> As far as I know, OpenLayers still has support for a layer based on MapServer CGI. Because MapServer can also serve up WMS well, this layer type isn't necessarily recommended or as well supported. > >> > >> http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html > > > > > > > > Indeed David. Because, going by the docs, the MapServer CGI calls are discouraged (or so it seems), I'd rather not invest in that path. This is a long term project that I am working on, so the foundations have to be very robust. Besides, I may or may not use OL. While I like OL a lot, I am also looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to decouple the backend from the front-end as much as possible. > > > > I have no issues with using WMS, but I just am unable to get MapServer WMS to work via MapScript. And, yes, I do have to use MapScript if I can help it -- my layer classification is generated on demand, and MapScript is the easiest way I can think of for doing that. > > > > I did find yesterday that `mode=tile` works really well, but I am trying to make that work with MapScript. A separate email thread for that question. > > > > > > > > > >> > >> David. > >> > >> -----Original Message----- > >> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mr. Puneet Kishor > >> Sent: Thursday, September 08, 2011 9:32 PM > >> To: Daniel Morissette > >> Cc: mapserver-users at lists.osgeo.org > >> Subject: Re: [mapserver-users] MapScript WMS request > >> > >> > >> On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote: > >> > >>> On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote: > >>>> > >>>> On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote: > >>>>> > >>>>> Maybe call $map->save("/tmp/my.map") in your script after the map and layer have been populated and paste the result... that may give us a hint... > >>>>> > >>>> > >>>> wow! this is a super-awesome debugging technique. I have sent you the map file off list to not pollute the entire list serve. > >>>> > >>> > >>> I was able to reproduce the issue with the copy of the mapfile you sent off-list. > >>> > >>> It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to always return > >>> > >>> {minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000} > >>> > >>> ...and then it returns MS_SUCCESS. > >>> > >>> I think this function should either be left unimplemented (this way MapServer would fallback on other mechanisms), or return MS_FAILURE to indicate to the calling code that it didn't do anything useful. > >>> > >>> A quick search indicates an open ticket about the issue: > >>> > >>> http://trac.osgeo.org/mapserver/ticket/3585 > >>> > >>> You could bump the ticket and hope someone works on it at the FOSS4G code sprint next week. > >>> > >>> The short term fix for you would be to set the "ows_extent" metadata in your layer: > >>> > >>> METADATA > >>> "ows_extent" "-180 -90 180 90" > >>> ... > >>> END > >>> > >> > >> > >> Thanks Daniel. I will bump the ticket. For now, see below -- > >> > >> Using the "my.map" file I sent you, with no further modifications to it, I am able to successfully get an image back via [http://localhost.local/cgi-bin/gmna?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=1200&HEIGHT=600&LAYERS=gmna&STYLES=&FORMAT=image/png&TRANSPARENT=true] > >> > >> Note, no further modifications is required, that is, not even the "ows_extent" "-180 -90 180 90" bit in the layer METADATA. and I still get a good image. > >> > >> > >> However, if I use the following program to access the same map file, I get the spurious "minx = -25000000, miny = -25000000, maxx = 25000000, maxy = 25000000" in the GetCapabilities. > >> > >> Finally, if I add the "ows_extent" "-180 -90 180 90" line in the layer METADATA in the "my.map" file, the GetCapabilities returns the correct bounds now, however, the image is still blank. > >> > >> #!/opt/local/bin/perl > >> > >> use strict; > >> use mapscript; > >> > >> my $wms = new mapscript::OWSRequest(); > >> $wms->setParameter("SERVICE", "WMS" ); > >> $wms->setParameter("VERSION", "1.1.1" ); > >> $wms->setParameter("REQUEST", "GetMap" ); > >> $wms->setParameter("BBOX", "-180,-90,180,90" ); > >> $wms->setParameter("LAYERS", "gmna"); > >> $wms->setParameter("SRS", "EPSG:4326"); > >> $wms->setParameter("WIDTH", "1200"); > >> $wms->setParameter("HEIGHT", "600"); > >> $wms->setParameter("FORMAT", "image/png"); > >> $wms->setParameter("TRANSPARENT", "true"); > >> > >> my $map = new mapscript::mapObj("/Users/punkish/Sites/test/mapscript/my.map"); > >> > >> if(!$map) { > >> warn "New mapObj() error: $mapscript::ms_error->{message}\n"; > >> } > >> > >> my $io = mapscript::msIO_installStdoutToBuffer(); > >> my $dispatch_out = $map->OWSDispatch( $wms ); > >> printf "%s\n", mapscript::msIO_getStdoutBufferString(); > >> > >> I have now spent an enormous amount of time on this, and for now, I have to move on. This is just not working out. Maybe I will try some other technique, perhaps this mode=tile to see if I can get MapServer powered maps in my apps. > >> > >> Thanks much for your help. If you (or anyone else) can come up with a bright idea, I will be happy to try it. > >> > >> Puneet. > >> > >> _______________________________________________ > >> mapserver-users mailing list > >> mapserver-users at lists.osgeo.org > >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >> > >> > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From j.l.h.hartmann at uva.nl Sat Sep 10 04:44:49 2011 From: j.l.h.hartmann at uva.nl (Jan Hartmann) Date: Sat, 10 Sep 2011 13:44:49 +0200 Subject: [mapserver-users] Hiding scale dependant layers in WMS GetCapabilities In-Reply-To: <4E68E06D.4050402@uva.nl> References: <4E6771AB.7080009@uva.nl> <4E687F3D.3060507@uva.nl> <4E68E06D.4050402@uva.nl> Message-ID: <4E6B4DB1.9040706@uva.nl> Hi folks, Is the following possible: I have a MapFile with a few groups, each consisting of multiple layers that are displayed dependent on the chosen scale. I want to display only the group names in the GetCapabilities request, and according to http://mapserver.org/trunk/development/rfc/ms-rfc-67.html#rfc67 this can be done with the "ows_enable_request" directive. I have tried different combinations of "ows_enable_request *" and "ows_enable_request !getcapabilities" in the web- and layer metadata, but I get either GetCapabilities for all layers, or for none at all. How can I get the GetCapabilities of all groups and nothing more? Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Sat Sep 10 06:10:49 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 08:10:49 -0500 Subject: [mapserver-users] Re: mode=tile and MapScript In-Reply-To: <619EBE40-091A-4876-ADBD-2794C326B90A@gmail.com> References: <619EBE40-091A-4876-ADBD-2794C326B90A@gmail.com> Message-ID: <96025A66-CA85-49D5-AB84-E5DF5CBC3603@gmail.com> knock, knock... any suggestions on the MapScript syntax for setting `mode=tile&tilemode=gmap&tile={X}+{Y}+{Z}` were X, Y, Z are received as http query params? On Sep 8, 2011, at 10:23 PM, Mr. Puneet Kishor wrote: > I am trying out mode=tile as detailed at [http://mapserver.org/output/tile_mode.html], and actually, it works great! Might be able to avoid the pains of WMS completely. > > However, it works great with MapServer CGI. What if I want to use MapScript? In other words, instead of > > var urlTemplate = 'http://localhost/cgi-bin/myapp?'; > urlTemplate += 'layers=layer1 layer2&'; > urlTemplate += 'mode=tile&'; > urlTemplate += 'tilemode=gmap&'; > urlTemplate += 'tile={X}+{Y}+{Z}'; > > I have > > var urlTemplate = 'http://localhost/myapp.cgi?'; > urlTemplate += 'tile={X}+{Y}+{Z}'; > > and I add mode=tile and tilemode=gmap on the server side. My question is -- one, will the above work? and, how do I pass mode=tile and tilemode=gmap and the tile={X}+{Y}+{Z} parameters to the program? I didn't see any MapScript documentation for these parameters. I need to translate a call such as [http://localhost/cgi-bin/myapp?layers=layer1&mode=tile&tilemode=gmap&tile=30+46+7] into a MapScript request. > > Puneet. From punk.kish at gmail.com Sat Sep 10 06:11:31 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 08:11:31 -0500 Subject: [mapserver-users] updating docs Message-ID: I would like to contribute some of my experiences and revelations to the MapScript docs on the mapserver.org. How do I go about doing that? From jmckenna at gatewaygeomatics.com Sat Sep 10 06:48:32 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Sat, 10 Sep 2011 10:48:32 -0300 Subject: [mapserver-users] updating docs In-Reply-To: References: Message-ID: <4E6B6AB0.10600@gatewaygeomatics.com> On 11-09-10 10:11 AM, Mr. Puneet Kishor wrote: > I would like to contribute some of my experiences and revelations to the MapScript docs on the mapserver.org. How do I go about doing that?_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > Hi Puneet! Sounds good. Which doc are you thinking of? Also: the very easiest way to improve docs is to write all of your examples, notes, hints, advice, on a wiki page (such as http://trac.osgeo.org/mapserver/wiki/PHPMapScript). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From punk.kish at gmail.com Sat Sep 10 08:04:14 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 10:04:14 -0500 Subject: [mapserver-users] updating docs In-Reply-To: <4E6B6AB0.10600@gatewaygeomatics.com> References: <4E6B6AB0.10600@gatewaygeomatics.com> Message-ID: <247CB7D3-58D5-4692-8F03-BDCB11833335@gmail.com> On Sep 10, 2011, at 8:48 AM, Jeff McKenna wrote: > On 11-09-10 10:11 AM, Mr. Puneet Kishor wrote: >> I would like to contribute some of my experiences and revelations to the MapScript docs on the mapserver.org. How do I go about doing that?_______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > > Hi Puneet! > > Sounds good. Which doc are you thinking of? Several -- the `mode=tile` page, and various, complete, working Perl MapScript examples and hints, etc. > Also: the very easiest way to improve docs is to write all of your examples, notes, hints, advice, on a wiki page (such as http://trac.osgeo.org/mapserver/wiki/PHPMapScript). Hmmm... I didn't even realize there was a wiki. I guess, most folks, like me, tend to go to the main docs, and kinda stay around there. > > -jeff > > -- > Jeff McKenna > MapServer Consulting and Training Services > http://www.gatewaygeomatics.com/ > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Sat Sep 10 12:35:04 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 14:35:04 -0500 Subject: [mapserver-users] querying in mode=tile Message-ID: Now that I have mode=tile working with Google Maps API v3, I am on my way to implement querying like so 0. Bind an infowindow.close() to a click event listener on the map 1. Bind an infowindow.open() to a click event listener on the MapServer layer 2. Fill the infowindow content with the result from an Ajax query to MapServer 3. When the user clicks on the MapServer layer, the Ajax query is fired 4. MapServer responds with the query result as a JSON object 5. Fill the infowindow with the JSON result 6. Close any already open infowindow via #0 above 7. Open a new infowindow with the result Is the general approach outlined above sound? Any pointers to existing code samples for the above? Tia. From stephan.holl at intevation.de Sat Sep 10 13:06:48 2011 From: stephan.holl at intevation.de (Stephan Holl) Date: Sat, 10 Sep 2011 22:06:48 +0200 Subject: [mapserver-users] [Announcemen]t: MXD2map 0.9 released Message-ID: <20110910220648.56fb84a1@keto> [sorry for cross-posting] MXD2map - an OpenSource converter for ESRI MXD-files! Osnabrueck, Germany, 09. of August 2011 MXD2map 0.9 is released. The development team is proud of the first release of this project! MXD2map is a converter for generating UMN MapServer mapfiles based on ESRI ArcGIS MXD-files. This offers the possibility of making maps in the usual manner using ArcGIS and generate UMN MapServer mapfiles with 'one click'. UMN MapServer-based WMS- and WFS-services were never created that easy! The Federal Maritime and Hydrographic Agency in Hamburg (BSH), Germany, supported the work on MXD2map. MXD2map is Free and Opensource. It is licenced under the GNU Lesser General Public Licence (GNU LGPL). A Windows-installer and the Sourcecode can be downloaded from the official website. Please visit the official website http://www.mxd2map.org for more information. Contact person: Intevation GmbH Stephan Holl Neuer Graben 17 49074 Osnabr?ck Germany stephan.holl at intevation.de +49 (0)541 33508 3663 -- Stephan Holl | Tel.: +49 (0)541-33 508 3663 Intevation GmbH, Neuer Graben 17, 49074 OS | AG Osnabr?ck - HR B 18998 Gesch?ftsf?hrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From sdlime at gmail.com Sat Sep 10 18:28:07 2011 From: sdlime at gmail.com (Steve Lime) Date: Sat, 10 Sep 2011 20:28:07 -0500 Subject: [mapserver-users] updating docs In-Reply-To: <247CB7D3-58D5-4692-8F03-BDCB11833335@gmail.com> References: <4E6B6AB0.10600@gatewaygeomatics.com> <247CB7D3-58D5-4692-8F03-BDCB11833335@gmail.com> Message-ID: <172F8C25-A4F6-4C13-8906-CA239F8FEC66@gmail.com> Perhaps SVN access? Perl examples could be added to mapscript/perl/examples in trunk. Sent from my iPad On Sep 10, 2011, at 10:04 AM, "Mr. Puneet Kishor" wrote: > > On Sep 10, 2011, at 8:48 AM, Jeff McKenna wrote: > >> On 11-09-10 10:11 AM, Mr. Puneet Kishor wrote: >>> I would like to contribute some of my experiences and revelations to the MapScript docs on the mapserver.org. How do I go about doing that?_______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >> >> Hi Puneet! >> >> Sounds good. Which doc are you thinking of? > > > Several -- the `mode=tile` page, and various, complete, working Perl MapScript examples and hints, etc. > > > >> Also: the very easiest way to improve docs is to write all of your examples, notes, hints, advice, on a wiki page (such as http://trac.osgeo.org/mapserver/wiki/PHPMapScript). > > > Hmmm... I didn't even realize there was a wiki. I guess, most folks, like me, tend to go to the main docs, and kinda stay around there. > > >> >> -jeff >> >> -- >> Jeff McKenna >> MapServer Consulting and Training Services >> http://www.gatewaygeomatics.com/ >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Sat Sep 10 18:28:21 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 20:28:21 -0500 Subject: [mapserver-users] querying with mode=tile Message-ID: <31DD8D18-03C1-4E8B-9C4E-C8251D9D48E3@gmail.com> I am still struggling with querying with mode=tile. My layer definition is LAYER CLASSITEM "foo" CONNECTION "host=localhost port=5432 dbname=db user=user password=password" CONNECTIONTYPE POSTGIS PROCESSING "CLOSE_CONNECTION=DEFER" DATA "the_geom FROM a_view USING UNIQUE gid USING srid=4326" NAME "layer" PROJECTION "init=epsg:4326" END STATUS ON TYPE POLYGON TEMPLATE '/path/to/template.json' # lots of CLASS definitions CLASS .. END END # LAYER "layer" The "template.json" file looks like so // mapserver template [resultset layer=layer] { "type": "FeatureCollection", "features": [ [feature trimlast=','] { "attrib1": "[attrib1]", "attrib2": "[attrib2]", "attrib3": "[attrib3]" }, [/feature] ] } [/resultset] My query looks like so http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920 Issue 1: I really do have a feature at the point I clicked, yet I get no result. It is likely my query is ill-formed. Truth be told, I don't know the complete list of params that `mode=query` takes, and I can't really find a single place in the documentation where this information is available. One, could someone tell me what is wrong with my query above? Two, point me to the relevant documentation. Maybe I just don't know how to find the correct documentation. Issue 2: Because MapServer finds no result, it reports back as "msQueryByPoint(): Search returned no results. No matching record(s) found." Well, no... what I really want is an empty JSON stream. In reality, I am sending the above query via Google Maps (which is why it is likely I have the wrong params, or wrong value for the right params) in my query. Once again, I would really appreciate hearing from someone who has solved this problem already. Specifically, I need to query from Google Maps API v3 to a MapServer backend running `mode=tile` Oh, and I still want to know if I can run the MapServer backend as a MapScript using `mode=tile` instead of CGI. Sadly, if I am unable to solve this, I will have to abandon MapServer and look at other options for this project, but I hope it won't come to that. Many thanks, Puneet. From prab.raja at gmail.com Sat Sep 10 19:42:07 2011 From: prab.raja at gmail.com (Prabu Raja) Date: Sun, 11 Sep 2011 08:12:07 +0530 Subject: [mapserver-users] querying with mode=tile In-Reply-To: <31DD8D18-03C1-4E8B-9C4E-C8251D9D48E3@gmail.com> References: <31DD8D18-03C1-4E8B-9C4E-C8251D9D48E3@gmail.com> Message-ID: Try this, http://localhost/cgi-bin/app?layers=layer&mode=query&mapxy=lng+lat where lng = clicked longitude lat = clicked latitude working for me. On Sun, Sep 11, 2011 at 6:58 AM, Mr. Puneet Kishor wrote: > > http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920 > -- Regards, Prabu Raja -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Sat Sep 10 19:52:56 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 21:52:56 -0500 Subject: [mapserver-users] querying with mode=tile In-Reply-To: References: <31DD8D18-03C1-4E8B-9C4E-C8251D9D48E3@gmail.com> Message-ID: On Sep 10, 2011, at 9:42 PM, Prabu Raja wrote: > Try this, > > http://localhost/cgi-bin/app?layers=layer&mode=query&mapxy=lng+lat > > where lng = clicked longitude > lat = clicked latitude > > working for me. Neat! it does work. Many thanks. Where did you find this information? Could you please point me to the location in the documentation where I could read up on this? > > On Sun, Sep 11, 2011 at 6:58 AM, Mr. Puneet Kishor wrote: > >> >> http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920 >> > > > > -- > Regards, > Prabu Raja From punk.kish at gmail.com Sat Sep 10 20:00:04 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 22:00:04 -0500 Subject: [mapserver-users] querying with mode=tile In-Reply-To: References: <31DD8D18-03C1-4E8B-9C4E-C8251D9D48E3@gmail.com> Message-ID: Couple of follow-ups (the following hint from Prabu Raja does work) -- If I change the name of the template from "template.html" to "template.json" I get the following error Content-type: text/html msReturnPage(): Web application error. Malformed template name (/Users/punkish/Documents/www/gmaps/lib/template.json). Another issue -- my template looks like so -- // mapserver template [resultset layer=layer] { "type": "FeatureCollection", "features": [ [feature trimlast=','] { "attrib1": "[attrib1]", "attrib2": "[attrib2]", "attrib3": "[attrib2]" }, [/feature] ] } [/resultset] When the above does work, I get back the following -- { "type": "FeatureCollection", "features": [ { "attrib1": "foo", "attrib2": "bar", "attrib3": "baz" }, ] } Hmmm... what's with that last "," after the first element in the features array? From what it seems like, I thought the [feature trimlast=','] would get rid of the last comma. On Sep 10, 2011, at 9:52 PM, Mr. Puneet Kishor wrote: > > On Sep 10, 2011, at 9:42 PM, Prabu Raja wrote: > >> Try this, >> >> http://localhost/cgi-bin/app?layers=layer&mode=query&mapxy=lng+lat >> >> where lng = clicked longitude >> lat = clicked latitude >> >> working for me. > > > Neat! it does work. Many thanks. > > > Where did you find this information? Could you please point me to the location in the documentation where I could read up on this? > > > >> >> On Sun, Sep 11, 2011 at 6:58 AM, Mr. Puneet Kishor wrote: >> >>> >>> http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920 >>> >> >> >> >> -- >> Regards, >> Prabu Raja > From punk.kish at gmail.com Sat Sep 10 20:25:20 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 22:25:20 -0500 Subject: [mapserver-users] querying with mode=tile In-Reply-To: References: <31DD8D18-03C1-4E8B-9C4E-C8251D9D48E3@gmail.com> Message-ID: On Sep 10, 2011, at 10:03 PM, Prabu Raja wrote: > http://mapserver.org/cgi/controls.html?highlight=mapxy > Thanks Prabu. To the MapServer developers/documenters -- On the page provided above, I note 5 instances of "mapxy". Only the following one is vaguely indicative of being useful in queries because of the last three words "User with queries." "MAPXY [x] [y] , MAPXY (shape) A point, in the same coordinate system as the shapefiles, to be used in conjuction with a buffer or a scale to construct a map extent. Can be set to shape as an alternative option. In this case mapextent is set to the extent of a selected shape. Used with queries." I am curious as to how I could have figured out that mode=query combined with mapxy=lng+lat would have been sufficient for querying by point? I do genuinely want to know. Additionally, just below that MAPXY entry, there is the write-up no MODEs. Granted, the text warns that "note that all of the query modes also support map-only modes, e.g. ITEMQUERYMAP, which for brevity are not all listed," where would I read up on mode=tile other than at [http://mapserver.org/output/tile_mode.html], the latter page strangely saying that it is revision 9817 updated on > Date: $Date: 2010-02-20 11:35:53 -0800 (Sat, 20 Feb 2010) $ > Last Updated: 2008/04/30 Hmmmm... > On Sun, Sep 11, 2011 at 8:22 AM, Mr. Puneet Kishor wrote: > >> >> On Sep 10, 2011, at 9:42 PM, Prabu Raja wrote: >> >>> Try this, >>> >>> http://localhost/cgi-bin/app?layers=layer&mode=query&mapxy=lng+lat >>> >>> where lng = clicked longitude >>> lat = clicked latitude >>> >>> working for me. >> >> >> Neat! it does work. Many thanks. >> >> >> Where did you find this information? Could you please point me to the >> location in the documentation where I could read up on this? >> >> >> >>> >>> On Sun, Sep 11, 2011 at 6:58 AM, Mr. Puneet Kishor >> wrote: >>> >>>> >>>> >> http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920 >>>> >>> >>> >>> >>> -- >>> Regards, >>> Prabu Raja >> >> > > > -- > Regards, > Prabu Raja From punk.kish at gmail.com Sat Sep 10 21:09:37 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 23:09:37 -0500 Subject: [mapserver-users] JSON template fail Message-ID: <29F30596-6D4A-4979-887E-EF9D7182DFE8@gmail.com> I was unable to achieve success with the suggestion for template at [http://mapserver.org/output/template_output.html]. So, I simplified my template like so -- // mapserver template { "gid": "[gid]", "attrib1": "[attrib1]", "attrib2": "[attrib2]", "attrib3": "[attrib3]" } In my map file I have an output format declared like so OUTPUTFORMAT NAME "json" DRIVER "TEMPLATE" MIMETYPE "application/json" FORMATOPTION "FILE=/Users/punkish/Documents/www/gmap/lib/template.html" END Note: MapServer croaks if I name the template "template.json" The output from MapServer is 1: { 2: "gid": "2676", 3: "attrib1": "foo", 4: "attrib2": "bar", 5: "attrib3": "baz" 6: } gmap:-1 Resource interpreted as Script but transferred with MIME type text/html. gmap:2 SyntaxError: Parse error So, in spite of declaring the MIMETYPE as "application/json", the result is sent back with a "text/html" mime type (could that be because the template ends in .html?). And, what on earth is the "SyntaxError"? I don't see any. Does anyone? From punk.kish at gmail.com Sat Sep 10 21:42:07 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 10 Sep 2011 23:42:07 -0500 Subject: [mapserver-users] interesting thread on JSON-ish output from MapServer Message-ID: [http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html] If I call my template "template.html" I get the output, but I get mime type warning and a syntax error in parsing the output. If I rename the template "template.json" MapServer complains that the name is malformed. If I rename the template "template.js" MapServer complains that it is "Unable to access file" If I add `qformat=geojson` to my query (as shown in the link above), the output contains the template with the place holders, no substitutions with the values. What gives? From punk.kish at gmail.com Sat Sep 10 22:03:57 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 00:03:57 -0500 Subject: [mapserver-users] Leaflet and MapServer Message-ID: <5E9C56F4-D5E9-4AF0-B20D-6143AF723875@gmail.com> Has anyone got Leaflet working with MapServer `mode=tile`? While Leaflet also sends X, Y, Z (in a different order than Gmaps), its tile numbers are way different from those generated by Gmaps. From richard.greenwood at gmail.com Sun Sep 11 05:58:22 2011 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Sun, 11 Sep 2011 06:58:22 -0600 Subject: [mapserver-users] interesting thread on JSON-ish output from MapServer In-Reply-To: References: Message-ID: On Sat, Sep 10, 2011 at 10:42 PM, Mr. Puneet Kishor wrote: > [http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html] > > If I call my template "template.html" I get the output, but I get mime type warning and a syntax error in parsing the output. Where is the warning originating? I have no problem consuming mapserver template based JSON in jQuery, despite the incorrect mime type. I do not know of any way to set the mime type of a mapserver template. Rich -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From sdlime at gmail.com Sun Sep 11 06:19:21 2011 From: sdlime at gmail.com (Steve Lime) Date: Sun, 11 Sep 2011 08:19:21 -0500 Subject: [mapserver-users] querying with mode=tile In-Reply-To: References: <31DD8D18-03C1-4E8B-9C4E-C8251D9D48E3@gmail.com> Message-ID: Issue 1: only certain extensions can be used for templates. I believe .js is legal but .json is not. We could change that in future releases. Could you file a ticket? Issue 2: it's possible a linefeed is getting in the way of the trimming. Try bumping the closing feature tag up a line. If that works then it's a bug and a ticket should be filed. Steve Sent from my iPad On Sep 10, 2011, at 10:00 PM, Mr. Puneet Kishor wrote: > Couple of follow-ups (the following hint from Prabu Raja does work) -- > > If I change the name of the template from "template.html" to "template.json" I get the following error > > Content-type: text/html msReturnPage(): Web application error. Malformed template name (/Users/punkish/Documents/www/gmaps/lib/template.json). > > Another issue -- my template looks like so -- > > // mapserver template > [resultset layer=layer] > { > "type": "FeatureCollection", > "features": [ > [feature trimlast=','] > { > "attrib1": "[attrib1]", > "attrib2": "[attrib2]", > "attrib3": "[attrib2]" > }, > [/feature] > ] > } > [/resultset] > > When the above does work, I get back the following -- > > { "type": "FeatureCollection", "features": [ { "attrib1": "foo", "attrib2": "bar", "attrib3": "baz" }, ] } > > Hmmm... what's with that last "," after the first element in the features array? From what it seems like, I thought the [feature trimlast=','] would get rid of the last comma. > > > On Sep 10, 2011, at 9:52 PM, Mr. Puneet Kishor wrote: > >> >> On Sep 10, 2011, at 9:42 PM, Prabu Raja wrote: >> >>> Try this, >>> >>> http://localhost/cgi-bin/app?layers=layer&mode=query&mapxy=lng+lat >>> >>> where lng = clicked longitude >>> lat = clicked latitude >>> >>> working for me. >> >> >> Neat! it does work. Many thanks. >> >> >> Where did you find this information? Could you please point me to the location in the documentation where I could read up on this? >> >> >> >>> >>> On Sun, Sep 11, 2011 at 6:58 AM, Mr. Puneet Kishor wrote: >>> >>>> >>>> http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920 >>>> >>> >>> >>> >>> -- >>> Regards, >>> Prabu Raja >> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Sun Sep 11 07:36:56 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 09:36:56 -0500 Subject: [mapserver-users] Re: interesting thread on JSON-ish output from MapServer In-Reply-To: References: Message-ID: Partial solution (phew, for now), but other problems persist -- (cc-ing to Steve Lime and Rich Greenwood) On Sep 10, 2011, at 11:42 PM, Mr. Puneet Kishor wrote: > [http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html] > > If I call my template "template.html" I get the output, but I get mime type warning and a syntax error in parsing the output. The above is now partially solved. I still get the mime type incorrectly set, but the syntax error was my mistake. However, it is something worthy of being documented. I was making a JSONP (cross-domain) call. Hence, the response coming back should have been wrapped in the callback as an argument. Since I am stuck using CGI for now, I don't know if I can get MapServer to recognize the callback param that is randomly generated by jQuery, and use that in the template. So, I prescribed a custom callback, and used that in the template. Before (doesn't work with JSONP) --------------------------------- $.ajax({ url : url, type : "GET", data : "", dataType: "jsonp", error : function() { alert("Error loading html document"); }, success : function(r) { .. } }); // mapserver template {"gid":"[gid]","unit":"[unit_abbre]","rock type":"[rocktype]","lithology":"[lithology]","min age":"[min_age]","max age":"[max_age]","interval":"[interval_name]"} After (works fine, note addition of "jsonpCallback" in the request) ------------------------------------------------------------------- $.ajax({ url : url, type : "GET", data : "", dataType: "jsonp", jsonpCallback: "foo", error : function() { alert("Error loading html document"); }, success : function(r) { .. } }); // mapserver template foo({"gid":"[gid]","unit":"[unit_abbre]","rock type":"[rocktype]","lithology":"[lithology]","min age":"[min_age]","max age":"[max_age]","interval":"[interval_name]"}) One issue I have not solved -- if no result is found, MapServer sends back the following -- ---- MapServer Message msQueryByPoint(): Search returned no results. No matching record(s) found. ---- Well, that gums up the works. I really want MapServer to just send an empty JSON structure, something like foo({}). Suggestions on how I can prevent this HTML message from MapServer, and force it to use the template instead? > > If I rename the template "template.json" MapServer complains that the name is malformed. This one is interesting. Per Steve Lime's email earlier today, "Issue 1: only certain extensions can be used for templates. I believe .js is legal but .json is not. We could change that in future releases. Could you file a ticket?" Yet, the docs at [http://mapserver.org/output/template_output.html] very clearly mention the use of ".json" as a file extension. I quote > OUTPUTFORMAT > NAME "geojson" > DRIVER "TEMPLATE" > FORMATOPTION "FILE=myTemplate.json" > END Fwiw, I using `NAME "geojson"` as above in my `OUTPUTFORMAT` block, but I am returning just plain vanilla JSON. If I change the "NAME" to "json", I get back an unprocessed template. > > If I rename the template "template.js" MapServer complains that it is "Unable to access file" ".js" being legal notwithstanding, the fact is, if I change my template.html to template.js, MapServer errors with the above complaint "Unable to access file," whatever that means. Exactly the same file, same file mode, everything identical, just the name change. > If I add `qformat=geojson` to my query (as shown in the link above), the output contains the template with the place holders, no substitutions with the values. This is even more bizarre -- per the email thread at [[http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html], it seems from Steve's comment that `qformat=geojson` is a valid query param (although I don't see it documented anywhere). Yet, if I add that, I get an unprocessed template. > > What gives? From punk.kish at gmail.com Sun Sep 11 07:40:06 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 09:40:06 -0500 Subject: [mapserver-users] interesting thread on JSON-ish output from MapServer In-Reply-To: References: Message-ID: <425AD54E-1FD2-45E1-9D21-99BF389F1F3D@gmail.com> On Sep 11, 2011, at 7:58 AM, Richard Greenwood wrote: > On Sat, Sep 10, 2011 at 10:42 PM, Mr. Puneet Kishor wrote: >> [http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html] >> >> If I call my template "template.html" I get the output, but I get mime type warning and a syntax error in parsing the output. > > Where is the warning originating? I have no problem consuming > mapserver template based JSON in jQuery, despite the incorrect mime > type. I do not know of any way to set the mime type of a mapserver > template. > I solved that one. See my recent email on the lack of JSONP callback in the template being the culprit. This is another in the list of items that I would like to add to MapServer documentation. Re. setting mime type of MapServer templates, ostensibly you can in the OUTPUTFORMAT block. For example, I have the following OUTPUTFORMAT NAME "geojson" DRIVER "TEMPLATE" MIMETYPE "application/json" FORMATOPTION "FILE=/Users/punkish/Documents/www/gmaps/lib/gmna.html" END Puneet. From punk.kish at gmail.com Sun Sep 11 07:48:48 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 09:48:48 -0500 Subject: [mapserver-users] querying in mode=tile In-Reply-To: References: Message-ID: <889E6AB4-5D44-4FBF-B437-8D921FF10E27@gmail.com> On Sep 11, 2011, at 8:03 AM, Richard Greenwood wrote: > On Sat, Sep 10, 2011 at 1:35 PM, Mr. Puneet Kishor wrote: >> Now that I have mode=tile working with Google Maps API v3, I am on my way to implement querying like so >> >> 0. Bind an infowindow.close() to a click event listener on the map >> 1. Bind an infowindow.open() to a click event listener on the MapServer layer >> 2. Fill the infowindow content with the result from an Ajax query to MapServer >> 3. When the user clicks on the MapServer layer, the Ajax query is fired >> 4. MapServer responds with the query result as a JSON object >> 5. Fill the infowindow with the JSON result >> 6. Close any already open infowindow via #0 above >> 7. Open a new infowindow with the result >> >> Is the general approach outlined above sound? Any pointers to existing code samples for the above? > > > Puneet, > > I'm doing pretty much that here: > http://records.sublettewyo.com/mapserver/map.html > I'm using jQuery in this example and putting the info into a jQuery > dialog, however I have used a standard browser window in the past. > Only thing is that I don't thinnk you really need step 0, simply > replace the contents of the container with the new info. Yup, I don't have to worry about #0. Howerver, #1 above is problematic, and I don't have a resolution for it yet. Seems like in Google Maps API v3 I can't addListener to an ImageMapType overlay. See, I am adding a MapServer layer as ImageMapType overlay like so "mapserverLayer" : new google.maps.ImageMapType({ .. }) map.overlayMapTypes.insertAt(0, mapserverLayer); If I do the following -- google.maps.event.addListener(map, "click", function (event) { } it works, however, the following doesn't work at all google.maps.event.addListener(mapserverLayer, "click", function (event) { } Which is silly, isn't it? I don't want the entire map to be listening to the "click" events. I just want the MapServer layer to be doing so. Haven't yet found a resolution to this. > > Also, if your data is in PostGIS you can skip mapserver for attribute > queries and do an info query against the PostGIS db via PHP or other > server-side tool. > Ok, I am very interested in the above, but I am not sure I understand you. For the most part, I want to click on the map, and find out more about what I clicked on. In order to do that query via Perl MapScript (I don't know PHP) and Pg, I would need to create the $mapObj. I am able to do that fine, but I don't know how to run MapServer in `mode=tile` via MapScript. This is the question I have asked a couple of times -- if I have a pure MapScript app (no map files involved at all, which is what I want), how no earth do I tell the app to use `mode=tile`? Puneet. From punk.kish at gmail.com Sun Sep 11 09:36:56 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 11:36:56 -0500 Subject: [mapserver-users] bad query result crashes Perl Message-ID: I query Pg to grab the data with which I construct LAYER CLASSes like so (nothing fancy). SELECT class_name, class_expression, class_color FROM table; A few of the rows in the result set come back with class_color = '' (I can easily avoid those, but that is not the point of this post). The "bad" color crashes mapscript.bundle which takes down Perl as well, which should never happen. I am using Perl 5.14.1 on Mac OS X Lion. $ perl -V Summary of my perl5 (revision 5 version 14 subversion 1) configuration: Platform: osname=darwin, osvers=11.0.1, archname=darwin-multi-2level uname='darwin lucknow.local 11.0.1 darwin kernel version 11.0.1: wed jun 29 19:53:22 pdt 2011; root:xnu-1699.23.2~1release_x86_64 x86_64 .. blah blah .. Here is the crash report ---- Process: perl5.14 [247] Path: /opt/local/bin/perl5.14 Identifier: perl5.14 Version: ??? (???) Code Type: X86-64 (Native) Parent Process: perl5.14 [246] Date/Time: 2011-09-11 11:25:29.138 -0500 OS Version: Mac OS X 10.7.1 (11B2118) Report Version: 9 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 VM Regions Near 0: --> __TEXT 000000010ca28000-000000010cb6a000 [ 1288K] r-x/rwx SM=COW /opt/local/bin/perl5.14 Application Specific Information: objc[247]: garbage collection is OFF Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 mapscript.bundle 0x000000010cdd2e84 _wrap_styleObj_color_set + 596 -- Puneet Kishor From sdlime at gmail.com Sun Sep 11 10:32:26 2011 From: sdlime at gmail.com (Steve Lime) Date: Sun, 11 Sep 2011 12:32:26 -0500 Subject: [mapserver-users] interesting thread on JSON-ish output from MapServer In-Reply-To: References: Message-ID: Actually the WEB object QUERYFORMAT (I believe) parameter can be used to set mime type for old style templates. Default is text/html. That same parameter can alternatively reference an output format, even an image-based one. Steve Sent from my iPad On Sep 11, 2011, at 7:58 AM, Richard Greenwood wrote: > On Sat, Sep 10, 2011 at 10:42 PM, Mr. Puneet Kishor wrote: >> [http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html] >> >> If I call my template "template.html" I get the output, but I get mime type warning and a syntax error in parsing the output. > > Where is the warning originating? I have no problem consuming > mapserver template based JSON in jQuery, despite the incorrect mime > type. I do not know of any way to set the mime type of a mapserver > template. > > Rich > > > -- > Richard Greenwood > richard.greenwood at gmail.com > www.greenwoodmap.com > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From sdlime at gmail.com Sun Sep 11 10:46:35 2011 From: sdlime at gmail.com (Steve Lime) Date: Sun, 11 Sep 2011 12:46:35 -0500 Subject: [mapserver-users] Re: interesting thread on JSON-ish output from MapServer In-Reply-To: References: Message-ID: Sent from my iPad On Sep 11, 2011, at 9:36 AM, Mr. Puneet Kishor wrote: > Partial solution (phew, for now), but other problems persist -- > > (cc-ing to Steve Lime and Rich Greenwood) > > On Sep 10, 2011, at 11:42 PM, Mr. Puneet Kishor wrote: > >> [http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html] >> >> If I call my template "template.html" I get the output, but I get mime type warning and a syntax error in parsing the output. > > The above is now partially solved. I still get the mime type incorrectly set, but the syntax error was my mistake. However, it is something worthy of being documented. I was making a JSONP (cross-domain) call. Hence, the response coming back should have been wrapped in the callback as an argument. Since I am stuck using CGI for now, I don't know if I can get MapServer to recognize the callback param that is randomly generated by jQuery, and use that in the template. So, I prescribed a custom callback, and used that in the template. > > Before (doesn't work with JSONP) > --------------------------------- > $.ajax({ > url : url, > type : "GET", > data : "", > dataType: "jsonp", > error : function() { alert("Error loading html document"); }, > success : function(r) { .. } > }); > > // mapserver template > {"gid":"[gid]","unit":"[unit_abbre]","rock type":"[rocktype]","lithology":"[lithology]","min age":"[min_age]","max age":"[max_age]","interval":"[interval_name]"} > > After (works fine, note addition of "jsonpCallback" in the request) > ------------------------------------------------------------------- > $.ajax({ > url : url, > type : "GET", > data : "", > dataType: "jsonp", > jsonpCallback: "foo", > error : function() { alert("Error loading html document"); }, > success : function(r) { .. } > }); > > // mapserver template > foo({"gid":"[gid]","unit":"[unit_abbre]","rock type":"[rocktype]","lithology":"[lithology]","min age":"[min_age]","max age":"[max_age]","interval":"[interval_name]"}) > > > One issue I have not solved -- if no result is found, MapServer sends back the following -- > > ---- > > > MapServer Message > > > > > > msQueryByPoint(): Search returned no results. No matching record(s) found. > > > ---- > > > Well, that gums up the works. I really want MapServer to just send an empty JSON structure, something like foo({}). Suggestions on how I can prevent this HTML message from MapServer, and force it to use the template instead? > > >> >> If I rename the template "template.json" MapServer complains that the name is malformed. > Correct, .json is not a valid extension. > > This one is interesting. Per Steve Lime's email earlier today, "Issue 1: only certain extensions can be used for templates. I believe .js is legal but .json is not. We could change that in future releases. Could you file a ticket?" Yet, the docs at [http://mapserver.org/output/template_output.html] very clearly mention the use of ".json" as a file extension. I quote > >> OUTPUTFORMAT >> NAME "geojson" >> DRIVER "TEMPLATE" >> FORMATOPTION "FILE=myTemplate.json" >> END > The docs/example is wrong or doesn't match the source anyway. The set of legal extensions is defined in mapserver.h and .json is not included. A ticket would help make sure we get that fixed. > > Fwiw, I using `NAME "geojson"` as above in my `OUTPUTFORMAT` block, but I am returning just plain vanilla JSON. If I change the "NAME" to "json", I get back an unprocessed template. > >> >> If I rename the template "template.js" MapServer complains that it is "Unable to access file" > Does the file exist? There's nothing cryptic about the error message. > ".js" being legal notwithstanding, the fact is, if I change my template.html to template.js, MapServer errors with the above complaint "Unable to access file," whatever that means. Exactly the same file, same file mode, everything identical, just the name change. > > >> If I add `qformat=geojson` to my query (as shown in the link above), the output contains the template with the place holders, no substitutions with the values. > I'd need to see the whole mapfile. It sounds like you might be mixing new and old-style template definitions which I would discourage. > This is even more bizarre -- per the email thread at [[http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html], it seems from Steve's comment that `qformat=geojson` is a valid query param (although I don't see it documented anywhere). Yet, if I add that, I get an unprocessed template. > >> >> What gives? > Note there are no predefined template drivers, so if you give it a qformat value that doesn't reference anything valid you should get an error but exactly what that is depends on the way you have errors configured in the web object. Steve From punk.kish at gmail.com Sun Sep 11 11:33:34 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 13:33:34 -0500 Subject: [mapserver-users] Re: interesting thread on JSON-ish output from MapServer In-Reply-To: References: Message-ID: <18179822-5247-4741-9DBC-7FDD61F2A5F6@gmail.com> On Sep 11, 2011, at 12:46 PM, Steve Lime wrote: > > > Sent from my iPad > > On Sep 11, 2011, at 9:36 AM, Mr. Puneet Kishor wrote: > >> Partial solution (phew, for now), but other problems persist -- >> .. >> >> >> One issue I have not solved -- if no result is found, MapServer sends back the following -- >> >> ---- >> >> >> MapServer Message >> >> >> >> >> >> msQueryByPoint(): Search returned no results. No matching record(s) found. >> >> >> ---- >> >> >> Well, that gums up the works. I really want MapServer to just send an empty JSON structure, something like foo({}). Suggestions on how I can prevent this HTML message from MapServer, and force it to use the template instead? Any suggestion for the above? That is, force MapServer to not send back an error message of the above kind. Instead, send back an empty JSON structure based on the template? Puneet. From sdlime at gmail.com Sun Sep 11 14:18:28 2011 From: sdlime at gmail.com (Steve Lime) Date: Sun, 11 Sep 2011 16:18:28 -0500 Subject: [mapserver-users] Re: interesting thread on JSON-ish output from MapServer In-Reply-To: <18179822-5247-4741-9DBC-7FDD61F2A5F6@gmail.com> References: <18179822-5247-4741-9DBC-7FDD61F2A5F6@gmail.com> Message-ID: <4F4D8C1A-FA75-4CBD-B14B-FC35EBEDB1B5@gmail.com> You could try the web object and the empty parameter. Sent from my iPad On Sep 11, 2011, at 1:33 PM, "Mr. Puneet Kishor" wrote: > > On Sep 11, 2011, at 12:46 PM, Steve Lime wrote: > >> >> >> Sent from my iPad >> >> On Sep 11, 2011, at 9:36 AM, Mr. Puneet Kishor wrote: >> >>> Partial solution (phew, for now), but other problems persist -- >>> > > .. > >>> >>> >>> One issue I have not solved -- if no result is found, MapServer sends back the following -- >>> >>> ---- >>> >>> >>> MapServer Message >>> >>> >>> >>> >>> >>> msQueryByPoint(): Search returned no results. No matching record(s) found. >>> >>> >>> ---- >>> >>> >>> Well, that gums up the works. I really want MapServer to just send an empty JSON structure, something like foo({}). Suggestions on how I can prevent this HTML message from MapServer, and force it to use the template instead? > > > Any suggestion for the above? That is, force MapServer to not send back an error message of the above kind. Instead, send back an empty JSON structure based on the template? > > > Puneet. From brunovani22 at gmail.com Sun Sep 11 14:34:44 2011 From: brunovani22 at gmail.com (Bruno Cesar Vani) Date: Sun, 11 Sep 2011 18:34:44 -0300 Subject: [mapserver-users] var_dump return void Message-ID: On php-mapscript 6.0.1, I can't use var_dump: code: var_dump($map); //don't works echo $map->mappath; //works output: object(mapObj)#1 (0) { } /* null?? */ /ms4w/apps/regente/mapfiles/ /* works */ Any suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Sun Sep 11 14:58:21 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 16:58:21 -0500 Subject: [mapserver-users] Re: interesting thread on JSON-ish output from MapServer In-Reply-To: <4F4D8C1A-FA75-4CBD-B14B-FC35EBEDB1B5@gmail.com> References: <18179822-5247-4741-9DBC-7FDD61F2A5F6@gmail.com> <4F4D8C1A-FA75-4CBD-B14B-FC35EBEDB1B5@gmail.com> Message-ID: On Sep 11, 2011, at 4:18 PM, Steve Lime wrote: > You could try the web object and the empty parameter. From TFM EMPTY [url] URL to forward users to if a query fails. If not defined the value for ERROR is used. Hmmmm... I am not sure I want to forward the user to any URL. This is all Ajax, so I have to receive an empty data structure. I guess I could try exploiting the jQuery `$.ajax({ error: function() { popup an infowindow with regrets message } });` > > Sent from my iPad > > On Sep 11, 2011, at 1:33 PM, "Mr. Puneet Kishor" wrote: > >> >> On Sep 11, 2011, at 12:46 PM, Steve Lime wrote: >> >>> >>> >>> Sent from my iPad >>> >>> On Sep 11, 2011, at 9:36 AM, Mr. Puneet Kishor wrote: >>> >>>> Partial solution (phew, for now), but other problems persist -- >>>> >> >> .. >> >>>> >>>> >>>> One issue I have not solved -- if no result is found, MapServer sends back the following -- >>>> >>>> ---- >>>> >>>> >>>> MapServer Message >>>> >>>> >>>> >>>> >>>> >>>> msQueryByPoint(): Search returned no results. No matching record(s) found. >>>> >>>> >>>> ---- >>>> >>>> >>>> Well, that gums up the works. I really want MapServer to just send an empty JSON structure, something like foo({}). Suggestions on how I can prevent this HTML message from MapServer, and force it to use the template instead? >> >> >> Any suggestion for the above? That is, force MapServer to not send back an error message of the above kind. Instead, send back an empty JSON structure based on the template? >> >> >> Puneet. From jaja0506 at gmail.com Sun Sep 11 18:10:17 2011 From: jaja0506 at gmail.com (jjwang) Date: Sun, 11 Sep 2011 18:10:17 -0700 (PDT) Subject: [mapserver-users] layer data sources more than one Message-ID: <1315789817421-6781936.post@n2.nabble.com> Hi, I know that the DATA statement should be given a data source of the layer. What if the data comes from multi shapefiles? Can I give it a list of shapefiles and how to write it? JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/layer-data-sources-more-than-one-tp6781936p6781936.html Sent from the Mapserver - User mailing list archive at Nabble.com. From punk.kish at gmail.com Sun Sep 11 19:18:26 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 21:18:26 -0500 Subject: [mapserver-users] layer data sources more than one In-Reply-To: References: <1315789817421-6781936.post@n2.nabble.com> <67BFF6E0-9E7C-4CEC-87C6-983BDD27467E@gmail.com> Message-ID: On Sep 11, 2011, at 9:05 PM, JIAJIA WANG wrote: > The data in the shapefile are suburb boundaries, but I got several > shapefiles, one shapefile for one state. I want a map showing the whole > country's suburb boundaries. > That's can be done by defining several layers (one layer reads one > shapefile) in one mapfile. But actually there are not conflicts between > these shapefiles. So I want to know is there any way to define only one > layer and read the data from all these shapefiles. I am pretty sure (but not 100%) that you can have only one data source per layer. That said, you could either combine all the shapefiles into a single countrywide shapefile, or you could create separate layers, and then create a layer group (I am pretty sure you can group the layers into one... its been a long time, and I am just coming back to MapServer, so check the docs). That way, all the different layers for different states will behave as if they are a single layer. From the docs -- GROUP [name] Name of a group that this layer belongs to. The group name can then be reference as a regular layer name in the template files, allowing to do things like turning on and off a group of layers at once. > > On Mon, Sep 12, 2011 at 11:17 AM, Mr. Puneet Kishor wrote: > >> >> On Sep 11, 2011, at 8:10 PM, jjwang wrote: >> >>> Hi, >>> >>> I know that the DATA statement should be given a data source of the >> layer. >>> What if the data comes from multi shapefiles? >>> Can I give it a list of shapefiles and how to write it? >>> >> >> >> Generally a LAYER maps to a shapefile or a table in a db. It is hard for me >> to imagine how one layer could have data from two or more shapefiles. >> Perhaps more explanation would help here. >> >> From sdlime at gmail.com Sun Sep 11 20:10:48 2011 From: sdlime at gmail.com (Steve Lime) Date: Sun, 11 Sep 2011 22:10:48 -0500 Subject: [mapserver-users] Re: interesting thread on JSON-ish output from MapServer In-Reply-To: References: <18179822-5247-4741-9DBC-7FDD61F2A5F6@gmail.com> <4F4D8C1A-FA75-4CBD-B14B-FC35EBEDB1B5@gmail.com> Message-ID: The forward could be to a JavaScript file with an empty object. Browser should follow ok... Sent from my iPad On Sep 11, 2011, at 4:58 PM, Mr. Puneet Kishor wrote: > > On Sep 11, 2011, at 4:18 PM, Steve Lime wrote: > >> You could try the web object and the empty parameter. > > > From TFM > > EMPTY [url] > URL to forward users to if a query fails. If not defined the value for ERROR is used. > > > Hmmmm... I am not sure I want to forward the user to any URL. This is all Ajax, so I have to receive an empty data structure. I guess I could try exploiting the jQuery `$.ajax({ error: function() { popup an infowindow with regrets message } });` > > > > >> >> Sent from my iPad >> >> On Sep 11, 2011, at 1:33 PM, "Mr. Puneet Kishor" wrote: >> >>> >>> On Sep 11, 2011, at 12:46 PM, Steve Lime wrote: >>> >>>> >>>> >>>> Sent from my iPad >>>> >>>> On Sep 11, 2011, at 9:36 AM, Mr. Puneet Kishor wrote: >>>> >>>>> Partial solution (phew, for now), but other problems persist -- >>>>> >>> >>> .. >>> >>>>> >>>>> >>>>> One issue I have not solved -- if no result is found, MapServer sends back the following -- >>>>> >>>>> ---- >>>>> >>>>> >>>>> MapServer Message >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> msQueryByPoint(): Search returned no results. No matching record(s) found. >>>>> >>>>> >>>>> ---- >>>>> >>>>> >>>>> Well, that gums up the works. I really want MapServer to just send an empty JSON structure, something like foo({}). Suggestions on how I can prevent this HTML message from MapServer, and force it to use the template instead? >>> >>> >>> Any suggestion for the above? That is, force MapServer to not send back an error message of the above kind. Instead, send back an empty JSON structure based on the template? >>> >>> >>> Puneet. > From richard.greenwood at gmail.com Sun Sep 11 20:03:28 2011 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Sun, 11 Sep 2011 21:03:28 -0600 Subject: [mapserver-users] querying in mode=tile In-Reply-To: <889E6AB4-5D44-4FBF-B437-8D921FF10E27@gmail.com> References: <889E6AB4-5D44-4FBF-B437-8D921FF10E27@gmail.com> Message-ID: On Sun, Sep 11, 2011 at 8:48 AM, Mr. Puneet Kishor wrote: > > On Sep 11, 2011, at 8:03 AM, Richard Greenwood wrote: > >> On Sat, Sep 10, 2011 at 1:35 PM, Mr. Puneet Kishor wrote: >>> Now that I have mode=tile working with Google Maps API v3, I am on my way to implement querying like so >>> >>> ? ?0. Bind an infowindow.close() to a click event listener on the map >>> ? ?1. Bind an infowindow.open() to a click event listener on the MapServer layer >>> ? ?2. Fill the infowindow content with the result from an Ajax query to MapServer >>> ? ?3. When the user clicks on the MapServer layer, the Ajax query is fired >>> ? ?4. MapServer responds with the query result as a JSON object >>> ? ?5. Fill the infowindow with the JSON result >>> ? ?6. Close any already open infowindow via #0 above >>> ? ?7. Open a new infowindow with the result >>> >>> Is the general approach outlined above sound? Any pointers to existing code samples for the above? >> >> >> Puneet, >> >> I'm doing pretty much that here: >> ? http://records.sublettewyo.com/mapserver/map.html >> I'm using jQuery in this example and putting the info into a jQuery >> dialog, however I have used a standard browser window in the past. >> Only thing is that I don't thinnk you really need step 0, simply >> replace the contents of the container with the new info. > > > Yup, I don't have to worry about #0. Howerver, #1 above is problematic, and I don't have a resolution for it yet. Seems like in Google Maps API v3 I can't addListener to an ImageMapType overlay. See, I am adding a MapServer layer as ImageMapType overlay like so > > ?"mapserverLayer" : new google.maps.ImageMapType({ .. }) > ?map.overlayMapTypes.insertAt(0, mapserverLayer); > > > If I do the following -- > > ?google.maps.event.addListener(map, "click", function (event) { } > > it works, however, the following doesn't work at all > > ?google.maps.event.addListener(mapserverLayer, "click", function (event) { } > > Which is silly, isn't it? I don't want the entire map to be listening to the "click" events. I just want the MapServer layer to be doing so. Haven't yet found a resolution to this. > > >> >> Also, if your data is in PostGIS you can skip mapserver for attribute >> queries and do an info query against the PostGIS db via PHP or other >> server-side tool. >> > > Ok, I am very interested in the above, but I am not sure I understand you. For the most part, I want to click on the map, and find out more about what I clicked on. In order to do that query via Perl MapScript (I don't know PHP) and Pg, I would need to create the $mapObj. I am able to do that fine, but I don't know how to run MapServer in `mode=tile` via MapScript. This is the question I have asked a couple of times -- if I have a pure MapScript app (no map files involved at all, which is what I want), how no earth do I tell the app to use `mode=tile`? > > Puneet. > > Puneet, I do not know how to bind an infowindow.open() to a click event listener on the MapServer layer (#1 above) because I do not use the Google API. But using Perl, PHP or whatever it is easy to query a PostGIS database, and even get GeoJSON back should you want to highlight the selected object on the map. I am using OpenLayers so I can easily convert the mouse click (or box) to a real-world coordinate(s). I pass the point or box to a PHP page which connects to a PostGIS db, does the query, and returns JSON. Does that help? I'm not sure that I understand everything that you're doing and maybe my approach is not appropriate in your case. Are you in Denver for FOSS4G?? Rich -- Richard Greenwood richard.greenwood at gmail.com www.greenwoodmap.com From punk.kish at gmail.com Sun Sep 11 20:37:13 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 22:37:13 -0500 Subject: [mapserver-users] querying in mode=tile In-Reply-To: References: <889E6AB4-5D44-4FBF-B437-8D921FF10E27@gmail.com> Message-ID: On Sep 11, 2011, at 10:03 PM, Richard Greenwood wrote: > On Sun, Sep 11, 2011 at 8:48 AM, Mr. Puneet Kishor wrote: >> >> On Sep 11, 2011, at 8:03 AM, Richard Greenwood wrote: >> >>> On Sat, Sep 10, 2011 at 1:35 PM, Mr. Puneet Kishor wrote: >>>> Now that I have mode=tile working with Google Maps API v3, I am on my way to implement querying like so >>>> >>>> 0. Bind an infowindow.close() to a click event listener on the map >>>> 1. Bind an infowindow.open() to a click event listener on the MapServer layer >>>> 2. Fill the infowindow content with the result from an Ajax query to MapServer >>>> 3. When the user clicks on the MapServer layer, the Ajax query is fired >>>> 4. MapServer responds with the query result as a JSON object >>>> 5. Fill the infowindow with the JSON result >>>> 6. Close any already open infowindow via #0 above >>>> 7. Open a new infowindow with the result >>>> >>>> Is the general approach outlined above sound? Any pointers to existing code samples for the above? >>> >>> >>> Puneet, >>> >>> I'm doing pretty much that here: >>> http://records.sublettewyo.com/mapserver/map.html >>> I'm using jQuery in this example and putting the info into a jQuery >>> dialog, however I have used a standard browser window in the past. >>> Only thing is that I don't thinnk you really need step 0, simply >>> replace the contents of the container with the new info. >> >> >> Yup, I don't have to worry about #0. Howerver, #1 above is problematic, and I don't have a resolution for it yet. Seems like in Google Maps API v3 I can't addListener to an ImageMapType overlay. See, I am adding a MapServer layer as ImageMapType overlay like so >> >> "mapserverLayer" : new google.maps.ImageMapType({ .. }) >> map.overlayMapTypes.insertAt(0, mapserverLayer); >> >> >> If I do the following -- >> >> google.maps.event.addListener(map, "click", function (event) { } >> >> it works, however, the following doesn't work at all >> >> google.maps.event.addListener(mapserverLayer, "click", function (event) { } >> >> Which is silly, isn't it? I don't want the entire map to be listening to the "click" events. I just want the MapServer layer to be doing so. Haven't yet found a resolution to this. >> >> >>> >>> Also, if your data is in PostGIS you can skip mapserver for attribute >>> queries and do an info query against the PostGIS db via PHP or other >>> server-side tool. >>> >> >> Ok, I am very interested in the above, but I am not sure I understand you. For the most part, I want to click on the map, and find out more about what I clicked on. In order to do that query via Perl MapScript (I don't know PHP) and Pg, I would need to create the $mapObj. I am able to do that fine, but I don't know how to run MapServer in `mode=tile` via MapScript. This is the question I have asked a couple of times -- if I have a pure MapScript app (no map files involved at all, which is what I want), how no earth do I tell the app to use `mode=tile`? >> >> Puneet. >> >> > > Puneet, > > I do not know how to bind an infowindow.open() to a click event > listener on the MapServer layer (#1 above) because I do not use the > Google API. But using Perl, PHP or whatever it is easy to query a > PostGIS database, and even get GeoJSON back should you want to > highlight the selected object on the map. > > I am using OpenLayers so I can easily convert the mouse click (or box) > to a real-world coordinate(s). I pass the point or box to a PHP page > which connects to a PostGIS db, does the query, and returns JSON. Does > that help? I'm not sure that I understand everything that you're doing > and maybe my approach is not appropriate in your case. I am assuming you are using OL with MapServer WMS. If I could get MapServer WMS (via MapScript) working, it would have been good, but after screwing around for a day and a half unsuccessfully, I gave up (for now). Then I tried `mode=tile` and it just worked. However, even that is not fully satisfactory as it is not via MapScript. Without MapScript I am severely hampered -- the complexity of the datasets makes for beastly map files. My map file with just one data source is already almost 9000 lines long. In fact, I generate the map file via MapScript, and then further tweak it by hand. Even with WMS or tile mode, I will have to implement some kind of tile caching either with tilecache or map proxy or some such to improve the performance. However, since I am not using MapScript (even though I would prefer to), I would have to implement both CGI and MapScript to do what you are suggesting above -- CGI to display the map and MapScript to do the query. For now, I have been able to get this clicky thing working -- I click on the map, do a `mode=query` and display the result in an infowindow. That part is working. Ideally, I would like to have a single technology -- MapScript to generate the maps that can be displayed via multiple front-ends -- OL, Gmaps, perhaps Leaflet, and MapScript to query the attributes via clicks and selects on the map. For now, I am flailing. > > Are you in Denver for FOSS4G?? > Unfortunately no. Too much work here, and no funding to travel. I am sure you all will have a blast. Puneet. From Jukka.Rahkonen at mmmtike.fi Sun Sep 11 20:55:01 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 12 Sep 2011 03:55:01 +0000 Subject: [mapserver-users] layer data sources more than one In-Reply-To: References: <1315789817421-6781936.post@n2.nabble.com> <67BFF6E0-9E7C-4CEC-87C6-983BDD27467E@gmail.com> , Message-ID: <84446DEF76453C439E9E97E438E13A63021582@suutari.haapa.mmm.fi> Hi, You will do it with "ogrtileindex". Read http://www.mapserver.org/optimization/tileindex.html -Jukka Rahkonen- Mr. Puneet Kishor wrote: > On Sep 11, 2011, at 9:05 PM, JIAJIA WANG wrote: >> The data in the shapefile are suburb boundaries, but I got several > shapefiles, one shapefile for one state. I want a map showing the whole > country's suburb boundaries. > That's can be done by defining several layers (one layer reads one > shapefile) in one mapfile. But actually there are not conflicts between > these shapefiles. So I want to know is there any way to define only one > layer and read the data from all these shapefiles. > I am pretty sure (but not 100%) that you can have only one data source per layer. That said, you could either combine all the shapefiles into a single countrywide shapefile, or you could create separate layers, and then create a layer group (I am pretty sure you can group the layers into one... its been a long time, and I am just coming back to MapServer, so check the docs). That way, all the different layers for different states will behave as if they are a single layer. From the docs -- GROUP [name] Name of a group that this layer belongs to. The group name can then be reference as a regular layer name in the template files, allowing to do things like turning on and off a group of layers at once. > > On Mon, Sep 12, 2011 at 11:17 AM, Mr. Puneet Kishor wrote: > >> >> On Sep 11, 2011, at 8:10 PM, jjwang wrote: >> >>> Hi, >>> >>> I know that the DATA statement should be given a data source of the >> layer. >>> What if the data comes from multi shapefiles? >>> Can I give it a list of shapefiles and how to write it? >>> >> >> >> Generally a LAYER maps to a shapefile or a table in a db. It is hard for me >> to imagine how one layer could have data from two or more shapefiles. >> Perhaps more explanation would help here. >> >> _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Sun Sep 11 21:03:34 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 11 Sep 2011 23:03:34 -0500 Subject: [mapserver-users] querying in mode=tile In-Reply-To: References: <889E6AB4-5D44-4FBF-B437-8D921FF10E27@gmail.com> Message-ID: <5925F15A-604E-4B4B-A828-4C601BF029A5@gmail.com> On Sep 11, 2011, at 10:52 PM, Richard Greenwood wrote: > On Sun, Sep 11, 2011 at 9:37 PM, Mr. Puneet Kishor wrote: > >> However, since I am not using MapScript (even though I would prefer to), I would have to implement both CGI and MapScript to do what you are suggesting above -- CGI to display the map and MapScript to do the query. > > But my point was that you can do the query without mapserver at all if > the data is in postgis. Use a server-side language such as Perl or PHP > to pass the request to postgis, which can do a spatial query, and then > Perl or PHP can format the result as JSON and return it to the page > (via AJAX). On second reading, I now get what you are saying. Strange that it never occurred to me. Sounds very sensible, and I will implement it tomorrow. That way I can get away from CGI `mode=query` and its TEMPLATE-ing vagaries. Yes, my data are in Pg, so I can do all my querying with Perl. Wish I could do away with `mode=tile` and also get tiles back via MapScript. Then my solution would be complete. Thanks for this really useful hint (more like making me see the obvious that I was missing for some reason). Puneet. From Jukka.Rahkonen at mmmtike.fi Sun Sep 11 21:41:34 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 12 Sep 2011 04:41:34 +0000 Subject: [mapserver-users] querying in mode=tile In-Reply-To: <5925F15A-604E-4B4B-A828-4C601BF029A5@gmail.com> References: <889E6AB4-5D44-4FBF-B437-8D921FF10E27@gmail.com> , <5925F15A-604E-4B4B-A828-4C601BF029A5@gmail.com> Message-ID: <84446DEF76453C439E9E97E438E13A630215AE@suutari.haapa.mmm.fi> Hi, If you happen to have a little bit time for considering some day, consider also using WFS for queries. And if you cannot manage to get the geojson outputformat work through the OGR outputformat system in a minute, you can install TinyOWS besides Mapserver. It can read the same mapfiles and it can output geojson out-of-the-box. -Jukka Rahkonen- Mr. Puneet Kishor wrote: >On Sep 11, 2011, at 10:52 PM, Richard Greenwood wrote: >> On Sun, Sep 11, 2011 at 9:37 PM, Mr. Puneet Kishor wrote: > >>> However, since I am not using MapScript (even though I would prefer to), I would have to implement both CGI and MapScript to do what you are suggesting above -- CGI to display the map and MapScript to do the query. > >> But my point was that you can do the query without mapserver at all if > the data is in postgis. Use a server-side language such as Perl or PHP > to pass the request to postgis, which can do a spatial query, and then > Perl or PHP can format the result as JSON and return it to the page > (via AJAX). > On second reading, I now get what you are saying. Strange that it never occurred to me. Sounds very sensible, and I will implement it tomorrow. That way I can get away from CGI `mode=query` and its TEMPLATE-ing vagaries. Yes, my data are in Pg, so I can do all my querying with Perl. > Wish I could do away with `mode=tile` and also get tiles back via MapScript. Then my solution would be complete. >Thanks for this really useful hint (more like making me see the obvious that I was missing for some reason). Puneet._______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From sdavies at sdc.com.au Sun Sep 11 22:26:06 2011 From: sdavies at sdc.com.au (Stephen Davies) Date: Mon, 12 Sep 2011 14:56:06 +0930 Subject: [mapserver-users] Issue with run-time substitution? In-Reply-To: <04D19D47-385C-4DD7-B34A-CECB94E727DF@gmail.com> References: <201108302113.32658.sdavies@sdc.com.au> <04D19D47-385C-4DD7-B34A-CECB94E727DF@gmail.com> Message-ID: <201109121456.07019.sdavies@sdc.com.au> All of my map files are dynamically generated at run-time from templates so mapserver run-time substitution is not really needed. I just wanted to see how it worked. I suspect that the apparent issue was caused by a bug in my template manipulation code as moving the logic into and out of my code made the issue go away. I did try varying the validation regex. It seems that pretty much anything works: in regex or URL:-)) You suggest that my validation expression "isn't strong enough". Given that, in this case, any NNN_NNN value is possible and valid, what else could I use? Cheers and thanks, Stephen On Wednesday 31 August 2011 23:17:28 Steve Lime wrote: > Hmm... Looks like it's setup correctly although you validation pattern > isn't strong enough. As a test what happens if you try a pattern like '.'? > If that works then it's a regex error. One thing that comes to mind is > that maybe there's query string parsing issue and the var to substitute > isn't being recognized. Spaces or other chars ahead of &var could mess > things up. Something to check. > > Steve > > Sent from my iPad > > On Aug 30, 2011, at 6:43 AM, Stephen Davies wrote: > > I am running mapserver 6.0.1 with map files migrated from 5.6.3. > > > > One of my map files has stopped working properly and I suspect that it > > may be a bug in the 6.0.1 run-time substitution code. > > > > The relevant map file layer sections look like this: > > LAYER > > > > CONNECTIONTYPE postgis > > NAME "battery" > > DATA "geom from wmd using unique id using SRID=4283" > > CONNECTION "user=scldad dbname=benparts" > > STATUS ON > > TYPE POINT > > VALIDATION > > > > vucv '[0-9]*_[0-9]*' > > > > END > > FILTER (stype='B' and uc='%vucv%') > > PROJECTION > > > > "init=epsg:4283" > > > > END > > MAXSCALE 5000000 > > LABELITEM "label" > > CLASSITEM "state" > > CLASS > > > > EXPRESSION "G" > > STYLE > > > > COLOR 0 255 0 > > SYMBOL 'dot' > > SIZE 7 > > OFFSET 17 0 > > > > END > > LABEL > > > > POSITION CR > > TYPE TRUETYPE > > FONT arial > > SIZE 8 > > COLOR 0 255 0 > > OFFSET 20 0 > > FORCE TRUE > > STYLE > > > > GEOMTRANSFORM 'labelpoly' > > COLOR 255 255 255 > > > > END > > > > END > > > > END > > > > . > > . > > END > > > > There are twelve layers with essentially the same definition apart from > > the STYPE values. > > > > The invoking URL has &vucv=137_11 but the postgresql log reveals that no > > substitution has occurred. The final pgsql command still has '%vucv%'. > > > > I suspect that having more than one FILTER with the same substitution > > breaks things as all other substitutions work fine. > > > > (I also tried putting the substitution in the DATA entry but with no > > better result.) > > > > Cheers, > > Stephen -- ============================================================================= Stephen Davies Consulting P/L Voice: 08-8177 1595 Adelaide, South Australia. Fax : 08-8177 0133 Records & Collections Management. Mobile:040 304 0583 From dejan.gambin at coin.hr Mon Sep 12 01:15:09 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 10:15:09 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> Message-ID: <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> Hi, I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( Thanks very much regards, dejan On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: > Hi, > > After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. > > Here is the error I get: > > ./libmapserver.a(mapimageio.o): In function `savePalettePNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' > ./libmapserver.a(mapimageio.o): In function `saveAsPNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' > ./libmapserver.a(mapimageio.o): In function `readPNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' > collect2: ld returned 1 exit status > > > Here is my configure: > > ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda > l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl > -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b > in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- > libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local > > Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing > > I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. > > Am I doing something wrong? > > Thank you very much for any useful info > > regards, dejan_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From thomas.bonfort at gmail.com Mon Sep 12 01:31:49 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 10:31:49 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> Message-ID: Can you check you are linking against the same version libpng library as the png.h header (i.e. check you don't have multiple png versions installed) 2011/9/12 Dejan Gambin : > Hi, > > I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( > > Thanks very much > > regards, dejan > On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: > >> Hi, >> >> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >> >> Here is the error I get: >> >> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >> ./libmapserver.a(mapimageio.o): In function `readPNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >> collect2: ld returned 1 exit status >> >> >> Here is my configure: >> >> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >> >> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >> >> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >> >> Am I doing something wrong? >> >> Thank you very much for any useful info >> >> regards, dejan_______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From dejan.gambin at coin.hr Mon Sep 12 02:13:28 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 11:13:28 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> Message-ID: <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> Hi Thomas Thanks for the help. As I said, I have system libpng installed in /usr/lib: dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ un libpng-dev (no description available) ii libpng12-0 1.2.27-2+lenny PNG library - runtime un libpng12-0-dev (no description available) ii libpng12-dev 1.2.27-2+lenny PNG library - development un libpng2 (no description available) un libpng2-dev (no description available) un libpng3-dev (no description available) dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so And I have libpng-1.5.4 installed in /usr/local/lib: dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so I made configure with --with-png=/usr/local Make fails in this: dgambin at coin:~/mapserver-6.0.1$ make g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img ./libmapserver.a(mapimageio.o): In function `savePalettePNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' ./libmapserver.a(mapimageio.o): In function `saveAsPNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' ./libmapserver.a(mapimageio.o): In function `readPNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' collect2: ld returned 1 exit status Is there anything wrong here? I'll send you anything else if needed :-) Thanks very much regards, dejan On 12. ruj. 2011., at 10:31, thomas bonfort wrote: > Can you check you are linking against the same version libpng library > as the png.h header (i.e. check you don't have multiple png versions > installed) > > 2011/9/12 Dejan Gambin : >> Hi, >> >> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >> >> Thanks very much >> >> regards, dejan >> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >> >>> Hi, >>> >>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>> >>> Here is the error I get: >>> >>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>> collect2: ld returned 1 exit status >>> >>> >>> Here is my configure: >>> >>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>> >>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>> >>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>> >>> Am I doing something wrong? >>> >>> Thank you very much for any useful info >>> >>> regards, dejan_______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> From thomas.bonfort at gmail.com Mon Sep 12 02:17:25 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 11:17:25 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> Message-ID: can you try modifying mapimageio.c and replace #include by #include "/usr/local/include/png.h" if you have both png 1.4 and 1.5 in /usr/local, you're asking for trouble, make sure this is not the case 2011/9/12 Dejan Gambin : > Hi Thomas > > Thanks for the help. As I said, I have system libpng installed in /usr/lib: > > dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* > Desired=Unknown/Install/Remove/Purge/Hold > | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend > |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) > ||/ Name ? ? ? ? ? Version ? ? ? ?Description > +++-==============-==============-============================================ > un ?libpng-dev ? ? ? ? ? ? (no description available) > ii ?libpng12-0 ? ? 1.2.27-2+lenny PNG library - runtime > un ?libpng12-0-dev ? ? ? ? (no description available) > ii ?libpng12-dev ? 1.2.27-2+lenny PNG library - development > un ?libpng2 ? ? ? ? ? ? ? ? (no description available) > un ?libpng2-dev ? ? ? ? ? ? (no description available) > un ?libpng3-dev ? ? ? ? ? ? (no description available) > > dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* > -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a > lrwxrwxrwx 1 root root ? ? 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 > lrwxrwxrwx 1 root root ? ? 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 > -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 > lrwxrwxrwx 1 root root ? ? 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a > lrwxrwxrwx 1 root root ? ? 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so > > > > And I have libpng-1.5.4 installed in /usr/local/lib: > > dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* > -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a > -rwxr-xr-x 1 root staff ? ? 934 2011-09-09 13:09 /usr/local/lib/libpng15.la > lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 > lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 > -rwxr-xr-x 1 root staff ?597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 > lrwxrwxrwx 1 root staff ? ? ?10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a > lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la > lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so > > > I made configure with --with-png=/usr/local > > Make fails in this: > > dgambin at coin:~/mapserver-6.0.1$ make > g++ -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local//include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img > ./libmapserver.a(mapimageio.o): In function `savePalettePNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' > ./libmapserver.a(mapimageio.o): In function `saveAsPNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' > ./libmapserver.a(mapimageio.o): In function `readPNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' > collect2: ld returned 1 exit status > > Is there anything wrong here? I'll send you anything else if needed :-) > > Thanks very much > > regards, dejan > > > On 12. ruj. 2011., at 10:31, thomas bonfort wrote: > >> Can you check you are linking against the same version libpng library >> as the png.h header (i.e. check you don't have multiple png versions >> installed) >> >> 2011/9/12 Dejan Gambin : >>> Hi, >>> >>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>> >>> Thanks very much >>> >>> regards, dejan >>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>> >>>> Hi, >>>> >>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>> >>>> Here is the error I get: >>>> >>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>> collect2: ld returned 1 exit status >>>> >>>> >>>> Here is my configure: >>>> >>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>> >>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>> >>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>> >>>> Am I doing something wrong? >>>> >>>> Thank you very much for any useful info >>>> >>>> regards, dejan_______________________________________________ >>>> mapserver-users mailing list >>>> mapserver-users at lists.osgeo.org >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> > > From dejan.gambin at coin.hr Mon Sep 12 02:41:40 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 11:41:40 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> Message-ID: <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> It doesn't help :-( Here is the part of make compile statement with mapimageio.c, maybe this can help you: gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 mapimageio.c -o mapimageio.o regards, dejan BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib On 12. ruj. 2011., at 11:17, thomas bonfort wrote: > can you try modifying mapimageio.c and replace > #include > by > #include "/usr/local/include/png.h" > > if you have both png 1.4 and 1.5 in /usr/local, you're asking for > trouble, make sure this is not the case > > 2011/9/12 Dejan Gambin : >> Hi Thomas >> >> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >> >> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >> Desired=Unknown/Install/Remove/Purge/Hold >> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >> ||/ Name Version Description >> +++-==============-==============-============================================ >> un libpng-dev (no description available) >> ii libpng12-0 1.2.27-2+lenny PNG library - runtime >> un libpng12-0-dev (no description available) >> ii libpng12-dev 1.2.27-2+lenny PNG library - development >> un libpng2 (no description available) >> un libpng2-dev (no description available) >> un libpng3-dev (no description available) >> >> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >> lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >> lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >> lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >> lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >> >> >> >> And I have libpng-1.5.4 installed in /usr/local/lib: >> >> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >> -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >> -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >> lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >> >> >> I made configure with --with-png=/usr/local >> >> Make fails in this: >> >> dgambin at coin:~/mapserver-6.0.1$ make >> g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >> ./libmapserver.a(mapimageio.o): In function `readPNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >> collect2: ld returned 1 exit status >> >> Is there anything wrong here? I'll send you anything else if needed :-) >> >> Thanks very much >> >> regards, dejan >> >> >> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >> >>> Can you check you are linking against the same version libpng library >>> as the png.h header (i.e. check you don't have multiple png versions >>> installed) >>> >>> 2011/9/12 Dejan Gambin : >>>> Hi, >>>> >>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>> >>>> Thanks very much >>>> >>>> regards, dejan >>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>> >>>>> Hi, >>>>> >>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>> >>>>> Here is the error I get: >>>>> >>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>> collect2: ld returned 1 exit status >>>>> >>>>> >>>>> Here is my configure: >>>>> >>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>> >>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>> >>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>> >>>>> Am I doing something wrong? >>>>> >>>>> Thank you very much for any useful info >>>>> >>>>> regards, dejan_______________________________________________ >>>>> mapserver-users mailing list >>>>> mapserver-users at lists.osgeo.org >>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >>>> _______________________________________________ >>>> mapserver-users mailing list >>>> mapserver-users at lists.osgeo.org >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >> >> From thomas.bonfort at gmail.com Mon Sep 12 02:45:27 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 11:45:27 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> Message-ID: 2011/9/12 Dejan Gambin : > It doesn't help :-( > > > Here is the part of make compile statement with mapimageio.c, maybe this can help you: > > gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -o mapimageio.o > > > regards, dejan > > BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib as you had stated you tried with 1.4 I just wanted to make sure. ok, last step before opening a ticket: - revert mapimageio.c to its original state - check the output of gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC -I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -M for the location of png.h - if png.h comes from /usr/local/include, open a ticket and assign it to me > > > On 12. ruj. 2011., at 11:17, thomas bonfort wrote: > >> can you try modifying mapimageio.c and replace >> #include >> by >> #include "/usr/local/include/png.h" >> >> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >> trouble, make sure this is not the case >> >> 2011/9/12 Dejan Gambin : >>> Hi Thomas >>> >>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>> >>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>> Desired=Unknown/Install/Remove/Purge/Hold >>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>> ||/ Name ? ? ? ? ? Version ? ? ? ?Description >>> +++-==============-==============-============================================ >>> un ?libpng-dev ? ? ? ? ? ? (no description available) >>> ii ?libpng12-0 ? ? 1.2.27-2+lenny PNG library - runtime >>> un ?libpng12-0-dev ? ? ? ? (no description available) >>> ii ?libpng12-dev ? 1.2.27-2+lenny PNG library - development >>> un ?libpng2 ? ? ? ? ? ? ? ? (no description available) >>> un ?libpng2-dev ? ? ? ? ? ? (no description available) >>> un ?libpng3-dev ? ? ? ? ? ? (no description available) >>> >>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>> lrwxrwxrwx 1 root root ? ? 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>> lrwxrwxrwx 1 root root ? ? 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>> lrwxrwxrwx 1 root root ? ? 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>> lrwxrwxrwx 1 root root ? ? 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>> >>> >>> >>> And I have libpng-1.5.4 installed in /usr/local/lib: >>> >>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>> -rwxr-xr-x 1 root staff ? ? 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>> -rwxr-xr-x 1 root staff ?597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>> lrwxrwxrwx 1 root staff ? ? ?10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>> >>> >>> I made configure with --with-png=/usr/local >>> >>> Make fails in this: >>> >>> dgambin at coin:~/mapserver-6.0.1$ make >>> g++ -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local//include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>> collect2: ld returned 1 exit status >>> >>> Is there anything wrong here? I'll send you anything else if needed :-) >>> >>> Thanks very much >>> >>> regards, dejan >>> >>> >>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>> >>>> Can you check you are linking against the same version libpng library >>>> as the png.h header (i.e. check you don't have multiple png versions >>>> installed) >>>> >>>> 2011/9/12 Dejan Gambin : >>>>> Hi, >>>>> >>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>> >>>>> Thanks very much >>>>> >>>>> regards, dejan >>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>> >>>>>> Here is the error I get: >>>>>> >>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>> collect2: ld returned 1 exit status >>>>>> >>>>>> >>>>>> Here is my configure: >>>>>> >>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>> >>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>> >>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>> >>>>>> Am I doing something wrong? >>>>>> >>>>>> Thank you very much for any useful info >>>>>> >>>>>> regards, dejan_______________________________________________ >>>>>> mapserver-users mailing list >>>>>> mapserver-users at lists.osgeo.org >>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>> >>>>> _______________________________________________ >>>>> mapserver-users mailing list >>>>> mapserver-users at lists.osgeo.org >>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>> >>> >>> > > From dejan.gambin at coin.hr Mon Sep 12 02:55:36 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 11:55:36 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> Message-ID: <7C3B9328-918F-4203-AD49-6C127F80A0EE@coin.hr> I get no output, just mapimageio.o generated....I'll try again...maybe some other option... dejan On 12. ruj. 2011., at 11:45, thomas bonfort wrote: > 2011/9/12 Dejan Gambin : >> It doesn't help :-( >> >> >> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >> >> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 mapimageio.c -o mapimageio.o >> >> >> regards, dejan >> >> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib > as you had stated you tried with 1.4 I just wanted to make sure. > > ok, last step before opening a ticket: > > - revert mapimageio.c to its original state > - check the output of > > gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY > -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR > -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML > -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS > -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ > -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG > -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR > -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV > -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include > -Irenderers/agg/include -I/usr/include -I/usr/local/include > -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC > -I/usr/include -I/usr/include/libxml2 mapimageio.c -M > > for the location of png.h > > - if png.h comes from /usr/local/include, open a ticket and assign it to me > > >> >> >> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >> >>> can you try modifying mapimageio.c and replace >>> #include >>> by >>> #include "/usr/local/include/png.h" >>> >>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>> trouble, make sure this is not the case >>> >>> 2011/9/12 Dejan Gambin : >>>> Hi Thomas >>>> >>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>> Desired=Unknown/Install/Remove/Purge/Hold >>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>> ||/ Name Version Description >>>> +++-==============-==============-============================================ >>>> un libpng-dev (no description available) >>>> ii libpng12-0 1.2.27-2+lenny PNG library - runtime >>>> un libpng12-0-dev (no description available) >>>> ii libpng12-dev 1.2.27-2+lenny PNG library - development >>>> un libpng2 (no description available) >>>> un libpng2-dev (no description available) >>>> un libpng3-dev (no description available) >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>> lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>> lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>> lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>> lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>> >>>> >>>> >>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>> -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>> -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>> lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>> >>>> >>>> I made configure with --with-png=/usr/local >>>> >>>> Make fails in this: >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ make >>>> g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>> collect2: ld returned 1 exit status >>>> >>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>> >>>> Thanks very much >>>> >>>> regards, dejan >>>> >>>> >>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>> >>>>> Can you check you are linking against the same version libpng library >>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>> installed) >>>>> >>>>> 2011/9/12 Dejan Gambin : >>>>>> Hi, >>>>>> >>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>> >>>>>> Thanks very much >>>>>> >>>>>> regards, dejan >>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>> >>>>>>> Here is the error I get: >>>>>>> >>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>> collect2: ld returned 1 exit status >>>>>>> >>>>>>> >>>>>>> Here is my configure: >>>>>>> >>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>> >>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>> >>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>> >>>>>>> Am I doing something wrong? >>>>>>> >>>>>>> Thank you very much for any useful info >>>>>>> >>>>>>> regards, dejan_______________________________________________ >>>>>>> mapserver-users mailing list >>>>>>> mapserver-users at lists.osgeo.org >>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>> >>>>>> _______________________________________________ >>>>>> mapserver-users mailing list >>>>>> mapserver-users at lists.osgeo.org >>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>> >>>> >>>> >> >> From thomas.bonfort at gmail.com Mon Sep 12 02:57:52 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 11:57:52 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: <7C3B9328-918F-4203-AD49-6C127F80A0EE@coin.hr> References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <7C3B9328-918F-4203-AD49-6C127F80A0EE@coin.hr> Message-ID: make sure you remove the "-o mapimageio.o" from the call 2011/9/12 Dejan Gambin : > I get no output, just mapimageio.o generated....I'll try again...maybe some other option... > > dejan > On 12. ruj. 2011., at 11:45, thomas bonfort wrote: > >> 2011/9/12 Dejan Gambin : >>> It doesn't help :-( >>> >>> >>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>> >>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -o mapimageio.o >>> >>> >>> regards, dejan >>> >>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >> as you had stated you tried with 1.4 I just wanted to make sure. >> >> ok, last step before opening a ticket: >> >> - revert mapimageio.c to its original state >> - check the output of >> >> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY >> -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR >> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >> -DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS >> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ >> -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID >> -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include >> -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include >> -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC >> -I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -M >> >> for the location of png.h >> >> - if png.h comes from /usr/local/include, open a ticket and assign it to me >> >> >>> >>> >>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>> >>>> can you try modifying mapimageio.c and replace >>>> #include >>>> by >>>> #include "/usr/local/include/png.h" >>>> >>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>> trouble, make sure this is not the case >>>> >>>> 2011/9/12 Dejan Gambin : >>>>> Hi Thomas >>>>> >>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>> ||/ Name ? ? ? ? ? Version ? ? ? ?Description >>>>> +++-==============-==============-============================================ >>>>> un ?libpng-dev ? ? ? ? ? ? (no description available) >>>>> ii ?libpng12-0 ? ? 1.2.27-2+lenny PNG library - runtime >>>>> un ?libpng12-0-dev ? ? ? ? (no description available) >>>>> ii ?libpng12-dev ? 1.2.27-2+lenny PNG library - development >>>>> un ?libpng2 ? ? ? ? ? ? ? ? (no description available) >>>>> un ?libpng2-dev ? ? ? ? ? ? (no description available) >>>>> un ?libpng3-dev ? ? ? ? ? ? (no description available) >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>> lrwxrwxrwx 1 root root ? ? 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>> lrwxrwxrwx 1 root root ? ? 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>> lrwxrwxrwx 1 root root ? ? 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>> lrwxrwxrwx 1 root root ? ? 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>> >>>>> >>>>> >>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>> -rwxr-xr-x 1 root staff ? ? 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>> -rwxr-xr-x 1 root staff ?597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>> lrwxrwxrwx 1 root staff ? ? ?10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>> >>>>> >>>>> I made configure with --with-png=/usr/local >>>>> >>>>> Make fails in this: >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>> g++ -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local//include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>> collect2: ld returned 1 exit status >>>>> >>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>> >>>>> Thanks very much >>>>> >>>>> regards, dejan >>>>> >>>>> >>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>> >>>>>> Can you check you are linking against the same version libpng library >>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>> installed) >>>>>> >>>>>> 2011/9/12 Dejan Gambin : >>>>>>> Hi, >>>>>>> >>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>> >>>>>>> Thanks very much >>>>>>> >>>>>>> regards, dejan >>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>> >>>>>>>> Here is the error I get: >>>>>>>> >>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>> collect2: ld returned 1 exit status >>>>>>>> >>>>>>>> >>>>>>>> Here is my configure: >>>>>>>> >>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>> >>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>> >>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>> >>>>>>>> Am I doing something wrong? >>>>>>>> >>>>>>>> Thank you very much for any useful info >>>>>>>> >>>>>>>> regards, dejan_______________________________________________ >>>>>>>> mapserver-users mailing list >>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>> >>>>>>> _______________________________________________ >>>>>>> mapserver-users mailing list >>>>>>> mapserver-users at lists.osgeo.org >>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>> >>>>> >>>>> >>> >>> > > From dejan.gambin at coin.hr Mon Sep 12 02:59:28 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 11:59:28 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <7C3B9328-918F-4203-AD49-6C127F80A0EE@coin.hr> Message-ID: O sorry, here it is: mapimageio.o: mapimageio.c mapserver.h /usr/include/stdio.h \ /usr/include/features.h /usr/include/sys/cdefs.h \ /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ /usr/include/gnu/stubs-64.h \ /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include/stddef.h \ /usr/include/bits/types.h /usr/include/bits/typesizes.h \ /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include/stdarg.h \ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ /usr/include/stdlib.h /usr/include/bits/waitflags.h \ /usr/include/bits/waitstatus.h /usr/include/endian.h \ /usr/include/bits/endian.h /usr/include/xlocale.h \ /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ /usr/include/bits/select.h /usr/include/bits/sigset.h \ /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ /usr/include/string.h /usr/include/math.h /usr/include/bits/huge_val.h \ /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \ /usr/include/bits/inf.h /usr/include/bits/nan.h \ /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ /usr/include/unistd.h /usr/include/bits/posix_opt.h \ /usr/include/bits/environments.h /usr/include/bits/confname.h \ /usr/include/getopt.h \ /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include-fixed/limits.h \ /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include-fixed/syslimits.h \ /usr/include/limits.h /usr/include/bits/posix1_lim.h \ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ /usr/include/stdint.h /usr/include/bits/wchar.h maperror.h \ mapprimitive.h mapshape.h mapsymbol.h /usr/include/gd.h \ /usr/include/gd_io.h /usr/include/gdfx.h /usr/include/gd.h \ /usr/include/assert.h maptree.h maphash.h mapio.h mapproject.h \ /usr/include/proj_api.h cgiutil.h mapregex.h \ /usr/local/include/ogr_api.h /usr/local/include/ogr_core.h \ /usr/local/include/cpl_port.h /usr/local/include/cpl_config.h \ /usr/include/ctype.h /usr/include/errno.h /usr/include/bits/errno.h \ /usr/include/linux/errno.h /usr/include/asm/errno.h \ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ /usr/include/locale.h /usr/include/bits/locale.h \ /usr/local/include/gdal_version.h mapows.h maphttp.h \ /usr/local/include/png.h /usr/local/include/pnglibconf.h \ /usr/include/setjmp.h /usr/include/bits/setjmp.h \ /usr/local/include/pngconf.h /usr/include/jpeglib.h \ /usr/include/jconfig.h /usr/include/jmorecfg.h /usr/include/gif_lib.h dejan On 12. ruj. 2011., at 11:57, thomas bonfort wrote: > make sure you remove the "-o mapimageio.o" from the call > > 2011/9/12 Dejan Gambin : >> I get no output, just mapimageio.o generated....I'll try again...maybe some other option... >> >> dejan >> On 12. ruj. 2011., at 11:45, thomas bonfort wrote: >> >>> 2011/9/12 Dejan Gambin : >>>> It doesn't help :-( >>>> >>>> >>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>>> >>>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 mapimageio.c -o mapimageio.o >>>> >>>> >>>> regards, dejan >>>> >>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >>> as you had stated you tried with 1.4 I just wanted to make sure. >>> >>> ok, last step before opening a ticket: >>> >>> - revert mapimageio.c to its original state >>> - check the output of >>> >>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY >>> -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR >>> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >>> -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS >>> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ >>> -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >>> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >>> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >>> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID >>> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include >>> -Irenderers/agg/include -I/usr/include -I/usr/local/include >>> -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC >>> -I/usr/include -I/usr/include/libxml2 mapimageio.c -M >>> >>> for the location of png.h >>> >>> - if png.h comes from /usr/local/include, open a ticket and assign it to me >>> >>> >>>> >>>> >>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>>> >>>>> can you try modifying mapimageio.c and replace >>>>> #include >>>>> by >>>>> #include "/usr/local/include/png.h" >>>>> >>>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>>> trouble, make sure this is not the case >>>>> >>>>> 2011/9/12 Dejan Gambin : >>>>>> Hi Thomas >>>>>> >>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>>> ||/ Name Version Description >>>>>> +++-==============-==============-============================================ >>>>>> un libpng-dev (no description available) >>>>>> ii libpng12-0 1.2.27-2+lenny PNG library - runtime >>>>>> un libpng12-0-dev (no description available) >>>>>> ii libpng12-dev 1.2.27-2+lenny PNG library - development >>>>>> un libpng2 (no description available) >>>>>> un libpng2-dev (no description available) >>>>>> un libpng3-dev (no description available) >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>>> lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>>> lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>>> lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>>> lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>>> >>>>>> >>>>>> >>>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>>> -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>>> -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>>> lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>>> >>>>>> >>>>>> I made configure with --with-png=/usr/local >>>>>> >>>>>> Make fails in this: >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>>> g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>> collect2: ld returned 1 exit status >>>>>> >>>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>>> >>>>>> Thanks very much >>>>>> >>>>>> regards, dejan >>>>>> >>>>>> >>>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>>> >>>>>>> Can you check you are linking against the same version libpng library >>>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>>> installed) >>>>>>> >>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>> Hi, >>>>>>>> >>>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>>> >>>>>>>> Thanks very much >>>>>>>> >>>>>>>> regards, dejan >>>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>>> >>>>>>>>> Here is the error I get: >>>>>>>>> >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>> >>>>>>>>> >>>>>>>>> Here is my configure: >>>>>>>>> >>>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>>> >>>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>>> >>>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>>> >>>>>>>>> Am I doing something wrong? >>>>>>>>> >>>>>>>>> Thank you very much for any useful info >>>>>>>>> >>>>>>>>> regards, dejan_______________________________________________ >>>>>>>>> mapserver-users mailing list >>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> mapserver-users mailing list >>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>> >>>>>> >>>>>> >>>> >>>> >> >> From dejan.gambin at coin.hr Mon Sep 12 03:09:24 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 12:09:24 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> Message-ID: <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> Here is the ticket I created: http://trac.osgeo.org/mapserver/ticket/4019 regards, dejan On 12. ruj. 2011., at 11:45, thomas bonfort wrote: > 2011/9/12 Dejan Gambin : >> It doesn't help :-( >> >> >> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >> >> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 mapimageio.c -o mapimageio.o >> >> >> regards, dejan >> >> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib > as you had stated you tried with 1.4 I just wanted to make sure. > > ok, last step before opening a ticket: > > - revert mapimageio.c to its original state > - check the output of > > gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY > -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR > -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML > -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS > -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ > -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG > -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR > -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV > -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include > -Irenderers/agg/include -I/usr/include -I/usr/local/include > -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC > -I/usr/include -I/usr/include/libxml2 mapimageio.c -M > > for the location of png.h > > - if png.h comes from /usr/local/include, open a ticket and assign it to me > > >> >> >> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >> >>> can you try modifying mapimageio.c and replace >>> #include >>> by >>> #include "/usr/local/include/png.h" >>> >>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>> trouble, make sure this is not the case >>> >>> 2011/9/12 Dejan Gambin : >>>> Hi Thomas >>>> >>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>> Desired=Unknown/Install/Remove/Purge/Hold >>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>> ||/ Name Version Description >>>> +++-==============-==============-============================================ >>>> un libpng-dev (no description available) >>>> ii libpng12-0 1.2.27-2+lenny PNG library - runtime >>>> un libpng12-0-dev (no description available) >>>> ii libpng12-dev 1.2.27-2+lenny PNG library - development >>>> un libpng2 (no description available) >>>> un libpng2-dev (no description available) >>>> un libpng3-dev (no description available) >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>> lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>> lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>> lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>> lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>> >>>> >>>> >>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>> -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>> -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>> lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>> >>>> >>>> I made configure with --with-png=/usr/local >>>> >>>> Make fails in this: >>>> >>>> dgambin at coin:~/mapserver-6.0.1$ make >>>> g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>> collect2: ld returned 1 exit status >>>> >>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>> >>>> Thanks very much >>>> >>>> regards, dejan >>>> >>>> >>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>> >>>>> Can you check you are linking against the same version libpng library >>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>> installed) >>>>> >>>>> 2011/9/12 Dejan Gambin : >>>>>> Hi, >>>>>> >>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>> >>>>>> Thanks very much >>>>>> >>>>>> regards, dejan >>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>> >>>>>>> Here is the error I get: >>>>>>> >>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>> collect2: ld returned 1 exit status >>>>>>> >>>>>>> >>>>>>> Here is my configure: >>>>>>> >>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>> >>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>> >>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>> >>>>>>> Am I doing something wrong? >>>>>>> >>>>>>> Thank you very much for any useful info >>>>>>> >>>>>>> regards, dejan_______________________________________________ >>>>>>> mapserver-users mailing list >>>>>>> mapserver-users at lists.osgeo.org >>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>> >>>>>> _______________________________________________ >>>>>> mapserver-users mailing list >>>>>> mapserver-users at lists.osgeo.org >>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>> >>>> >>>> >> >> From thomas.bonfort at gmail.com Mon Sep 12 03:10:28 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 12:10:28 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> Message-ID: One last check: can you run the linker command with the "-t" option and post the output 2011/9/12 Dejan Gambin : > Here is the ticket I created: > > http://trac.osgeo.org/mapserver/ticket/4019 > > regards, dejan > On 12. ruj. 2011., at 11:45, thomas bonfort wrote: > >> 2011/9/12 Dejan Gambin : >>> It doesn't help :-( >>> >>> >>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>> >>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -o mapimageio.o >>> >>> >>> regards, dejan >>> >>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >> as you had stated you tried with 1.4 I just wanted to make sure. >> >> ok, last step before opening a ticket: >> >> - revert mapimageio.c to its original state >> - check the output of >> >> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY >> -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR >> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >> -DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS >> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ >> -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID >> -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include >> -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include >> -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC >> -I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -M >> >> for the location of png.h >> >> - if png.h comes from /usr/local/include, open a ticket and assign it to me >> >> >>> >>> >>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>> >>>> can you try modifying mapimageio.c and replace >>>> #include >>>> by >>>> #include "/usr/local/include/png.h" >>>> >>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>> trouble, make sure this is not the case >>>> >>>> 2011/9/12 Dejan Gambin : >>>>> Hi Thomas >>>>> >>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>> ||/ Name ? ? ? ? ? Version ? ? ? ?Description >>>>> +++-==============-==============-============================================ >>>>> un ?libpng-dev ? ? ? ? ? ? (no description available) >>>>> ii ?libpng12-0 ? ? 1.2.27-2+lenny PNG library - runtime >>>>> un ?libpng12-0-dev ? ? ? ? (no description available) >>>>> ii ?libpng12-dev ? 1.2.27-2+lenny PNG library - development >>>>> un ?libpng2 ? ? ? ? ? ? ? ? (no description available) >>>>> un ?libpng2-dev ? ? ? ? ? ? (no description available) >>>>> un ?libpng3-dev ? ? ? ? ? ? (no description available) >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>> lrwxrwxrwx 1 root root ? ? 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>> lrwxrwxrwx 1 root root ? ? 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>> lrwxrwxrwx 1 root root ? ? 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>> lrwxrwxrwx 1 root root ? ? 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>> >>>>> >>>>> >>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>> -rwxr-xr-x 1 root staff ? ? 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>> -rwxr-xr-x 1 root staff ?597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>> lrwxrwxrwx 1 root staff ? ? ?10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>> >>>>> >>>>> I made configure with --with-png=/usr/local >>>>> >>>>> Make fails in this: >>>>> >>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>> g++ -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local//include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>> collect2: ld returned 1 exit status >>>>> >>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>> >>>>> Thanks very much >>>>> >>>>> regards, dejan >>>>> >>>>> >>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>> >>>>>> Can you check you are linking against the same version libpng library >>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>> installed) >>>>>> >>>>>> 2011/9/12 Dejan Gambin : >>>>>>> Hi, >>>>>>> >>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>> >>>>>>> Thanks very much >>>>>>> >>>>>>> regards, dejan >>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>> >>>>>>>> Here is the error I get: >>>>>>>> >>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>> collect2: ld returned 1 exit status >>>>>>>> >>>>>>>> >>>>>>>> Here is my configure: >>>>>>>> >>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>> >>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>> >>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>> >>>>>>>> Am I doing something wrong? >>>>>>>> >>>>>>>> Thank you very much for any useful info >>>>>>>> >>>>>>>> regards, dejan_______________________________________________ >>>>>>>> mapserver-users mailing list >>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>> >>>>>>> _______________________________________________ >>>>>>> mapserver-users mailing list >>>>>>> mapserver-users at lists.osgeo.org >>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>> >>>>> >>>>> >>> >>> > > From dejan.gambin at coin.hr Mon Sep 12 03:17:20 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 12:17:20 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> Message-ID: <716018FC-0672-4A4D-AAB0-D95EBEDD24AE@coin.hr> Is this ok? coin:/home/dgambin/mapserver-6.0.1# g++ -g -t -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local/lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local/lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img /usr/bin/ld: mode elf_x86_64 /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtbegin.o shp2img.o (./libmapserver.a)mapstring.o (./libmapserver.a)mapfile.o (./libmapserver.a)maputil.o (./libmapserver.a)mapscale.o (./libmapserver.a)mapquery.o (./libmapserver.a)maplabel.o (./libmapserver.a)maperror.o (./libmapserver.a)mapprimitive.o (./libmapserver.a)mapproject.o (./libmapserver.a)mapogr.o (./libmapserver.a)maplayer.o (./libmapserver.a)maporaclespatial.o (./libmapserver.a)mapdraw.o (./libmapserver.a)mapoutput.o (./libmapserver.a)mapgdal.o (./libmapserver.a)mapimagemap.o (./libmapserver.a)mapows.o (./libmapserver.a)mapwfs.o (./libmapserver.a)mapwfs11.o (./libmapserver.a)mapwfslayer.o (./libmapserver.a)maphttp.o (./libmapserver.a)mapjoin.o (./libmapserver.a)mapgraticule.o (./libmapserver.a)mapcopy.o (./libmapserver.a)mapogcfilter.o (./libmapserver.a)maptime.o (./libmapserver.a)cgiutil.o (./libmapserver.a)maprasterquery.o (./libmapserver.a)mapobject.o (./libmapserver.a)mapio.o (./libmapserver.a)mappool.o (./libmapserver.a)mapregex.o (./libmapserver.a)mappluginlayer.o (./libmapserver.a)mappostgresql.o (./libmapserver.a)mapcrypto.o (./libmapserver.a)mapowscommon.o (./libmapserver.a)maplibxml2.o (./libmapserver.a)mapdebug.o (./libmapserver.a)mapchart.o (./libmapserver.a)mapkml.o (./libmapserver.a)mapkmlrenderer.o (./libmapserver.a)mapogroutput.o (./libmapserver.a)mapogcfiltercommon.o (./libmapserver.a)mapunion.o (./libmapserver.a)mapcluster.o (./libmapserver.a)mapdummyrenderer.o (./libmapserver.a)mapogl.o (./libmapserver.a)mapimageio.o (./libmapserver.a)mapcairo.o (./libmapserver.a)maprendering.o (./libmapserver.a)mapgeomtransform.o (./libmapserver.a)mapquantization.o (./libmapserver.a)maptemplate.o (./libmapserver.a)mapbits.o (./libmapserver.a)maphash.o (./libmapserver.a)mapshape.o (./libmapserver.a)mapxbase.o (./libmapserver.a)mapparser.o (./libmapserver.a)maplexer.o (./libmapserver.a)maptree.o (./libmapserver.a)mapsearch.o (./libmapserver.a)mapsymbol.o (./libmapserver.a)maplegend.o (./libmapserver.a)mapraster.o (./libmapserver.a)mapsde.o (./libmapserver.a)mappostgis.o (./libmapserver.a)mapresample.o (./libmapserver.a)mapwms.o (./libmapserver.a)mapwmslayer.o (./libmapserver.a)mapgml.o (./libmapserver.a)mapprojhack.o (./libmapserver.a)mapgd.o (./libmapserver.a)mapagg.o (./libmapserver.a)mapcontext.o (./libmapserver.a)mapdrawgdal.o (./libmapserver.a)mapogcsld.o (./libmapserver.a)mapcpl.o (./libmapserver.a)mapgeos.o (./libmapserver.a)classobject.o (./libmapserver.a)maptclutf.o (./libmapserver.a)clipper.o (./libmapserver.a)agg_curves.o (./libmapserver.a)agg_vcgen_contour.o (./libmapserver.a)agg_vcgen_dash.o (./libmapserver.a)agg_vcgen_stroke.o (./libmapserver.a)agg_line_aa_basics.o (./libmapserver.a)agg_embedded_raster_fonts.o (./libmapserver.a)agg_trans_affine.o (./libmapserver.a)agg_font_freetype.o (./libmapserver.a)mapgeomutil.o (./libmapserver.a)agg_arc.o -lfreetype (/usr/lib64/libfreetype.so) -lz (/usr/lib64/libz.so) -lgd (/usr/lib64/libgd.so) -lgd (/usr/lib64/libgd.so) -ljpeg (/usr/lib64/libjpeg.so) -lfreetype (/usr/lib64/libfreetype.so) -lz (/usr/lib64/libz.so) -lpng (/usr/lib64/libpng.so) -lz (/usr/lib64/libz.so) -lXpm (/usr/lib64/libXpm.so) -lX11 (/usr/lib64/libX11.so) -lexpat (/usr/lib64/libexpat.so) -lproj (/usr/lib64/libproj.so) -ljpeg (/usr/lib64/libjpeg.so) -lpng (/usr/lib64/libpng.so) -lgif (/usr/lib64/libgif.so) -lgdal (/usr/local/lib/libgdal.so) -lpq (/usr/lib64/libpq.so) -lmysqlclient (/usr/lib64/libmysqlclient.so) -lmysqlclient (/usr/lib64/libmysqlclient.so) -lcurl (/usr/lib64/libcurl.so) -lz (/usr/lib64/libz.so) -lxml2 (/usr/lib64/libxml2.so) -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) -lm (/usr/lib64/libm.so) /lib/libc.so.6 (/usr/lib/libc_nonshared.a)elf-init.oS (/usr/lib/libc_nonshared.a)stat.oS /lib/ld-linux-x86-64.so.2 -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) /lib/libc.so.6 /lib/ld-linux-x86-64.so.2 -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crtn.o ./libmapserver.a(mapimageio.o): In function `savePalettePNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' ./libmapserver.a(mapimageio.o): In function `saveAsPNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' ./libmapserver.a(mapimageio.o): In function `readPNG': /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' /usr/bin/ld: link errors found, deleting executable `shp2img' collect2: ld returned 1 exit status On 12. ruj. 2011., at 12:10, thomas bonfort wrote: > One last check: can you run the linker command with the "-t" option > and post the output > > 2011/9/12 Dejan Gambin : >> Here is the ticket I created: >> >> http://trac.osgeo.org/mapserver/ticket/4019 >> >> regards, dejan >> On 12. ruj. 2011., at 11:45, thomas bonfort wrote: >> >>> 2011/9/12 Dejan Gambin : >>>> It doesn't help :-( >>>> >>>> >>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>>> >>>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 mapimageio.c -o mapimageio.o >>>> >>>> >>>> regards, dejan >>>> >>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >>> as you had stated you tried with 1.4 I just wanted to make sure. >>> >>> ok, last step before opening a ticket: >>> >>> - revert mapimageio.c to its original state >>> - check the output of >>> >>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY >>> -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR >>> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >>> -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS >>> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ >>> -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >>> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >>> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >>> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID >>> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include >>> -Irenderers/agg/include -I/usr/include -I/usr/local/include >>> -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC >>> -I/usr/include -I/usr/include/libxml2 mapimageio.c -M >>> >>> for the location of png.h >>> >>> - if png.h comes from /usr/local/include, open a ticket and assign it to me >>> >>> >>>> >>>> >>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>>> >>>>> can you try modifying mapimageio.c and replace >>>>> #include >>>>> by >>>>> #include "/usr/local/include/png.h" >>>>> >>>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>>> trouble, make sure this is not the case >>>>> >>>>> 2011/9/12 Dejan Gambin : >>>>>> Hi Thomas >>>>>> >>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>>> ||/ Name Version Description >>>>>> +++-==============-==============-============================================ >>>>>> un libpng-dev (no description available) >>>>>> ii libpng12-0 1.2.27-2+lenny PNG library - runtime >>>>>> un libpng12-0-dev (no description available) >>>>>> ii libpng12-dev 1.2.27-2+lenny PNG library - development >>>>>> un libpng2 (no description available) >>>>>> un libpng2-dev (no description available) >>>>>> un libpng3-dev (no description available) >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>>> lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>>> lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>>> lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>>> lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>>> >>>>>> >>>>>> >>>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>>> -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>>> -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>>> lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>>> >>>>>> >>>>>> I made configure with --with-png=/usr/local >>>>>> >>>>>> Make fails in this: >>>>>> >>>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>>> g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>> collect2: ld returned 1 exit status >>>>>> >>>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>>> >>>>>> Thanks very much >>>>>> >>>>>> regards, dejan >>>>>> >>>>>> >>>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>>> >>>>>>> Can you check you are linking against the same version libpng library >>>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>>> installed) >>>>>>> >>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>> Hi, >>>>>>>> >>>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>>> >>>>>>>> Thanks very much >>>>>>>> >>>>>>>> regards, dejan >>>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>>> >>>>>>>>> Here is the error I get: >>>>>>>>> >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>> >>>>>>>>> >>>>>>>>> Here is my configure: >>>>>>>>> >>>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>>> >>>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>>> >>>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>>> >>>>>>>>> Am I doing something wrong? >>>>>>>>> >>>>>>>>> Thank you very much for any useful info >>>>>>>>> >>>>>>>>> regards, dejan_______________________________________________ >>>>>>>>> mapserver-users mailing list >>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> mapserver-users mailing list >>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>> >>>>>> >>>>>> >>>> >>>> >> >> From thomas.bonfort at gmail.com Mon Sep 12 03:21:03 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 12:21:03 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: <716018FC-0672-4A4D-AAB0-D95EBEDD24AE@coin.hr> References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> <716018FC-0672-4A4D-AAB0-D95EBEDD24AE@coin.hr> Message-ID: it's using the libpng.so from /usr/lib64 instead of /usr/local try adding -L/usr/local/lib right after "-o shp2img.o" 2011/9/12 Dejan Gambin : > Is this ok? > > coin:/home/dgambin/mapserver-6.0.1# g++ -g -t -fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local/lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local/lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img > /usr/bin/ld: mode elf_x86_64 > /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crt1.o > /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crti.o > /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtbegin.o > shp2img.o > (./libmapserver.a)mapstring.o > (./libmapserver.a)mapfile.o > (./libmapserver.a)maputil.o > (./libmapserver.a)mapscale.o > (./libmapserver.a)mapquery.o > (./libmapserver.a)maplabel.o > (./libmapserver.a)maperror.o > (./libmapserver.a)mapprimitive.o > (./libmapserver.a)mapproject.o > (./libmapserver.a)mapogr.o > (./libmapserver.a)maplayer.o > (./libmapserver.a)maporaclespatial.o > (./libmapserver.a)mapdraw.o > (./libmapserver.a)mapoutput.o > (./libmapserver.a)mapgdal.o > (./libmapserver.a)mapimagemap.o > (./libmapserver.a)mapows.o > (./libmapserver.a)mapwfs.o > (./libmapserver.a)mapwfs11.o > (./libmapserver.a)mapwfslayer.o > (./libmapserver.a)maphttp.o > (./libmapserver.a)mapjoin.o > (./libmapserver.a)mapgraticule.o > (./libmapserver.a)mapcopy.o > (./libmapserver.a)mapogcfilter.o > (./libmapserver.a)maptime.o > (./libmapserver.a)cgiutil.o > (./libmapserver.a)maprasterquery.o > (./libmapserver.a)mapobject.o > (./libmapserver.a)mapio.o > (./libmapserver.a)mappool.o > (./libmapserver.a)mapregex.o > (./libmapserver.a)mappluginlayer.o > (./libmapserver.a)mappostgresql.o > (./libmapserver.a)mapcrypto.o > (./libmapserver.a)mapowscommon.o > (./libmapserver.a)maplibxml2.o > (./libmapserver.a)mapdebug.o > > > (./libmapserver.a)mapchart.o > (./libmapserver.a)mapkml.o > (./libmapserver.a)mapkmlrenderer.o > (./libmapserver.a)mapogroutput.o > (./libmapserver.a)mapogcfiltercommon.o > (./libmapserver.a)mapunion.o > (./libmapserver.a)mapcluster.o > (./libmapserver.a)mapdummyrenderer.o > (./libmapserver.a)mapogl.o > (./libmapserver.a)mapimageio.o > (./libmapserver.a)mapcairo.o > (./libmapserver.a)maprendering.o > (./libmapserver.a)mapgeomtransform.o > (./libmapserver.a)mapquantization.o > (./libmapserver.a)maptemplate.o > (./libmapserver.a)mapbits.o > (./libmapserver.a)maphash.o > (./libmapserver.a)mapshape.o > (./libmapserver.a)mapxbase.o > (./libmapserver.a)mapparser.o > (./libmapserver.a)maplexer.o > (./libmapserver.a)maptree.o > (./libmapserver.a)mapsearch.o > (./libmapserver.a)mapsymbol.o > (./libmapserver.a)maplegend.o > (./libmapserver.a)mapraster.o > (./libmapserver.a)mapsde.o > (./libmapserver.a)mappostgis.o > (./libmapserver.a)mapresample.o > (./libmapserver.a)mapwms.o > (./libmapserver.a)mapwmslayer.o > (./libmapserver.a)mapgml.o > (./libmapserver.a)mapprojhack.o > (./libmapserver.a)mapgd.o > (./libmapserver.a)mapagg.o > (./libmapserver.a)mapcontext.o > (./libmapserver.a)mapdrawgdal.o > (./libmapserver.a)mapogcsld.o > (./libmapserver.a)mapcpl.o > (./libmapserver.a)mapgeos.o > (./libmapserver.a)classobject.o > (./libmapserver.a)maptclutf.o > (./libmapserver.a)clipper.o > (./libmapserver.a)agg_curves.o > (./libmapserver.a)agg_vcgen_contour.o > (./libmapserver.a)agg_vcgen_dash.o > (./libmapserver.a)agg_vcgen_stroke.o > (./libmapserver.a)agg_line_aa_basics.o > (./libmapserver.a)agg_embedded_raster_fonts.o > (./libmapserver.a)agg_trans_affine.o > (./libmapserver.a)agg_font_freetype.o > (./libmapserver.a)mapgeomutil.o > (./libmapserver.a)agg_arc.o > -lfreetype (/usr/lib64/libfreetype.so) > -lz (/usr/lib64/libz.so) > -lgd (/usr/lib64/libgd.so) > -lgd (/usr/lib64/libgd.so) > -ljpeg (/usr/lib64/libjpeg.so) > -lfreetype (/usr/lib64/libfreetype.so) > -lz (/usr/lib64/libz.so) > -lpng (/usr/lib64/libpng.so) > -lz (/usr/lib64/libz.so) > -lXpm (/usr/lib64/libXpm.so) > -lX11 (/usr/lib64/libX11.so) > -lexpat (/usr/lib64/libexpat.so) > -lproj (/usr/lib64/libproj.so) > -ljpeg (/usr/lib64/libjpeg.so) > -lpng (/usr/lib64/libpng.so) > -lgif (/usr/lib64/libgif.so) > -lgdal (/usr/local/lib/libgdal.so) > -lpq (/usr/lib64/libpq.so) > -lmysqlclient (/usr/lib64/libmysqlclient.so) > -lmysqlclient (/usr/lib64/libmysqlclient.so) > -lcurl (/usr/lib64/libcurl.so) > -lz (/usr/lib64/libz.so) > -lxml2 (/usr/lib64/libxml2.so) > -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) > -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) > -lm (/usr/lib64/libm.so) > /lib/libc.so.6 > (/usr/lib/libc_nonshared.a)elf-init.oS > (/usr/lib/libc_nonshared.a)stat.oS > /lib/ld-linux-x86-64.so.2 > -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) > /lib/libc.so.6 > /lib/ld-linux-x86-64.so.2 > -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) > /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtend.o > /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crtn.o > ./libmapserver.a(mapimageio.o): In function `savePalettePNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' > ./libmapserver.a(mapimageio.o): In function `saveAsPNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' > ./libmapserver.a(mapimageio.o): In function `readPNG': > /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' > /usr/bin/ld: link errors found, deleting executable `shp2img' > collect2: ld returned 1 exit status > > > > On 12. ruj. 2011., at 12:10, thomas bonfort wrote: > >> One last check: can you run the linker command with the "-t" option >> and post the output >> >> 2011/9/12 Dejan Gambin : >>> Here is the ticket I created: >>> >>> http://trac.osgeo.org/mapserver/ticket/4019 >>> >>> regards, dejan >>> On 12. ruj. 2011., at 11:45, thomas bonfort wrote: >>> >>>> 2011/9/12 Dejan Gambin : >>>>> It doesn't help :-( >>>>> >>>>> >>>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>>>> >>>>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -o mapimageio.o >>>>> >>>>> >>>>> regards, dejan >>>>> >>>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >>>> as you had stated you tried with 1.4 I just wanted to make sure. >>>> >>>> ok, last step before opening a ticket: >>>> >>>> - revert mapimageio.c to its original state >>>> - check the output of >>>> >>>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY >>>> -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR >>>> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >>>> -DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS >>>> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ >>>> -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >>>> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >>>> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >>>> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID >>>> -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include >>>> -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include >>>> -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC >>>> -I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -M >>>> >>>> for the location of png.h >>>> >>>> - if png.h comes from /usr/local/include, open a ticket and assign it to me >>>> >>>> >>>>> >>>>> >>>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>>>> >>>>>> can you try modifying mapimageio.c and replace >>>>>> #include >>>>>> by >>>>>> #include "/usr/local/include/png.h" >>>>>> >>>>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>>>> trouble, make sure this is not the case >>>>>> >>>>>> 2011/9/12 Dejan Gambin : >>>>>>> Hi Thomas >>>>>>> >>>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>>>> >>>>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>>>> ||/ Name ? ? ? ? ? Version ? ? ? ?Description >>>>>>> +++-==============-==============-============================================ >>>>>>> un ?libpng-dev ? ? ? ? ? ? (no description available) >>>>>>> ii ?libpng12-0 ? ? 1.2.27-2+lenny PNG library - runtime >>>>>>> un ?libpng12-0-dev ? ? ? ? (no description available) >>>>>>> ii ?libpng12-dev ? 1.2.27-2+lenny PNG library - development >>>>>>> un ?libpng2 ? ? ? ? ? ? ? ? (no description available) >>>>>>> un ?libpng2-dev ? ? ? ? ? ? (no description available) >>>>>>> un ?libpng3-dev ? ? ? ? ? ? (no description available) >>>>>>> >>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>>>> lrwxrwxrwx 1 root root ? ? 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>>>> lrwxrwxrwx 1 root root ? ? 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>>>> lrwxrwxrwx 1 root root ? ? 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>>>> lrwxrwxrwx 1 root root ? ? 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>>>> >>>>>>> >>>>>>> >>>>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>>>> >>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>>>> -rwxr-xr-x 1 root staff ? ? 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>>>> -rwxr-xr-x 1 root staff ?597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>>>> lrwxrwxrwx 1 root staff ? ? ?10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>>>> >>>>>>> >>>>>>> I made configure with --with-png=/usr/local >>>>>>> >>>>>>> Make fails in this: >>>>>>> >>>>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>>>> g++ -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local//include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>> collect2: ld returned 1 exit status >>>>>>> >>>>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>>>> >>>>>>> Thanks very much >>>>>>> >>>>>>> regards, dejan >>>>>>> >>>>>>> >>>>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>>>> >>>>>>>> Can you check you are linking against the same version libpng library >>>>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>>>> installed) >>>>>>>> >>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>>>> >>>>>>>>> Thanks very much >>>>>>>>> >>>>>>>>> regards, dejan >>>>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>>>> >>>>>>>>>> Here is the error I get: >>>>>>>>>> >>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Here is my configure: >>>>>>>>>> >>>>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>>>> >>>>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>>>> >>>>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>>>> >>>>>>>>>> Am I doing something wrong? >>>>>>>>>> >>>>>>>>>> Thank you very much for any useful info >>>>>>>>>> >>>>>>>>>> regards, dejan_______________________________________________ >>>>>>>>>> mapserver-users mailing list >>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> mapserver-users mailing list >>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>> >>> > > From thomas.bonfort at gmail.com Mon Sep 12 03:24:36 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 12:24:36 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> <716018FC-0672-4A4D-AAB0-D95EBEDD24AE@coin.hr> Message-ID: Note that even though this may make it compile, you might end up with runtime errors as you are mixing png versions (gd is linked against libpng from /usr/lib64) you might try not using the system gd version, and compile your own one using the png version of /usr/local On Mon, Sep 12, 2011 at 12:21, thomas bonfort wrote: > it's using the libpng.so from /usr/lib64 instead of /usr/local > > try adding -L/usr/local/lib right after "-o shp2img.o" > > 2011/9/12 Dejan Gambin : >> Is this ok? >> >> coin:/home/dgambin/mapserver-6.0.1# g++ -g -t -fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local/lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local/lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >> /usr/bin/ld: mode elf_x86_64 >> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crt1.o >> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crti.o >> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtbegin.o >> shp2img.o >> (./libmapserver.a)mapstring.o >> (./libmapserver.a)mapfile.o >> (./libmapserver.a)maputil.o >> (./libmapserver.a)mapscale.o >> (./libmapserver.a)mapquery.o >> (./libmapserver.a)maplabel.o >> (./libmapserver.a)maperror.o >> (./libmapserver.a)mapprimitive.o >> (./libmapserver.a)mapproject.o >> (./libmapserver.a)mapogr.o >> (./libmapserver.a)maplayer.o >> (./libmapserver.a)maporaclespatial.o >> (./libmapserver.a)mapdraw.o >> (./libmapserver.a)mapoutput.o >> (./libmapserver.a)mapgdal.o >> (./libmapserver.a)mapimagemap.o >> (./libmapserver.a)mapows.o >> (./libmapserver.a)mapwfs.o >> (./libmapserver.a)mapwfs11.o >> (./libmapserver.a)mapwfslayer.o >> (./libmapserver.a)maphttp.o >> (./libmapserver.a)mapjoin.o >> (./libmapserver.a)mapgraticule.o >> (./libmapserver.a)mapcopy.o >> (./libmapserver.a)mapogcfilter.o >> (./libmapserver.a)maptime.o >> (./libmapserver.a)cgiutil.o >> (./libmapserver.a)maprasterquery.o >> (./libmapserver.a)mapobject.o >> (./libmapserver.a)mapio.o >> (./libmapserver.a)mappool.o >> (./libmapserver.a)mapregex.o >> (./libmapserver.a)mappluginlayer.o >> (./libmapserver.a)mappostgresql.o >> (./libmapserver.a)mapcrypto.o >> (./libmapserver.a)mapowscommon.o >> (./libmapserver.a)maplibxml2.o >> (./libmapserver.a)mapdebug.o >> >> >> (./libmapserver.a)mapchart.o >> (./libmapserver.a)mapkml.o >> (./libmapserver.a)mapkmlrenderer.o >> (./libmapserver.a)mapogroutput.o >> (./libmapserver.a)mapogcfiltercommon.o >> (./libmapserver.a)mapunion.o >> (./libmapserver.a)mapcluster.o >> (./libmapserver.a)mapdummyrenderer.o >> (./libmapserver.a)mapogl.o >> (./libmapserver.a)mapimageio.o >> (./libmapserver.a)mapcairo.o >> (./libmapserver.a)maprendering.o >> (./libmapserver.a)mapgeomtransform.o >> (./libmapserver.a)mapquantization.o >> (./libmapserver.a)maptemplate.o >> (./libmapserver.a)mapbits.o >> (./libmapserver.a)maphash.o >> (./libmapserver.a)mapshape.o >> (./libmapserver.a)mapxbase.o >> (./libmapserver.a)mapparser.o >> (./libmapserver.a)maplexer.o >> (./libmapserver.a)maptree.o >> (./libmapserver.a)mapsearch.o >> (./libmapserver.a)mapsymbol.o >> (./libmapserver.a)maplegend.o >> (./libmapserver.a)mapraster.o >> (./libmapserver.a)mapsde.o >> (./libmapserver.a)mappostgis.o >> (./libmapserver.a)mapresample.o >> (./libmapserver.a)mapwms.o >> (./libmapserver.a)mapwmslayer.o >> (./libmapserver.a)mapgml.o >> (./libmapserver.a)mapprojhack.o >> (./libmapserver.a)mapgd.o >> (./libmapserver.a)mapagg.o >> (./libmapserver.a)mapcontext.o >> (./libmapserver.a)mapdrawgdal.o >> (./libmapserver.a)mapogcsld.o >> (./libmapserver.a)mapcpl.o >> (./libmapserver.a)mapgeos.o >> (./libmapserver.a)classobject.o >> (./libmapserver.a)maptclutf.o >> (./libmapserver.a)clipper.o >> (./libmapserver.a)agg_curves.o >> (./libmapserver.a)agg_vcgen_contour.o >> (./libmapserver.a)agg_vcgen_dash.o >> (./libmapserver.a)agg_vcgen_stroke.o >> (./libmapserver.a)agg_line_aa_basics.o >> (./libmapserver.a)agg_embedded_raster_fonts.o >> (./libmapserver.a)agg_trans_affine.o >> (./libmapserver.a)agg_font_freetype.o >> (./libmapserver.a)mapgeomutil.o >> (./libmapserver.a)agg_arc.o >> -lfreetype (/usr/lib64/libfreetype.so) >> -lz (/usr/lib64/libz.so) >> -lgd (/usr/lib64/libgd.so) >> -lgd (/usr/lib64/libgd.so) >> -ljpeg (/usr/lib64/libjpeg.so) >> -lfreetype (/usr/lib64/libfreetype.so) >> -lz (/usr/lib64/libz.so) >> -lpng (/usr/lib64/libpng.so) >> -lz (/usr/lib64/libz.so) >> -lXpm (/usr/lib64/libXpm.so) >> -lX11 (/usr/lib64/libX11.so) >> -lexpat (/usr/lib64/libexpat.so) >> -lproj (/usr/lib64/libproj.so) >> -ljpeg (/usr/lib64/libjpeg.so) >> -lpng (/usr/lib64/libpng.so) >> -lgif (/usr/lib64/libgif.so) >> -lgdal (/usr/local/lib/libgdal.so) >> -lpq (/usr/lib64/libpq.so) >> -lmysqlclient (/usr/lib64/libmysqlclient.so) >> -lmysqlclient (/usr/lib64/libmysqlclient.so) >> -lcurl (/usr/lib64/libcurl.so) >> -lz (/usr/lib64/libz.so) >> -lxml2 (/usr/lib64/libxml2.so) >> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >> -lm (/usr/lib64/libm.so) >> /lib/libc.so.6 >> (/usr/lib/libc_nonshared.a)elf-init.oS >> (/usr/lib/libc_nonshared.a)stat.oS >> /lib/ld-linux-x86-64.so.2 >> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >> /lib/libc.so.6 >> /lib/ld-linux-x86-64.so.2 >> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtend.o >> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crtn.o >> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >> ./libmapserver.a(mapimageio.o): In function `readPNG': >> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >> /usr/bin/ld: link errors found, deleting executable `shp2img' >> collect2: ld returned 1 exit status >> >> >> >> On 12. ruj. 2011., at 12:10, thomas bonfort wrote: >> >>> One last check: can you run the linker command with the "-t" option >>> and post the output >>> >>> 2011/9/12 Dejan Gambin : >>>> Here is the ticket I created: >>>> >>>> http://trac.osgeo.org/mapserver/ticket/4019 >>>> >>>> regards, dejan >>>> On 12. ruj. 2011., at 11:45, thomas bonfort wrote: >>>> >>>>> 2011/9/12 Dejan Gambin : >>>>>> It doesn't help :-( >>>>>> >>>>>> >>>>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>>>>> >>>>>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -o mapimageio.o >>>>>> >>>>>> >>>>>> regards, dejan >>>>>> >>>>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >>>>> as you had stated you tried with 1.4 I just wanted to make sure. >>>>> >>>>> ok, last step before opening a ticket: >>>>> >>>>> - revert mapimageio.c to its original state >>>>> - check the output of >>>>> >>>>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY >>>>> -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR >>>>> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >>>>> -DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS >>>>> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ >>>>> -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >>>>> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >>>>> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >>>>> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID >>>>> -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include >>>>> -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include >>>>> -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC >>>>> -I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -M >>>>> >>>>> for the location of png.h >>>>> >>>>> - if png.h comes from /usr/local/include, open a ticket and assign it to me >>>>> >>>>> >>>>>> >>>>>> >>>>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>>>>> >>>>>>> can you try modifying mapimageio.c and replace >>>>>>> #include >>>>>>> by >>>>>>> #include "/usr/local/include/png.h" >>>>>>> >>>>>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>>>>> trouble, make sure this is not the case >>>>>>> >>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>> Hi Thomas >>>>>>>> >>>>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>>>>> >>>>>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>>>>> ||/ Name ? ? ? ? ? Version ? ? ? ?Description >>>>>>>> +++-==============-==============-============================================ >>>>>>>> un ?libpng-dev ? ? ? ? ? ? (no description available) >>>>>>>> ii ?libpng12-0 ? ? 1.2.27-2+lenny PNG library - runtime >>>>>>>> un ?libpng12-0-dev ? ? ? ? (no description available) >>>>>>>> ii ?libpng12-dev ? 1.2.27-2+lenny PNG library - development >>>>>>>> un ?libpng2 ? ? ? ? ? ? ? ? (no description available) >>>>>>>> un ?libpng2-dev ? ? ? ? ? ? (no description available) >>>>>>>> un ?libpng3-dev ? ? ? ? ? ? (no description available) >>>>>>>> >>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>>>>> lrwxrwxrwx 1 root root ? ? 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>>>>> lrwxrwxrwx 1 root root ? ? 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>>>>> lrwxrwxrwx 1 root root ? ? 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>>>>> lrwxrwxrwx 1 root root ? ? 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>>>>> >>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>>>>> -rwxr-xr-x 1 root staff ? ? 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>>>>> -rwxr-xr-x 1 root staff ?597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>>>>> lrwxrwxrwx 1 root staff ? ? ?10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>>>>> >>>>>>>> >>>>>>>> I made configure with --with-png=/usr/local >>>>>>>> >>>>>>>> Make fails in this: >>>>>>>> >>>>>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>>>>> g++ -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local//include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>> collect2: ld returned 1 exit status >>>>>>>> >>>>>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>>>>> >>>>>>>> Thanks very much >>>>>>>> >>>>>>>> regards, dejan >>>>>>>> >>>>>>>> >>>>>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>>>>> >>>>>>>>> Can you check you are linking against the same version libpng library >>>>>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>>>>> installed) >>>>>>>>> >>>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>>>>> >>>>>>>>>> Thanks very much >>>>>>>>>> >>>>>>>>>> regards, dejan >>>>>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>>>>> >>>>>>>>>>> Here is the error I get: >>>>>>>>>>> >>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Here is my configure: >>>>>>>>>>> >>>>>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>>>>> >>>>>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>>>>> >>>>>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>>>>> >>>>>>>>>>> Am I doing something wrong? >>>>>>>>>>> >>>>>>>>>>> Thank you very much for any useful info >>>>>>>>>>> >>>>>>>>>>> regards, dejan_______________________________________________ >>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> mapserver-users mailing list >>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>> >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>> >>>> >> >> > From dejan.gambin at coin.hr Mon Sep 12 03:26:58 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 12:26:58 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> <716018FC-0672-4A4D-AAB0-D95EBEDD24AE@coin.hr> Message-ID: Thanks Thomas, I have suspection something might be related to gd but wasn't sure. Besides this solution, where should I add this piece of code (-L/usr/local/lib) so it get linked properly? dejan On 12. ruj. 2011., at 12:24, thomas bonfort wrote: > Note that even though this may make it compile, you might end up with > runtime errors as you are mixing png versions (gd is linked against > libpng from /usr/lib64) > > you might try not using the system gd version, and compile your own > one using the png version of /usr/local > > On Mon, Sep 12, 2011 at 12:21, thomas bonfort wrote: >> it's using the libpng.so from /usr/lib64 instead of /usr/local >> >> try adding -L/usr/local/lib right after "-o shp2img.o" >> >> 2011/9/12 Dejan Gambin : >>> Is this ok? >>> >>> coin:/home/dgambin/mapserver-6.0.1# g++ -g -t -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local/lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local/lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>> /usr/bin/ld: mode elf_x86_64 >>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crt1.o >>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crti.o >>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtbegin.o >>> shp2img.o >>> (./libmapserver.a)mapstring.o >>> (./libmapserver.a)mapfile.o >>> (./libmapserver.a)maputil.o >>> (./libmapserver.a)mapscale.o >>> (./libmapserver.a)mapquery.o >>> (./libmapserver.a)maplabel.o >>> (./libmapserver.a)maperror.o >>> (./libmapserver.a)mapprimitive.o >>> (./libmapserver.a)mapproject.o >>> (./libmapserver.a)mapogr.o >>> (./libmapserver.a)maplayer.o >>> (./libmapserver.a)maporaclespatial.o >>> (./libmapserver.a)mapdraw.o >>> (./libmapserver.a)mapoutput.o >>> (./libmapserver.a)mapgdal.o >>> (./libmapserver.a)mapimagemap.o >>> (./libmapserver.a)mapows.o >>> (./libmapserver.a)mapwfs.o >>> (./libmapserver.a)mapwfs11.o >>> (./libmapserver.a)mapwfslayer.o >>> (./libmapserver.a)maphttp.o >>> (./libmapserver.a)mapjoin.o >>> (./libmapserver.a)mapgraticule.o >>> (./libmapserver.a)mapcopy.o >>> (./libmapserver.a)mapogcfilter.o >>> (./libmapserver.a)maptime.o >>> (./libmapserver.a)cgiutil.o >>> (./libmapserver.a)maprasterquery.o >>> (./libmapserver.a)mapobject.o >>> (./libmapserver.a)mapio.o >>> (./libmapserver.a)mappool.o >>> (./libmapserver.a)mapregex.o >>> (./libmapserver.a)mappluginlayer.o >>> (./libmapserver.a)mappostgresql.o >>> (./libmapserver.a)mapcrypto.o >>> (./libmapserver.a)mapowscommon.o >>> (./libmapserver.a)maplibxml2.o >>> (./libmapserver.a)mapdebug.o >>> >>> >>> (./libmapserver.a)mapchart.o >>> (./libmapserver.a)mapkml.o >>> (./libmapserver.a)mapkmlrenderer.o >>> (./libmapserver.a)mapogroutput.o >>> (./libmapserver.a)mapogcfiltercommon.o >>> (./libmapserver.a)mapunion.o >>> (./libmapserver.a)mapcluster.o >>> (./libmapserver.a)mapdummyrenderer.o >>> (./libmapserver.a)mapogl.o >>> (./libmapserver.a)mapimageio.o >>> (./libmapserver.a)mapcairo.o >>> (./libmapserver.a)maprendering.o >>> (./libmapserver.a)mapgeomtransform.o >>> (./libmapserver.a)mapquantization.o >>> (./libmapserver.a)maptemplate.o >>> (./libmapserver.a)mapbits.o >>> (./libmapserver.a)maphash.o >>> (./libmapserver.a)mapshape.o >>> (./libmapserver.a)mapxbase.o >>> (./libmapserver.a)mapparser.o >>> (./libmapserver.a)maplexer.o >>> (./libmapserver.a)maptree.o >>> (./libmapserver.a)mapsearch.o >>> (./libmapserver.a)mapsymbol.o >>> (./libmapserver.a)maplegend.o >>> (./libmapserver.a)mapraster.o >>> (./libmapserver.a)mapsde.o >>> (./libmapserver.a)mappostgis.o >>> (./libmapserver.a)mapresample.o >>> (./libmapserver.a)mapwms.o >>> (./libmapserver.a)mapwmslayer.o >>> (./libmapserver.a)mapgml.o >>> (./libmapserver.a)mapprojhack.o >>> (./libmapserver.a)mapgd.o >>> (./libmapserver.a)mapagg.o >>> (./libmapserver.a)mapcontext.o >>> (./libmapserver.a)mapdrawgdal.o >>> (./libmapserver.a)mapogcsld.o >>> (./libmapserver.a)mapcpl.o >>> (./libmapserver.a)mapgeos.o >>> (./libmapserver.a)classobject.o >>> (./libmapserver.a)maptclutf.o >>> (./libmapserver.a)clipper.o >>> (./libmapserver.a)agg_curves.o >>> (./libmapserver.a)agg_vcgen_contour.o >>> (./libmapserver.a)agg_vcgen_dash.o >>> (./libmapserver.a)agg_vcgen_stroke.o >>> (./libmapserver.a)agg_line_aa_basics.o >>> (./libmapserver.a)agg_embedded_raster_fonts.o >>> (./libmapserver.a)agg_trans_affine.o >>> (./libmapserver.a)agg_font_freetype.o >>> (./libmapserver.a)mapgeomutil.o >>> (./libmapserver.a)agg_arc.o >>> -lfreetype (/usr/lib64/libfreetype.so) >>> -lz (/usr/lib64/libz.so) >>> -lgd (/usr/lib64/libgd.so) >>> -lgd (/usr/lib64/libgd.so) >>> -ljpeg (/usr/lib64/libjpeg.so) >>> -lfreetype (/usr/lib64/libfreetype.so) >>> -lz (/usr/lib64/libz.so) >>> -lpng (/usr/lib64/libpng.so) >>> -lz (/usr/lib64/libz.so) >>> -lXpm (/usr/lib64/libXpm.so) >>> -lX11 (/usr/lib64/libX11.so) >>> -lexpat (/usr/lib64/libexpat.so) >>> -lproj (/usr/lib64/libproj.so) >>> -ljpeg (/usr/lib64/libjpeg.so) >>> -lpng (/usr/lib64/libpng.so) >>> -lgif (/usr/lib64/libgif.so) >>> -lgdal (/usr/local/lib/libgdal.so) >>> -lpq (/usr/lib64/libpq.so) >>> -lmysqlclient (/usr/lib64/libmysqlclient.so) >>> -lmysqlclient (/usr/lib64/libmysqlclient.so) >>> -lcurl (/usr/lib64/libcurl.so) >>> -lz (/usr/lib64/libz.so) >>> -lxml2 (/usr/lib64/libxml2.so) >>> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >>> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >>> -lm (/usr/lib64/libm.so) >>> /lib/libc.so.6 >>> (/usr/lib/libc_nonshared.a)elf-init.oS >>> (/usr/lib/libc_nonshared.a)stat.oS >>> /lib/ld-linux-x86-64.so.2 >>> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >>> /lib/libc.so.6 >>> /lib/ld-linux-x86-64.so.2 >>> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtend.o >>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crtn.o >>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>> /usr/bin/ld: link errors found, deleting executable `shp2img' >>> collect2: ld returned 1 exit status >>> >>> >>> >>> On 12. ruj. 2011., at 12:10, thomas bonfort wrote: >>> >>>> One last check: can you run the linker command with the "-t" option >>>> and post the output >>>> >>>> 2011/9/12 Dejan Gambin : >>>>> Here is the ticket I created: >>>>> >>>>> http://trac.osgeo.org/mapserver/ticket/4019 >>>>> >>>>> regards, dejan >>>>> On 12. ruj. 2011., at 11:45, thomas bonfort wrote: >>>>> >>>>>> 2011/9/12 Dejan Gambin : >>>>>>> It doesn't help :-( >>>>>>> >>>>>>> >>>>>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>>>>>> >>>>>>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 mapimageio.c -o mapimageio.o >>>>>>> >>>>>>> >>>>>>> regards, dejan >>>>>>> >>>>>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >>>>>> as you had stated you tried with 1.4 I just wanted to make sure. >>>>>> >>>>>> ok, last step before opening a ticket: >>>>>> >>>>>> - revert mapimageio.c to its original state >>>>>> - check the output of >>>>>> >>>>>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY >>>>>> -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR >>>>>> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >>>>>> -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS >>>>>> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ >>>>>> -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >>>>>> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >>>>>> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >>>>>> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID >>>>>> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include >>>>>> -Irenderers/agg/include -I/usr/include -I/usr/local/include >>>>>> -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC >>>>>> -I/usr/include -I/usr/include/libxml2 mapimageio.c -M >>>>>> >>>>>> for the location of png.h >>>>>> >>>>>> - if png.h comes from /usr/local/include, open a ticket and assign it to me >>>>>> >>>>>> >>>>>>> >>>>>>> >>>>>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>>>>>> >>>>>>>> can you try modifying mapimageio.c and replace >>>>>>>> #include >>>>>>>> by >>>>>>>> #include "/usr/local/include/png.h" >>>>>>>> >>>>>>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>>>>>> trouble, make sure this is not the case >>>>>>>> >>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>> Hi Thomas >>>>>>>>> >>>>>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>>>>>> >>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>>>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>>>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>>>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>>>>>> ||/ Name Version Description >>>>>>>>> +++-==============-==============-============================================ >>>>>>>>> un libpng-dev (no description available) >>>>>>>>> ii libpng12-0 1.2.27-2+lenny PNG library - runtime >>>>>>>>> un libpng12-0-dev (no description available) >>>>>>>>> ii libpng12-dev 1.2.27-2+lenny PNG library - development >>>>>>>>> un libpng2 (no description available) >>>>>>>>> un libpng2-dev (no description available) >>>>>>>>> un libpng3-dev (no description available) >>>>>>>>> >>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>>>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>>>>>> lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>>>>>> lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>>>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>>>>>> lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>>>>>> lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>>>>>> >>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>>>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>>>>>> -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>>>>>> -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>>>>>> lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>>>>>> >>>>>>>>> >>>>>>>>> I made configure with --with-png=/usr/local >>>>>>>>> >>>>>>>>> Make fails in this: >>>>>>>>> >>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>>>>>> g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>> >>>>>>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>>>>>> >>>>>>>>> Thanks very much >>>>>>>>> >>>>>>>>> regards, dejan >>>>>>>>> >>>>>>>>> >>>>>>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>>>>>> >>>>>>>>>> Can you check you are linking against the same version libpng library >>>>>>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>>>>>> installed) >>>>>>>>>> >>>>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>>>>>> >>>>>>>>>>> Thanks very much >>>>>>>>>>> >>>>>>>>>>> regards, dejan >>>>>>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>>>>>> >>>>>>>>>>>> Here is the error I get: >>>>>>>>>>>> >>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Here is my configure: >>>>>>>>>>>> >>>>>>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>>>>>> >>>>>>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>>>>>> >>>>>>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>>>>>> >>>>>>>>>>>> Am I doing something wrong? >>>>>>>>>>>> >>>>>>>>>>>> Thank you very much for any useful info >>>>>>>>>>>> >>>>>>>>>>>> regards, dejan_______________________________________________ >>>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>> >>> >> From thomas.bonfort at gmail.com Mon Sep 12 03:29:59 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 12:29:59 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> <716018FC-0672-4A4D-AAB0-D95EBEDD24AE@coin.hr> Message-ID: don't do that. recompile gd using the /usr/local libpng and reconfigure mapserver with --with-gd=/usr/local regards, thomas 2011/9/12 Dejan Gambin : > Thanks Thomas, > > I have suspection something might be related to gd but wasn't sure. Besides this solution, where should I add this piece of code (-L/usr/local/lib) so it get linked properly? > > dejan > On 12. ruj. 2011., at 12:24, thomas bonfort wrote: > >> Note that even though this may make it compile, you might end up with >> runtime errors as you are mixing png versions (gd is linked against >> libpng from /usr/lib64) >> >> you might try not using the system gd version, and compile your own >> one using the png version of /usr/local >> >> On Mon, Sep 12, 2011 at 12:21, thomas bonfort wrote: >>> it's using the libpng.so from /usr/lib64 instead of /usr/local >>> >>> try adding -L/usr/local/lib right after "-o shp2img.o" >>> >>> 2011/9/12 Dejan Gambin : >>>> Is this ok? >>>> >>>> coin:/home/dgambin/mapserver-6.0.1# g++ -g -t -fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local/lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local/lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >>>> /usr/bin/ld: mode elf_x86_64 >>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crt1.o >>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crti.o >>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtbegin.o >>>> shp2img.o >>>> (./libmapserver.a)mapstring.o >>>> (./libmapserver.a)mapfile.o >>>> (./libmapserver.a)maputil.o >>>> (./libmapserver.a)mapscale.o >>>> (./libmapserver.a)mapquery.o >>>> (./libmapserver.a)maplabel.o >>>> (./libmapserver.a)maperror.o >>>> (./libmapserver.a)mapprimitive.o >>>> (./libmapserver.a)mapproject.o >>>> (./libmapserver.a)mapogr.o >>>> (./libmapserver.a)maplayer.o >>>> (./libmapserver.a)maporaclespatial.o >>>> (./libmapserver.a)mapdraw.o >>>> (./libmapserver.a)mapoutput.o >>>> (./libmapserver.a)mapgdal.o >>>> (./libmapserver.a)mapimagemap.o >>>> (./libmapserver.a)mapows.o >>>> (./libmapserver.a)mapwfs.o >>>> (./libmapserver.a)mapwfs11.o >>>> (./libmapserver.a)mapwfslayer.o >>>> (./libmapserver.a)maphttp.o >>>> (./libmapserver.a)mapjoin.o >>>> (./libmapserver.a)mapgraticule.o >>>> (./libmapserver.a)mapcopy.o >>>> (./libmapserver.a)mapogcfilter.o >>>> (./libmapserver.a)maptime.o >>>> (./libmapserver.a)cgiutil.o >>>> (./libmapserver.a)maprasterquery.o >>>> (./libmapserver.a)mapobject.o >>>> (./libmapserver.a)mapio.o >>>> (./libmapserver.a)mappool.o >>>> (./libmapserver.a)mapregex.o >>>> (./libmapserver.a)mappluginlayer.o >>>> (./libmapserver.a)mappostgresql.o >>>> (./libmapserver.a)mapcrypto.o >>>> (./libmapserver.a)mapowscommon.o >>>> (./libmapserver.a)maplibxml2.o >>>> (./libmapserver.a)mapdebug.o >>>> >>>> >>>> (./libmapserver.a)mapchart.o >>>> (./libmapserver.a)mapkml.o >>>> (./libmapserver.a)mapkmlrenderer.o >>>> (./libmapserver.a)mapogroutput.o >>>> (./libmapserver.a)mapogcfiltercommon.o >>>> (./libmapserver.a)mapunion.o >>>> (./libmapserver.a)mapcluster.o >>>> (./libmapserver.a)mapdummyrenderer.o >>>> (./libmapserver.a)mapogl.o >>>> (./libmapserver.a)mapimageio.o >>>> (./libmapserver.a)mapcairo.o >>>> (./libmapserver.a)maprendering.o >>>> (./libmapserver.a)mapgeomtransform.o >>>> (./libmapserver.a)mapquantization.o >>>> (./libmapserver.a)maptemplate.o >>>> (./libmapserver.a)mapbits.o >>>> (./libmapserver.a)maphash.o >>>> (./libmapserver.a)mapshape.o >>>> (./libmapserver.a)mapxbase.o >>>> (./libmapserver.a)mapparser.o >>>> (./libmapserver.a)maplexer.o >>>> (./libmapserver.a)maptree.o >>>> (./libmapserver.a)mapsearch.o >>>> (./libmapserver.a)mapsymbol.o >>>> (./libmapserver.a)maplegend.o >>>> (./libmapserver.a)mapraster.o >>>> (./libmapserver.a)mapsde.o >>>> (./libmapserver.a)mappostgis.o >>>> (./libmapserver.a)mapresample.o >>>> (./libmapserver.a)mapwms.o >>>> (./libmapserver.a)mapwmslayer.o >>>> (./libmapserver.a)mapgml.o >>>> (./libmapserver.a)mapprojhack.o >>>> (./libmapserver.a)mapgd.o >>>> (./libmapserver.a)mapagg.o >>>> (./libmapserver.a)mapcontext.o >>>> (./libmapserver.a)mapdrawgdal.o >>>> (./libmapserver.a)mapogcsld.o >>>> (./libmapserver.a)mapcpl.o >>>> (./libmapserver.a)mapgeos.o >>>> (./libmapserver.a)classobject.o >>>> (./libmapserver.a)maptclutf.o >>>> (./libmapserver.a)clipper.o >>>> (./libmapserver.a)agg_curves.o >>>> (./libmapserver.a)agg_vcgen_contour.o >>>> (./libmapserver.a)agg_vcgen_dash.o >>>> (./libmapserver.a)agg_vcgen_stroke.o >>>> (./libmapserver.a)agg_line_aa_basics.o >>>> (./libmapserver.a)agg_embedded_raster_fonts.o >>>> (./libmapserver.a)agg_trans_affine.o >>>> (./libmapserver.a)agg_font_freetype.o >>>> (./libmapserver.a)mapgeomutil.o >>>> (./libmapserver.a)agg_arc.o >>>> -lfreetype (/usr/lib64/libfreetype.so) >>>> -lz (/usr/lib64/libz.so) >>>> -lgd (/usr/lib64/libgd.so) >>>> -lgd (/usr/lib64/libgd.so) >>>> -ljpeg (/usr/lib64/libjpeg.so) >>>> -lfreetype (/usr/lib64/libfreetype.so) >>>> -lz (/usr/lib64/libz.so) >>>> -lpng (/usr/lib64/libpng.so) >>>> -lz (/usr/lib64/libz.so) >>>> -lXpm (/usr/lib64/libXpm.so) >>>> -lX11 (/usr/lib64/libX11.so) >>>> -lexpat (/usr/lib64/libexpat.so) >>>> -lproj (/usr/lib64/libproj.so) >>>> -ljpeg (/usr/lib64/libjpeg.so) >>>> -lpng (/usr/lib64/libpng.so) >>>> -lgif (/usr/lib64/libgif.so) >>>> -lgdal (/usr/local/lib/libgdal.so) >>>> -lpq (/usr/lib64/libpq.so) >>>> -lmysqlclient (/usr/lib64/libmysqlclient.so) >>>> -lmysqlclient (/usr/lib64/libmysqlclient.so) >>>> -lcurl (/usr/lib64/libcurl.so) >>>> -lz (/usr/lib64/libz.so) >>>> -lxml2 (/usr/lib64/libxml2.so) >>>> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >>>> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >>>> -lm (/usr/lib64/libm.so) >>>> /lib/libc.so.6 >>>> (/usr/lib/libc_nonshared.a)elf-init.oS >>>> (/usr/lib/libc_nonshared.a)stat.oS >>>> /lib/ld-linux-x86-64.so.2 >>>> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >>>> /lib/libc.so.6 >>>> /lib/ld-linux-x86-64.so.2 >>>> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtend.o >>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crtn.o >>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>> /usr/bin/ld: link errors found, deleting executable `shp2img' >>>> collect2: ld returned 1 exit status >>>> >>>> >>>> >>>> On 12. ruj. 2011., at 12:10, thomas bonfort wrote: >>>> >>>>> One last check: can you run the linker command with the "-t" option >>>>> and post the output >>>>> >>>>> 2011/9/12 Dejan Gambin : >>>>>> Here is the ticket I created: >>>>>> >>>>>> http://trac.osgeo.org/mapserver/ticket/4019 >>>>>> >>>>>> regards, dejan >>>>>> On 12. ruj. 2011., at 11:45, thomas bonfort wrote: >>>>>> >>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>> It doesn't help :-( >>>>>>>> >>>>>>>> >>>>>>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>>>>>>> >>>>>>>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -o mapimageio.o >>>>>>>> >>>>>>>> >>>>>>>> regards, dejan >>>>>>>> >>>>>>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >>>>>>> as you had stated you tried with 1.4 I just wanted to make sure. >>>>>>> >>>>>>> ok, last step before opening a ticket: >>>>>>> >>>>>>> - revert mapimageio.c to its original state >>>>>>> - check the output of >>>>>>> >>>>>>> gcc -c -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY >>>>>>> -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR >>>>>>> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >>>>>>> -DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS >>>>>>> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ >>>>>>> -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >>>>>>> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >>>>>>> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >>>>>>> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID >>>>>>> -I/usr/include/freetype2 ?-I/usr/local/include ? -I/usr/include >>>>>>> -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include >>>>>>> -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC >>>>>>> -I/usr/include ? -I/usr/include/libxml2 ? mapimageio.c -M >>>>>>> >>>>>>> for the location of png.h >>>>>>> >>>>>>> - if png.h comes from /usr/local/include, open a ticket and assign it to me >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>>>>>>> >>>>>>>>> can you try modifying mapimageio.c and replace >>>>>>>>> #include >>>>>>>>> by >>>>>>>>> #include "/usr/local/include/png.h" >>>>>>>>> >>>>>>>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>>>>>>> trouble, make sure this is not the case >>>>>>>>> >>>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>>> Hi Thomas >>>>>>>>>> >>>>>>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>>>>>>> >>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>>>>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>>>>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>>>>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>>>>>>> ||/ Name ? ? ? ? ? Version ? ? ? ?Description >>>>>>>>>> +++-==============-==============-============================================ >>>>>>>>>> un ?libpng-dev ? ? ? ? ? ? (no description available) >>>>>>>>>> ii ?libpng12-0 ? ? 1.2.27-2+lenny PNG library - runtime >>>>>>>>>> un ?libpng12-0-dev ? ? ? ? (no description available) >>>>>>>>>> ii ?libpng12-dev ? 1.2.27-2+lenny PNG library - development >>>>>>>>>> un ?libpng2 ? ? ? ? ? ? ? ? (no description available) >>>>>>>>>> un ?libpng2-dev ? ? ? ? ? ? (no description available) >>>>>>>>>> un ?libpng3-dev ? ? ? ? ? ? (no description available) >>>>>>>>>> >>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>>>>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>>>>>>> lrwxrwxrwx 1 root root ? ? 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>>>>>>> lrwxrwxrwx 1 root root ? ? 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>>>>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>>>>>>> lrwxrwxrwx 1 root root ? ? 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>>>>>>> lrwxrwxrwx 1 root root ? ? 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>>>>>>> >>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>>>>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>>>>>>> -rwxr-xr-x 1 root staff ? ? 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>>>>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>>>>>>> lrwxrwxrwx 1 root staff ? ? ?18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>>>>>>> -rwxr-xr-x 1 root staff ?597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>>>>>>> lrwxrwxrwx 1 root staff ? ? ?10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>>>>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>>>>>>> lrwxrwxrwx 1 root staff ? ? ?11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> I made configure with --with-png=/usr/local >>>>>>>>>> >>>>>>>>>> Make fails in this: >>>>>>>>>> >>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>>>>>>> g++ -g ?-fPIC -Wall ? ? -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR ? ? ? ? ? -DUSE_WMS_LYR -DUSE_WFS_LYR ?-DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML ?-DUSE_WFS_SVR -DUSE_WMS_SVR ?-DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR ? -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS ? ?-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE ? -DDISABLE_CVSID -I/usr/include/freetype2 ?-I/usr/local//include ? -I/usr/include -Irenderers/agg/include ? ?-I/usr/include ? -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql ?-DBIG_JOINS=1 -fPIC ? ?-I/usr/include ? -I/usr/include/libxml2 ? shp2img.o ?-L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 ?-lexpat ? -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif ?-L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl ? ?-L/usr/lib -lc ? ?-lz -lxml2 ?-lm -lstdc++ ? ?-o shp2img >>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>>> >>>>>>>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>>>>>>> >>>>>>>>>> Thanks very much >>>>>>>>>> >>>>>>>>>> regards, dejan >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>>>>>>> >>>>>>>>>>> Can you check you are linking against the same version libpng library >>>>>>>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>>>>>>> installed) >>>>>>>>>>> >>>>>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>>>>>>> >>>>>>>>>>>> Thanks very much >>>>>>>>>>>> >>>>>>>>>>>> regards, dejan >>>>>>>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi, >>>>>>>>>>>>> >>>>>>>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>>>>>>> >>>>>>>>>>>>> Here is the error I get: >>>>>>>>>>>>> >>>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Here is my configure: >>>>>>>>>>>>> >>>>>>>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>>>>>>> >>>>>>>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>>>>>>> >>>>>>>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>>>>>>> >>>>>>>>>>>>> Am I doing something wrong? >>>>>>>>>>>>> >>>>>>>>>>>>> Thank you very much for any useful info >>>>>>>>>>>>> >>>>>>>>>>>>> regards, dejan_______________________________________________ >>>>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>> >>>> >>> > > From dejan.gambin at coin.hr Mon Sep 12 03:30:34 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 12:30:34 +0200 Subject: [mapserver-users] Problem compiling MapServer 6.0.1 with libpng In-Reply-To: References: <29505336-FCAD-426C-ACB9-C2393D2D3138@coin.hr> <90B86120-83DB-4B8F-8C57-C9BF56942913@coin.hr> <0C61150E-7DC1-4B86-8A82-051D50ECF695@coin.hr> <83A9CF53-9721-4B07-8BAD-4A6A3336E7F4@coin.hr> <03CC1536-7CBD-4C36-A8B5-AA06B565CC69@coin.hr> <716018FC-0672-4A4D-AAB0-D95EBEDD24AE@coin.hr> Message-ID: OK thanks very much regards, dejan On 12. ruj. 2011., at 12:29, thomas bonfort wrote: > don't do that. recompile gd using the /usr/local libpng and > reconfigure mapserver with --with-gd=/usr/local > > regards, > thomas > > > 2011/9/12 Dejan Gambin : >> Thanks Thomas, >> >> I have suspection something might be related to gd but wasn't sure. Besides this solution, where should I add this piece of code (-L/usr/local/lib) so it get linked properly? >> >> dejan >> On 12. ruj. 2011., at 12:24, thomas bonfort wrote: >> >>> Note that even though this may make it compile, you might end up with >>> runtime errors as you are mixing png versions (gd is linked against >>> libpng from /usr/lib64) >>> >>> you might try not using the system gd version, and compile your own >>> one using the png version of /usr/local >>> >>> On Mon, Sep 12, 2011 at 12:21, thomas bonfort wrote: >>>> it's using the libpng.so from /usr/lib64 instead of /usr/local >>>> >>>> try adding -L/usr/local/lib right after "-o shp2img.o" >>>> >>>> 2011/9/12 Dejan Gambin : >>>>> Is this ok? >>>>> >>>>> coin:/home/dgambin/mapserver-6.0.1# g++ -g -t -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local/lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local/lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>>>> /usr/bin/ld: mode elf_x86_64 >>>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crt1.o >>>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crti.o >>>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtbegin.o >>>>> shp2img.o >>>>> (./libmapserver.a)mapstring.o >>>>> (./libmapserver.a)mapfile.o >>>>> (./libmapserver.a)maputil.o >>>>> (./libmapserver.a)mapscale.o >>>>> (./libmapserver.a)mapquery.o >>>>> (./libmapserver.a)maplabel.o >>>>> (./libmapserver.a)maperror.o >>>>> (./libmapserver.a)mapprimitive.o >>>>> (./libmapserver.a)mapproject.o >>>>> (./libmapserver.a)mapogr.o >>>>> (./libmapserver.a)maplayer.o >>>>> (./libmapserver.a)maporaclespatial.o >>>>> (./libmapserver.a)mapdraw.o >>>>> (./libmapserver.a)mapoutput.o >>>>> (./libmapserver.a)mapgdal.o >>>>> (./libmapserver.a)mapimagemap.o >>>>> (./libmapserver.a)mapows.o >>>>> (./libmapserver.a)mapwfs.o >>>>> (./libmapserver.a)mapwfs11.o >>>>> (./libmapserver.a)mapwfslayer.o >>>>> (./libmapserver.a)maphttp.o >>>>> (./libmapserver.a)mapjoin.o >>>>> (./libmapserver.a)mapgraticule.o >>>>> (./libmapserver.a)mapcopy.o >>>>> (./libmapserver.a)mapogcfilter.o >>>>> (./libmapserver.a)maptime.o >>>>> (./libmapserver.a)cgiutil.o >>>>> (./libmapserver.a)maprasterquery.o >>>>> (./libmapserver.a)mapobject.o >>>>> (./libmapserver.a)mapio.o >>>>> (./libmapserver.a)mappool.o >>>>> (./libmapserver.a)mapregex.o >>>>> (./libmapserver.a)mappluginlayer.o >>>>> (./libmapserver.a)mappostgresql.o >>>>> (./libmapserver.a)mapcrypto.o >>>>> (./libmapserver.a)mapowscommon.o >>>>> (./libmapserver.a)maplibxml2.o >>>>> (./libmapserver.a)mapdebug.o >>>>> >>>>> >>>>> (./libmapserver.a)mapchart.o >>>>> (./libmapserver.a)mapkml.o >>>>> (./libmapserver.a)mapkmlrenderer.o >>>>> (./libmapserver.a)mapogroutput.o >>>>> (./libmapserver.a)mapogcfiltercommon.o >>>>> (./libmapserver.a)mapunion.o >>>>> (./libmapserver.a)mapcluster.o >>>>> (./libmapserver.a)mapdummyrenderer.o >>>>> (./libmapserver.a)mapogl.o >>>>> (./libmapserver.a)mapimageio.o >>>>> (./libmapserver.a)mapcairo.o >>>>> (./libmapserver.a)maprendering.o >>>>> (./libmapserver.a)mapgeomtransform.o >>>>> (./libmapserver.a)mapquantization.o >>>>> (./libmapserver.a)maptemplate.o >>>>> (./libmapserver.a)mapbits.o >>>>> (./libmapserver.a)maphash.o >>>>> (./libmapserver.a)mapshape.o >>>>> (./libmapserver.a)mapxbase.o >>>>> (./libmapserver.a)mapparser.o >>>>> (./libmapserver.a)maplexer.o >>>>> (./libmapserver.a)maptree.o >>>>> (./libmapserver.a)mapsearch.o >>>>> (./libmapserver.a)mapsymbol.o >>>>> (./libmapserver.a)maplegend.o >>>>> (./libmapserver.a)mapraster.o >>>>> (./libmapserver.a)mapsde.o >>>>> (./libmapserver.a)mappostgis.o >>>>> (./libmapserver.a)mapresample.o >>>>> (./libmapserver.a)mapwms.o >>>>> (./libmapserver.a)mapwmslayer.o >>>>> (./libmapserver.a)mapgml.o >>>>> (./libmapserver.a)mapprojhack.o >>>>> (./libmapserver.a)mapgd.o >>>>> (./libmapserver.a)mapagg.o >>>>> (./libmapserver.a)mapcontext.o >>>>> (./libmapserver.a)mapdrawgdal.o >>>>> (./libmapserver.a)mapogcsld.o >>>>> (./libmapserver.a)mapcpl.o >>>>> (./libmapserver.a)mapgeos.o >>>>> (./libmapserver.a)classobject.o >>>>> (./libmapserver.a)maptclutf.o >>>>> (./libmapserver.a)clipper.o >>>>> (./libmapserver.a)agg_curves.o >>>>> (./libmapserver.a)agg_vcgen_contour.o >>>>> (./libmapserver.a)agg_vcgen_dash.o >>>>> (./libmapserver.a)agg_vcgen_stroke.o >>>>> (./libmapserver.a)agg_line_aa_basics.o >>>>> (./libmapserver.a)agg_embedded_raster_fonts.o >>>>> (./libmapserver.a)agg_trans_affine.o >>>>> (./libmapserver.a)agg_font_freetype.o >>>>> (./libmapserver.a)mapgeomutil.o >>>>> (./libmapserver.a)agg_arc.o >>>>> -lfreetype (/usr/lib64/libfreetype.so) >>>>> -lz (/usr/lib64/libz.so) >>>>> -lgd (/usr/lib64/libgd.so) >>>>> -lgd (/usr/lib64/libgd.so) >>>>> -ljpeg (/usr/lib64/libjpeg.so) >>>>> -lfreetype (/usr/lib64/libfreetype.so) >>>>> -lz (/usr/lib64/libz.so) >>>>> -lpng (/usr/lib64/libpng.so) >>>>> -lz (/usr/lib64/libz.so) >>>>> -lXpm (/usr/lib64/libXpm.so) >>>>> -lX11 (/usr/lib64/libX11.so) >>>>> -lexpat (/usr/lib64/libexpat.so) >>>>> -lproj (/usr/lib64/libproj.so) >>>>> -ljpeg (/usr/lib64/libjpeg.so) >>>>> -lpng (/usr/lib64/libpng.so) >>>>> -lgif (/usr/lib64/libgif.so) >>>>> -lgdal (/usr/local/lib/libgdal.so) >>>>> -lpq (/usr/lib64/libpq.so) >>>>> -lmysqlclient (/usr/lib64/libmysqlclient.so) >>>>> -lmysqlclient (/usr/lib64/libmysqlclient.so) >>>>> -lcurl (/usr/lib64/libcurl.so) >>>>> -lz (/usr/lib64/libz.so) >>>>> -lxml2 (/usr/lib64/libxml2.so) >>>>> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >>>>> -lstdc++ (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so) >>>>> -lm (/usr/lib64/libm.so) >>>>> /lib/libc.so.6 >>>>> (/usr/lib/libc_nonshared.a)elf-init.oS >>>>> (/usr/lib/libc_nonshared.a)stat.oS >>>>> /lib/ld-linux-x86-64.so.2 >>>>> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >>>>> /lib/libc.so.6 >>>>> /lib/ld-linux-x86-64.so.2 >>>>> -lgcc_s (/usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc_s.so) >>>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/crtend.o >>>>> /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crtn.o >>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>> /usr/bin/ld: link errors found, deleting executable `shp2img' >>>>> collect2: ld returned 1 exit status >>>>> >>>>> >>>>> >>>>> On 12. ruj. 2011., at 12:10, thomas bonfort wrote: >>>>> >>>>>> One last check: can you run the linker command with the "-t" option >>>>>> and post the output >>>>>> >>>>>> 2011/9/12 Dejan Gambin : >>>>>>> Here is the ticket I created: >>>>>>> >>>>>>> http://trac.osgeo.org/mapserver/ticket/4019 >>>>>>> >>>>>>> regards, dejan >>>>>>> On 12. ruj. 2011., at 11:45, thomas bonfort wrote: >>>>>>> >>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>> It doesn't help :-( >>>>>>>>> >>>>>>>>> >>>>>>>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you: >>>>>>>>> >>>>>>>>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 mapimageio.c -o mapimageio.o >>>>>>>>> >>>>>>>>> >>>>>>>>> regards, dejan >>>>>>>>> >>>>>>>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib >>>>>>>> as you had stated you tried with 1.4 I just wanted to make sure. >>>>>>>> >>>>>>>> ok, last step before opening a ticket: >>>>>>>> >>>>>>>> - revert mapimageio.c to its original state >>>>>>>> - check the output of >>>>>>>> >>>>>>>> gcc -c -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY >>>>>>>> -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR >>>>>>>> -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML >>>>>>>> -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS >>>>>>>> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ >>>>>>>> -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG >>>>>>>> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR >>>>>>>> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV >>>>>>>> -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID >>>>>>>> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include >>>>>>>> -Irenderers/agg/include -I/usr/include -I/usr/local/include >>>>>>>> -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC >>>>>>>> -I/usr/include -I/usr/include/libxml2 mapimageio.c -M >>>>>>>> >>>>>>>> for the location of png.h >>>>>>>> >>>>>>>> - if png.h comes from /usr/local/include, open a ticket and assign it to me >>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote: >>>>>>>>> >>>>>>>>>> can you try modifying mapimageio.c and replace >>>>>>>>>> #include >>>>>>>>>> by >>>>>>>>>> #include "/usr/local/include/png.h" >>>>>>>>>> >>>>>>>>>> if you have both png 1.4 and 1.5 in /usr/local, you're asking for >>>>>>>>>> trouble, make sure this is not the case >>>>>>>>>> >>>>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>>>> Hi Thomas >>>>>>>>>>> >>>>>>>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib: >>>>>>>>>>> >>>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ dpkg -l libpng* >>>>>>>>>>> Desired=Unknown/Install/Remove/Purge/Hold >>>>>>>>>>> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend >>>>>>>>>>> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) >>>>>>>>>>> ||/ Name Version Description >>>>>>>>>>> +++-==============-==============-============================================ >>>>>>>>>>> un libpng-dev (no description available) >>>>>>>>>>> ii libpng12-0 1.2.27-2+lenny PNG library - runtime >>>>>>>>>>> un libpng12-0-dev (no description available) >>>>>>>>>>> ii libpng12-dev 1.2.27-2+lenny PNG library - development >>>>>>>>>>> un libpng2 (no description available) >>>>>>>>>>> un libpng2-dev (no description available) >>>>>>>>>>> un libpng3-dev (no description available) >>>>>>>>>>> >>>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng* >>>>>>>>>>> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a >>>>>>>>>>> lrwxrwxrwx 1 root root 18 2011-09-09 13:29 /usr/lib/libpng12.so -> libpng12.so.0.27.0 >>>>>>>>>>> lrwxrwxrwx 1 root root 18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0 >>>>>>>>>>> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0 >>>>>>>>>>> lrwxrwxrwx 1 root root 10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a >>>>>>>>>>> lrwxrwxrwx 1 root root 11 2011-09-09 13:29 /usr/lib/libpng.so -> libpng12.so >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> And I have libpng-1.5.4 installed in /usr/local/lib: >>>>>>>>>>> >>>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng* >>>>>>>>>>> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a >>>>>>>>>>> -rwxr-xr-x 1 root staff 934 2011-09-09 13:09 /usr/local/lib/libpng15.la >>>>>>>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so -> libpng15.so.15.4.0 >>>>>>>>>>> lrwxrwxrwx 1 root staff 18 2011-09-09 13:09 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0 >>>>>>>>>>> -rwxr-xr-x 1 root staff 597897 2011-09-09 13:09 /usr/local/lib/libpng15.so.15.4.0 >>>>>>>>>>> lrwxrwxrwx 1 root staff 10 2011-09-09 13:09 /usr/local/lib/libpng.a -> libpng15.a >>>>>>>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.la -> libpng15.la >>>>>>>>>>> lrwxrwxrwx 1 root staff 11 2011-09-09 13:09 /usr/local/lib/libpng.so -> libpng15.so >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I made configure with --with-png=/usr/local >>>>>>>>>>> >>>>>>>>>>> Make fails in this: >>>>>>>>>>> >>>>>>>>>>> dgambin at coin:~/mapserver-6.0.1$ make >>>>>>>>>>> g++ -g -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -DDISABLE_CVSID -I/usr/include/freetype2 -I/usr/local//include -I/usr/include -Irenderers/agg/include -I/usr/include -I/usr/local/include -I/usr/include/postgresql -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -I/usr/include -I/usr/include/libxml2 shp2img.o -L. -lmapserver -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib -lpng -lz -lXpm -lX11 -lexpat -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib -lpng -lgif -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lmysqlclient -lcurl -L/usr/lib -lc -lz -lxml2 -lm -lstdc++ -o shp2img >>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>>>> >>>>>>>>>>> Is there anything wrong here? I'll send you anything else if needed :-) >>>>>>>>>>> >>>>>>>>>>> Thanks very much >>>>>>>>>>> >>>>>>>>>>> regards, dejan >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 12. ruj. 2011., at 10:31, thomas bonfort wrote: >>>>>>>>>>> >>>>>>>>>>>> Can you check you are linking against the same version libpng library >>>>>>>>>>>> as the png.h header (i.e. check you don't have multiple png versions >>>>>>>>>>>> installed) >>>>>>>>>>>> >>>>>>>>>>>> 2011/9/12 Dejan Gambin : >>>>>>>>>>>>> Hi, >>>>>>>>>>>>> >>>>>>>>>>>>> I am still unable to compi?e mapserver 6.0.1. I can't find this function (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am almost sure I am doing some stupid mistake, but for me seems unsolvable :-( >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks very much >>>>>>>>>>>>> >>>>>>>>>>>>> regards, dejan >>>>>>>>>>>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>> >>>>>>>>>>>>>> After many trials and missings, I am still unable to compile MapServer 6.0.1 (6.0.0 also) on my Debian Lenny machine. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Here is the error I get: >>>>>>>>>>>>>> >>>>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG': >>>>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG': >>>>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>>>> ./libmapserver.a(mapimageio.o): In function `readPNG': >>>>>>>>>>>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to `png_set_longjmp_fn' >>>>>>>>>>>>>> collect2: ld returned 1 exit status >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Here is my configure: >>>>>>>>>>>>>> >>>>>>>>>>>>>> ./configure --with-ogr=/usr/local/bin/gdal-config --with-gdal=/usr/local/bin/gda >>>>>>>>>>>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-curl >>>>>>>>>>>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg --with-freetype=/usr/b >>>>>>>>>>>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config --with- >>>>>>>>>>>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 --with-png=/usr/local >>>>>>>>>>>>>> >>>>>>>>>>>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and put "--with-png=/usr/local" in my configure file. But seems like it doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried without "--with-png=/usr/local" (so it should use system libpng)...nothing >>>>>>>>>>>>>> >>>>>>>>>>>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 1.5.4. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Am I doing something wrong? >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thank you very much for any useful info >>>>>>>>>>>>>> >>>>>>>>>>>>>> regards, dejan_______________________________________________ >>>>>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> mapserver-users mailing list >>>>>>>>>>>>> mapserver-users at lists.osgeo.org >>>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>>> >> >> From sumariva at gmail.com Mon Sep 12 04:59:39 2011 From: sumariva at gmail.com (Cristiano Sumariva) Date: Mon, 12 Sep 2011 08:59:39 -0300 Subject: [mapserver-users] layer data sources more than one In-Reply-To: <84446DEF76453C439E9E97E438E13A63021582@suutari.haapa.mmm.fi> References: <1315789817421-6781936.post@n2.nabble.com> <67BFF6E0-9E7C-4CEC-87C6-983BDD27467E@gmail.com> <84446DEF76453C439E9E97E438E13A63021582@suutari.haapa.mmm.fi> Message-ID: Also there is the LAYER TILEINDEX http://mapserver.org/optimization/tileindex.html#tileindex that may do that you need. Like a virtual mosaic. 2011/9/12 Rahkonen Jukka > Hi, > > You will do it with "ogrtileindex". Read > http://www.mapserver.org/optimization/tileindex.html > > -Jukka Rahkonen- > > Mr. Puneet Kishor wrote: > > > On Sep 11, 2011, at 9:05 PM, JIAJIA WANG wrote: > > >> The data in the shapefile are suburb boundaries, but I got several > > shapefiles, one shapefile for one state. I want a map showing the whole > > country's suburb boundaries. > > That's can be done by defining several layers (one layer reads one > > shapefile) in one mapfile. But actually there are not conflicts between > > these shapefiles. So I want to know is there any way to define only one > > layer and read the data from all these shapefiles. > > > > I am pretty sure (but not 100%) that you can have only one data source > per layer. That said, you could either combine all the shapefiles into a > single countrywide shapefile, or you could create separate layers, and then > create a layer group (I am pretty sure you can group the layers into one... > its been a long time, and I am just coming back to MapServer, so check the > docs). That way, all the different layers for different states will behave > as if they are a single layer. From the docs -- > > GROUP [name] > Name of a group that this layer belongs to. The group name can then be > reference as a regular > layer name in the template files, allowing to do things like turning on > and off a group of > layers at once. > > > > > On Mon, Sep 12, 2011 at 11:17 AM, Mr. Puneet Kishor >wrote: > > > >> > >> On Sep 11, 2011, at 8:10 PM, jjwang wrote: > >> > >>> Hi, > >>> > >>> I know that the DATA statement should be given a data source of the > >> layer. > >>> What if the data comes from multi shapefiles? > >>> Can I give it a list of shapefiles and how to write it? > >>> > >> > >> > >> Generally a LAYER maps to a shapefile or a table in a db. It is hard for > me > >> to imagine how one layer could have data from two or more shapefiles. > >> Perhaps more explanation would help here. > >> > >> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dejan.gambin at coin.hr Mon Sep 12 05:03:53 2011 From: dejan.gambin at coin.hr (Dejan Gambin) Date: Mon, 12 Sep 2011 14:03:53 +0200 Subject: [mapserver-users] GetFeatureInfo using MySQL join Message-ID: Hi, After solving my compile problem (thanks to thomas), I need to do GetFeatureInfo to a shape layer joined to MySQL table (non-spatial join). I compiled MapServer with MySQL support and everything seems ok, but "mapserv -v" doesn't return "INPUT=MYSQL". Is it supposed to anyway? Or it is enough to be compiled with gdal/ogr that supports MySQL? Because - when I do this: ogrinfo -sql "SELECT * FROM my LEFT JOIN 'MYSQL:gis,host=localhost,user=gis,password=gis'.katastar_vodnjan ON my.KO_KC=katastar_vodnjan.broj_ko_kc" /var/www/data/vodnjan/my.shp I get all the attributes from shape (dbf) and MySQL, so everything seems fine But using thi: LAYER # katastar vodnjan poligoni NAME "mylayer" STATUS ON CONNECTIONTYPE ogr CONNECTION "/var/www/data/vodnjan/my.shp" DATA "SELECT * FROM my LEFT JOIN 'MYSQL:gis,host=localhost,user=gis,password=gis'.katastar_vodnjan ON my.KO_KC=katastar_vodnjan.broj_ko_kc" TYPE POLYGON ... I don't get any information with GetFeatureInfo. The request is like: http://www.coin.hr/cgi-bin/mywms61?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=5403800,4981350,5403980,4981460&SRS=EPSG:31275&WIDTH=400&HEIGHT=300&LAYERS=katastar_vodnjan_poligon&STYLES=&FORMAT=image/png&TRANSPARENT=true&QUERY_LAYERS=mylayer&INFO_FORMAT=gml&X=200&Y=100 Using the same request with regular mapfile: LAYER # katastar vodnjan poligoni NAME "mylayer" STATUS ON DATA "my" TYPE POLYGON ... returns one feature and its attributes from the dbf (tha is OK) I have also tried with JOIN clause in LAYER part, but this doesn't work either. Do I have to use owf? Am I doing something wrong? regards, dejan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sumariva at gmail.com Mon Sep 12 05:28:52 2011 From: sumariva at gmail.com (Cristiano Sumariva) Date: Mon, 12 Sep 2011 09:28:52 -0300 Subject: [mapserver-users] Re: interesting thread on JSON-ish output from MapServer In-Reply-To: References: <18179822-5247-4741-9DBC-7FDD61F2A5F6@gmail.com> <4F4D8C1A-FA75-4CBD-B14B-FC35EBEDB1B5@gmail.com> Message-ID: Why do this the hard way? Mapserver now can generate KML output. Just create a KMLLayer on google maps API an it will do all for you. The KMLlayer do the ajax request for you, setup the click handler on Map, setup the infoWindow events all in a two line call, support all simple features geometry types for vector data. On mapserver side, setup the kml layer, bind an attribute to the kml name attribute that will de the infowWindow header. For additional text on info window you can instruct mapserver to assembly an HTML template to the kml description attribute. ? Can someone put an layer example for this case ? Check out KML sample builder for details http://kml-samples.googlecode.com/svn/trunk/interactive/index.html and Mapserver http://mapserver.org/output/kml_output.html and Maps API KML http://code.google.com/intl/pt-BR/apis/maps/documentation/javascript/reference.html#KmlLayer If mapserver options do not meet your requires is very easy to create KML without Mapserver at all. The problem now is turning into to force mapserver do what google requires. If mapserver is becoming hard to do it, you make your logic without it. 2011/9/12 Steve Lime > The forward could be to a JavaScript file with an empty object. Browser > should follow ok... > > Sent from my iPad > > On Sep 11, 2011, at 4:58 PM, Mr. Puneet Kishor > wrote: > > > > > On Sep 11, 2011, at 4:18 PM, Steve Lime wrote: > > > >> You could try the web object and the empty parameter. > > > > > > From TFM > > > > EMPTY [url] > > URL to forward users to if a query fails. If not defined the value for > ERROR is used. > > > > > > Hmmmm... I am not sure I want to forward the user to any URL. This is all > Ajax, so I have to receive an empty data structure. I guess I could try > exploiting the jQuery `$.ajax({ error: function() { popup an infowindow with > regrets message } });` > > > > > > > > > >> > >> Sent from my iPad > >> > >> On Sep 11, 2011, at 1:33 PM, "Mr. Puneet Kishor" > wrote: > >> > >>> > >>> On Sep 11, 2011, at 12:46 PM, Steve Lime wrote: > >>> > >>>> > >>>> > >>>> Sent from my iPad > >>>> > >>>> On Sep 11, 2011, at 9:36 AM, Mr. Puneet Kishor > wrote: > >>>> > >>>>> Partial solution (phew, for now), but other problems persist -- > >>>>> > >>> > >>> .. > >>> > >>>>> > >>>>> > >>>>> One issue I have not solved -- if no result is found, MapServer sends > back the following -- > >>>>> > >>>>> ---- > >>>>> > >>>>> > >>>>> MapServer Message > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> msQueryByPoint(): Search returned no results. No matching record(s) > found. > >>>>> > >>>>> > >>>>> ---- > >>>>> > >>>>> > >>>>> Well, that gums up the works. I really want MapServer to just send an > empty JSON structure, something like foo({}). Suggestions on how I can > prevent this HTML message from MapServer, and force it to use the template > instead? > >>> > >>> > >>> Any suggestion for the above? That is, force MapServer to not send back > an error message of the above kind. Instead, send back an empty JSON > structure based on the template? > >>> > >>> > >>> Puneet. > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From flavio at tydac.ch Mon Sep 12 07:06:38 2011 From: flavio at tydac.ch (Flavio Hendry) Date: Mon, 12 Sep 2011 16:06:38 +0200 Subject: [mapserver-users] GEOMTRANSFORM not working on "notices" In-Reply-To: References: <4E69E3EB.1070408@mapmedia.de> Message-ID: <4E6E11EE.6040202@tydac.ch> Hi all A notice can be defined as follows (see http://mapserver.org/faq.html): LAYER NAME "copyright" STATUS ON TYPE annotation TRANSFORM ll #set the image origin to be lower left FEATURE POINTS 60 -10 #set the offset from lower left position in pixels END TEXT "? xyz company 2006" #this is your displaying text END CLASS LABEL #defines the font, colors etc. of the text FONT "sans" TYPE TRUETYPE SIZE 8 BUFFER 1 COLOR 0 0 0 BACKGROUNDCOLOR 255 255 255 FORCE TRUE END END UNITS PIXELS #sets the units for the feature object END BACKGROUNDCOLOR on labels is deprecated in V6 (who knows why ..., love this backward compatibility) ... and replaced by "GEOMTRANSFORM", therefore the new syntax is: LAYER NAME "copyright" STATUS ON TYPE annotation TRANSFORM ll #set the image origin to be lower left FEATURE POINTS 60 -10 #set the offset from lower left position in pixels END TEXT "? xyz company 2006" #this is your displaying text END CLASS LABEL #defines the font, colors etc. of the text FONT "sans" TYPE TRUETYPE SIZE 8 BUFFER 1 COLOR 0 0 0 STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 OUTLINECOLOR 255 0 0 WIDTH 10 END FORCE TRUE END END UNITS PIXELS #sets the units for the feature object END However, it does not work ..... Mit freundlichem Gruss / Best regards Flavio Hendry ---------------------------------------------------------------- TYDAC Inc. - http://www.tydac.ch Web Mapping - http://www.mapserver.ch Swiss Maps - http://www.mapplus.ch ---------------------------------------------------------------- ############ Mit freundlichen Gruessen / Kind Regards ############ Flavio Hendry, CEO - mailto:flavio at tydac.ch ############ TYDAC AG - http://www.tydac.ch #### #### Geographic Information Solutions #### #### Optingenstrasse 27 -- CH-3013 Bern ############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 ---------------------------------------------------------------- Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27 ---------------------------------------------------------------- From thomas.bonfort at gmail.com Mon Sep 12 07:29:47 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 16:29:47 +0200 Subject: [mapserver-users] GEOMTRANSFORM not working on "notices" In-Reply-To: <4E6E11EE.6040202@tydac.ch> References: <4E69E3EB.1070408@mapmedia.de> <4E6E11EE.6040202@tydac.ch> Message-ID: On Mon, Sep 12, 2011 at 16:06, Flavio Hendry wrote: > Hi all > > A notice can be defined as follows (see http://mapserver.org/faq.html): > > LAYER > ?NAME "copyright" > ?STATUS ON > ?TYPE annotation > ?TRANSFORM ll #set the image origin to be lower left > ?FEATURE > ? ?POINTS > ? ? ?60 -10 #set the offset from lower left position in pixels > ? ?END > ? ?TEXT "? xyz company 2006" #this is your displaying text > ?END > ?CLASS > ? ?LABEL #defines the font, colors etc. of the text > ? ? ?FONT "sans" > ? ? ?TYPE TRUETYPE > ? ? ?SIZE 8 > ? ? ?BUFFER 1 > ? ? ?COLOR 0 0 0 > ? ? ?BACKGROUNDCOLOR 255 255 255 > ? ? ?FORCE TRUE > ? ?END > ?END > ?UNITS PIXELS #sets the units for the feature object > END > > BACKGROUNDCOLOR on labels is deprecated in V6 (who knows why ..., love this > backward compatibility) I guess the folks who spent some time implementing this know better than you then... It's not like we are obliging you to upgrade, so this disparaging attitude is not appreciated. > ... and replaced by "GEOMTRANSFORM", therefore the > new syntax is: > > LAYER > ?NAME "copyright" > ?STATUS ON > ?TYPE annotation > ?TRANSFORM ll #set the image origin to be lower left > ?FEATURE > ? ?POINTS > ? ? ?60 -10 #set the offset from lower left position in pixels > ? ?END > ? ?TEXT "? xyz company 2006" #this is your displaying text > ?END > ?CLASS > ? ?LABEL #defines the font, colors etc. of the text > ? ? ?FONT "sans" > ? ? ?TYPE TRUETYPE > ? ? ?SIZE 8 > ? ? ?BUFFER 1 > ? ? ?COLOR 0 0 0 > ? ? ? ?STYLE > ? ? ? ?GEOMTRANSFORM 'labelpoly' > ? ? ? ?COLOR 255 255 255 > ? ? ? ?OUTLINECOLOR 255 0 0 > ? ? ? ?WIDTH 10 > ? ? ? ?END > ? ? ?FORCE TRUE > ? ?END > ?END > ?UNITS PIXELS #sets the units for the feature object > END > > However, it does not work ..... what does "not work" mean? those keywords mean you are drawing a very thick red outline around the polygon, is that intended? -- Thomas > > Mit freundlichem Gruss / Best regards > Flavio Hendry > > ---------------------------------------------------------------- > TYDAC Inc. ?- http://www.tydac.ch > Web Mapping - http://www.mapserver.ch > Swiss Maps ?- http://www.mapplus.ch > ---------------------------------------------------------------- > ############ ? ? ?Mit freundlichen Gruessen / Kind Regards > ############ ? ? Flavio Hendry, CEO - mailto:flavio at tydac.ch > ############ ? ? ? ? TYDAC AG - http://www.tydac.ch > #### ? ?#### ? ? ? ?Geographic Information Solutions > #### ? ?#### ? ? ? Optingenstrasse 27 -- CH-3013 Bern > ############ ? Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 > ---------------------------------------------------------------- > ? Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27 > ---------------------------------------------------------------- > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From thomas.bonfort at gmail.com Mon Sep 12 07:50:15 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 16:50:15 +0200 Subject: [mapserver-users] GEOMTRANSFORM not working on "notices" In-Reply-To: References: <4E69E3EB.1070408@mapmedia.de> <4E6E11EE.6040202@tydac.ch> Message-ID: I have just tried your exact same layer and the output is correct and attached to this email -- thomas On Mon, Sep 12, 2011 at 16:29, thomas bonfort wrote: > On Mon, Sep 12, 2011 at 16:06, Flavio Hendry wrote: >> Hi all >> >> A notice can be defined as follows (see http://mapserver.org/faq.html): >> >> LAYER >> ?NAME "copyright" >> ?STATUS ON >> ?TYPE annotation >> ?TRANSFORM ll #set the image origin to be lower left >> ?FEATURE >> ? ?POINTS >> ? ? ?60 -10 #set the offset from lower left position in pixels >> ? ?END >> ? ?TEXT "? xyz company 2006" #this is your displaying text >> ?END >> ?CLASS >> ? ?LABEL #defines the font, colors etc. of the text >> ? ? ?FONT "sans" >> ? ? ?TYPE TRUETYPE >> ? ? ?SIZE 8 >> ? ? ?BUFFER 1 >> ? ? ?COLOR 0 0 0 >> ? ? ?BACKGROUNDCOLOR 255 255 255 >> ? ? ?FORCE TRUE >> ? ?END >> ?END >> ?UNITS PIXELS #sets the units for the feature object >> END >> >> BACKGROUNDCOLOR on labels is deprecated in V6 (who knows why ..., love this >> backward compatibility) > > I guess the folks who spent some time implementing this know better > than you then... It's not like we are obliging you to upgrade, so this > disparaging attitude is not appreciated. > > >> ... and replaced by "GEOMTRANSFORM", therefore the >> new syntax is: >> >> LAYER >> ?NAME "copyright" >> ?STATUS ON >> ?TYPE annotation >> ?TRANSFORM ll #set the image origin to be lower left >> ?FEATURE >> ? ?POINTS >> ? ? ?60 -10 #set the offset from lower left position in pixels >> ? ?END >> ? ?TEXT "? xyz company 2006" #this is your displaying text >> ?END >> ?CLASS >> ? ?LABEL #defines the font, colors etc. of the text >> ? ? ?FONT "sans" >> ? ? ?TYPE TRUETYPE >> ? ? ?SIZE 8 >> ? ? ?BUFFER 1 >> ? ? ?COLOR 0 0 0 >> ? ? ? ?STYLE >> ? ? ? ?GEOMTRANSFORM 'labelpoly' >> ? ? ? ?COLOR 255 255 255 >> ? ? ? ?OUTLINECOLOR 255 0 0 >> ? ? ? ?WIDTH 10 >> ? ? ? ?END >> ? ? ?FORCE TRUE >> ? ?END >> ?END >> ?UNITS PIXELS #sets the units for the feature object >> END >> >> However, it does not work ..... > > what does "not work" mean? those keywords mean you are drawing a very > thick red outline around the polygon, is that intended? > > -- > Thomas > >> >> Mit freundlichem Gruss / Best regards >> Flavio Hendry >> >> ---------------------------------------------------------------- >> TYDAC Inc. ?- http://www.tydac.ch >> Web Mapping - http://www.mapserver.ch >> Swiss Maps ?- http://www.mapplus.ch >> ---------------------------------------------------------------- >> ############ ? ? ?Mit freundlichen Gruessen / Kind Regards >> ############ ? ? Flavio Hendry, CEO - mailto:flavio at tydac.ch >> ############ ? ? ? ? TYDAC AG - http://www.tydac.ch >> #### ? ?#### ? ? ? ?Geographic Information Solutions >> #### ? ?#### ? ? ? Optingenstrasse 27 -- CH-3013 Bern >> ############ ? Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 >> ---------------------------------------------------------------- >> ? Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27 >> ---------------------------------------------------------------- >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: flavio.png Type: image/png Size: 3060 bytes Desc: not available URL: From meinetoonen at b3partners.nl Mon Sep 12 07:22:16 2011 From: meinetoonen at b3partners.nl (Meine Toonen) Date: Mon, 12 Sep 2011 16:22:16 +0200 Subject: [mapserver-users] SLD with LayerFeatureConstraints Message-ID: <20110912142216.5019ba8e@kmail.b3partners.nl> Hi list, I'm currently trying to filter features from a layer via a SLD, but using the style defined by the service. I managed to get a NamedStyle by defining a classgroup and assigning the class with the group. When I set the style via SLD to mv2, it works perfectly, but when I add the filterpart (LayerFeatureConstraints) it fails: the default style is used and no filtering occurs. Am I doing something wrong, of is filtering nog possible via LayerFeatureConstraints? Mapfile: layer name telpunten_motorvoertuig_punt CLASSGROUP "mv" metadata "wms_title" "telpunten_points" "gml_include_items" "all" "wfs_featureid" "id" end group telpunten status off type point dump true template bla connectiontype postgis connection CONNECTIONSTATEMENT data "locatie from (select id, nummer, locatie, coalesce(soort,'Onbekend') as wb_soort, wegnummer from telpunt ) as foo using srid=28992 using unique id" projection "init=epsg:28992" end classitem wb_soort class NAME "motorvoertuig" group "mv" expression "MOTORVOERTUIG" style symbol "square" color 0 204 204 outlinecolor 0 0 0 size 8 end end class NAME "motorvoertuig2" group "mv2" expression "MOTORVOERTUIG" style symbol "square" color 255 0 0 outlinecolor 0 0 0 size 8 end end processing "CLOSE_CONNECTION=DEFER" end The SLD: telpunten_motorvoertuig_punt mv wegnummer A28 Thanks in advance! Meine Toonen B3Partners BV Tel: 030 214 2083 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tom.Kralidis at ec.gc.ca Mon Sep 12 07:56:33 2011 From: Tom.Kralidis at ec.gc.ca (Kralidis,Tom [Ontario]) Date: Mon, 12 Sep 2011 10:56:33 -0400 Subject: [mapserver-users] SLD with LayerFeatureConstraints In-Reply-To: <20110912142216.5019ba8e@kmail.b3partners.nl> References: <20110912142216.5019ba8e@kmail.b3partners.nl> Message-ID: > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users- > bounces at lists.osgeo.org] On Behalf Of Meine Toonen > Sent: Monday, 12 September 2011 10:22 > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] SLD with LayerFeatureConstraints > > Hi list, > > I'm currently trying to filter features from a layer via a SLD, but using > the style defined by the service. I managed to get a NamedStyle by defining > a classgroup and assigning the class with the group. > > When I set the style via SLD to mv2, it works perfectly, but when I add the > filterpart (LayerFeatureConstraints) it fails: the default style is used > and no filtering occurs. > > Am I doing something wrong, of is filtering nog possible via > LayerFeatureConstraints? > > Mapfile: > > layer > name telpunten_motorvoertuig_punt > CLASSGROUP "mv" > metadata > "wms_title" "telpunten_points" > "gml_include_items" "all" > "wfs_featureid" "id" > end > group telpunten > status off > type point > dump true > template bla > connectiontype postgis > connection CONNECTIONSTATEMENT > data "locatie from (select id, nummer, locatie, > coalesce(soort,'Onbekend') as wb_soort, wegnummer from telpunt ) as foo > using srid=28992 using unique id" > projection > "init=epsg:28992" > end > classitem wb_soort > > class > NAME "motorvoertuig" > group "mv" > expression "MOTORVOERTUIG" > style > > symbol "square" > color 0 204 204 > outlinecolor 0 0 0 > size 8 > end > end > > class > NAME "motorvoertuig2" > group "mv2" > expression "MOTORVOERTUIG" > style > > symbol "square" > color 255 0 0 > outlinecolor 0 0 0 > size 8 > end > end > > > processing "CLOSE_CONNECTION=DEFER" > end > > The SLD: > > > xmlns:deegreeogc="http://www.deegree.org/ogc" > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:sld="http://www.opengis.net/sld" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:se="http://www.opengis.net/se" version="1.0.0"> > > telpunten_motorvoertuig_punt > > mv > > > > > > wegnummer > A28 > > > > > > > > > Thanks in advance! > Sld:LayerFeatureConstraints is not supported by MapServer, or SLD 1.0.0. FYI here's an example of applying filters to SLD: ms_ogc_workshop SLD for MapServer OGC Web Services Workshop This is an SLD to show how one can make a custom style without having to change the data style at the server-side rivers sld_01 sld_01 1 NAME Japura #FFCC00 5 From charlton at 2creek.com Mon Sep 12 11:00:28 2011 From: charlton at 2creek.com (Charlton Galvarino) Date: Mon, 12 Sep 2011 14:00:28 -0400 Subject: [mapserver-users] 'dot' only features that are labeled Message-ID: <97FDCEA6D905154D94E20D02312C8A310D928E3C4A@mse18be1.mse18.exchange.ms> Hi, MS-ers. Good luck to those of you who are in Denver this week. For the rest of us working away back home, I have a quick Q. Probably even a rookie Q. I have a nice LABEL in a POINT CLASS that draws beautifully. FORCE is *not* set to TRUE, so no labels get clobbered. Tiling is a snap. But I'd like to show the feature dots for those things that are labeled and not the bazillion other points w/i that tile that aren't. So simply putting a SYMBOL and a COLOR alongside the LABEL doesn't work because it gladly draws all the dots. I'm looking for a way to tie the drawing of a LABEL w/ the drawing of its dot. Any way to do that? TIA. Charlton Galvarino 1 (803) 233-6205 : voice 1 (803) 223-9579 : fax charlton at 2creek.com P.O. Box 50960 Columbia, SC 29250 From thomas.bonfort at gmail.com Mon Sep 12 11:41:14 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 12 Sep 2011 20:41:14 +0200 Subject: [mapserver-users] 'dot' only features that are labeled In-Reply-To: <97FDCEA6D905154D94E20D02312C8A310D928E3C4A@mse18be1.mse18.exchange.ms> References: <97FDCEA6D905154D94E20D02312C8A310D928E3C4A@mse18be1.mse18.exchange.ms> Message-ID: you're looking for TYPE ANNOTATION layer. -- thomas On Mon, Sep 12, 2011 at 20:00, Charlton Galvarino wrote: > Hi, MS-ers. ?Good luck to those of you who are in Denver this week. ?For the rest of us working away back home, I have a quick Q. ?Probably even a rookie Q. > > I have a nice LABEL in a POINT CLASS that draws beautifully. ?FORCE is *not* set to TRUE, so no labels get clobbered. ?Tiling is a snap. ?But I'd like to show the feature dots for those things that are labeled and not the bazillion other points w/i that tile that aren't. ?So simply putting a SYMBOL and a COLOR alongside the LABEL doesn't work because it gladly draws all the dots. ?I'm looking for a way to tie the drawing of a LABEL w/ the drawing of its dot. ?Any way to do that? > > TIA. > > > > > > Charlton Galvarino > 1 (803) 233-6205 : voice > 1 (803) 223-9579 : ? fax > charlton at 2creek.com > > P.O. Box 50960 > Columbia, SC 29250 > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From tspradley at snoogems.com Mon Sep 12 13:59:58 2011 From: tspradley at snoogems.com (Ted Spradley) Date: Mon, 12 Sep 2011 13:59:58 -0700 (PDT) Subject: [mapserver-users] Rendering engine implemented on an iOS device Message-ID: <1315861198733-6785236.post@n2.nabble.com> Hi guys, it's been a while. My iPhone Software Engineering class at Univ. Houston has us choosing projects. My group is considering a project that has a mapping component with the requirement that the maps be available off line, so rendered by software running on the device. I only see posts concerning displaying online maps in the archives. Has anyone implemented Mapserver natively on an iOS device? Does anyone have any input on an open source engine like Mapserver that has been implemented on iOS? Many thanks. All of you that contribute to this list inspired me to go back to school and get a Comp. Science degree. Almost finished! Thanks again, Ted S. ----- Thank you, Ted S MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Linux/Fedora7 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Rendering-engine-implemented-on-an-iOS-device-tp6785236p6785236.html Sent from the Mapserver - User mailing list archive at Nabble.com. From sdlime at gmail.com Mon Sep 12 13:57:24 2011 From: sdlime at gmail.com (Steve Lime) Date: Mon, 12 Sep 2011 15:57:24 -0500 Subject: [mapserver-users] 'dot' only features that are labeled In-Reply-To: <97FDCEA6D905154D94E20D02312C8A310D928E3C4A@mse18be1.mse18.exchange.ms> References: <97FDCEA6D905154D94E20D02312C8A310D928E3C4A@mse18be1.mse18.exchange.ms> Message-ID: Two ways: - use an annotation layer - use label styles (6.0+) You'd use the latter if you're drawing markers, in addition to other symbolization of the geometries themselves (e.g. text+shields+road line work). If you're really doing just points just change TYPE POINTS to TYPE ANNOTATION. Steve On Mon, Sep 12, 2011 at 1:00 PM, Charlton Galvarino wrote: > Hi, MS-ers. ?Good luck to those of you who are in Denver this week. ?For the rest of us working away back home, I have a quick Q. ?Probably even a rookie Q. > > I have a nice LABEL in a POINT CLASS that draws beautifully. ?FORCE is *not* set to TRUE, so no labels get clobbered. ?Tiling is a snap. ?But I'd like to show the feature dots for those things that are labeled and not the bazillion other points w/i that tile that aren't. ?So simply putting a SYMBOL and a COLOR alongside the LABEL doesn't work because it gladly draws all the dots. ?I'm looking for a way to tie the drawing of a LABEL w/ the drawing of its dot. ?Any way to do that? > > TIA. > > > > > > Charlton Galvarino > 1 (803) 233-6205?: voice > 1 (803) 223-9579?: ? fax > charlton at 2creek.com > > P.O. Box 50960 > Columbia, SC 29250 > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Mon Sep 12 14:23:48 2011 From: sdlime at gmail.com (Steve Lime) Date: Mon, 12 Sep 2011 16:23:48 -0500 Subject: [mapserver-users] querying in mode=tile In-Reply-To: <84446DEF76453C439E9E97E438E13A630215AE@suutari.haapa.mmm.fi> References: <889E6AB4-5D44-4FBF-B437-8D921FF10E27@gmail.com> <5925F15A-604E-4B4B-A828-4C601BF029A5@gmail.com> <84446DEF76453C439E9E97E438E13A630215AE@suutari.haapa.mmm.fi> Message-ID: You can also bail on JSON and just return HTML from your template. Here's a trivial example that uses GMap2 API and mode=tile for an overlay layer and a straight mapserver point query for handling clicks. The actual calls to the CGI are being proxied but it's straight CGI. I look at the query result and if there's an error I don't display the result. Watch with Firebug to see what's moving between the client and server. http://www.dnr.state.mn.us/officerpatrolareas/index.html Here's another one with GMap3 API that uses a mod-geocache tileset for an overlay and straight MapServer 6.0 queries for handling a click event tied to the map. I check for an error and if ok I redirect the user to the contents of the template (in this case just a URL to a PDF). Kind of a Google maps imagemap. http://www.dnr.state.mn.us/forestlegacy/hunting.html Steve On Sun, Sep 11, 2011 at 11:41 PM, Rahkonen Jukka wrote: > Hi, > > If you happen to have a little bit time for considering some day, consider also using WFS for queries. ?And if you cannot manage to get the geojson outputformat work through the OGR outputformat system in a minute, you can install TinyOWS besides Mapserver. It can read the same mapfiles and it can output geojson out-of-the-box. > > -Jukka Rahkonen- > > Mr. Puneet Kishor wrote: > >>On Sep 11, 2011, at 10:52 PM, Richard Greenwood wrote: > >>> On Sun, Sep 11, 2011 at 9:37 PM, Mr. Puneet Kishor wrote: >> >>>> However, since I am not using MapScript (even though I would prefer to), I would have to implement both CGI and MapScript to do what you are suggesting above -- CGI to display the map and MapScript to do the query. >> >>> But my point was that you can do the query without mapserver at all if >> the data is in postgis. Use a server-side language such as Perl or PHP >> to pass the request to postgis, which can do a spatial query, and then >> Perl or PHP can format the result as JSON and return it to the page >> (via AJAX). > > >> On second reading, I now get what you are saying. Strange that it never occurred to me. Sounds very sensible, and I will implement it tomorrow. That way I can get away from CGI `mode=query` and its TEMPLATE-ing vagaries. Yes, my data are in Pg, so I can do all my querying with Perl. > >> Wish I could do away with `mode=tile` and also get tiles back via MapScript. Then my solution would be complete. > >>Thanks for this really useful hint (more like making me see the obvious that I was missing for some reason). > > Puneet._______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From lucho1524 at gmail.com Mon Sep 12 14:45:01 2011 From: lucho1524 at gmail.com (Lucho) Date: Mon, 12 Sep 2011 16:45:01 -0500 Subject: [mapserver-users] wms_getcapabilities_version doesn't work Message-ID: Hi List, I have the url of this service, with the parameter "wms_getcapabilities_version" "1.1.1" in the mapfile, but doesn't take this specified version, and still takes by default the 1.3.0. http://geoservice.igac.gov.co/IGACwms?service=WMS&request=GetCapabilities Any ideas? Thanks, -- LUIS FERNANDO ORTIZ REYES INGENIERO DE SISTEMAS UNIVERSIDAD DISTRITAL -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Mon Sep 12 14:57:01 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 12 Sep 2011 21:57:01 +0000 Subject: [mapserver-users] wms_getcapabilities_version doesn't work In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A63021807@suutari.haapa.mmm.fi> Hi, I didn't bother to read the documents either but my guess is that your Mapserver is too old to support this. It seems to be MapServer Template Sample Testing Australia_reserves...
Map Controls
Set your zoom option:

The mapfile (bha_simple.map) below: MAP NAME BHA IMAGETYPE 'png' SIZE 400 300 #SYMBOLSET "symbols.txt" EXTENT 146.7 -38 151.6 -34.3 UNITS dd # # Start of web interface definition # WEB TEMPLATE '/var/www/cgi-bin/australia_reserves.html' IMAGEPATH '/var/www/cgi-bin/images/' IMAGEURL '[bush heritage URL]' END # # Start of layer definitions # LAYER NAME "Highways" DATA '/var/www/cgi-bin/data/australia_highway.shp' TYPE line STATUS ON CLASS COLOR 0 0 0 END END # Layer END #MAP Richard MacNeill Spatial Information Coordinator Bush Heritage Australia PO Box 329 Flinders Lane, Melbourne Vic 8009 Level 5, 395 Collins Street, Melbourne Vic 3000 www.bushheritage.org.au Part time (Monday to Wednesday) T: +61(0)3 8610 9110 F: +61(0)3 8610 9199 ***************** From julho at kms.dk Mon Sep 19 00:36:57 2011 From: julho at kms.dk (Hollingbery, Julian) Date: Mon, 19 Sep 2011 09:36:57 +0200 Subject: SV: [mapserver-users] Generic template for WMS GetFeatureInfo In-Reply-To: <7F5478A7-D68D-406D-8EA3-A0DDA9404866@gmail.com> References: <53D7A0A1A7E1B94689D14547F9262CF60D078753@resc-ex002.res.adroot.dk> <7F5478A7-D68D-406D-8EA3-A0DDA9404866@gmail.com> Message-ID: <53D7A0A1A7E1B94689D14547F9262CF60D0EAFB4@resc-ex002.res.adroot.dk> Hi Steve, thanks for the tip. Most of my users have desktop GIS systems (MapInfo, ArcMap, etc.), but I might test whether these support a JavaScript-based solution. In the mean time, could you expand a bit on the "new-style templates"? All I have done so far is according to http://mapserver.org/mapfile/template.html#template, and I don't remember that this says anything about inclusion of subtemplates. Julian ________________________________ Fra: Steve Lime [mailto:sdlime at gmail.com] Sendt: 15. september 2011 20:43 Til: Hollingbery, Julian Cc: Emne: Re: [mapserver-users] Generic template for WMS GetFeatureInfo Hi Julian: You might try the [items] and [values] template tags combined with a little JavaScript. Those tags output a delimited list of items and values for a feature or set of features. You could split the output into arrays and display however you like. The attributes are just slammed together into 1 comma delimited string, so this approach won't work if your attribute data contains commas I fear. The same template in theory could be used for any layer then... You could use new-style templates (e.g. Via output formats) with template includes and handle this with 2 files- the main template and the shared include... I notice those tags aren't documented so I'll create a ticket to do so. Should also probably enhance those tags, at least the values one, to take some simple formatting options. Steve Sent from my iPad On Sep 14, 2011, at 8:39 AM, "Hollingbery, Julian" wrote: Hi list, I too want to serve GetFeatureInfo requests. However, I wonder if it is necessary to have a template per layer, when all I want to do is "show all attribute values in a HTML table". The thing is, I have a handful of services with approx. 40 layers in each. Each layer has on average a dozen attributes, so all in all, I am looking to simplify maintenance of 2000 HTML table cells. Has anyone done anything in a script or otherwise, so that one can use the same template file on layers with varying attribute lists? I am considering utilising the fact that a TEMPLATE statement can reference a URL: I imagine that this might refer to a PHP-script, which takes e.g. a database table name, and returns a HTML response with the column names. Has anyone done anything like this? Regards, Julian Hollingbery _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From csdave4u at gmail.com Mon Sep 19 04:23:40 2011 From: csdave4u at gmail.com (Dave Chetan) Date: Mon, 19 Sep 2011 16:53:40 +0530 Subject: [mapserver-users] Mapserver using Silverlight controls Message-ID: Hi, I want to implement Mapserver using Silverlight controls. I tried SLMAPVIEWER "Change Set 49797" but unable to resolve following error message *"Invalid URI: The format of the URI could not be determined."* Please either - Let me know how to resolve above error message or - Is there any other method to do this? Thanks in advance, Dave C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at wildwalks.com Mon Sep 19 19:28:09 2011 From: matt at wildwalks.com (Matt McClelland) Date: Tue, 20 Sep 2011 12:28:09 +1000 Subject: [mapserver-users] Display raster image Message-ID: Hi I am wanting to display a geotiff for map shading, but it is not displaying I have this as the first layer entry in the .map file LAYER NAME "hillshade" DATA "/var/www/osm/hill/S34E151.tif" TYPE RASTER STATUS ON END and even when I generate a map with just the hillshade layer (in the area of the tif) there is no hill shading If I change the file name to something silly, I get an error saying the file can not be found, but as is there is no error message. With just the hillshade layer on I just get a white image back. Any hints on how I might solve this??? Running # gdalinfo S34E151.tif give me this ------------------- Driver: GTiff/GeoTIFF Files: S34E151.tif Size is 1201, 1201 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (150.999583333333334,-32.999583333333334) Pixel Size = (0.000833333333333,-0.000833333333333) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 150.9995833, -32.9995833) (150d59'58.50"E, 32d59'58.50"S) Lower Left ( 150.9995833, -34.0004167) (150d59'58.50"E, 34d 0' 1.50"S) Upper Right ( 152.0004167, -32.9995833) (152d 0' 1.50"E, 32d59'58.50"S) Lower Right ( 152.0004167, -34.0004167) (152d 0' 1.50"E, 34d 0' 1.50"S) Center ( 151.5000000, -33.5000000) (151d30' 0.00"E, 33d30' 0.00"S) Band 1 Block=1201x6 Type=Byte, ColorInterp=Gray NoData Value=0 ------------------ Matt :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Mon Sep 19 20:48:47 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 20 Sep 2011 03:48:47 +0000 Subject: [mapserver-users] Display raster image In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A630230FA@suutari.haapa.mmm.fi> Hi, Usually this means that everything is OK but you are somehow asking image from an area that is not covered by your image. Tell us - the EXTENT in your mapfile - the PROJECTION block of the mapfile at MAP level - the request you are using for getting the image Add DEBUG 5 into your mapfile and you will get useful information into log file that is defined with MS_ERRORFILE It is good to use projection block for all the layers too. In your case it looks like is should be PROJECTION "init=epsg:4326" END -Jukka Rahkonen- Matt McClelland wrote: > Hi > I am wanting to display a geotiff for map shading, but it is not displaying > I have this as the first layer entry in the .map file > LAYER NAME "hillshade" DATA "/var/www/osm/hill/S34E151.tif" TYPE RASTER STATUS ON END > and even when I generate a map with just the hillshade layer (in the area of the tif) there is no hill shading > If I change the file name to something silly, I get an error saying the file can not be found, but as is there is no > error message. With just the hillshade layer on I just get a white image back. > Any hints on how I might solve this??? Running # gdalinfo S34E151.tif give me this ------------------- Driver: GTiff/GeoTIFF Files: S34E151.tif Size is 1201, 1201 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (150.999583333333334,-32.999583333333334) Pixel Size = (0.000833333333333,-0.000833333333333) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 150.9995833, -32.9995833) (150d59'58.50"E, 32d59'58.50"S) Lower Left ( 150.9995833, -34.0004167) (150d59'58.50"E, 34d 0' 1.50"S) Upper Right ( 152.0004167, -32.9995833) (152d 0' 1.50"E, 32d59'58.50"S) Lower Right ( 152.0004167, -34.0004167) (152d 0' 1.50"E, 34d 0' 1.50"S) Center ( 151.5000000, -33.5000000) (151d30' 0.00"E, 33d30' 0.00"S) Band 1 Block=1201x6 Type=Byte, ColorInterp=Gray NoData Value=0 ------------------ Matt :) From matt at wildwalks.com Mon Sep 19 20:59:44 2011 From: matt at wildwalks.com (Matt McClelland) Date: Tue, 20 Sep 2011 13:59:44 +1000 Subject: [mapserver-users] Display raster image In-Reply-To: <84446DEF76453C439E9E97E438E13A630230FA@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A630230FA@suutari.haapa.mmm.fi> Message-ID: Thanks Jukka The projection block did the trick. Now producing beautiful maps :) Thanks Matt :) On Tue, Sep 20, 2011 at 1:48 PM, Rahkonen Jukka wrote: > Hi, > > Usually this means that everything is OK but you are somehow asking image > from an area that is not covered by your image. Tell us > - the EXTENT in your mapfile > - the PROJECTION block of the mapfile at MAP level > - the request you are using for getting the image > > Add DEBUG 5 into your mapfile and you will get useful information into log > file that is defined with MS_ERRORFILE > It is good to use projection block for all the layers too. In your case it > looks like is should be > PROJECTION > "init=epsg:4326" > END > > -Jukka Rahkonen- > > Matt McClelland wrote: > > > > Hi > > > I am wanting to display a geotiff for map shading, but it is not > displaying > > I have this as the first layer entry in the .map file > > > LAYER > NAME "hillshade" > DATA "/var/www/osm/hill/S34E151.tif" > TYPE RASTER > STATUS ON > END > > > and even when I generate a map with just the hillshade layer (in the area > of the tif) there is no hill shading > > If I change the file name to something silly, I get an error saying the > file can not be found, but as is there is no > error message. With just the > hillshade layer on I just get a white image back. > > > Any hints on how I might solve this??? > > Running # gdalinfo S34E151.tif > give me this > ------------------- > Driver: GTiff/GeoTIFF > Files: S34E151.tif > Size is 1201, 1201 > Coordinate System is: > GEOGCS["WGS 84", > DATUM["WGS_1984", > SPHEROID["WGS 84",6378137,298.257223563, > AUTHORITY["EPSG","7030"]], > AUTHORITY["EPSG","6326"]], > PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433], > AUTHORITY["EPSG","4326"]] > Origin = (150.999583333333334,-32.999583333333334) > Pixel Size = (0.000833333333333,-0.000833333333333) > Metadata: > AREA_OR_POINT=Area > Image Structure Metadata: > INTERLEAVE=BAND > Corner Coordinates: > Upper Left ( 150.9995833, -32.9995833) (150d59'58.50"E, 32d59'58.50"S) > Lower Left ( 150.9995833, -34.0004167) (150d59'58.50"E, 34d 0' 1.50"S) > Upper Right ( 152.0004167, -32.9995833) (152d 0' 1.50"E, 32d59'58.50"S) > Lower Right ( 152.0004167, -34.0004167) (152d 0' 1.50"E, 34d 0' 1.50"S) > Center ( 151.5000000, -33.5000000) (151d30' 0.00"E, 33d30' 0.00"S) > Band 1 Block=1201x6 Type=Byte, ColorInterp=Gray > NoData Value=0 > ------------------ > > > Matt :) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From traviskirstine at gmail.com Tue Sep 20 05:47:29 2011 From: traviskirstine at gmail.com (Travis Kirstine) Date: Tue, 20 Sep 2011 08:47:29 -0400 Subject: [mapserver-users] mapfile config options - scan directory Message-ID: Hi All, I saw Frank's GDAL performance tips presentation at FOSS4G and he mentioned that a config option in a MS mapfile could be set to stop GDAL from scanning for auxiliary files when using external tiling. I have looked around in the MS documentation and GDAL and cannot find the option. If this option was set would it stop GDAL from using external worldfiles / overviews? Regards From a1hunter at ucsd.edu Tue Sep 20 09:10:37 2011 From: a1hunter at ucsd.edu (aphunter) Date: Tue, 20 Sep 2011 09:10:37 -0700 (PDT) Subject: [mapserver-users] Image Pyramid with gdal_retile and two UTM zones Message-ID: <1316535037179-6812832.post@n2.nabble.com> Hello. I have a large raster mosaic and it is currently split into two zones. UTM 10N and UTM 11N (Northern and Southern California). Currently, when I use gdal_retile, the two zones sit next to each other. Is there some way I can tile things so that the zones are on top of each other, and the state looks complete? http://osgeo-org.1803224.n2.nabble.com/file/n6812832/noalpha_m_3211401_ne_11_1_20090525_1_1.png -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812832.html Sent from the Mapserver - User mailing list archive at Nabble.com. From david.fawcett at state.mn.us Tue Sep 20 09:30:38 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Tue, 20 Sep 2011 11:30:38 -0500 Subject: [mapserver-users] Image Pyramid with gdal_retile and two UTM zones In-Reply-To: <1316535037179-6812832.post@n2.nabble.com> References: <1316535037179-6812832.post@n2.nabble.com> Message-ID: The problem is that both images are showing up in the same UTM Zone. A quick glance at the gdal_retile.py doc page indicates that all of the input tiles need to be in the same spatial reference system. http://www.gdal.org/gdal_retile.html I assume that you could reproject one of your tiles into the adjacent UTM Zone and then run gdal_retile, but I don't know if that would cause any distortion. David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of aphunter Sent: Tuesday, September 20, 2011 11:11 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Image Pyramid with gdal_retile and two UTM zones Hello. I have a large raster mosaic and it is currently split into two zones. UTM 10N and UTM 11N (Northern and Southern California). Currently, when I use gdal_retile, the two zones sit next to each other. Is there some way I can tile things so that the zones are on top of each other, and the state looks complete? http://osgeo-org.1803224.n2.nabble.com/file/n6812832/noalpha_m_3211401_ne_11_1_20090525_1_1.png -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812832.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From a1hunter at ucsd.edu Tue Sep 20 09:40:56 2011 From: a1hunter at ucsd.edu (aphunter) Date: Tue, 20 Sep 2011 09:40:56 -0700 (PDT) Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones In-Reply-To: References: <1316535037179-6812832.post@n2.nabble.com> Message-ID: <1316536856857-6812947.post@n2.nabble.com> Thanks for the reply. Would it make more sense to create two pyramids and then show two layers at the same time in mapserver? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812947.html Sent from the Mapserver - User mailing list archive at Nabble.com. From Bob.Bistrais at maine.gov Tue Sep 20 09:45:00 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Tue, 20 Sep 2011 12:45:00 -0400 Subject: [mapserver-users] Text outline not working on line features Message-ID: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us> I'm trying to draw and label road features from a shapefile. I'd like to include an outline of the road name text as a halo. This works fine on polygon and point features, but is not working for me with the line features. Here is the code block: LABEL ANGLE auto PARTIALS false FORCE false MINDISTANCE 250 POSITION uc COLOR 200 0 0 OUTLINECOLOR 255 255 255 OUTLINEWIDTH 5 FONT "verdana" SIZE 12 TYPE truetype END TEXT ([RDNAME]) -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Tue Sep 20 10:47:19 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Tue, 20 Sep 2011 19:47:19 +0200 Subject: [mapserver-users] Text outline not working on line features In-Reply-To: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: what mapserver version, what outputformat? regardless, it should work with any version, are you sure that this is the actual mapfile snippet that is being used ? -- thomas On Tue, Sep 20, 2011 at 18:45, Bistrais, Bob wrote: > I?m trying to draw and label road features from a shapefile.? I?d like to > include an outline of the road name text as a halo.? This works fine on > polygon and point features, but is not working for me with the line > features. > > > > Here is the code block: > > > > ??????????? ??? LABEL > > ??????????? ????? ANGLE auto > > ??????????? ????? PARTIALS false > > ??????????? ????? FORCE false > > ??????????? ????? MINDISTANCE 250 > > ??????????? ????? POSITION uc > > ??????????? ????? COLOR 200 0 0 > > ??????????? ????? OUTLINECOLOR 255 255 255 > > ??????????? ????? OUTLINEWIDTH 5 > > ??????????? ????? FONT "verdana" > > ??????????? ????? SIZE 12 > > ??????????? ????? TYPE truetype > > ??????????? ??? END > > ??????????? ??? TEXT ([RDNAME]) > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From woodbri at swoodbridge.com Tue Sep 20 10:49:23 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 20 Sep 2011 13:49:23 -0400 Subject: [mapserver-users] Text outline not working on line features In-Reply-To: References: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: <4E78D223.9080701@swoodbridge.com> Bob, Also, what are you getting for label output in you case? More info would help diagnose this. Thanks, -Steve W On 9/20/2011 1:47 PM, thomas bonfort wrote: > what mapserver version, what outputformat? > regardless, it should work with any version, are you sure that this is > the actual mapfile snippet that is being used ? > > -- > thomas > > On Tue, Sep 20, 2011 at 18:45, Bistrais, Bob wrote: >> I?m trying to draw and label road features from a shapefile. I?d like to >> include an outline of the road name text as a halo. This works fine on >> polygon and point features, but is not working for me with the line >> features. >> >> >> >> Here is the code block: >> >> >> >> LABEL >> >> ANGLE auto >> >> PARTIALS false >> >> FORCE false >> >> MINDISTANCE 250 >> >> POSITION uc >> >> COLOR 200 0 0 >> >> OUTLINECOLOR 255 255 255 >> >> OUTLINEWIDTH 5 >> >> FONT "verdana" >> >> SIZE 12 >> >> TYPE truetype >> >> END >> >> TEXT ([RDNAME]) >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users From hawk at aamdal.com Tue Sep 20 11:09:17 2011 From: hawk at aamdal.com (Hawk AA) Date: Tue, 20 Sep 2011 20:09:17 +0200 Subject: [mapserver-users] WFS Typename behavior Message-ID: <000c01cc77c0$69e82730$3db87590$@aamdal.com> Hi, It seems for me that by entering multiple layers in Typename, I am not getting the same results. For instance would using Typename=Traseer give me all of the geometries in the BBOX, but Typename=Traseer, Punkter will give me all in Punkter, but only some geometries from Traseer. Is it supposed to be that way? Any other way I can query a BBOX on multiple layers without running a WFS request per layer? Thanks in advance! Hawk -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.fawcett at state.mn.us Tue Sep 20 11:21:40 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Tue, 20 Sep 2011 13:21:40 -0500 Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones In-Reply-To: <1316536856857-6812947.post@n2.nabble.com> References: <1316535037179-6812832.post@n2.nabble.com> <1316536856857-6812947.post@n2.nabble.com> Message-ID: For performance, you will want the imagery pre-warped into one spatial reference system. (The same SRS as your output SRS.) I don't know if you will want the output SRS to be one of the two UTM Zones, or if you want to choose a different SRS. David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of aphunter Sent: Tuesday, September 20, 2011 11:41 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones Thanks for the reply. Would it make more sense to create two pyramids and then show two layers at the same time in mapserver? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812947.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Bob.Bistrais at maine.gov Tue Sep 20 13:56:36 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Tue, 20 Sep 2011 16:56:36 -0400 Subject: [mapserver-users] Text outline not working on line features In-Reply-To: <4E78D223.9080701@swoodbridge.com> References: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4E78D223.9080701@swoodbridge.com> Message-ID: <4EFF8BB964547748A07CA32961810C041C154AA5@SOM-TEAQASMAIL1.som.w2k.state.me.us> This is an older version of MapServer, MS4W 2.3.1, MapServer 5.2.1. Using a global file with the outputformat params: OUTPUTFORMAT NAME 'agg/png' DRIVER AGG/PNG IMAGEMODE RGBA FORMATOPTION "TRANSPARENT=TRUE" END OUTPUTFORMAT NAME 'print' DRIVER "GD/GIF" MIMETYPE "image/gif" IMAGEMODE PC256 EXTENSION "gif" TRANSPARENT ON END -So we're going to gif on the printout. Not sure what you meant by label output. But here's what I see- on the web application, the labels are as they should be- they have the background halo. On the printed map, the label text itself appears, but no background halo. Yes, I'm absolutely sure that's the code being used in the .map file. -----Original Message----- From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com] Sent: Tuesday, September 20, 2011 1:49 PM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Text outline not working on line features Bob, Also, what are you getting for label output in you case? More info would help diagnose this. Thanks, -Steve W On 9/20/2011 1:47 PM, thomas bonfort wrote: > what mapserver version, what outputformat? > regardless, it should work with any version, are you sure that this is > the actual mapfile snippet that is being used ? > > -- > thomas > > On Tue, Sep 20, 2011 at 18:45, Bistrais, Bob wrote: >> I'm trying to draw and label road features from a shapefile. I'd like to >> include an outline of the road name text as a halo. This works fine on >> polygon and point features, but is not working for me with the line >> features. >> >> >> >> Here is the code block: >> >> >> >> LABEL >> >> ANGLE auto >> >> PARTIALS false >> >> FORCE false >> >> MINDISTANCE 250 >> >> POSITION uc >> >> COLOR 200 0 0 >> >> OUTLINECOLOR 255 255 255 >> >> OUTLINEWIDTH 5 >> >> FONT "verdana" >> >> SIZE 12 >> >> TYPE truetype >> >> END >> >> TEXT ([RDNAME]) >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users From Bob.Basques at ci.stpaul.mn.us Tue Sep 20 14:31:21 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Tue, 20 Sep 2011 16:31:21 -0500 Subject: [mapserver-users] Looking for information on SHPXY, specifically an example of a LINE IMAGEMAP template. Message-ID: <4E78BFD9020000A80002E26F@heckle> All, Should I be using "POLY" as the type for LINE imagemaps? This works most of the time: class="Sewers" shape="poly" coords="[shpxy cs=" " xf="," proj="image" buffer=20px] Also, related to precision, is there a weeding option of some sort? A typical output from above looks like (really a LINE feature), notice the same points being written out: class="Sewers" shape="poly" coords="816,525 816,514 815,504 814,494 812,483 810,473 807,463 803,453 799,443 795,434 790,425 785,416 779,407 773,399 766,391 759,383 751,376 743,369 735,362 727,356 718,351 708,346 699,341 689,337 680,333 670,330 659,328 649,326 639,324 628,323 618,323 607,323 597,324 587,325 576,327 566,329 556,332 546,336 536,340 527,344 518,349 509,354 500,360 492,366 484,373 476,380 469,388 462,396 455,404 449,412 444,421 439,431 434,440 430,450 426,459 423,469 421,480 419,490 417,500 416,511 416,521 415,627 415,638 416,648 417,658 419,669 421,679 424,689 428,699 432,709 436,718 441,727 446,736 452,745 458,753 465,761 472,769 480,776 488,783 496,790 504,796 513,801 523,806 532,811 542,815 551,819 561,822 572,824 582,826 592,828 603,829 613,829 624,829 634,828 644,827 655,825 665,823 675,820 685,816 695,812 704,808 713,803 722,798 731,792 739,786 747,779 755,772 762,764 769,756 776,748 782,740 787,731 792,721 797,712 801,702 805,693 808,683 810,672 812,662 814,652 815,641 815,631 816,525" . . . but not all of the time, seems to get confused from time to time in how the imagemap is drawn. The above imagemap is for a two point line feature for example. bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From HeuerT at landcareresearch.co.nz Tue Sep 20 19:15:08 2011 From: HeuerT at landcareresearch.co.nz (Tim Heuer) Date: Wed, 21 Sep 2011 14:15:08 +1200 Subject: [mapserver-users] MapServer Map Files and GeoTools In-Reply-To: <4E78BFD9020000A80002E26F@heckle> References: <4E78BFD9020000A80002E26F@heckle> Message-ID: Hi All, Was great to see some of you at Foss4G. As you might know, I'm a committer on the MapFish print module and am really interested in excelling the development of that. Hopefully I can get some time to do so. To get to the point: We use MapServer as our main WMS to build our caches and for printing maps. Currently an SVG is downloaded by the print module and then rendered onto a Graphics2D object inside the module and then rendered onto a PDF document with iTextPDF. We would like to make this process a bit slicker and render from PostGIS directly with the help of the style defined inside the map files. An idea inspired by Jesse Eichar was that we use GeoTools and include it as a dependency to do the heavy work for us. But does this mean we would need to implement parsing the map files somehow or is there already functionality for that inside GeoTools? I found this on the MapServer docs (sorry for the HTML email, but I thought it's more readable... http://mapserver.org/ogc/sld.html): PHP/MapScript Example that Generates an SLD from a Mapfile The following is a small script that calls the generateSLD() function to create an SLD for a specific layer in a mapfile: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 getLayerByName("parcel"); // force visibilty of the layer $oLayer->set('status', MS_ON); // generate the sld for that layer $SLD = $oLayer->generateSLD(); // save sld to a file $fp = fopen("parcel-sld.xml", "a"); fputs( $fp, $SLD ); fclose($fp); ?> Is there a way to use this functionality with GeoTools or another Java library? Thoughts are appreciated. Cheers, Tim ________________________________ Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Tue Sep 20 21:29:49 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 21 Sep 2011 00:29:49 -0400 Subject: [mapserver-users] Limits on CLASS EXPRESSIONS for regular expressions Message-ID: <4E79683D.6070506@swoodbridge.com> Does anyone know if/what restrictions we have on regular expressions within mapserver. I have a perl regular expression that matches 44 of 120 counties in Kentucky: EXPRESSION /(?-xism:(?i:(?=[abcfghjlmnorstw])(?:b(?:o(?:y(?:d|le)|urbon)|u(?:llitt|tler)|(?:arr|rack)en)|c(?:a(?:rter|sey)|(?:hristia|rittende)n|lark)|f(?:ayette|leming|ulton)|h(?:a(?:ncock|rt)|enderson)|l(?:e(?:tcher|wis)|(?:incol|oga|yo)n)|m(?:a(?:di)?son|e(?:rcer|tcalfe)|o(?:ntgomery|rgan)|ccracken|uhlenberg)|s(?:helby|impson|pencer)|t(?:aylor|odd)|w(?:ayne|oodford)|adair|grant|johnson|nicholas|oldham|russell)))/ This has been optimized and uses some embedded modifiers. This works fine in Perl but does not match anything in mapserver. Any thoughts on how to modify this to work with mapserver. While this looks very convoluted, it is generated from a list of words and is high efficient when matching. Thoughts? -Steve W PS: Using 5.6.x at the moment. From jaja0506 at gmail.com Tue Sep 20 21:36:28 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 20 Sep 2011 21:36:28 -0700 (PDT) Subject: [mapserver-users] passing values to mapfile Message-ID: <1316579788693-6814838.post@n2.nabble.com> Is there any way to pass values to mapfile from the query string without using mapscript. What I want is: In my mapfile, I defined some classes, the expression is comparing an attribute with a value. But the value is not predefined. It's defined at the client side. So I want to know is there any way to pass a value from client side into the mapfile. for example: CLASS EXPRESSION ([Area] > X) END I want this X to be a value comes from client side (JS-Openlayers). Is this possible? JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6814838.html Sent from the Mapserver - User mailing list archive at Nabble.com. From woodbri at swoodbridge.com Tue Sep 20 21:36:05 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 21 Sep 2011 00:36:05 -0400 Subject: [mapserver-users] passing values to mapfile In-Reply-To: <1316579788693-6814838.post@n2.nabble.com> References: <1316579788693-6814838.post@n2.nabble.com> Message-ID: <4E7969B5.8050007@swoodbridge.com> On 9/21/2011 12:36 AM, jjwang wrote: > Is there any way to pass values to mapfile from the query string without > using mapscript. > What I want is: > In my mapfile, I defined some classes, the expression is comparing an > attribute with a value. But the value is not predefined. It's defined at the > client side. So I want to know is there any way to pass a value from client > side into the mapfile. > for example: > CLASS > EXPRESSION ([Area]> X) > END > > I want this X to be a value comes from client side (JS-Openlayers). > > Is this possible? Yes! http://mapserver.org/cgi/runsub.html From punk.kish at gmail.com Tue Sep 20 21:57:15 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Tue, 20 Sep 2011 23:57:15 -0500 Subject: [mapserver-users] efficiently displaying daily changing vector data Message-ID: <718B8481-C518-40F3-8D78-6CFD5634D18C@gmail.com> I have just finished reading the following thread Mapserver - User - How to display vector symbols (direction and magnitude) in MapServer? http://osgeo-org.1803224.n2.nabble.com/How-to-display-vector-symbols-direction-and-magnitude-in-MapServer-td1971531.html Two questions -- 1. What is the most efficient way to display vector data that comes to me on a daily basis as text files. I have x,y, length and angle information in these text files (along with some other info). I guess, I will have to massage the files to convert them to clean CSV with only the first line containing the column names. Then I can access the file as an OGRVRTDataSource. Or, should I insert the data in a Pg table and then use that? The files will be refreshed daily, so the processing needs to be done only once a day. 2. The thread above makes a mention of a Mapfile CLASS definition like so CLASS SYMBOL 'arrow' ANGLE [Rate] SIZE [Az] COLOR 0 0 0 END Is there an arrow symbol definition that I can use, or is that only possible with truetype fonts? From jaja0506 at gmail.com Tue Sep 20 22:57:45 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 20 Sep 2011 22:57:45 -0700 (PDT) Subject: [mapserver-users] Re: passing values to mapfile In-Reply-To: <4E7969B5.8050007@swoodbridge.com> References: <1316579788693-6814838.post@n2.nabble.com> <4E7969B5.8050007@swoodbridge.com> Message-ID: <1316584665138-6814960.post@n2.nabble.com> Thank you so much. I'm just looking into it. It says 'You can use runtime substitutions to change values within a FILTER as you go'. Can do it within a EXPRESSION? Cause I was trying to do the substitution within a EXPRESSION. But it seems not work. (no error) What I did is: EXPRESSION ([AREA] > %grade%) then ...&grade=1000&... Or I can only substitute the whole expression statement? I tried: EXPRESSION %expression% then ....&expression=([AREA]>1000)&... But I got an error message 'getSymbol(): Symbol definition error. Parsing error near (%):(line 27)' -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6814960.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jaja0506 at gmail.com Tue Sep 20 23:33:45 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 20 Sep 2011 23:33:45 -0700 (PDT) Subject: [mapserver-users] Re: passing values to mapfile In-Reply-To: <1316584665138-6814960.post@n2.nabble.com> References: <1316579788693-6814838.post@n2.nabble.com> <4E7969B5.8050007@swoodbridge.com> <1316584665138-6814960.post@n2.nabble.com> Message-ID: <1316586825008-6815018.post@n2.nabble.com> Any one have any idea about this? I tried the simplest example, and it didn't work as well. CLASS CLASSITEM 'SUBURB' EXPRESSION '%expression%' # it will work if I just write 'REDFERN' ... END then ...&expression=REDFERN&... Help me. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815018.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jaja0506 at gmail.com Tue Sep 20 23:43:43 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 20 Sep 2011 23:43:43 -0700 (PDT) Subject: [mapserver-users] How can i get an attribute value of a specific shape in the mapfile? Message-ID: <1316587423896-6815042.post@n2.nabble.com> Is there any way to get an attribute value of a specific shape in the mapfile? For example: I want to know the value of the attribute 'AREA' of a shape whose 'NAME' is 'REDFERN'. So that I can use it in the EXPRESSION like this: CLASS EXPRESSION ([AREA] > [the area value of shape whose name is 'redfern']) ... END JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-can-i-get-an-attribute-value-of-a-specific-shape-in-the-mapfile-tp6815042p6815042.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jaja0506 at gmail.com Wed Sep 21 00:16:37 2011 From: jaja0506 at gmail.com (jjwang) Date: Wed, 21 Sep 2011 00:16:37 -0700 (PDT) Subject: [mapserver-users] Re: passing values to mapfile In-Reply-To: <1316586825008-6815018.post@n2.nabble.com> References: <1316579788693-6814838.post@n2.nabble.com> <4E7969B5.8050007@swoodbridge.com> <1316584665138-6814960.post@n2.nabble.com> <1316586825008-6815018.post@n2.nabble.com> Message-ID: <1316589397595-6815106.post@n2.nabble.com> I think I found out the problem. It seems not see the value in the url at all. Because if I give it a default value. The default value will work. But I still don't know why and how to solve it. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815106.html Sent from the Mapserver - User mailing list archive at Nabble.com. From anddreas2 at yahoo.gr Wed Sep 21 00:38:32 2011 From: anddreas2 at yahoo.gr (anddreas2) Date: Wed, 21 Sep 2011 00:38:32 -0700 (PDT) Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem In-Reply-To: References: Message-ID: <1316590712086-6815163.post@n2.nabble.com> Hi I have the same problem. Did you find any solution? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6815163.html Sent from the Mapserver - User mailing list archive at Nabble.com. From mapoubelle22 at gmail.com Wed Sep 21 01:31:18 2011 From: mapoubelle22 at gmail.com (fred p) Date: Wed, 21 Sep 2011 10:31:18 +0200 Subject: [mapserver-users] problem with mercator projection Message-ID: Hello ! I am trying to serve an image in Mercator projection (EPSG:3395) with an extent larger than "360? in longitude" but I get a truncated and reversed in longitude image. Do I make a mistake somewhere? Thanks for your help The mapfile content and the gdalinfo output on the original image are given below. Mapserver version: 6.0.1 Call to mapserver: /path/to/mapserv -nh "QUERY_STRING=map=/tmp/world. map&service=wms&LAYERS=countries&FORMAT=image/png&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=epsg:3395&BBOX=-26080550.098232,-15000000,26080550.098232,15000000&WIDTH=885&HEIGHT=509" > foo.png Content of the mapfile: MAP EXTENT -180 -90 180 90 IMAGECOLOR 255 255 255 IMAGETYPE agg STATUS ON OUTPUTFORMAT NAME "agg" MIMETYPE "image/png" DRIVER "AGG/PNG" EXTENSION "png" IMAGEMODE "RGBA" TRANSPARENT TRUE FORMATOPTION "INTERLACE=false" END PROJECTION "init=epsg:4326" END WEB METADATA "wms_srs" "epsg:4326 epsg:3395 epsg:900913 epsg:3995" "OWS_ENABLE_REQUEST" "*" END END LAYER DATA "/tmp/world.tif" NAME "countries" PROJECTION "init=epsg:4326" END STATUS ON TYPE RASTER END END Output of gdalinfo command: $ gdalinfo /tmp/world.tif Driver: GTiff/GeoTIFF Files: /tmp/world.tif Size is 1000, 500 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (-180.000000000000000,90.000000000000000) Pixel Size = (0.360000000000000,-0.360000000000000) Metadata: TIFFTAG_DOCUMENTNAME=/tmp/world.tif TIFFTAG_XRESOLUTION=72 TIFFTAG_YRESOLUTION=72 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left (-180.0000000, 90.0000000) (180d 0'0.00"W, 90d 0'0.00"N) Lower Left (-180.0000000, -90.0000000) (180d 0'0.00"W, 90d 0'0.00"S) Upper Right ( 180.0000000, 90.0000000) (180d 0'0.00"E, 90d 0'0.00"N) Lower Right ( 180.0000000, -90.0000000) (180d 0'0.00"E, 90d 0'0.00"S) Center ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N) Band 1 Block=1000x8 Type=Byte, ColorInterp=Gray -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.fawcett at state.mn.us Wed Sep 21 06:46:06 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Wed, 21 Sep 2011 08:46:06 -0500 Subject: [mapserver-users] Re: passing values to mapfile In-Reply-To: <1316589397595-6815106.post@n2.nabble.com> References: <1316579788693-6814838.post@n2.nabble.com> <4E7969B5.8050007@swoodbridge.com> <1316584665138-6814960.post@n2.nabble.com> <1316586825008-6815018.post@n2.nabble.com> <1316589397595-6815106.post@n2.nabble.com> Message-ID: http://mapserver.org/mapfile/class.html?highlight=validation You need to set up a validation block with an expression that will match the value of the variable that you are passing through the GET request. David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of jjwang Sent: Wednesday, September 21, 2011 2:17 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Re: passing values to mapfile I think I found out the problem. It seems not see the value in the url at all. Because if I give it a default value. The default value will work. But I still don't know why and how to solve it. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815106.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From RMcCulley at county24.com Wed Sep 21 07:27:01 2011 From: RMcCulley at county24.com (Rob McCulley) Date: Wed, 21 Sep 2011 08:27:01 -0600 Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem In-Reply-To: <1316590712086-6815163.post@n2.nabble.com> References: <1316590712086-6815163.post@n2.nabble.com> Message-ID: Unfortunately not. I tried using the debugging tools available, but because the cgi just hangs, there are no errors reported. I tried a fresh install, with the same problem. Beyond that, I haven't had time to look into it any further. I'm still running 5.6 as a result. Rob -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of anddreas2 Sent: September-21-11 1:39 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem Hi I have the same problem. Did you find any solution? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6815163.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Bob.Basques at ci.stpaul.mn.us Wed Sep 21 07:47:40 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Wed, 21 Sep 2011 09:47:40 -0500 Subject: [mapserver-users] Looking for information on SHPXY, specifically an example of a LINE IMAGEMAP template. In-Reply-To: <4E78BFD9020000A80002E26F@heckle> References: <4E78BFD9020000A80002E26F@heckle> Message-ID: <4E79B2BC020000A80002E2B1@heckle> All, Some more info on the topic, I see now that my first question was phrased wrongly, I actaully need more information about how SHPXY works against (POLY)LINE features (vs POLYGONS): Using this slightly modified version of the SHPXY call (removed the "px" from the end of the buffer coords="[shpxy cs=" " xf="," proj="image" buffer=20]" The output looks like: coords="0,950 0,0 879,0 879,950" (coincidentally mapsize=880 952 for the call) Much smaller list than below (but it now includes almost the complete image). I also think that an imagemaop needs to have the first and last coordinate pairs be the same in order to close the same (which is correct below) coords="[shpxy cs=" " xf="," proj="image" buffer=20px]" coords="442,455 441,455 440,455 439,455 438,455 437,456 436,456 435,456 434,457 433,457 432,458 431,458 430,459 429,460 428,460 428,461 427,462 426,463 426,463 425,464 425,465 424,466 424,467 423,468 423,469 423,470 422,471 422,472 422,473 422,474 422,475 422,476 422,477 422,478 422,479 423,480 423,481 423,482 424,483 424,484 425,485 425,486 426,487 427,488 427,489 428,489 429,490 430,491 430,491 431,492 432,492 433,493 434,493 435,494 436,494 437,494 438,495 439,495 440,495 441,495 442,495 879,490 880,490 881,490 882,490 883,490 884,489 885,489 886,489 887,488 888,488 889,487 890,487 891,486 892,485 893,485 893,484 894,483 895,482 895,482 896,481 896,480 897,479 897,478 898,477 898,476 898,475 899,474 899,473 899,472 899,471 899,470 899,469 899,468 899,467 899,466 898,465 898,464 898,463 897,462 897,461 896,460 896,459 895,458 894,457 894,456 893,456 892,455 891,454 891,454 890,453 889,453 888,452 887,452 886,451 885,451 884,451 883,450 882,450 881,450 880,450 879,450 442,455" See attached for image from above examples. I couldn't find any documentation anywhere about these unit options like "px". So what's the deal with this unit inclusion changing the output, and why are so many numbers required to imagemap a straight line? Is this related to incrementally going around a corner or curved object or ??? Still working it . . . bobb >>> "Bob Basques" wrote: All, Should I be using "POLY" as the type for LINE imagemaps? This works most of the time: class="Sewers" shape="poly" coords="[shpxy cs=" " xf="," proj="image" buffer=20px] Also, related to precision, is there a weeding option of some sort? A typical output from above looks like (really a LINE feature), notice the same points being written out: class="Sewers" shape="poly" coords="816,525 816,514 815,504 814,494 812,483 810,473 807,463 803,453 799,443 795,434 790,425 785,416 779,407 773,399 766,391 759,383 751,376 743,369 735,362 727,356 718,351 708,346 699,341 689,337 680,333 670,330 659,328 649,326 639,324 628,323 618,323 607,323 597,324 587,325 576,327 566,329 556,332 546,336 536,340 527,344 518,349 509,354 500,360 492,366 484,373 476,380 469,388 462,396 455,404 449,412 444,421 439,431 434,440 430,450 426,459 423,469 421,480 419,490 417,500 416,511 416,521 415,627 415,638 416,648 417,658 419,669 421,679 424,689 428,699 432,709 436,718 441,727 446,736 452,745 458,753 465,761 472,769 480,776 488,783 496,790 504,796 513,801 523,806 532,811 542,815 551,819 561,822 572,824 582,826 592,828 603,829 613,829 624,829 634,828 644,827 655,825 665,823 675,820 685,816 695,812 704,808 713,803 722,798 731,792 739,786 747,779 755,772 762,764 769,756 776,748 782,740 787,731 792,721 797,712 801,702 805,693 808,683 810,672 812,662 814,652 815,641 815,631 816,525" . . . but not all of the time, seems to get confused from time to time in how the imagemap is drawn. The above imagemap is for a two point line feature for example. bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SANITARY.map.png Type: image/png Size: 3615 bytes Desc: Portable Network Graphics Format URL: From bfraser at geoanalytic.com Wed Sep 21 07:49:58 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Wed, 21 Sep 2011 08:49:58 -0600 Subject: [mapserver-users] efficiently displaying daily changing vector data In-Reply-To: <718B8481-C518-40F3-8D78-6CFD5634D18C@gmail.com> References: <718B8481-C518-40F3-8D78-6CFD5634D18C@gmail.com> Message-ID: <4E79F996.1020003@geoanalytic.com> Puneet, 1. If the incoming CSV format and content is consistent then using OGR would likely be OK. If you need to modify the values to make it acceptable to Mapserver (e.g. change your angles from Heading (clockwise, north is 0) to "standard" angles (counter-clockwise, + x axis is 0), the PostGIS would be a better solution. Note that RFC 64 may solve the heading angle problem by allowing you to do the math in the mapfile, but I haven't tried it. Also you may want to test both CSV/OGR and PostGIS solutions for performance reasons. 2. There are a couple of vector( Type vector, not TrueType) arrow symbols described at the bottom of http://mapserver.org/mapfile/symbology/construction.html Best Regards, Brent Fraser On 9/20/2011 10:57 PM, Mr. Puneet Kishor wrote: > I have just finished reading the following thread > > Mapserver - User - How to display vector symbols (direction and magnitude) in MapServer? > http://osgeo-org.1803224.n2.nabble.com/How-to-display-vector-symbols-direction-and-magnitude-in-MapServer-td1971531.html > > > Two questions -- > > 1. What is the most efficient way to display vector data that comes to me on a daily basis as text files. I have x,y, length and angle information in these text files (along with some other info). I guess, I will have to massage the files to convert them to clean CSV with only the first line containing the column names. Then I can access the file as an OGRVRTDataSource. Or, should I insert the data in a Pg table and then use that? The files will be refreshed daily, so the processing needs to be done only once a day. > > 2. The thread above makes a mention of a Mapfile CLASS definition like so > > CLASS > SYMBOL 'arrow' > ANGLE [Rate] > SIZE [Az] > COLOR 0 0 0 > END > > Is there an arrow symbol definition that I can use, or is that only possible with truetype fonts?_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From lucadeluge at gmail.com Wed Sep 21 08:52:06 2011 From: lucadeluge at gmail.com (Luca Delucchi) Date: Wed, 21 Sep 2011 17:52:06 +0200 Subject: [mapserver-users] python mapscript error Message-ID: Hi everybody, I'm starting to use python mapscript to create web services, but I have a problem when I try to create a new layer. I saw this [0] thread, and I try to apply the patch but it didn't work. I'm running svn version of branches 6 on a Ubuntu OS lucadelu at giswks001:~/compilati/mapserver6-0/mapserver/mapscript/python$ python Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mapscript >>> >>> map = mapscript.mapObj( ) >>> map.name = "Orthophoto Merano" >>> map.setSize(250, 250) 1 >>> map.setExtent(11.134999, 46.617079, 11.212800, 46.692624) 0 >>> map.imagecolor.setRGB(255, 255, 255) 0 >>> map.units = mapscript.MS_DD >>> layer = mapscript.layerObj() Traceback (most recent call last): File "", line 1, in File "mapscript.py", line 807, in __init__ if args and len(args)!=0: NameError: global name 'args' is not defined >>> layer = mapscript.layerObj(map) Traceback (most recent call last): File "", line 1, in File "mapscript.py", line 807, in __init__ if args and len(args)!=0: NameError: global name 'args' is not defined [0] http://gis.stackexchange.com/questions/8735/using-mapscript-to-create-a-mapfile-from-scratch -- thanks Luca http://gis.cri.fmach.it/delucchi/ www.lucadelu.org From pramsey at opengeo.org Wed Sep 21 13:24:38 2011 From: pramsey at opengeo.org (Paul Ramsey) Date: Wed, 21 Sep 2011 13:24:38 -0700 Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem In-Reply-To: References: <1316590712086-6815163.post@n2.nabble.com> Message-ID: Does avoiding the WMS/OWS side and doing a CGI request using 'mode=map' produce a different result? P. On Wed, Sep 21, 2011 at 7:27 AM, Rob McCulley wrote: > Unfortunately not. ?I tried using the debugging tools available, but because the cgi just hangs, there are no errors reported. ?I tried a fresh install, with the same problem. > > Beyond that, I haven't had time to look into it any further. ?I'm still running 5.6 as a result. > > Rob > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of anddreas2 > Sent: September-21-11 1:39 AM > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > > Hi > > I have the same problem. Did you find any solution? > > > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6815163.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From jaja0506 at gmail.com Wed Sep 21 16:08:42 2011 From: jaja0506 at gmail.com (jjwang) Date: Wed, 21 Sep 2011 16:08:42 -0700 (PDT) Subject: [mapserver-users] Re: passing values to mapfile In-Reply-To: References: <1316579788693-6814838.post@n2.nabble.com> <4E7969B5.8050007@swoodbridge.com> <1316584665138-6814960.post@n2.nabble.com> <1316586825008-6815018.post@n2.nabble.com> <1316589397595-6815106.post@n2.nabble.com> Message-ID: <1316646522435-6818235.post@n2.nabble.com> Exactly right. Thank you so much. I thought it's not compulsory. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6818235.html Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at gmail.com Wed Sep 21 17:46:07 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 22 Sep 2011 02:46:07 +0200 Subject: [mapserver-users] Limits on CLASS EXPRESSIONS for regular expressions In-Reply-To: <4E79683D.6070506@swoodbridge.com> References: <4E79683D.6070506@swoodbridge.com> Message-ID: If I'm not mistaken, mapserver uses regex, which has a smaller featureset than perl's regular expressions. Using pcre instead of regex inside mapserver might solve your problem. -- thomas On Wed, Sep 21, 2011 at 06:29, Stephen Woodbridge wrote: > Does anyone know if/what restrictions we have on regular expressions within > mapserver. I have a perl regular expression that matches 44 of 120 counties > in Kentucky: > > EXPRESSION > /(?-xism:(?i:(?=[abcfghjlmnorstw])(?:b(?:o(?:y(?:d|le)|urbon)|u(?:llitt|tler)|(?:arr|rack)en)|c(?:a(?:rter|sey)|(?:hristia|rittende)n|lark)|f(?:ayette|leming|ulton)|h(?:a(?:ncock|rt)|enderson)|l(?:e(?:tcher|wis)|(?:incol|oga|yo)n)|m(?:a(?:di)?son|e(?:rcer|tcalfe)|o(?:ntgomery|rgan)|ccracken|uhlenberg)|s(?:helby|impson|pencer)|t(?:aylor|odd)|w(?:ayne|oodford)|adair|grant|johnson|nicholas|oldham|russell)))/ > > This has been optimized and uses some embedded modifiers. This works fine in > Perl but does not match anything in mapserver. > > Any thoughts on how to modify this to work with mapserver. While this looks > very convoluted, it is generated from a list of words and is high efficient > when matching. > > Thoughts? > > -Steve W > > PS: Using 5.6.x at the moment. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From woodbri at swoodbridge.com Wed Sep 21 18:02:56 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 21 Sep 2011 21:02:56 -0400 Subject: [mapserver-users] Limits on CLASS EXPRESSIONS for regular expressions In-Reply-To: References: <4E79683D.6070506@swoodbridge.com> Message-ID: <4E7A8940.5020800@swoodbridge.com> Thanks Thomas, That would explain it. I thought that we had converted to pcre in mapserver, but I must have been mistaken. I solved it by changing the expressions to /word1|word2|.../ style of list. Perl has a very cool module Regexp::List that lets you take a list of words and creates an optimized regexp that will recognize any word in the list and reject anything not in the list. I use it for other stuff and thought I had used it with mapserver but that was probably not the case, now that you point this out. Back to the salt mines ... -Steve On 9/21/2011 8:46 PM, thomas bonfort wrote: > If I'm not mistaken, mapserver uses regex, which has a smaller > featureset than perl's regular expressions. Using pcre instead of > regex inside mapserver might solve your problem. > > -- > thomas > > On Wed, Sep 21, 2011 at 06:29, Stephen Woodbridge > wrote: >> Does anyone know if/what restrictions we have on regular expressions within >> mapserver. I have a perl regular expression that matches 44 of 120 counties >> in Kentucky: >> >> EXPRESSION >> /(?-xism:(?i:(?=[abcfghjlmnorstw])(?:b(?:o(?:y(?:d|le)|urbon)|u(?:llitt|tler)|(?:arr|rack)en)|c(?:a(?:rter|sey)|(?:hristia|rittende)n|lark)|f(?:ayette|leming|ulton)|h(?:a(?:ncock|rt)|enderson)|l(?:e(?:tcher|wis)|(?:incol|oga|yo)n)|m(?:a(?:di)?son|e(?:rcer|tcalfe)|o(?:ntgomery|rgan)|ccracken|uhlenberg)|s(?:helby|impson|pencer)|t(?:aylor|odd)|w(?:ayne|oodford)|adair|grant|johnson|nicholas|oldham|russell)))/ >> >> This has been optimized and uses some embedded modifiers. This works fine in >> Perl but does not match anything in mapserver. >> >> Any thoughts on how to modify this to work with mapserver. While this looks >> very convoluted, it is generated from a list of words and is high efficient >> when matching. >> >> Thoughts? >> >> -Steve W >> >> PS: Using 5.6.x at the moment. >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> From thomas.bonfort at gmail.com Wed Sep 21 18:17:40 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 22 Sep 2011 03:17:40 +0200 Subject: [mapserver-users] Text outline not working on line features In-Reply-To: <4EFF8BB964547748A07CA32961810C041C154AA5@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4E78D223.9080701@swoodbridge.com> <4EFF8BB964547748A07CA32961810C041C154AA5@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: The GD driver does not support the OUTLINEWIDTH keyword on labels, but you should see a hard 1-pixel outline be applied to the text. -- thomas On Tue, Sep 20, 2011 at 22:56, Bistrais, Bob wrote: > This is an older version of MapServer, MS4W 2.3.1, MapServer 5.2.1. > > Using a global file with the outputformat params: > > ? ? ? ?OUTPUTFORMAT > ? ? ? ? ? ? ? ?NAME 'agg/png' > ? ? ? ? ? ? ? ?DRIVER AGG/PNG > ? ? ? ? ? ? ? ?IMAGEMODE RGBA > ? ? ? ? ? ? ? ?FORMATOPTION "TRANSPARENT=TRUE" > ? ? ? ?END > > ? ? ? ?OUTPUTFORMAT > ? ? ? ? ? ? ? ?NAME 'print' > ? ? ? ? ? ? ? ?DRIVER "GD/GIF" > ? ? ? ? ? ? ? ?MIMETYPE "image/gif" > ? ? ? ? ? ? ? ?IMAGEMODE PC256 > ? ? ? ? ? ? ? ?EXTENSION "gif" > ? ? ? ? ? ? ? ?TRANSPARENT ON > ? ? ? ?END > > -So we're going to gif on the printout. > > Not sure what you meant by label output. ?But here's what I see- on the > web application, the labels are as they should be- they have the > background halo. ?On the printed map, the label text itself appears, but > no background halo. > > Yes, I'm absolutely sure that's the code being used in the .map file. > > > -----Original Message----- > From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com] > Sent: Tuesday, September 20, 2011 1:49 PM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Text outline not working on line features > > Bob, > > Also, what are you getting for label output in you case? More info would > > help diagnose this. > > Thanks, > -Steve W > > On 9/20/2011 1:47 PM, thomas bonfort wrote: >> what mapserver version, what outputformat? >> regardless, it should work with any version, are you sure that this is >> the actual mapfile snippet that is being used ? >> >> -- >> thomas >> >> On Tue, Sep 20, 2011 at 18:45, Bistrais, Bob > wrote: >>> I'm trying to draw and label road features from a shapefile. ?I'd > like to >>> include an outline of the road name text as a halo. ?This works fine > on >>> polygon and point features, but is not working for me with the line >>> features. >>> >>> >>> >>> Here is the code block: >>> >>> >>> >>> ? ? ? ? ? ? ? ? ?LABEL >>> >>> ? ? ? ? ? ? ? ? ? ?ANGLE auto >>> >>> ? ? ? ? ? ? ? ? ? ?PARTIALS false >>> >>> ? ? ? ? ? ? ? ? ? ?FORCE false >>> >>> ? ? ? ? ? ? ? ? ? ?MINDISTANCE 250 >>> >>> ? ? ? ? ? ? ? ? ? ?POSITION uc >>> >>> ? ? ? ? ? ? ? ? ? ?COLOR 200 0 0 >>> >>> ? ? ? ? ? ? ? ? ? ?OUTLINECOLOR 255 255 255 >>> >>> ? ? ? ? ? ? ? ? ? ?OUTLINEWIDTH 5 >>> >>> ? ? ? ? ? ? ? ? ? ?FONT "verdana" >>> >>> ? ? ? ? ? ? ? ? ? ?SIZE 12 >>> >>> ? ? ? ? ? ? ? ? ? ?TYPE truetype >>> >>> ? ? ? ? ? ? ? ? ?END >>> >>> ? ? ? ? ? ? ? ? ?TEXT ([RDNAME]) >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >>> >>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From punk.kish at gmail.com Wed Sep 21 21:51:57 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 21 Sep 2011 23:51:57 -0500 Subject: [mapserver-users] little whiskers on my arrows Message-ID: <39D0EE5E-0C4E-44ED-91CC-4EC3A1D6DCC8@gmail.com> I have a simple arrowhead defined like so STYLE SYMBOL 'horiz-line' ANGLE [Az] SIZE [Rate] COLOR 255 255 255 WIDTH 1 END STYLE ANGLE [Az] GEOMTRANSFORM "end" SYMBOL "to" COLOR 255 255 255 WIDTH 8 END SYMBOL NAME "horiz-line" TYPE vector POINTS 0 0 1 0 END END SYMBOL NAME "to" TYPE vector POINTS 0 0 1 0.5 0 1 END END I have attached two images: arr.png and arr_zoom.png. They show the problem. My arrows have little whiskers coming out from behind the arrowhead. How can I get a clean symbol? Puneet. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: arr_zoom.png Type: image/png Size: 7128 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: arr.png Type: image/png Size: 2442 bytes Desc: not available URL: From anddreas2 at yahoo.gr Wed Sep 21 22:52:21 2011 From: anddreas2 at yahoo.gr (anddreas2) Date: Wed, 21 Sep 2011 22:52:21 -0700 (PDT) Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem In-Reply-To: References: <1316590712086-6815163.post@n2.nabble.com> Message-ID: <1316670741804-6819004.post@n2.nabble.com> I found the solution: Just set THE wms_extent METADATA in the layer section and it works. Without Layers wms_extent it crashes. (Jesus, I spent three days of my life for this stupid thing. I tested with all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). I am think it is ms4w problem). -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6819004.html Sent from the Mapserver - User mailing list archive at Nabble.com. From havard.tveite at umb.no Wed Sep 21 23:26:01 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Thu, 22 Sep 2011 08:26:01 +0200 Subject: [mapserver-users] WFS Typename behavior In-Reply-To: <000c01cc77c0$69e82730$3db87590$@aamdal.com> References: <000c01cc77c0$69e82730$3db87590$@aamdal.com> Message-ID: <4E7AD4F9.1090107@umb.no> I think that you have to use only one Typename per WFS request. H?vard On 9/20/2011 8:09 PM, Hawk AA wrote: > Hi, > > It seems for me that by entering multiple layers in Typename, I am not getting the same results. For instance would using Typename=Traseer give me all of the geometries in the BBOX, but Typename=Traseer, Punkter will give me all in Punkter, but only some geometries from Traseer. Is it supposed to be that way? Any other way I can query a BBOX on multiple layers without running a WFS request per layer? > > Thanks in advance! > > Hawk > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From Jukka.Rahkonen at mmmtike.fi Wed Sep 21 23:32:23 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 22 Sep 2011 06:32:23 +0000 Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem In-Reply-To: <1316670741804-6819004.post@n2.nabble.com> References: <1316590712086-6815163.post@n2.nabble.com> <1316670741804-6819004.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A63023B9D@suutari.haapa.mmm.fi> Hi, Basically it means that the SQL query for getting the extents of your layer is slow. Set timing on with \timing on in your psql window and run query select st_extent(geom) from titles; http://postgis.refractions.net/docs/ST_Extent.html How long does it take? Do vacuum analyze for the table and try again to see if there has been some trouble with indexes. Anyway, it is always faster to get extents from the metadata line than from PostGIS, but normally it should not take very long. For me it takes 1500 ms with a table of 300000 polygons. -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta anddreas2 > L?hetetty: 22. syyskuuta 2011 8:52 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > > I found the solution: > > Just set THE wms_extent METADATA in the layer section and it > works. Without > Layers wms_extent it crashes. > > (Jesus, I spent three days of my life for this stupid thing. > I tested with > all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). > I am think it > is ms4w problem). > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS > -Problem-tp6387007p6819004.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From amitzankar16 at gmail.com Thu Sep 22 00:18:26 2011 From: amitzankar16 at gmail.com (Amit Zankar) Date: Thu, 22 Sep 2011 12:48:26 +0530 Subject: [mapserver-users] java napscript Message-ID: Hello, I am new user of mapserver.I am java Developer and I want procedure(Steps) to compile mapserver in java. Plz hel me!!!!!!!!!!!! -- Amit Zankar -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul_pag00 at hotmail.com Thu Sep 22 00:51:36 2011 From: paul_pag00 at hotmail.com (Paul Alarcon) Date: Thu, 22 Sep 2011 07:51:36 +0000 Subject: [mapserver-users] (no subject) Message-ID: http://www.grassrootsasalon.com/wp-content/themes/openair/ghyer.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Thu Sep 22 04:35:16 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 22 Sep 2011 11:35:16 +0000 Subject: [mapserver-users] WFS Typename behavior In-Reply-To: <4E7AD4F9.1090107@umb.no> References: <000c01cc77c0$69e82730$3db87590$@aamdal.com> <4E7AD4F9.1090107@umb.no> Message-ID: <84446DEF76453C439E9E97E438E13A63023CAB@suutari.haapa.mmm.fi> Hi, I can see from the server logs that users of ArcGIS Data Interoperability extension are usually making first request so that all the feature types are listed in &typename and with &maxFeatures=30000. This will lead on our server to output that is truncated at the 30000th feature but it varies a bit on what feature type the limit is achieved. But according to the standard using a list of typenames is OK. TinyOWS does not have problems with such a request http://188.64.1.61/cgi-bin/tinyows?service=WFS&version=1.0.0&request=GetFeature&typename=mml_airport,mml_asemat Check if the output is truncated at your maxFeatures. If it is then everything is OK. If maxFeatures is not reached then the result should be the same as when making two separate getFeatures for Traseer and Punkter. Otherwise it looks like a bug. -Jukka Rahkonen- > Havard Tveite wrote: > L?hetetty: 22. syyskuuta 2011 9:26 > I think that you have to use only one Typename per WFS request. > > H?vard > > On 9/20/2011 8:09 PM, Hawk AA wrote: > > Hi, > > > > It seems for me that by entering multiple layers in > Typename, I am not getting the same results. For instance > would using Typename=Traseer give me all of the geometries in > the BBOX, but Typename=Traseer, Punkter will give me all in > Punkter, but only some geometries from Traseer. Is it > supposed to be that way? Any other way I can query a BBOX on > multiple layers without running a WFS request per layer? > > > > Thanks in advance! > > > > Hawk > > > > -- > H?vard Tveite > Department of Mathematical Sciences and Technology, UMB > Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY > Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Jukka.Rahkonen at mmmtike.fi Thu Sep 22 06:38:45 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 22 Sep 2011 13:38:45 +0000 Subject: =?utf-8?B?UmU6IM6jz4fOtc+EOiBbbWFwc2VydmVyLXVzZXJzXSBSZTogTWFwc2VydmVy?= =?utf-8?Q?_6_WMS_/_PostGIS_Problem?= In-Reply-To: <1316675635.51878.YahooMailNeo@web26003.mail.ukl.yahoo.com> References: <1316590712086-6815163.post@n2.nabble.com> <1316670741804-6819004.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A63023B9D@suutari.haapa.mmm.fi> <1316675635.51878.YahooMailNeo@web26003.mail.ukl.yahoo.com> Message-ID: <84446DEF76453C439E9E97E438E13A63023D16@suutari.haapa.mmm.fi> Hi, I can repeat this problem with Mapserver 6.0.1 on Windows Vista 32-bit. I defined one PostGIS test layer without metadata and GetCapabilities fails after a long waiting. With DEBUG 5 the last line in MS_ERRORFILE that appears is this msPostGISLayerIsOpen called. Adding "wms_extent" corrects the situation. Same mapfile does work on Linux and it used to work for me on Windows too with Mapserver 5.x. -Jukka Rahkonen- ________________________________ L?hett?j?: Andreas Douvalis [mailto:anddreas2 at yahoo.gr] L?hetetty: 22. syyskuuta 2011 10:14 Vastaanottaja: Rahkonen Jukka Aihe: ????: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem No problem with pgsql It takes 78 ms the sql of the layer that it doesn't work with wms get map request. Unfortunately there is no debug error to check the query that mapserver runs. ________________________________ ???: Rahkonen Jukka ????: 'anddreas2' ; "'mapserver-users at lists.osgeo.org'" ????????: 9:32 ?.?. ??????, 22 ??????????? 2011 ????: Re: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem Hi, Basically it means that the SQL query for getting the extents of your layer is slow. Set timing on with \timing on in your psql window and run query select st_extent(geom) from titles; http://postgis.refractions.net/docs/ST_Extent.html How long does it take? Do vacuum analyze for the table and try again to see if there has been some trouble with indexes. Anyway, it is always faster to get extents from the metadata line than from PostGIS, but normally it should not take very long. For me it takes 1500 ms with a table of 300000 polygons. -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta anddreas2 > L?hetetty: 22. syyskuuta 2011 8:52 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > > I found the solution: > > Just set THE wms_extent METADATA in the layer section and it > works. Without > Layers wms_extent it crashes. > > (Jesus, I spent three days of my life for this stupid thing. > I tested with > all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). > I am think it > is ms4w problem). > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS > -Problem-tp6387007p6819004.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Thu Sep 22 06:47:05 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 22 Sep 2011 15:47:05 +0200 Subject: =?UTF-8?B?UmU6IM6jz4fOtc+EOiBbbWFwc2VydmVyLXVzZXJzXSBSZTogTWFwc2VydmVyIDYgV01TIA==?= =?UTF-8?B?LyBQb3N0R0lTIFByb2JsZW0=?= In-Reply-To: <84446DEF76453C439E9E97E438E13A63023D16@suutari.haapa.mmm.fi> References: <1316590712086-6815163.post@n2.nabble.com> <1316670741804-6819004.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A63023B9D@suutari.haapa.mmm.fi> <1316675635.51878.YahooMailNeo@web26003.mail.ukl.yahoo.com> <84446DEF76453C439E9E97E438E13A63023D16@suutari.haapa.mmm.fi> Message-ID: When the request hangs, is it the mapserver process or the postgres one that is eating all the cpu cycles ? -- thomas 2011/9/22 Rahkonen Jukka : > Hi, > > I can repeat this?problem with Mapserver 6.0.1 on Windows Vista 32-bit.? I > defined one PostGIS test layer without metadata and GetCapabilities fails > after a long waiting. With DEBUG 5 the last line in MS_ERRORFILE that > appears is this > msPostGISLayerIsOpen called. > > Adding "wms_extent" corrects the situation.? Same mapfile does work on Linux > and it?used to work for me on Windows too with Mapserver 5.x. > > -Jukka Rahkonen- > > ________________________________ > L?hett?j?: Andreas Douvalis [mailto:anddreas2 at yahoo.gr] > L?hetetty: 22. syyskuuta 2011 10:14 > Vastaanottaja: Rahkonen Jukka > Aihe: ????: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > > No problem with pgsql > > > It takes 78 ms the sql of the layer that it doesn't work with wms get map > request. > Unfortunately ?there is no debug error to check the query that mapserver > runs. > ________________________________ > ???: Rahkonen Jukka > ????: 'anddreas2' ; "'mapserver-users at lists.osgeo.org'" > > ????????: 9:32 ?.?. ??????, 22 ??????????? 2011 > ????: Re: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > > Hi, > > Basically it means that the SQL query for getting the extents of your layer > is slow. > Set timing on with \timing on in your psql window and run query > select st_extent(geom) from titles; > http://postgis.refractions.net/docs/ST_Extent.html > How long does it take? Do vacuum analyze for the table and try again to see > if there has been some trouble with indexes. > Anyway, it is always faster to get extents from the metadata line than from > PostGIS, but normally it should not take very long. For me it takes 1500 ms > with a table of 300000 polygons. > > -Jukka Rahkonen- > > > >> -----Alkuper?inen viesti----- >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org >> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta anddreas2 >> L?hetetty: 22. syyskuuta 2011 8:52 >> Vastaanottaja: mapserver-users at lists.osgeo.org >> Aihe: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem >> >> I found the solution: >> >> Just set THE wms_extent METADATA in the layer section and it >> works.? Without >> Layers wms_extent it crashes. >> >> (Jesus, I spent three days of my life for this stupid thing. >> I tested with >> all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). >> I am think it >> is ms4w problem). >> >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS >> -Problem-tp6387007p6819004.html >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From Jukka.Rahkonen at mmmtike.fi Thu Sep 22 06:57:02 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 22 Sep 2011 13:57:02 +0000 Subject: =?utf-8?B?UmU6IM6jz4fOtc+EOiBbbWFwc2VydmVyLXVzZXJzXSBSZTogTWFwc2VydmVy?= =?utf-8?Q?_6_WMS_/_PostGIS_Problem?= In-Reply-To: References: <1316590712086-6815163.post@n2.nabble.com> <1316670741804-6819004.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A63023B9D@suutari.haapa.mmm.fi> <1316675635.51878.YahooMailNeo@web26003.mail.ukl.yahoo.com> <84446DEF76453C439E9E97E438E13A63023D16@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A63023D57@suutari.haapa.mmm.fi> Hi, I turned PostgreSQL statement logging on and I can see this line to appear: execute (unnamed): SELECT postgis_version() Mapserv.exe is eating now 52% of CPU and nothing else seems to happen. -Jukka- > -----Alkuper?inen viesti----- > L?hett?j?: thomas bonfort [mailto:thomas.bonfort at gmail.com] > L?hetetty: 22. syyskuuta 2011 16:47 > Vastaanottaja: Rahkonen Jukka > Kopio: Andreas Douvalis; mapserver-users at lists.osgeo.org > Aihe: Re: ????: [mapserver-users] Re: Mapserver 6 WMS / > PostGIS Problem > > When the request hangs, is it the mapserver process or the postgres > one that is eating all the cpu cycles ? > > -- > thomas > > 2011/9/22 Rahkonen Jukka : > > Hi, > > > > I can repeat this?problem with Mapserver 6.0.1 on Windows > Vista 32-bit.? I > > defined one PostGIS test layer without metadata and > GetCapabilities fails > > after a long waiting. With DEBUG 5 the last line in > MS_ERRORFILE that > > appears is this > > msPostGISLayerIsOpen called. > > > > Adding "wms_extent" corrects the situation.? Same mapfile > does work on Linux > > and it?used to work for me on Windows too with Mapserver 5.x. > > > > -Jukka Rahkonen- > > > > ________________________________ > > L?hett?j?: Andreas Douvalis [mailto:anddreas2 at yahoo.gr] > > L?hetetty: 22. syyskuuta 2011 10:14 > > Vastaanottaja: Rahkonen Jukka > > Aihe: ????: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > > > > No problem with pgsql > > > > > > It takes 78 ms the sql of the layer that it doesn't work > with wms get map > > request. > > Unfortunately ?there is no debug error to check the query > that mapserver > > runs. > > ________________________________ > > ???: Rahkonen Jukka > > ????: 'anddreas2' ; > "'mapserver-users at lists.osgeo.org'" > > > > ????????: 9:32 ?.?. ??????, 22 ??????????? 2011 > > ????: Re: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > > > > Hi, > > > > Basically it means that the SQL query for getting the > extents of your layer > > is slow. > > Set timing on with \timing on in your psql window and run query > > select st_extent(geom) from titles; > > http://postgis.refractions.net/docs/ST_Extent.html > > How long does it take? Do vacuum analyze for the table and > try again to see > > if there has been some trouble with indexes. > > Anyway, it is always faster to get extents from the > metadata line than from > > PostGIS, but normally it should not take very long. For me > it takes 1500 ms > > with a table of 300000 polygons. > > > > -Jukka Rahkonen- > > > > > > > >> -----Alkuper?inen viesti----- > >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org > >> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta anddreas2 > >> L?hetetty: 22. syyskuuta 2011 8:52 > >> Vastaanottaja: mapserver-users at lists.osgeo.org > >> Aihe: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > >> > >> I found the solution: > >> > >> Just set THE wms_extent METADATA in the layer section and it > >> works.? Without > >> Layers wms_extent it crashes. > >> > >> (Jesus, I spent three days of my life for this stupid thing. > >> I tested with > >> all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). > >> I am think it > >> is ms4w problem). > >> > >> -- > >> View this message in context: > >> http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS > >> -Problem-tp6387007p6819004.html > >> Sent from the Mapserver - User mailing list archive at Nabble.com. > >> _______________________________________________ > >> mapserver-users mailing list > >> mapserver-users at lists.osgeo.org > >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >> > > > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > From Michael.Smith at usace.army.mil Thu Sep 22 07:06:38 2011 From: Michael.Smith at usace.army.mil (Smith, Michael ERDC-CRREL-NH) Date: Thu, 22 Sep 2011 14:06:38 +0000 Subject: =?utf-8?B?UmU6IM6jz4fOtc+EOiBbbWFwc2VydmVyLXVzZXJzXSBSZTogTWFwc2VydmVy?= =?utf-8?Q?_6_WMS_/_PostGIS_Problem?= In-Reply-To: <84446DEF76453C439E9E97E438E13A63023D57@suutari.haapa.mmm.fi> Message-ID: I have seen similar issues for Oracle, where it queries all geometries and aggregates the bounds to get an extent. Manually setting the wms_extents is what we always do. Mike -- Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers On 9/22/11 9:57 AM, "Rahkonen Jukka" wrote: >Hi, > >I turned PostgreSQL statement logging on and I can see this line to >appear: >execute (unnamed): SELECT postgis_version() > >Mapserv.exe is eating now 52% of CPU and nothing else seems to happen. > >-Jukka- > > >> -----Alkuper?inen viesti----- >> L?hett?j?: thomas bonfort [mailto:thomas.bonfort at gmail.com] >> L?hetetty: 22. syyskuuta 2011 16:47 >> Vastaanottaja: Rahkonen Jukka >> Kopio: Andreas Douvalis; mapserver-users at lists.osgeo.org >> Aihe: Re: ????: [mapserver-users] Re: Mapserver 6 WMS / >> PostGIS Problem >> >> When the request hangs, is it the mapserver process or the postgres >> one that is eating all the cpu cycles ? >> >> -- >> thomas >> >> 2011/9/22 Rahkonen Jukka : >> > Hi, >> > >> > I can repeat this problem with Mapserver 6.0.1 on Windows >> Vista 32-bit. I >> > defined one PostGIS test layer without metadata and >> GetCapabilities fails >> > after a long waiting. With DEBUG 5 the last line in >> MS_ERRORFILE that >> > appears is this >> > msPostGISLayerIsOpen called. >> > >> > Adding "wms_extent" corrects the situation. Same mapfile >> does work on Linux >> > and it used to work for me on Windows too with Mapserver 5.x. >> > >> > -Jukka Rahkonen- >> > >> > ________________________________ >> > L?hett?j?: Andreas Douvalis [mailto:anddreas2 at yahoo.gr] >> > L?hetetty: 22. syyskuuta 2011 10:14 >> > Vastaanottaja: Rahkonen Jukka >> > Aihe: ????: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem >> > >> > No problem with pgsql >> > >> > >> > It takes 78 ms the sql of the layer that it doesn't work >> with wms get map >> > request. >> > Unfortunately there is no debug error to check the query >> that mapserver >> > runs. >> > ________________________________ >> > ???: Rahkonen Jukka >> > ????: 'anddreas2' ; >> "'mapserver-users at lists.osgeo.org'" >> > >> > ????????: 9:32 ?.?. ??????, 22 ??????????? 2011 >> > ????: Re: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem >> > >> > Hi, >> > >> > Basically it means that the SQL query for getting the >> extents of your layer >> > is slow. >> > Set timing on with \timing on in your psql window and run query >> > select st_extent(geom) from titles; >> > http://postgis.refractions.net/docs/ST_Extent.html >> > How long does it take? Do vacuum analyze for the table and >> try again to see >> > if there has been some trouble with indexes. >> > Anyway, it is always faster to get extents from the >> metadata line than from >> > PostGIS, but normally it should not take very long. For me >> it takes 1500 ms >> > with a table of 300000 polygons. >> > >> > -Jukka Rahkonen- >> > >> > >> > >> >> -----Alkuper?inen viesti----- >> >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org >> >> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta anddreas2 >> >> L?hetetty: 22. syyskuuta 2011 8:52 >> >> Vastaanottaja: mapserver-users at lists.osgeo.org >> >> Aihe: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem >> >> >> >> I found the solution: >> >> >> >> Just set THE wms_extent METADATA in the layer section and it >> >> works. Without >> >> Layers wms_extent it crashes. >> >> >> >> (Jesus, I spent three days of my life for this stupid thing. >> >> I tested with >> >> all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). >> >> I am think it >> >> is ms4w problem). >> >> >> >> -- >> >> View this message in context: >> >> http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS >> >> -Problem-tp6387007p6819004.html >> >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> >> _______________________________________________ >> >> mapserver-users mailing list >> >> mapserver-users at lists.osgeo.org >> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> > >> > >> > _______________________________________________ >> > mapserver-users mailing list >> > mapserver-users at lists.osgeo.org >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > >> > >> _______________________________________________ >mapserver-users mailing list >mapserver-users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users From Jukka.Rahkonen at mmmtike.fi Thu Sep 22 07:17:04 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 22 Sep 2011 14:17:04 +0000 Subject: =?utf-8?B?UmU6IM6jz4fOtc+EOiBbbWFwc2VydmVyLXVzZXJzXSBSZTogTWFwc2VydmVy?= =?utf-8?Q?_6_WMS_/_PostGIS_Problem?= In-Reply-To: References: <84446DEF76453C439E9E97E438E13A63023D57@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A63023D7A@suutari.haapa.mmm.fi> Hi, Oracle is known to be slow in aggrecated extents query but this is something different because the process stops already after the SELECT postgis_version()query and SELECT ST_Extent is not sent at all. My PostgreSQL version is 8.3 and the query that Mapserver is sending "select postgis_version()" returns 1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: Smith, Michael ERDC-CRREL-NH > [mailto:Michael.Smith at usace.army.mil] > L?hetetty: 22. syyskuuta 2011 17:07 > Vastaanottaja: Rahkonen Jukka; 'thomas bonfort'; > 'mapserver-users at lists.osgeo.org' > Aihe: Re: ????: [mapserver-users] Re: Mapserver 6 WMS / > PostGIS Problem > > I have seen similar issues for Oracle, where it queries all > geometries and > aggregates the bounds to get an extent. Manually setting the > wms_extents > is what we always do. > > Mike > > -- > Michael Smith > > Remote Sensing/GIS Center > US Army Corps of Engineers > > > > On 9/22/11 9:57 AM, "Rahkonen Jukka" > wrote: > > >Hi, > > > >I turned PostgreSQL statement logging on and I can see this line to > >appear: > >execute (unnamed): SELECT postgis_version() > > > >Mapserv.exe is eating now 52% of CPU and nothing else seems > to happen. > > > >-Jukka- > > > > > >> -----Alkuper?inen viesti----- > >> L?hett?j?: thomas bonfort [mailto:thomas.bonfort at gmail.com] > >> L?hetetty: 22. syyskuuta 2011 16:47 > >> Vastaanottaja: Rahkonen Jukka > >> Kopio: Andreas Douvalis; mapserver-users at lists.osgeo.org > >> Aihe: Re: ????: [mapserver-users] Re: Mapserver 6 WMS / > >> PostGIS Problem > >> > >> When the request hangs, is it the mapserver process or the postgres > >> one that is eating all the cpu cycles ? > >> > >> -- > >> thomas > >> > >> 2011/9/22 Rahkonen Jukka : > >> > Hi, > >> > > >> > I can repeat this problem with Mapserver 6.0.1 on Windows > >> Vista 32-bit. I > >> > defined one PostGIS test layer without metadata and > >> GetCapabilities fails > >> > after a long waiting. With DEBUG 5 the last line in > >> MS_ERRORFILE that > >> > appears is this > >> > msPostGISLayerIsOpen called. > >> > > >> > Adding "wms_extent" corrects the situation. Same mapfile > >> does work on Linux > >> > and it used to work for me on Windows too with Mapserver 5.x. > >> > > >> > -Jukka Rahkonen- > >> > > >> > ________________________________ > >> > L?hett?j?: Andreas Douvalis [mailto:anddreas2 at yahoo.gr] > >> > L?hetetty: 22. syyskuuta 2011 10:14 > >> > Vastaanottaja: Rahkonen Jukka > >> > Aihe: ????: [mapserver-users] Re: Mapserver 6 WMS / > PostGIS Problem > >> > > >> > No problem with pgsql > >> > > >> > > >> > It takes 78 ms the sql of the layer that it doesn't work > >> with wms get map > >> > request. > >> > Unfortunately there is no debug error to check the query > >> that mapserver > >> > runs. > >> > ________________________________ > >> > ???: Rahkonen Jukka > >> > ????: 'anddreas2' ; > >> "'mapserver-users at lists.osgeo.org'" > >> > > >> > ????????: 9:32 ?.?. ??????, 22 ??????????? 2011 > >> > ????: Re: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > >> > > >> > Hi, > >> > > >> > Basically it means that the SQL query for getting the > >> extents of your layer > >> > is slow. > >> > Set timing on with \timing on in your psql window and run query > >> > select st_extent(geom) from titles; > >> > http://postgis.refractions.net/docs/ST_Extent.html > >> > How long does it take? Do vacuum analyze for the table and > >> try again to see > >> > if there has been some trouble with indexes. > >> > Anyway, it is always faster to get extents from the > >> metadata line than from > >> > PostGIS, but normally it should not take very long. For me > >> it takes 1500 ms > >> > with a table of 300000 polygons. > >> > > >> > -Jukka Rahkonen- > >> > > >> > > >> > > >> >> -----Alkuper?inen viesti----- > >> >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org > >> >> [mailto:mapserver-users-bounces at lists.osgeo.org] > Puolesta anddreas2 > >> >> L?hetetty: 22. syyskuuta 2011 8:52 > >> >> Vastaanottaja: mapserver-users at lists.osgeo.org > >> >> Aihe: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem > >> >> > >> >> I found the solution: > >> >> > >> >> Just set THE wms_extent METADATA in the layer section and it > >> >> works. Without > >> >> Layers wms_extent it crashes. > >> >> > >> >> (Jesus, I spent three days of my life for this stupid thing. > >> >> I tested with > >> >> all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). > >> >> I am think it > >> >> is ms4w problem). > >> >> > >> >> -- > >> >> View this message in context: > >> >> http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS > >> >> -Problem-tp6387007p6819004.html > >> >> Sent from the Mapserver - User mailing list archive at > Nabble.com. > >> >> _______________________________________________ > >> >> mapserver-users mailing list > >> >> mapserver-users at lists.osgeo.org > >> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >> >> > >> > > >> > > >> > _______________________________________________ > >> > mapserver-users mailing list > >> > mapserver-users at lists.osgeo.org > >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users > >> > > >> > > >> _______________________________________________ > >mapserver-users mailing list > >mapserver-users at lists.osgeo.org > >http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From gaston.lucero at sitrack.com Thu Sep 22 07:21:00 2011 From: gaston.lucero at sitrack.com (=?iso-8859-1?Q?Lucero=2C_Gast=F3n_=28SITRACK=29?=) Date: Thu, 22 Sep 2011 14:21:00 +0000 Subject: [mapserver-users] RE: 4. java napscript In-Reply-To: <20110923110840.386AEE0247F@lists.osgeo.org> References: <20110923110840.386AEE0247F@lists.osgeo.org> Message-ID: <4E7B444B.902@sitrack.com> Follow the instructions in mapserver/mapscript/java/README.txt to generate mapscript.jar, and libmascript.so, After then ,copy the .so file where the libraries are in your jdk = jdk/jre/lib/folder Disclaimer: This email and any attachments thereof may contain confidential, privileged, proprietary, or otherwise private information. This email is intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient of the email and its attachments please inform the sender immediately and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any way and delete this e-mail and its attachments from your system. Any views or opinions expressed are solely those of the author. From Asad.Ullah at sigmaspace.com Thu Sep 22 07:47:25 2011 From: Asad.Ullah at sigmaspace.com (Asad Ullah) Date: Thu, 22 Sep 2011 14:47:25 +0000 Subject: [mapserver-users] Parameter substitution problem Message-ID: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> List, I am trying to substitute DATA parameter in my mapfile with a call from Openlayers as follow: map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png" The mapfile is: LAYER NAME "OMI_CP" TYPE RASTER STATUS DEFAULT OFFSITE 0 0 0 PROJECTION "init=epsg:4326" END DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" VALIDATION 'DATA' '^OMI_.*\.png$' END The call should change the date part (20110922) of the png filename but it is not doing it. Can anyone point to what I am doing wrong here? Thanks, Asad -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob.Bistrais at maine.gov Thu Sep 22 08:10:22 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Thu, 22 Sep 2011 11:10:22 -0400 Subject: [mapserver-users] Text outline not working on line features In-Reply-To: References: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us><4E78D223.9080701@swoodbridge.com><4EFF8BB964547748A07CA32961810C041C154AA5@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: <4EFF8BB964547748A07CA32961810C041C15513A@SOM-TEAQASMAIL1.som.w2k.state.me.us> Yes, I think I see a white outline about 1 pixel. Do I have any control over that at all? (width and/or color) -----Original Message----- From: thomas bonfort [mailto:thomas.bonfort at gmail.com] Sent: Wednesday, September 21, 2011 9:18 PM To: Bistrais, Bob Cc: Stephen Woodbridge; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Text outline not working on line features The GD driver does not support the OUTLINEWIDTH keyword on labels, but you should see a hard 1-pixel outline be applied to the text. -- thomas On Tue, Sep 20, 2011 at 22:56, Bistrais, Bob wrote: > This is an older version of MapServer, MS4W 2.3.1, MapServer 5.2.1. > > Using a global file with the outputformat params: > > ? ? ? ?OUTPUTFORMAT > ? ? ? ? ? ? ? ?NAME 'agg/png' > ? ? ? ? ? ? ? ?DRIVER AGG/PNG > ? ? ? ? ? ? ? ?IMAGEMODE RGBA > ? ? ? ? ? ? ? ?FORMATOPTION "TRANSPARENT=TRUE" > ? ? ? ?END > > ? ? ? ?OUTPUTFORMAT > ? ? ? ? ? ? ? ?NAME 'print' > ? ? ? ? ? ? ? ?DRIVER "GD/GIF" > ? ? ? ? ? ? ? ?MIMETYPE "image/gif" > ? ? ? ? ? ? ? ?IMAGEMODE PC256 > ? ? ? ? ? ? ? ?EXTENSION "gif" > ? ? ? ? ? ? ? ?TRANSPARENT ON > ? ? ? ?END > > -So we're going to gif on the printout. > > Not sure what you meant by label output. ?But here's what I see- on the > web application, the labels are as they should be- they have the > background halo. ?On the printed map, the label text itself appears, but > no background halo. > > Yes, I'm absolutely sure that's the code being used in the .map file. > > > -----Original Message----- > From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com] > Sent: Tuesday, September 20, 2011 1:49 PM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Text outline not working on line features > > Bob, > > Also, what are you getting for label output in you case? More info would > > help diagnose this. > > Thanks, > -Steve W > > On 9/20/2011 1:47 PM, thomas bonfort wrote: >> what mapserver version, what outputformat? >> regardless, it should work with any version, are you sure that this is >> the actual mapfile snippet that is being used ? >> >> -- >> thomas >> >> On Tue, Sep 20, 2011 at 18:45, Bistrais, Bob > wrote: >>> I'm trying to draw and label road features from a shapefile. ?I'd > like to >>> include an outline of the road name text as a halo. ?This works fine > on >>> polygon and point features, but is not working for me with the line >>> features. >>> >>> >>> >>> Here is the code block: >>> >>> >>> >>> ? ? ? ? ? ? ? ? ?LABEL >>> >>> ? ? ? ? ? ? ? ? ? ?ANGLE auto >>> >>> ? ? ? ? ? ? ? ? ? ?PARTIALS false >>> >>> ? ? ? ? ? ? ? ? ? ?FORCE false >>> >>> ? ? ? ? ? ? ? ? ? ?MINDISTANCE 250 >>> >>> ? ? ? ? ? ? ? ? ? ?POSITION uc >>> >>> ? ? ? ? ? ? ? ? ? ?COLOR 200 0 0 >>> >>> ? ? ? ? ? ? ? ? ? ?OUTLINECOLOR 255 255 255 >>> >>> ? ? ? ? ? ? ? ? ? ?OUTLINEWIDTH 5 >>> >>> ? ? ? ? ? ? ? ? ? ?FONT "verdana" >>> >>> ? ? ? ? ? ? ? ? ? ?SIZE 12 >>> >>> ? ? ? ? ? ? ? ? ? ?TYPE truetype >>> >>> ? ? ? ? ? ? ? ? ?END >>> >>> ? ? ? ? ? ? ? ? ?TEXT ([RDNAME]) >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >>> >>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Bob.Bistrais at maine.gov Thu Sep 22 08:15:03 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Thu, 22 Sep 2011 11:15:03 -0400 Subject: [mapserver-users] Abandoned railroad symbol Message-ID: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> I've been playing around with the symbology but I'm not getting my spacing right. I'm trying to create a symbol for abandoned railroad track, looks like the standard RR symbol, a line with the crossties, but dashed. Here is my code. Problem is, although I get a dashed line and the crossties, the interval isn't correct, and I was wondering if anyone had advice on making it more consistent so the crossties are always on the dashed line: CLASS EXPRESSION ('[STATUS]' = '3') # The crossties: STYLE COLOR 200 200 200 WIDTH 4 LINECAP BUTT ANGLE 90 PATTERN 1 10 END END # The centerline: STYLE COLOR 200 200 200 WIDTH 1 PATTERN 5 10 END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Thu Sep 22 08:17:43 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 22 Sep 2011 17:17:43 +0200 Subject: [mapserver-users] Text outline not working on line features In-Reply-To: <4EFF8BB964547748A07CA32961810C041C15513A@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C154906@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4E78D223.9080701@swoodbridge.com> <4EFF8BB964547748A07CA32961810C041C154AA5@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4EFF8BB964547748A07CA32961810C041C15513A@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: color yes, width not with GD. -- thomas On Thu, Sep 22, 2011 at 17:10, Bistrais, Bob wrote: > Yes, I think I see a white outline about 1 pixel. ?Do I have any control over that at all? (width and/or color) > > -----Original Message----- > From: thomas bonfort [mailto:thomas.bonfort at gmail.com] > Sent: Wednesday, September 21, 2011 9:18 PM > To: Bistrais, Bob > Cc: Stephen Woodbridge; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Text outline not working on line features > > The GD driver does not support the OUTLINEWIDTH keyword on labels, but > you should see a hard 1-pixel outline be applied to the text. > > -- > thomas > > On Tue, Sep 20, 2011 at 22:56, Bistrais, Bob wrote: >> This is an older version of MapServer, MS4W 2.3.1, MapServer 5.2.1. >> >> Using a global file with the outputformat params: >> >> ? ? ? ?OUTPUTFORMAT >> ? ? ? ? ? ? ? ?NAME 'agg/png' >> ? ? ? ? ? ? ? ?DRIVER AGG/PNG >> ? ? ? ? ? ? ? ?IMAGEMODE RGBA >> ? ? ? ? ? ? ? ?FORMATOPTION "TRANSPARENT=TRUE" >> ? ? ? ?END >> >> ? ? ? ?OUTPUTFORMAT >> ? ? ? ? ? ? ? ?NAME 'print' >> ? ? ? ? ? ? ? ?DRIVER "GD/GIF" >> ? ? ? ? ? ? ? ?MIMETYPE "image/gif" >> ? ? ? ? ? ? ? ?IMAGEMODE PC256 >> ? ? ? ? ? ? ? ?EXTENSION "gif" >> ? ? ? ? ? ? ? ?TRANSPARENT ON >> ? ? ? ?END >> >> -So we're going to gif on the printout. >> >> Not sure what you meant by label output. ?But here's what I see- on the >> web application, the labels are as they should be- they have the >> background halo. ?On the printed map, the label text itself appears, but >> no background halo. >> >> Yes, I'm absolutely sure that's the code being used in the .map file. >> >> >> -----Original Message----- >> From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com] >> Sent: Tuesday, September 20, 2011 1:49 PM >> To: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Text outline not working on line features >> >> Bob, >> >> Also, what are you getting for label output in you case? More info would >> >> help diagnose this. >> >> Thanks, >> -Steve W >> >> On 9/20/2011 1:47 PM, thomas bonfort wrote: >>> what mapserver version, what outputformat? >>> regardless, it should work with any version, are you sure that this is >>> the actual mapfile snippet that is being used ? >>> >>> -- >>> thomas >>> >>> On Tue, Sep 20, 2011 at 18:45, Bistrais, Bob >> wrote: >>>> I'm trying to draw and label road features from a shapefile. ?I'd >> like to >>>> include an outline of the road name text as a halo. ?This works fine >> on >>>> polygon and point features, but is not working for me with the line >>>> features. >>>> >>>> >>>> >>>> Here is the code block: >>>> >>>> >>>> >>>> ? ? ? ? ? ? ? ? ?LABEL >>>> >>>> ? ? ? ? ? ? ? ? ? ?ANGLE auto >>>> >>>> ? ? ? ? ? ? ? ? ? ?PARTIALS false >>>> >>>> ? ? ? ? ? ? ? ? ? ?FORCE false >>>> >>>> ? ? ? ? ? ? ? ? ? ?MINDISTANCE 250 >>>> >>>> ? ? ? ? ? ? ? ? ? ?POSITION uc >>>> >>>> ? ? ? ? ? ? ? ? ? ?COLOR 200 0 0 >>>> >>>> ? ? ? ? ? ? ? ? ? ?OUTLINECOLOR 255 255 255 >>>> >>>> ? ? ? ? ? ? ? ? ? ?OUTLINEWIDTH 5 >>>> >>>> ? ? ? ? ? ? ? ? ? ?FONT "verdana" >>>> >>>> ? ? ? ? ? ? ? ? ? ?SIZE 12 >>>> >>>> ? ? ? ? ? ? ? ? ? ?TYPE truetype >>>> >>>> ? ? ? ? ? ? ? ? ?END >>>> >>>> ? ? ? ? ? ? ? ? ?TEXT ([RDNAME]) >>>> >>>> _______________________________________________ >>>> mapserver-users mailing list >>>> mapserver-users at lists.osgeo.org >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> mapserver-users mailing list >>>> mapserver-users at lists.osgeo.org >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > From thomas.bonfort at gmail.com Thu Sep 22 08:20:49 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 22 Sep 2011 17:20:49 +0200 Subject: [mapserver-users] Abandoned railroad symbol In-Reply-To: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: SYMBOL NAME "tie" TYPE TRUETYPE FONT "path/to/arial.ttf" CHARACTER "|" END CLASS EXPRESSION ('[STATUS]' = '3') # The crossties: STYLE COLOR 200 200 200 SIZE 4 SYMBOL "tie" GAP -10 END # The centerline: STYLE COLOR 200 200 200 WIDTH 1 PATTERN 5 10 END END END On Thu, Sep 22, 2011 at 17:15, Bistrais, Bob wrote: > I?ve been playing around with the symbology but I?m not getting my spacing > right.? I?m trying to create a symbol for abandoned railroad track, looks > like the standard RR symbol, a line with the crossties, but dashed.? Here is > my code.? Problem is, although I get a dashed line and the crossties, the > interval isn?t correct, and I was wondering if anyone had advice on making > it more consistent so the crossties are always on the dashed line: > > > > ? CLASS > > ??? EXPRESSION ('[STATUS]' = '3') > > # The crossties: > > ??? STYLE > > ????? COLOR 200 200 200 > > ????? WIDTH 4 > > ????? LINECAP BUTT > > ????? ANGLE 90 > > ????? PATTERN > > ??????? 1 10 > > ????? END > > ??? END > > # The centerline: > > ??? STYLE > > ????? COLOR 200 200 200 > > ????? WIDTH 1 > > ????? PATTERN > > ??????? 5 10 > > ????? END > > ??? END > > > > ? END > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From Bob.Bistrais at maine.gov Thu Sep 22 09:14:55 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Thu, 22 Sep 2011 12:14:55 -0400 Subject: [mapserver-users] Abandoned railroad symbol In-Reply-To: References: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: <4EFF8BB964547748A07CA32961810C041C1551D9@SOM-TEAQASMAIL1.som.w2k.state.me.us> Hmm, still not getting the spacing correct. The crossties seem to be at a consistent interval, but the dashed centerline isn't spacing well- sometimes I get ties centered on the line (which is whaat I want), and sometimes the ties are at the end of a dash. -----Original Message----- From: thomas bonfort [mailto:thomas.bonfort at gmail.com] Sent: Thursday, September 22, 2011 11:21 AM To: Bistrais, Bob Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Abandoned railroad symbol SYMBOL NAME "tie" TYPE TRUETYPE FONT "path/to/arial.ttf" CHARACTER "|" END CLASS EXPRESSION ('[STATUS]' = '3') # The crossties: STYLE COLOR 200 200 200 SIZE 4 SYMBOL "tie" GAP -10 END # The centerline: STYLE COLOR 200 200 200 WIDTH 1 PATTERN 5 10 END END END On Thu, Sep 22, 2011 at 17:15, Bistrais, Bob wrote: > I've been playing around with the symbology but I'm not getting my spacing > right.? I'm trying to create a symbol for abandoned railroad track, looks > like the standard RR symbol, a line with the crossties, but dashed.? Here is > my code.? Problem is, although I get a dashed line and the crossties, the > interval isn't correct, and I was wondering if anyone had advice on making > it more consistent so the crossties are always on the dashed line: > > > > ? CLASS > > ??? EXPRESSION ('[STATUS]' = '3') > > # The crossties: > > ??? STYLE > > ????? COLOR 200 200 200 > > ????? WIDTH 4 > > ????? LINECAP BUTT > > ????? ANGLE 90 > > ????? PATTERN > > ??????? 1 10 > > ????? END > > ??? END > > # The centerline: > > ??? STYLE > > ????? COLOR 200 200 200 > > ????? WIDTH 1 > > ????? PATTERN > > ??????? 5 10 > > ????? END > > ??? END > > > > ? END > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From Bob.Basques at ci.stpaul.mn.us Thu Sep 22 09:22:44 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Thu, 22 Sep 2011 11:22:44 -0500 Subject: [mapserver-users] Abandoned railroad symbol In-Reply-To: <4EFF8BB964547748A07CA32961810C041C1551D9@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4EFF8BB964547748A07CA32961810C041C1551D9@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: <4E7B1A84020000A80002E419@heckle> All, How about just using a "+" sign as a symbol for the line instead of all the STYLE stuff? bobb >>> "Bistrais, Bob" wrote: Hmm, still not getting the spacing correct. The crossties seem to be at a consistent interval, but the dashed centerline isn't spacing well- sometimes I get ties centered on the line (which is whaat I want), and sometimes the ties are at the end of a dash. -----Original Message----- From: thomas bonfort [mailto:thomas.bonfort at gmail.com] Sent: Thursday, September 22, 2011 11:21 AM To: Bistrais, Bob Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Abandoned railroad symbol SYMBOL NAME "tie" TYPE TRUETYPE FONT "path/to/arial.ttf" CHARACTER "|" END CLASS EXPRESSION ('[STATUS]' = '3') # The crossties: STYLE COLOR 200 200 200 SIZE 4 SYMBOL "tie" GAP -10 END # The centerline: STYLE COLOR 200 200 200 WIDTH 1 PATTERN 5 10 END END END On Thu, Sep 22, 2011 at 17:15, Bistrais, Bob wrote: > I've been playing around with the symbology but I'm not getting my spacing > right. I'm trying to create a symbol for abandoned railroad track, looks > like the standard RR symbol, a line with the crossties, but dashed. Here is > my code. Problem is, although I get a dashed line and the crossties, the > interval isn't correct, and I was wondering if anyone had advice on making > it more consistent so the crossties are always on the dashed line: > > > > CLASS > > EXPRESSION ('[STATUS]' = '3') > > # The crossties: > > STYLE > > COLOR 200 200 200 > > WIDTH 4 > > LINECAP BUTT > > ANGLE 90 > > PATTERN > > 1 10 > > END > > END > > # The centerline: > > STYLE > > COLOR 200 200 200 > > WIDTH 1 > > PATTERN > > 5 10 > > END > > END > > > > END > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob.Bistrais at maine.gov Thu Sep 22 09:35:52 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Thu, 22 Sep 2011 12:35:52 -0400 Subject: [mapserver-users] Abandoned railroad symbol In-Reply-To: <4E7B1A84020000A80002E419@heckle> References: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4EFF8BB964547748A07CA32961810C041C1551D9@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4E7B1A84020000A80002E419@heckle> Message-ID: <4EFF8BB964547748A07CA32961810C041C155200@SOM-TEAQASMAIL1.som.w2k.state.me.us> Hmm, that doesn't work too badly at all. We'll see what the critics think, but I like it! ________________________________ From: Bob Basques [mailto:Bob.Basques at ci.stpaul.mn.us] Sent: Thursday, September 22, 2011 12:23 PM To: thomas bonfort; Bistrais, Bob Cc: mapserver-users at lists.osgeo.org Subject: RE: [mapserver-users] Abandoned railroad symbol All, How about just using a "+" sign as a symbol for the line instead of all the STYLE stuff? bobb >>> "Bistrais, Bob" wrote: Hmm, still not getting the spacing correct. The crossties seem to be at a consistent interval, but the dashed centerline isn't spacing well- sometimes I get ties centered on the line (which is whaat I want), and sometimes the ties are at the end of a dash. -----Original Message----- From: thomas bonfort [mailto:thomas.bonfort at gmail.com] Sent: Thursday, September 22, 2011 11:21 AM To: Bistrais, Bob Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Abandoned railroad symbol SYMBOL NAME "tie" TYPE TRUETYPE FONT "path/to/arial.ttf" CHARACTER "|" END CLASS EXPRESSION ('[STATUS]' = '3') # The crossties: STYLE COLOR 200 200 200 SIZE 4 SYMBOL "tie" GAP -10 END # The centerline: STYLE COLOR 200 200 200 WIDTH 1 PATTERN 5 10 END END END On Thu, Sep 22, 2011 at 17:15, Bistrais, Bob wrote: > I've been playing around with the symbology but I'm not getting my spacing > right. I'm trying to create a symbol for abandoned railroad track, looks > like the standard RR symbol, a line with the crossties, but dashed. Here is > my code. Problem is, although I get a dashed line and the crossties, the > interval isn't correct, and I was wondering if anyone had advice on making > it more consistent so the crossties are always on the dashed line: > > > > CLASS > > EXPRESSION ('[STATUS]' = '3') > > # The crossties: > > STYLE > > COLOR 200 200 200 > > WIDTH 4 > > LINECAP BUTT > > ANGLE 90 > > PATTERN > > 1 10 > > END > > END > > # The centerline: > > STYLE > > COLOR 200 200 200 > > WIDTH 1 > > PATTERN > > 5 10 > > END > > END > > > > END > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From rustam.kamberov at gmail.com Thu Sep 22 10:20:41 2011 From: rustam.kamberov at gmail.com (Rustam Kamberov) Date: Thu, 22 Sep 2011 19:20:41 +0200 Subject: [mapserver-users] Mapscript and Python problems Message-ID: Hi everyone, i have installed Mapserver, and downloaded Mapscript library for Python, followed the official procedure. I tested http://localhost:8080/cgi-bin/test-cgi-mapscript.py example. it works perfectly. But when I try to import mapscript from Python IDLE, it gives the error shown below: >>> import mapscript Traceback (most recent call last): File "", line 1, in import mapscript File "C:\Python26\lib\site-packages\mapscript.py", line 25, in _mapscript = swig_import_helper() File "C:\Python26\lib\site-packages\mapscript.py", line 24, in swig_import_helper return _mod UnboundLocalError: local variable '_mod' referenced before assignment It seem the problem in the mapscript.py code. I would appreciate if you give me an advice what to do. Thanks in advance, Rustam -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Thu Sep 22 18:00:03 2011 From: sdlime at gmail.com (Steve Lime) Date: Thu, 22 Sep 2011 19:00:03 -0600 Subject: [mapserver-users] How can i get an attribute value of a specific shape in the mapfile? In-Reply-To: <1316587423896-6815042.post@n2.nabble.com> References: <1316587423896-6815042.post@n2.nabble.com> Message-ID: I suppose if you were using a RDBMS you could do a sub-select in the data statement. Other idea would be to chain a query with a map draw. That is, do a query to identify 'red fern' and then use attributes from it to parameterize a map draw by passing in the area via runtime substitution. Steve On Wednesday, September 21, 2011, jjwang wrote: > Is there any way to get an attribute value of a specific shape in the > mapfile? > For example: > I want to know the value of the attribute 'AREA' of a shape whose 'NAME' is > 'REDFERN'. > So that I can use it in the EXPRESSION like this: > CLASS > EXPRESSION ([AREA] > [the area value of shape whose name is 'redfern']) > ... > END > > JJ > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-can-i-get-an-attribute-value-of-a-specific-shape-in-the-mapfile-tp6815042p6815042.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaja0506 at gmail.com Thu Sep 22 18:43:40 2011 From: jaja0506 at gmail.com (jjwang) Date: Thu, 22 Sep 2011 18:43:40 -0700 (PDT) Subject: [mapserver-users] Re: How can i get an attribute value of a specific shape in the mapfile? In-Reply-To: References: <1316587423896-6815042.post@n2.nabble.com> Message-ID: <1316742220426-6822625.post@n2.nabble.com> Thank you for your reply. Yeah. What I did is to do a wfs getfeature request first to get the attribute I want by using a filter. And then use runtime substitution to pass it into the mapfile. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-can-i-get-an-attribute-value-of-a-specific-shape-in-the-mapfile-tp6815042p6822625.html Sent from the Mapserver - User mailing list archive at Nabble.com. From punk.kish at gmail.com Thu Sep 22 19:17:11 2011 From: punk.kish at gmail.com (Puneet Kishor) Date: Thu, 22 Sep 2011 21:17:11 -0500 Subject: [mapserver-users] WMS layers get canceled Message-ID: <3FADC8D3-BD51-431A-8165-E6045FCA91CF@gmail.com> I am unable to figure this out -- My app front is Google Maps API v3 with MapServer 6.0.1 $./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE The app fires WMS requests that look like so in Firebug and Safari Web Inspector (one per tile) http://path/to/server/cgi-bin/app?version=1.1.1&request=GetMap&format=image/png&TRANSPARENT=TRUE&Styles=&SRS=EPSG:4326&Layers=lyr&width=256&height=256&BBOX=-135,40.97989806962013,-90,66.51326044311185 The status code in Firebug is "Aborted" ("Canceled" in Safari Web Inspector). The ms_error file kicks in the following messages -- [Thu Sep 22 21:00:55 2011].347078 msWMSLoadGetMapParams(): enabling non-square pixels. [Thu Sep 22 21:00:55 2011].347608 msDrawMap(): kicking into non-square pixel preserving mode. [Thu Sep 22 21:00:55 2011].347615 msDrawMap(): rendering using outputformat named png24 (AGG/PNG). My .map file has the following incantation -- #### in the MAP section ##### PROJECTION "init=epsg:4326" END WEB METADATA ows_enable_request "*" wms_abstract "blah blah" wms_accessconstraints "none" wms_title "gpsvecs" wms_onlineresource "http://path/to/server/cgi-bin/gpsvecs?" wms_srs "EPSG:4326" wms_keywordlist "foo,bar" wms_enable_request "*" END END #### in the LAYER section #### LAYER NAME "lyr" CONNECTION "host=localhost port=5432 dbname=db user=user password=passwd" CONNECTIONTYPE POSTGIS PROCESSING "CLOSE_CONNECTION=DEFER" DATA "the_geom FROM (SELECT gid, a, b, the_geom FROM table) foo USING UNIQUE gid USING srid=4326" PROJECTION "init=epsg:4326" END METADATA wms_srs "EPSG:4326" wms_title "lyr" wms_abstract "blah blah" wms_keywordlist "foo,bar" wms_enable_request "*" wms_extent "-180 -90 180 90" END Suggestions? From sdlime at gmail.com Thu Sep 22 19:56:44 2011 From: sdlime at gmail.com (Steve Lime) Date: Thu, 22 Sep 2011 20:56:44 -0600 Subject: [mapserver-users] Looking for information on SHPXY, specifically an example of a LINE IMAGEMAP template. In-Reply-To: <4E79B2BC020000A80002E2B1@heckle> References: <4E78BFD9020000A80002E26F@heckle> <4E79B2BC020000A80002E2B1@heckle> Message-ID: The units change when buffering is done. There's only 1 supported, px. If not set to px the units are assumed to be the same as the layers projection. In that case the feature is buffered and then converted to image coords. If the units are px then the buffering happens after conversion to image coordinates. I suspect that's why you see the more complex output. The map to image conversion removes loads of unnecessary coords that are re-introduced when buffering. I suspect there may be a way to always buffer beforehand but I've not looked into that. Steve On Wednesday, September 21, 2011, Bob Basques wrote: > All, > > Some more info on the topic, I see now that my first question was phrased wrongly, I actaully need more information about how SHPXY works against (POLY)LINE features (vs POLYGONS): > > Using this slightly modified version of the SHPXY call (removed the "px" from the end of the buffer > > coords="[shpxy cs=" " xf="," proj="image" buffer=20]" > > The output looks like: > > coords="0,950 0,0 879,0 879,950" (coincidentally mapsize=880 952 for the call) > > Much smaller list than below (but it now includes almost the complete image). I also think that an imagemaop needs to have the first and last coordinate pairs be the same in order to close the same (which is correct below) > > coords="[shpxy cs=" " xf="," proj="image" buffer=20px]" > > coords="442,455 441,455 440,455 439,455 438,455 437,456 436,456 435,456 434,457 433,457 432,458 431,458 430,459 429,460 428,460 428,461 427,462 426,463 426,463 425,464 425,465 424,466 424,467 423,468 423,469 423,470 422,471 422,472 422,473 422,474 422,475 422,476 422,477 422,478 422,479 423,480 423,481 423,482 424,483 424,484 425,485 425,486 426,487 427,488 427,489 428,489 429,490 430,491 430,491 431,492 432,492 433,493 434,493 435,494 436,494 437,494 438,495 439,495 440,495 441,495 442,495 879,490 880,490 881,490 882,490 883,490 884,489 885,489 886,489 887,488 888,488 889,487 890,487 891,486 892,485 893,485 893,484 894,483 895,482 895,482 896,481 896,480 897,479 897,478 898,477 898,476 898,475 899,474 899,473 899,472 899,471 899,470 899,469 899,468 899,467 899,466 898,465 898,464 898,463 897,462 897,461 896,460 896,459 895,458 894,457 894,456 893,456 892,455 891,454 891,454 890,453 889,453 888,452 887,452 886,451 885,451 884,451 883,450 882,450 881,450 880,450 879,450 442,455" > > See attached for image from above examples. > > I couldn't find any documentation anywhere about these unit options like "px". So what's the deal with this unit inclusion changing the output, and why are so many numbers required to imagemap a straight line? Is this related to incrementally going around a corner or curved object or ??? > > Still working it . . . > > bobb > > > >>>> "Bob Basques" wrote: > > All, > > Should I be using "POLY" as the type for LINE imagemaps? > > This works most of the time: > > class="Sewers" shape="poly" coords="[shpxy cs=" " xf="," proj="image" buffer=20px] > > Also, related to precision, is there a weeding option of some sort? A typical output from above looks like (really a LINE feature), notice the same points being written out: > > class="Sewers" shape="poly" coords="816,525 816,514 815,504 814,494 812,483 810,473 807,463 803,453 799,443 795,434 790,425 785,416 779,407 773,399 766,391 759,383 751,376 743,369 735,362 727,356 718,351 708,346 699,341 689,337 680,333 670,330 659,328 649,326 639,324 628,323 618,323 607,323 597,324 587,325 576,327 566,329 556,332 546,336 536,340 527,344 518,349 509,354 500,360 492,366 484,373 476,380 469,388 462,396 455,404 449,412 444,421 439,431 434,440 430,450 426,459 423,469 421,480 419,490 417,500 416,511 416,521 415,627 415,638 416,648 417,658 419,669 421,679 424,689 428,699 432,709 436,718 441,727 446,736 452,745 458,753 465,761 472,769 480,776 488,783 496,790 504,796 513,801 523,806 532,811 542,815 551,819 561,822 572,824 582,826 592,828 603,829 613,829 624,829 634,828 644,827 655,825 665,823 675,820 685,816 695,812 704,808 713,803 722,798 731,792 739,786 747,779 755,772 762,764 769,756 776,748 782,740 787,731 792,721 797,712 801,702 805,693 808,683 810,672 812,662 814,652 815,641 815,631 816,525" > > . . . but not all of the time, seems to get confused from time to time in how the imagemap is drawn. The above imagemap is for a two point line feature for example. > > bobb > -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Thu Sep 22 20:47:22 2011 From: punk.kish at gmail.com (Puneet Kishor) Date: Thu, 22 Sep 2011 22:47:22 -0500 Subject: [mapserver-users] Re: WMS layers get canceled In-Reply-To: <3FADC8D3-BD51-431A-8165-E6045FCA91CF@gmail.com> References: <3FADC8D3-BD51-431A-8165-E6045FCA91CF@gmail.com> Message-ID: a bit more on this below -- On Sep 22, 2011, at 9:17 PM, Puneet Kishor wrote: > I am unable to figure this out -- > > My app front is Google Maps API v3 with MapServer 6.0.1 > > $./mapserv -v > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE > > The app fires WMS requests that look like so in Firebug and Safari Web Inspector (one per tile) > > http://path/to/server/cgi-bin/app?version=1.1.1&request=GetMap&format=image/png&TRANSPARENT=TRUE&Styles=&SRS=EPSG:4326&Layers=lyr&width=256&height=256&BBOX=-135,40.97989806962013,-90,66.51326044311185 > > The status code in Firebug is "Aborted" ("Canceled" in Safari Web Inspector). The ms_error file kicks in the following messages -- > > [Thu Sep 22 21:00:55 2011].347078 msWMSLoadGetMapParams(): enabling non-square pixels. > [Thu Sep 22 21:00:55 2011].347608 msDrawMap(): kicking into non-square pixel preserving mode. > [Thu Sep 22 21:00:55 2011].347615 msDrawMap(): rendering using outputformat named png24 (AGG/PNG). > > My .map file has the following incantation -- > > #### in the MAP section ##### > PROJECTION > "init=epsg:4326" > END > WEB > METADATA > ows_enable_request "*" > wms_abstract "blah blah" > wms_accessconstraints "none" > wms_title "gpsvecs" > wms_onlineresource "http://path/to/server/cgi-bin/gpsvecs?" > wms_srs "EPSG:4326" > wms_keywordlist "foo,bar" > wms_enable_request "*" > END > END > > #### in the LAYER section #### > LAYER > NAME "lyr" > CONNECTION "host=localhost port=5432 dbname=db user=user password=passwd" > CONNECTIONTYPE POSTGIS > PROCESSING "CLOSE_CONNECTION=DEFER" > DATA "the_geom FROM (SELECT gid, a, b, the_geom FROM table) foo USING UNIQUE gid USING srid=4326" > > PROJECTION > "init=epsg:4326" > END > > METADATA > wms_srs "EPSG:4326" > wms_title "lyr" > wms_abstract "blah blah" > wms_keywordlist "foo,bar" > wms_enable_request "*" > wms_extent "-180 -90 180 90" > END > > > Suggestions? Seems like when fired by Google Maps, MapServer doesn't return any Response Headers. If I take the same query and send it manually, I get the response headers, and I get a nice image back. Any idea what is going on? My guess is I am doing something wrong on the Gmaps side. Here is my relevant code var lyr = new google.maps.ImageMapType({ "getTileUrl" : function (tile, zoom) { return uri + "layers=" + name + "&mode=tile&tilemode=gmap&tile=" + tile.x + "+" + tile.y + "+" + zoom; }, "tileSize" : new google.maps.Size(256, 256), "isPng" : false, "opacity" : 0.5, "maxZoom" : 22, "minZoom" : 1, "alt" : "", "name" : name }); map.overlayMapTypes.push(lyr) From Jukka.Rahkonen at mmmtike.fi Thu Sep 22 21:00:14 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 23 Sep 2011 04:00:14 +0000 Subject: [mapserver-users] WMS layers get canceled In-Reply-To: <3FADC8D3-BD51-431A-8165-E6045FCA91CF@gmail.com> References: <3FADC8D3-BD51-431A-8165-E6045FCA91CF@gmail.com> Message-ID: <84446DEF76453C439E9E97E438E13A630241A9@suutari.haapa.mmm.fi> Hi, Is this really your DATA or did you just wipe our "AS" from "AS foo" when editing your mail? DATA "the_geom FROM (SELECT gid, a, b, the_geom FROM table) foo USING UNIQUE gid USING srid=4326" It really looks like &service=WMS is not compulsory in WMS. Brave programmer who makes a client to leave it out, though, because it would not cost anything to include it and make thing for sure clear for a server. -Jukka Rahkonen- ________________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] käyttäjän Puneet Kishor [punk.kish at gmail.com] puolesta L?hetetty: 23. syyskuuta 2011 5:17 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [mapserver-users] WMS layers get canceled I am unable to figure this out -- My app front is Google Maps API v3 with MapServer 6.0.1 $./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE The app fires WMS requests that look like so in Firebug and Safari Web Inspector (one per tile) http://path/to/server/cgi-bin/app?version=1.1.1&request=GetMap&format=image/png&TRANSPARENT=TRUE&Styles=&SRS=EPSG:4326&Layers=lyr&width=256&height=256&BBOX=-135,40.97989806962013,-90,66.51326044311185 The status code in Firebug is "Aborted" ("Canceled" in Safari Web Inspector). The ms_error file kicks in the following messages -- [Thu Sep 22 21:00:55 2011].347078 msWMSLoadGetMapParams(): enabling non-square pixels. [Thu Sep 22 21:00:55 2011].347608 msDrawMap(): kicking into non-square pixel preserving mode. [Thu Sep 22 21:00:55 2011].347615 msDrawMap(): rendering using outputformat named png24 (AGG/PNG). My .map file has the following incantation -- #### in the MAP section ##### PROJECTION "init=epsg:4326" END WEB METADATA ows_enable_request "*" wms_abstract "blah blah" wms_accessconstraints "none" wms_title "gpsvecs" wms_onlineresource "http://path/to/server/cgi-bin/gpsvecs?" wms_srs "EPSG:4326" wms_keywordlist "foo,bar" wms_enable_request "*" END END #### in the LAYER section #### LAYER NAME "lyr" CONNECTION "host=localhost port=5432 dbname=db user=user password=passwd" CONNECTIONTYPE POSTGIS PROCESSING "CLOSE_CONNECTION=DEFER" DATA "the_geom FROM (SELECT gid, a, b, the_geom FROM table) foo USING UNIQUE gid USING srid=4326" PROJECTION "init=epsg:4326" END METADATA wms_srs "EPSG:4326" wms_title "lyr" wms_abstract "blah blah" wms_keywordlist "foo,bar" wms_enable_request "*" wms_extent "-180 -90 180 90" END Suggestions?_______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Thu Sep 22 21:30:31 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 22 Sep 2011 23:30:31 -0500 Subject: [mapserver-users] WMS layers get canceled In-Reply-To: <84446DEF76453C439E9E97E438E13A630241A9@suutari.haapa.mmm.fi> References: <3FADC8D3-BD51-431A-8165-E6045FCA91CF@gmail.com> <84446DEF76453C439E9E97E438E13A630241A9@suutari.haapa.mmm.fi> Message-ID: On Sep 22, 2011, at 11:00 PM, Rahkonen Jukka wrote: > Hi, > > Is this really your DATA or did you just wipe our "AS" from "AS foo" when editing your mail? There is no difference between `(SELECT...) AS foo` and `(SELECT...) foo`. `AS` is optional in SQL when declaring aliases. > DATA "the_geom FROM (SELECT gid, a, b, the_geom FROM table) foo USING UNIQUE gid USING srid=4326" > > It really looks like &service=WMS is not compulsory in WMS. Brave programmer who makes a client to leave it out, though, because it would not cost anything to include it and make thing for sure clear for a server. > > -Jukka Rahkonen- > > ________________________________________ > L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] käyttäjän Puneet Kishor [punk.kish at gmail.com] puolesta > L?hetetty: 23. syyskuuta 2011 5:17 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] WMS layers get canceled > > I am unable to figure this out -- > > My app front is Google Maps API v3 with MapServer 6.0.1 > > $./mapserv -v > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE > > The app fires WMS requests that look like so in Firebug and Safari Web Inspector (one per tile) > > http://path/to/server/cgi-bin/app?version=1.1.1&request=GetMap&format=image/png&TRANSPARENT=TRUE&Styles=&SRS=EPSG:4326&Layers=lyr&width=256&height=256&BBOX=-135,40.97989806962013,-90,66.51326044311185 > > The status code in Firebug is "Aborted" ("Canceled" in Safari Web Inspector). The ms_error file kicks in the following messages -- > > [Thu Sep 22 21:00:55 2011].347078 msWMSLoadGetMapParams(): enabling non-square pixels. > [Thu Sep 22 21:00:55 2011].347608 msDrawMap(): kicking into non-square pixel preserving mode. > [Thu Sep 22 21:00:55 2011].347615 msDrawMap(): rendering using outputformat named png24 (AGG/PNG). > > My .map file has the following incantation -- > > #### in the MAP section ##### > PROJECTION > "init=epsg:4326" > END > WEB > METADATA > ows_enable_request "*" > wms_abstract "blah blah" > wms_accessconstraints "none" > wms_title "gpsvecs" > wms_onlineresource "http://path/to/server/cgi-bin/gpsvecs?" > wms_srs "EPSG:4326" > wms_keywordlist "foo,bar" > wms_enable_request "*" > END > END > > #### in the LAYER section #### > LAYER > NAME "lyr" > CONNECTION "host=localhost port=5432 dbname=db user=user password=passwd" > CONNECTIONTYPE POSTGIS > PROCESSING "CLOSE_CONNECTION=DEFER" > DATA "the_geom FROM (SELECT gid, a, b, the_geom FROM table) foo USING UNIQUE gid USING srid=4326" > > PROJECTION > "init=epsg:4326" > END > > METADATA > wms_srs "EPSG:4326" > wms_title "lyr" > wms_abstract "blah blah" > wms_keywordlist "foo,bar" > wms_enable_request "*" > wms_extent "-180 -90 180 90" > END > > > Suggestions?_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From mapoubelle22 at gmail.com Fri Sep 23 01:10:17 2011 From: mapoubelle22 at gmail.com (fred p) Date: Fri, 23 Sep 2011 10:10:17 +0200 Subject: [mapserver-users] Re: problem with mercator projection In-Reply-To: References: Message-ID: Hello Nobody has got an idea whether I am wrong somewhere or there is a problem in the image or ... ? I add the result is OK in EPSG:4326 whatever the bbox is and it is OK too in EPSG:3395 provided the extent longitude is smaller than 360?. However when it is higher... Thanks in advance 2011/9/21 fred p > Hello ! > > I am trying to serve an image in Mercator projection (EPSG:3395) with an > extent larger than "360? in longitude" but I get a truncated and reversed in > longitude image. > Do I make a mistake somewhere? > Thanks for your help > > The mapfile content and the gdalinfo output on the original image are given > below. > > > Mapserver version: 6.0.1 > > Call to mapserver: > /path/to/mapserv -nh "QUERY_STRING=map=/tmp/world. > map&service=wms&LAYERS=countries&FORMAT=image/png&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=epsg:3395&BBOX=-26080550.098232,-15000000,26080550.098232,15000000&WIDTH=885&HEIGHT=509" > > foo.png > > Content of the mapfile: > MAP > EXTENT -180 -90 180 90 > IMAGECOLOR 255 255 255 > IMAGETYPE agg > STATUS ON > > OUTPUTFORMAT > NAME "agg" > MIMETYPE "image/png" > DRIVER "AGG/PNG" > EXTENSION "png" > IMAGEMODE "RGBA" > TRANSPARENT TRUE > FORMATOPTION "INTERLACE=false" > END > > PROJECTION > "init=epsg:4326" > END > > WEB > METADATA > "wms_srs" "epsg:4326 epsg:3395 epsg:900913 epsg:3995" > "OWS_ENABLE_REQUEST" "*" > END > END > > LAYER > DATA "/tmp/world.tif" > NAME "countries" > PROJECTION > "init=epsg:4326" > END > STATUS ON > TYPE RASTER > END > > END > > Output of gdalinfo command: > $ gdalinfo /tmp/world.tif > Driver: GTiff/GeoTIFF > Files: /tmp/world.tif > Size is 1000, 500 > Coordinate System is: > GEOGCS["WGS 84", > DATUM["WGS_1984", > SPHEROID["WGS 84",6378137,298.257223563, > AUTHORITY["EPSG","7030"]], > AUTHORITY["EPSG","6326"]], > PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433], > AUTHORITY["EPSG","4326"]] > Origin = (-180.000000000000000,90.000000000000000) > Pixel Size = (0.360000000000000,-0.360000000000000) > Metadata: > TIFFTAG_DOCUMENTNAME=/tmp/world.tif > TIFFTAG_XRESOLUTION=72 > TIFFTAG_YRESOLUTION=72 > TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) > AREA_OR_POINT=Area > Image Structure Metadata: > INTERLEAVE=BAND > Corner Coordinates: > Upper Left (-180.0000000, 90.0000000) (180d 0'0.00"W, 90d 0'0.00"N) > Lower Left (-180.0000000, -90.0000000) (180d 0'0.00"W, 90d 0'0.00"S) > Upper Right ( 180.0000000, 90.0000000) (180d 0'0.00"E, 90d 0'0.00"N) > Lower Right ( 180.0000000, -90.0000000) (180d 0'0.00"E, 90d 0'0.00"S) > Center ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N) > Band 1 Block=1000x8 Type=Byte, ColorInterp=Gray > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rustam.kamberov at gmail.com Fri Sep 23 01:27:44 2011 From: rustam.kamberov at gmail.com (Rustam Kamberov) Date: Fri, 23 Sep 2011 10:27:44 +0200 Subject: [mapserver-users] Mapscript and Python Message-ID: Hi everyone, i have installed Mapserver, and downloaded Mapscript library for Python, followed the official procedure. I tested http://localhost:8080/cgi-bin/test-cgi-mapscript.py example. it works perfectly. But when I try to import mapscript from Python IDLE, it gives the error shown below: >>> import mapscript Traceback (most recent call last): File "", line 1, in import mapscript File "C:\Python26\lib\site-packages\mapscript.py", line 25, in _mapscript = swig_import_helper() File "C:\Python26\lib\site-packages\mapscript.py", line 24, in swig_import_helper return _mod UnboundLocalError: local variable '_mod' referenced before assignment It seem the problem in the mapscript.py code. I would appreciate if you give me an advice what to do. Thanks in advance, Rustam -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Fri Sep 23 01:31:34 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 23 Sep 2011 08:31:34 +0000 Subject: [mapserver-users] Re: problem with mercator projection In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A63024227@suutari.haapa.mmm.fi> Hi, You perhaps want to achieve a map presenting the whole world once and then some extra from the second round in the margins like http://www.openstreetmap.org/?lat=59&lon=-39&zoom=1&layers=M? It might well be that the transformation functions consider that for EPSG:3395 the maximum values really are the bounds reported at http://spatialreference.org/ref/epsg/3395/ and values outside the value range are invalid. I have no idea about how you could get your map out from WMS. Could you consider composing it from pieces somehow? -Jukka Rahkonen- ________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta fred p L?hetetty: 23. syyskuuta 2011 11:10 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [mapserver-users] Re: problem with mercator projection Hello Nobody has got an idea whether I am wrong somewhere or there is a problem in the image or ... ? I add the result is OK in EPSG:4326 whatever the bbox is and it is OK too in EPSG:3395 provided the extent longitude is smaller than 360?. However when it is higher... Thanks in advance 2011/9/21 fred p > Hello ! I am trying to serve an image in Mercator projection (EPSG:3395) with an extent larger than "360? in longitude" but I get a truncated and reversed in longitude image. Do I make a mistake somewhere? Thanks for your help The mapfile content and the gdalinfo output on the original image are given below. Mapserver version: 6.0.1 Call to mapserver: /path/to/mapserv -nh "QUERY_STRING=map=/tmp/world. map&service=wms&LAYERS=countries&FORMAT=image/png&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=epsg:3395&BBOX=-26080550.098232,-15000000,26080550.098232,15000000&WIDTH=885&HEIGHT=509" > foo.png Content of the mapfile: MAP EXTENT -180 -90 180 90 IMAGECOLOR 255 255 255 IMAGETYPE agg STATUS ON OUTPUTFORMAT NAME "agg" MIMETYPE "image/png" DRIVER "AGG/PNG" EXTENSION "png" IMAGEMODE "RGBA" TRANSPARENT TRUE FORMATOPTION "INTERLACE=false" END PROJECTION "init=epsg:4326" END WEB METADATA "wms_srs" "epsg:4326 epsg:3395 epsg:900913 epsg:3995" "OWS_ENABLE_REQUEST" "*" END END LAYER DATA "/tmp/world.tif" NAME "countries" PROJECTION "init=epsg:4326" END STATUS ON TYPE RASTER END END Output of gdalinfo command: $ gdalinfo /tmp/world.tif Driver: GTiff/GeoTIFF Files: /tmp/world.tif Size is 1000, 500 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (-180.000000000000000,90.000000000000000) Pixel Size = (0.360000000000000,-0.360000000000000) Metadata: TIFFTAG_DOCUMENTNAME=/tmp/world.tif TIFFTAG_XRESOLUTION=72 TIFFTAG_YRESOLUTION=72 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left (-180.0000000, 90.0000000) (180d 0'0.00"W, 90d 0'0.00"N) Lower Left (-180.0000000, -90.0000000) (180d 0'0.00"W, 90d 0'0.00"S) Upper Right ( 180.0000000, 90.0000000) (180d 0'0.00"E, 90d 0'0.00"N) Lower Right ( 180.0000000, -90.0000000) (180d 0'0.00"E, 90d 0'0.00"S) Center ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N) Band 1 Block=1000x8 Type=Byte, ColorInterp=Gray -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Fri Sep 23 01:55:13 2011 From: sdlime at gmail.com (Steve Lime) Date: Fri, 23 Sep 2011 02:55:13 -0600 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> Message-ID: My guess is the validation is correct but the syntax of the URL parameter is is wrong in that the value passed for DATA is not quoted. If you unquote the default value in your mapfile does that result in a error? That would be an easy way to test the need for quotes. One last idea, while map_layer... should work, try map.layer... instead as you variable name. If you're really are just replacing the date part you could do that by doing a runtime sub... DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" VALIDATION date 'regex' END And then you pass date as a CGI variable. Steve On Thursday, September 22, 2011, Asad Ullah wrote: > List, > I am trying to substitute DATA parameter in my mapfile with a call from Openlayers as follow: > > map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png" > > The mapfile is: > > LAYER > NAME "OMI_CP" > TYPE RASTER > STATUS DEFAULT > OFFSITE 0 0 0 > PROJECTION > "init=epsg:4326" > END > DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" > VALIDATION > 'DATA' '^OMI_.*\.png$' > END > > The call should change the date part (20110922) of the png filename but it is not doing it. Can anyone point to what I am doing wrong here? > > Thanks, > > Asad > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Fri Sep 23 02:10:41 2011 From: sdlime at gmail.com (Steve Lime) Date: Fri, 23 Sep 2011 03:10:41 -0600 Subject: [mapserver-users] Generic template for WMS GetFeatureInfo In-Reply-To: <53D7A0A1A7E1B94689D14547F9262CF60D0EAFB4@resc-ex002.res.adroot.dk> References: <53D7A0A1A7E1B94689D14547F9262CF60D078753@resc-ex002.res.adroot.dk> <7F5478A7-D68D-406D-8EA3-A0DDA9404866@gmail.com> <53D7A0A1A7E1B94689D14547F9262CF60D0EAFB4@resc-ex002.res.adroot.dk> Message-ID: See http://mapserver.org/output/template_output.html for more info. The idea was to wrap templates in output formats so you can support multiple output types with a single mapfile. You'd have to do that with multiple layers using the old scheme. Plus one template can reference many layers so there are Far less files to manage. -Steve On Monday, September 19, 2011, Hollingbery, Julian wrote: > Hi Steve, > > thanks for the tip. Most of my users have desktop GIS systems (MapInfo, ArcMap, etc.), but I might test whether these support a JavaScript-based solution. > In the mean time, could you expand a bit on the "new-style templates"? All I have done so far is according to http://mapserver.org/mapfile/template.html#template, and I don't remember that this says anything about inclusion of subtemplates. > > Julian > ________________________________ > Fra: Steve Lime [mailto:sdlime at gmail.com] > Sendt: 15. september 2011 20:43 > Til: Hollingbery, Julian > Cc: > Emne: Re: [mapserver-users] Generic template for WMS GetFeatureInfo > > Hi Julian: You might try the [items] and [values] template tags combined with a little JavaScript. Those tags output a delimited list of items and values for a feature or set of features. You could split the output into arrays and display however you like. The attributes are just slammed together into 1 comma delimited string, so this approach won't work if your attribute data contains commas I fear. The same template in theory could be used for any layer then... You could use new-style templates (e.g. Via output formats) with template includes and handle this with 2 files- the main template and the shared include... > I notice those tags aren't documented so I'll create a ticket to do so. Should also probably enhance those tags, at least the values one, to take some simple formatting options. > Steve > > Sent from my iPad > On Sep 14, 2011, at 8:39 AM, "Hollingbery, Julian" wrote: > > Hi list, > > I too want to serve GetFeatureInfo requests. However, I wonder if it is necessary to have a template per layer, when all I want to do is "show all attribute values in a HTML table". The thing is, I have a handful of services with approx. 40 layers in each. Each layer has on average a dozen attributes, so all in all, I am looking to simplify maintenance of 2000 HTML table cells. Has anyone done anything in a script or otherwise, so that one can use the same template file on layers with varying attribute lists? > > I am considering utilising the fact that a TEMPLATE statement can reference a URL: I imagine that this might refer to a PHP-script, which takes e.g. a database table name, and returns a HTML response with the column names. Has anyone done anything like this? > > Regards, > Julian Hollingbery > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aboudreault at mapgears.com Fri Sep 23 05:21:43 2011 From: aboudreault at mapgears.com (Alan Boudreault) Date: Fri, 23 Sep 2011 08:21:43 -0400 Subject: [mapserver-users] Mapscript and Python In-Reply-To: References: Message-ID: <201109230821.43900.aboudreault@mapgears.com> Try to rebuild and recompile the python binding using an old version of SWIG. It seems that using a too recent swig causes issues sometime. I think I normally use swig 1.3.39. Alan On September 23, 2011 04:27:44 am Rustam Kamberov wrote: > Hi everyone, > > i have installed Mapserver, and downloaded Mapscript library for Python, > followed the official procedure. > > I tested http://localhost:8080/cgi-bin/test-cgi-mapscript.py example. it > works perfectly. But when I try to import mapscript from Python IDLE, it > > gives the error shown below: > >>> import mapscript > > Traceback (most recent call last): > File "", line 1, in > import mapscript > File "C:\Python26\lib\site-packages\mapscript.py", line 25, in > _mapscript = swig_import_helper() > File "C:\Python26\lib\site-packages\mapscript.py", line 24, in > swig_import_helper > return _mod > UnboundLocalError: local variable '_mod' referenced before assignment > > > It seem the problem in the mapscript.py code. I would appreciate if you > give me an advice what to do. > > Thanks in advance, > Rustam -- Alan Boudreault Mapgears http://www.mapgears.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From craiga at genesisgroup.com Fri Sep 23 07:51:44 2011 From: craiga at genesisgroup.com (Craig Anderson) Date: Fri, 23 Sep 2011 07:51:44 -0700 (PDT) Subject: [mapserver-users] File Geodatabase - Feature Dataset Message-ID: <1316789504683-6824494.post@n2.nabble.com> I have MANY ArcGIS 10 File Geodatabases whose data is organized into Feature Datasets and I'd liketo be able to serve them upo as WMS/WFS services using Mapserver: How do I "path" to these vector data that are stored in feature datasets? Niether of these work: CONNECTIONTYPE OGR CONNECTION "../data/HillsboroughBase.gdb/Cadastral" DATA "Parcels" or CONNECTIONTYPE OGR CONNECTION "../data/HillsboroughBase.gdb" DATA "Cadastral/Parcels" Any help would be appreciated. Craig -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/File-Geodatabase-Feature-Dataset-tp6824494p6824494.html Sent from the Mapserver - User mailing list archive at Nabble.com. From david.fawcett at state.mn.us Fri Sep 23 07:58:00 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Fri, 23 Sep 2011 09:58:00 -0500 Subject: [mapserver-users] File Geodatabase - Feature Dataset In-Reply-To: <1316789504683-6824494.post@n2.nabble.com> References: <1316789504683-6824494.post@n2.nabble.com> Message-ID: Craig, Do you have an instance of OGR that can read ESRI's proprietary File Geodatabase format? David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Craig Anderson Sent: Friday, September 23, 2011 9:52 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] File Geodatabase - Feature Dataset I have MANY ArcGIS 10 File Geodatabases whose data is organized into Feature Datasets and I'd liketo be able to serve them upo as WMS/WFS services using Mapserver: How do I "path" to these vector data that are stored in feature datasets? Niether of these work: CONNECTIONTYPE OGR CONNECTION "../data/HillsboroughBase.gdb/Cadastral" DATA "Parcels" or CONNECTIONTYPE OGR CONNECTION "../data/HillsboroughBase.gdb" DATA "Cadastral/Parcels" Any help would be appreciated. Craig -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/File-Geodatabase-Feature-Dataset-tp6824494p6824494.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From kinju59 at gmail.com Fri Sep 23 10:03:12 2011 From: kinju59 at gmail.com (=?ISO-8859-1?Q?Aur=E9lien_FILEZ?=) Date: Fri, 23 Sep 2011 19:03:12 +0200 Subject: [mapserver-users] Proj 900913 and mapext lat/lon Message-ID: Hi List, I have data with projection 900913. My mapfile is configured to use this projection. Until there, everything is fine. Also I have an application which manage tiles cutting the world in lat/lon coordinates. For exemple, from -180,-90,180,90, if the zoom=2 it want retreive 4 tiles : 1) -180 -90 0 0 2) -180 0 0 90 3) 0 -90 180 0 4) 0 0 180 90 This done like this king of query : http://localhost/cgi-bin/mapserv?map=MY_MAPFILE&mode=map&layers=all&mapext=minX+minY+maxX+maxY&mapsize=256+256 But it does not work fine. Tiles are well cutted in coordinates but not when rendering.. Is there is a trick to make it ? Or maybe it's not possible to display in 900913 and exploit in 4326 ? I'm a beginner.. Sorry for my bad english, Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From kinju59 at gmail.com Fri Sep 23 10:25:05 2011 From: kinju59 at gmail.com (=?ISO-8859-1?Q?Aur=E9lien_FILEZ?=) Date: Fri, 23 Sep 2011 19:25:05 +0200 Subject: [mapserver-users] Re: Proj 900913 and mapext lat/lon In-Reply-To: References: Message-ID: For example, I have 4 tiles : 1) mapext=-30+30+0+45 2) mapext=-30+45+0+60 3) mapext=0+30+30+45 4) mapext=0+45+30+60 All with mapsize=1024+1024 The result is here : http://kinju59.free.fr/tiles/ For the horizontal cut, it seems to be good, but not for the vertical :( Why ? Should I change my mapsize values ? Or the "width" ratio lati/longi ? Please help me :'( 2011/9/23 Aur?lien FILEZ > Hi List, > > I have data with projection 900913. My mapfile is configured to use this > projection. Until there, everything is fine. > > Also I have an application which manage tiles cutting the world in lat/lon > coordinates. For exemple, from -180,-90,180,90, if the zoom=2 it want > retreive 4 tiles : > 1) -180 -90 0 0 > 2) -180 0 0 90 > 3) 0 -90 180 0 > 4) 0 0 180 90 > > This done like this king of query : > > http://localhost/cgi-bin/mapserv?map=MY_MAPFILE&mode=map&layers=all&mapext=minX+minY+maxX+maxY&mapsize=256+256 > > But it does not work fine. Tiles are well cutted in coordinates but not > when rendering.. > > Is there is a trick to make it ? Or maybe it's not possible to display in > 900913 and exploit in 4326 ? > > I'm a beginner.. > > Sorry for my bad english, > Regards > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a1hunter at ucsd.edu Fri Sep 23 14:03:54 2011 From: a1hunter at ucsd.edu (aphunter) Date: Fri, 23 Sep 2011 14:03:54 -0700 (PDT) Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones In-Reply-To: References: <1316535037179-6812832.post@n2.nabble.com> <1316536856857-6812947.post@n2.nabble.com> Message-ID: <1316811834605-6825717.post@n2.nabble.com> Hi there. I used gdalwarp to warp one of the zones into the spatial reference system of the other, and everything lined up. The only issue now is that each image seems tilted, and so there is a lot of black space on the warped pyramid. Is there any way to prevent this from happening? http://osgeo-org.1803224.n2.nabble.com/file/n6825717/out.jpg http://osgeo-org.1803224.n2.nabble.com/file/n6825717/noalpha_m_3211401_ne_11_1_20090525_1_1.jpg -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6825717.html Sent from the Mapserver - User mailing list archive at Nabble.com. From Jukka.Rahkonen at mmmtike.fi Sat Sep 24 02:25:14 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Sat, 24 Sep 2011 09:25:14 +0000 Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones In-Reply-To: <1316811834605-6825717.post@n2.nabble.com> References: <1316535037179-6812832.post@n2.nabble.com> <1316536856857-6812947.post@n2.nabble.com> , <1316811834605-6825717.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A630243C0@suutari.haapa.mmm.fi> Hi, Use the -dstnodata parameter with gdalwarp http://gdal.org/gdalwarp.html Then use the same value in LAYER OFFSITE http://mapserver.org/mapfile/layer.html Note that this works perfectly only if the warped images are in some lossless format. In jpeg, ecw etc. the nodata gets also slightly different RGB values and some pixels are then not transparent in Mapserver. I have never tried alpha channels for masking the nodata area and I can't say it works with Mapserver. -Jukka Rahkonen- ________________________________________ aphunter wrote: > Hi there. I used gdalwarp to warp one of the zones into the spatial reference > system of the other, and everything lined up. The only issue now is that > each image seems tilted, and so there is a lot of black space on the warped >pyramid. > Is there any way to prevent this from happening? > http://osgeo-org.1803224.n2.nabble.com/file/n6825717/out.jpg > http://osgeo-org.1803224.n2.nabble.com/file/n6825717/noalpha_m_3211401_ne_11_1_20090525_1_1.jpg -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6825717.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From matt at wildwalks.com Sun Sep 25 18:53:06 2011 From: matt at wildwalks.com (Matt McClelland) Date: Mon, 26 Sep 2011 11:53:06 +1000 Subject: [mapserver-users] Scalebar on PDF Message-ID: Hi All I am trying to add a scalebar to the map output. It works fine in raster images (using WMS request) but when I try to create a pdf (x-pdf) I get this error message ---------------------------------------- msEmbedScalebar(): (null) failed to create scalebar image msDrawScalebar(): General error message. Outputformat not supported for scalebar ----------------------------------------- Is this a bug or known limitation? Does anyone know how to get scale bars working on PDF's?? mapfile entry that I am using (I also tried STATUS as ON, this gets rid of the error message, but no scalebar was rendered) --------------------- SCALEBAR INTERVALS 5 UNITS meters OUTLINECOLOR 0 0 0 STYLE 0 TRANSPARENT on POSITION ul STATUS embed LABEL SIZE small COLOR 0 0 0 END END --------------------- Thanks Matt :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From havard.tveite at umb.no Mon Sep 26 03:09:29 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Mon, 26 Sep 2011 12:09:29 +0200 Subject: [mapserver-users] Abandoned railroad symbol In-Reply-To: <4EFF8BB964547748A07CA32961810C041C1551D9@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4EFF8BB964547748A07CA32961810C041C1551D9@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: <4E804F59.1040602@umb.no> Dear Bob, Mapserver does not allow sensible styling of dashed lines with for instance point symbols. To be able to do this, a new mechanism will have to be introduced (for instance INITIALGAP, as used in the SLD specification). This is what Mapserver ticket #3879 suggests. http://trac.osgeo.org/mapserver/ticket/3879 Advanced styling of lines with point symbols is also hampered by the strange calculation of GAP in Mapserver, as reported in ticket #3867. GAP should, in my opinion, specify the centre to centre distance between the point symbols. http://trac.osgeo.org/mapserver/ticket/3867 H?vard Tveite On 9/22/2011 6:14 PM, Bistrais, Bob wrote: > Hmm, still not getting the spacing correct. The crossties seem to be at a consistent interval, but the dashed centerline isn't spacing well- sometimes I get ties centered on the line (which is whaat I want), and sometimes the ties are at the end of a dash. > > -----Original Message----- > From: thomas bonfort [mailto:thomas.bonfort at gmail.com] > Sent: Thursday, September 22, 2011 11:21 AM > To: Bistrais, Bob > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Abandoned railroad symbol > > SYMBOL > NAME "tie" > TYPE TRUETYPE > FONT "path/to/arial.ttf" > CHARACTER "|" > END > > > CLASS > EXPRESSION ('[STATUS]' = '3') > # The crossties: > STYLE > COLOR 200 200 200 > SIZE 4 > SYMBOL "tie" > GAP -10 > END > # The centerline: > STYLE > COLOR 200 200 200 > WIDTH 1 > PATTERN > 5 10 > END > END > > END > > On Thu, Sep 22, 2011 at 17:15, Bistrais, Bob wrote: >> I've been playing around with the symbology but I'm not getting my spacing >> right. I'm trying to create a symbol for abandoned railroad track, looks >> like the standard RR symbol, a line with the crossties, but dashed. Here is >> my code. Problem is, although I get a dashed line and the crossties, the >> interval isn't correct, and I was wondering if anyone had advice on making >> it more consistent so the crossties are always on the dashed line: >> >> >> >> CLASS >> >> EXPRESSION ('[STATUS]' = '3') >> >> # The crossties: >> >> STYLE >> >> COLOR 200 200 200 >> >> WIDTH 4 >> >> LINECAP BUTT >> >> ANGLE 90 >> >> PATTERN >> >> 1 10 >> >> END >> >> END >> >> # The centerline: >> >> STYLE >> >> COLOR 200 200 200 >> >> WIDTH 1 >> >> PATTERN >> >> 5 10 >> >> END >> >> END >> >> >> >> END >> From thomas.bonfort at gmail.com Mon Sep 26 03:29:20 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 26 Sep 2011 12:29:20 +0200 Subject: [mapserver-users] Abandoned railroad symbol In-Reply-To: <4E804F59.1040602@umb.no> References: <4EFF8BB964547748A07CA32961810C041C155144@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4EFF8BB964547748A07CA32961810C041C1551D9@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4E804F59.1040602@umb.no> Message-ID: Havard, #3867 seems reasonable, we would just need to document that in the migration guide for people who are using a symbol who's size is larger than the gap they specified, as this will result in messed up rendering. #3879 is more involved, as it requires the addition of two mapfile keywords. You might want to bring this up on the -dev list to see what the reactions are w.r.t these keyword additions. regards, thomas On Mon, Sep 26, 2011 at 12:09, Havard Tveite wrote: > Dear Bob, > > Mapserver does not allow sensible styling of dashed lines with for > instance point symbols. > To be able to do this, a new mechanism will have to be introduced > (for instance INITIALGAP, as used in the SLD specification). ?This > is what Mapserver ticket #3879 suggests. > http://trac.osgeo.org/mapserver/ticket/3879 > > Advanced styling of lines with point symbols is also hampered by the > strange calculation of GAP in Mapserver, as reported in ticket #3867. > GAP should, in my opinion, specify the centre to centre distance > between the point symbols. > http://trac.osgeo.org/mapserver/ticket/3867 > > H?vard Tveite > > On 9/22/2011 6:14 PM, Bistrais, Bob wrote: >> >> Hmm, still not getting the spacing correct. ?The crossties seem to be at a >> consistent interval, but the dashed centerline isn't spacing well- sometimes >> I get ties centered on the line (which is whaat I want), and sometimes the >> ties are at the end of a dash. >> >> -----Original Message----- >> From: thomas bonfort [mailto:thomas.bonfort at gmail.com] >> Sent: Thursday, September 22, 2011 11:21 AM >> To: Bistrais, Bob >> Cc: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Abandoned railroad symbol >> >> SYMBOL >> ? NAME "tie" >> ? TYPE TRUETYPE >> ? FONT "path/to/arial.ttf" >> ? CHARACTER "|" >> END >> >> >> CLASS >> ? ? EXPRESSION ('[STATUS]' = '3') >> # The crossties: >> ? ? STYLE >> ? ? ? COLOR 200 200 200 >> ? ? ? SIZE 4 >> ? ? ? SYMBOL "tie" >> ? ? ? GAP -10 >> ? ? END >> # The centerline: >> ? ? STYLE >> ? ? ? COLOR 200 200 200 >> ? ? ? WIDTH 1 >> ? ? ? PATTERN >> ? ? ? ? 5 10 >> ? ? ? END >> ? ? END >> >> ? END >> >> On Thu, Sep 22, 2011 at 17:15, Bistrais, Bob >> ?wrote: >>> >>> I've been playing around with the symbology but I'm not getting my >>> spacing >>> right. ?I'm trying to create a symbol for abandoned railroad track, looks >>> like the standard RR symbol, a line with the crossties, but dashed. ?Here >>> is >>> my code. ?Problem is, although I get a dashed line and the crossties, the >>> interval isn't correct, and I was wondering if anyone had advice on >>> making >>> it more consistent so the crossties are always on the dashed line: >>> >>> >>> >>> ? CLASS >>> >>> ? ? EXPRESSION ('[STATUS]' = '3') >>> >>> # The crossties: >>> >>> ? ? STYLE >>> >>> ? ? ? COLOR 200 200 200 >>> >>> ? ? ? WIDTH 4 >>> >>> ? ? ? LINECAP BUTT >>> >>> ? ? ? ANGLE 90 >>> >>> ? ? ? PATTERN >>> >>> ? ? ? ? 1 10 >>> >>> ? ? ? END >>> >>> ? ? END >>> >>> # The centerline: >>> >>> ? ? STYLE >>> >>> ? ? ? COLOR 200 200 200 >>> >>> ? ? ? WIDTH 1 >>> >>> ? ? ? PATTERN >>> >>> ? ? ? ? 5 10 >>> >>> ? ? ? END >>> >>> ? ? END >>> >>> >>> >>> ? END >>> > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From mapoubelle22 at gmail.com Mon Sep 26 04:22:29 2011 From: mapoubelle22 at gmail.com (fred p) Date: Mon, 26 Sep 2011 13:22:29 +0200 Subject: [mapserver-users] Re: problem with mercator projection In-Reply-To: References: <84446DEF76453C439E9E97E438E13A63024227@suutari.haapa.mmm.fi> Message-ID: Thanks to Jukka for this first input. The given example is similar to what I want to get. Rendering the image in separate tiles could be an alternative but for some reasons I would prefer get the whole image within a single call to the server. Anybody has got an idea ? Fred 2011/9/23 Rahkonen Jukka > ** > Hi, > > You perhaps want to achieve a map presenting the whole world once and then > some extra from the second round in the margins like > http://www.openstreetmap.org/?lat=59&lon=-39&zoom=1&layers=M? It might > well be that the transformation functions consider that for EPSG:3395 the > maximum values really are the bounds reported at > http://spatialreference.org/ref/epsg/3395/ and values outside the value > range are invalid. I have no idea about how you could get your map out from > WMS. Could you consider composing it from pieces somehow? > > -Jukka Rahkonen- > > > ------------------------------ > *L?hett?j?:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *Puolesta *fred p > *L?hetetty:* 23. syyskuuta 2011 11:10 > *Vastaanottaja:* mapserver-users at lists.osgeo.org > *Aihe:* [mapserver-users] Re: problem with mercator projection > > Hello > Nobody has got an idea whether I am wrong somewhere or there is a problem > in the image or ... ? > I add the result is OK in EPSG:4326 whatever the bbox is and it is OK too > in EPSG:3395 provided the extent longitude is smaller than 360?. However > when it is higher... > Thanks in advance > > 2011/9/21 fred p > >> Hello ! >> >> I am trying to serve an image in Mercator projection (EPSG:3395) with an >> extent larger than "360? in longitude" but I get a truncated and reversed in >> longitude image. >> Do I make a mistake somewhere? >> Thanks for your help >> >> The mapfile content and the gdalinfo output on the original image are >> given below. >> >> >> Mapserver version: 6.0.1 >> >> Call to mapserver: >> /path/to/mapserv -nh "QUERY_STRING=map=/tmp/world. >> map&service=wms&LAYERS=countries&FORMAT=image/png&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=epsg:3395&BBOX=-26080550.098232,-15000000,26080550.098232,15000000&WIDTH=885&HEIGHT=509" >> > foo.png >> >> Content of the mapfile: >> MAP >> EXTENT -180 -90 180 90 >> IMAGECOLOR 255 255 255 >> IMAGETYPE agg >> STATUS ON >> >> OUTPUTFORMAT >> NAME "agg" >> MIMETYPE "image/png" >> DRIVER "AGG/PNG" >> EXTENSION "png" >> IMAGEMODE "RGBA" >> TRANSPARENT TRUE >> FORMATOPTION "INTERLACE=false" >> END >> >> PROJECTION >> "init=epsg:4326" >> END >> >> WEB >> METADATA >> "wms_srs" "epsg:4326 epsg:3395 epsg:900913 epsg:3995" >> "OWS_ENABLE_REQUEST" "*" >> END >> END >> >> LAYER >> DATA "/tmp/world.tif" >> NAME "countries" >> PROJECTION >> "init=epsg:4326" >> END >> STATUS ON >> TYPE RASTER >> END >> >> END >> >> Output of gdalinfo command: >> $ gdalinfo /tmp/world.tif >> Driver: GTiff/GeoTIFF >> Files: /tmp/world.tif >> Size is 1000, 500 >> Coordinate System is: >> GEOGCS["WGS 84", >> DATUM["WGS_1984", >> SPHEROID["WGS 84",6378137,298.257223563, >> AUTHORITY["EPSG","7030"]], >> AUTHORITY["EPSG","6326"]], >> PRIMEM["Greenwich",0], >> UNIT["degree",0.0174532925199433], >> AUTHORITY["EPSG","4326"]] >> Origin = (-180.000000000000000,90.000000000000000) >> Pixel Size = (0.360000000000000,-0.360000000000000) >> Metadata: >> TIFFTAG_DOCUMENTNAME=/tmp/world.tif >> TIFFTAG_XRESOLUTION=72 >> TIFFTAG_YRESOLUTION=72 >> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) >> AREA_OR_POINT=Area >> Image Structure Metadata: >> INTERLEAVE=BAND >> Corner Coordinates: >> Upper Left (-180.0000000, 90.0000000) (180d 0'0.00"W, 90d 0'0.00"N) >> Lower Left (-180.0000000, -90.0000000) (180d 0'0.00"W, 90d 0'0.00"S) >> Upper Right ( 180.0000000, 90.0000000) (180d 0'0.00"E, 90d 0'0.00"N) >> Lower Right ( 180.0000000, -90.0000000) (180d 0'0.00"E, 90d 0'0.00"S) >> Center ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N) >> Band 1 Block=1000x8 Type=Byte, ColorInterp=Gray >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boolean10001 at yahoo.com Mon Sep 26 08:02:14 2011 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Mon, 26 Sep 2011 08:02:14 -0700 (PDT) Subject: [mapserver-users] Scalebar on PDF In-Reply-To: References: Message-ID: <1317049334.23010.YahooMailNeo@web38207.mail.mud.yahoo.com> Matt, The documentation about PDF output says that legend, scalebar are not supported. Cheers from M?xico ? IC Carlos Ruiz ________________________________ From: Matt McClelland To: mapserver-users at lists.osgeo.org Sent: Sunday, September 25, 2011 8:53 PM Subject: [mapserver-users] Scalebar on PDF Hi All I am trying to add a scalebar to the map output.? It works fine in raster images (using WMS request) but when I try to create a pdf (x-pdf) I get this error message ---------------------------------------- msEmbedScalebar(): (null) failed to create scalebar image msDrawScalebar(): General error message. Outputformat not supported for scalebar ----------------------------------------- Is this a bug or known limitation? Does anyone know how to get scale bars working on PDF's?? mapfile entry that I am using (I also tried STATUS as ON, this gets rid of the error message, but no scalebar was rendered) --------------------- SCALEBAR INTERVALS 5 UNITS meters OUTLINECOLOR 0 0 0 STYLE 0 TRANSPARENT on POSITION ul STATUS embed ? LABEL ??? SIZE small ??? COLOR 0 0 0 ? END END --------------------- Thanks Matt? :) _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From tmartinh at gmail.com Mon Sep 26 08:52:43 2011 From: tmartinh at gmail.com (=?ISO-8859-1?Q?Toni_Mart=EDnez?=) Date: Mon, 26 Sep 2011 17:52:43 +0200 Subject: [mapserver-users] Displaying repeated values in label Message-ID: Hi all, I am using MapServer version 5.6.1 reading data from Postgis. One of the layers I am working with makes use of labels displaying data from a Postgis column over a marker on the map. Everything seems to be working fine but some data to be displayed on labels is 0.0 In such case, mapserver only displays one marker with its label. Because I need all markers and labels to be represented on that layer even if values are the same, I have been trying some options that I read in mapserver official docs like MINDISTANCE or FORCE or PROCESSING "LABEL_NO_CLIP=ON" with no results. Please take a look at my layer's code. LAYER NAME pern_lectura GROUP overlays TYPE POINT STATUS OFF PROCESSING "CLOSE_CONNECTION=DEFER" CONNECTIONTYPE POSTGIS CONNECTION 'user=postgres password=xxxxxx dbname=UAS host=xxxxxxx port=5432' DATA "the_geom from gis_schema.perno_estat_geom using SRID=23031 using unique id_perno" FILTER "nombre_anillo='A903'" OPACITY 100 CLASS NAME 'Normalitat' EXPRESSION ([estat] = 0) STYLE SYMBOL "quadrat" SIZE 15 COLOR 45 181 45 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "circle" SIZE 11.25 COLOR 204 204 255 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "creu" SIZE 6 COLOR 0 0 0 END LABEL MINFEATURESIZE 80 TYPE TRUETYPE FONT "arial" SIZE 8 ANGLE FOLLOW COLOR 25 25 175 OUTLINECOLOR 255 255 255 MINDISTANCE 600 PARTIALS FALSE END END CLASS NAME 'Notificaci?' EXPRESSION ([estat] = 1) STYLE SYMBOL "quadrat" SIZE 15 COLOR 226 226 0 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "circle" SIZE 11.25 COLOR 204 204 255 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "creu" SIZE 6 COLOR 0 0 0 END LABEL MINFEATURESIZE 80 TYPE TRUETYPE FONT "arial" SIZE 8 ANGLE FOLLOW COLOR 25 25 175 OUTLINECOLOR 255 255 255 MINDISTANCE 600 PARTIALS FALSE END END CLASS NAME 'Preav?s' EXPRESSION ([estat] = 2) STYLE SYMBOL "quadrat" SIZE 15 COLOR 255 130 0 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "circle" SIZE 11.25 COLOR 204 204 255 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "creu" SIZE 6 COLOR 0 0 0 END LABEL MINFEATURESIZE 80 TYPE TRUETYPE FONT "arial" SIZE 8 ANGLE FOLLOW COLOR 25 25 175 OUTLINECOLOR 255 255 255 MINDISTANCE 600 PARTIALS FALSE END END CLASS NAME 'Atenci?' EXPRESSION ([estat] = 3) STYLE SYMBOL "quadrat" SIZE 15 COLOR 212 0 0 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "circle" SIZE 11.25 COLOR 204 204 255 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "creu" SIZE 6 COLOR 0 0 0 END LABEL MINFEATURESIZE 80 TYPE TRUETYPE FONT "arial" SIZE 8 ANGLE FOLLOW COLOR 25 25 175 OUTLINECOLOR 255 255 255 MINDISTANCE 600 PARTIALS FALSE END END PROJECTION "init=epsg:23031" END METADATA "wms_srs" "EPSG:23031" "wms_title" "Perns lectura" "wms_include_items" "id" END TEMPLATE "templates/template.php" TOLERANCE 1 PROCESSING "LABEL_NO_CLIP=ON" TYPE ANNOTATION LABELITEM lectura_dif CLASS LABEL COLOR 0 0 0 TYPE TRUETYPE FONT arial SIZE 10 ANTIALIAS TRUE POSITION AUTO FORCE TRUE PARTIALS FALSE MINDISTANCE 3000 BUFFER 4 PARTIALS FALSE END END END Any help will be greatly appreciated. Regards, Toni M. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Mon Sep 26 08:57:30 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 26 Sep 2011 17:57:30 +0200 Subject: [mapserver-users] Displaying repeated values in label In-Reply-To: References: Message-ID: remove the MINDISTANCE keywords from your labels, they prevent duplicate labels from appearing closer than the specified distance (i.e. 600 in your case) which depending an your image size can mean that your 0.0 is only displayed once. -- thomas On Mon, Sep 26, 2011 at 17:52, Toni Mart?nez wrote: > Hi all, > I am using MapServer version 5.6.1 reading data from Postgis. > One of the layers I am working with makes use of labels displaying data from > a Postgis column over a marker on the map. Everything seems to be working > fine but some data to be displayed on labels is 0.0 In such case, mapserver > only displays one marker with its label. > Because I need all markers and labels to be represented on that layer even > if values are the same, I have been trying some options that I read in > mapserver official docs like MINDISTANCE or FORCE or PROCESSING > "LABEL_NO_CLIP=ON" with no results. > Please take a look at my layer's code. > > LAYER > ??? NAME pern_lectura > ??? GROUP overlays > ??? TYPE POINT > ??? STATUS OFF > ??? PROCESSING "CLOSE_CONNECTION=DEFER" > ??? CONNECTIONTYPE POSTGIS > ??? CONNECTION 'user=postgres password=xxxxxx dbname=UAS host=xxxxxxx > port=5432' > ??? DATA "the_geom from gis_schema.perno_estat_geom using SRID=23031 using > unique id_perno" > ??? FILTER "nombre_anillo='A903'" > ??? OPACITY 100 > ??? CLASS > ????? NAME 'Normalitat' > ????? EXPRESSION ([estat] = 0) > ??????? STYLE > ??????????????? SYMBOL "quadrat" > ??????????????? SIZE 15 > ??????????????? COLOR 45 181 45 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "circle" > ??????????????? SIZE 11.25 > ??????????????? COLOR 204 204 255 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "creu" > ??????????????? SIZE 6 > ??????????????? COLOR 0 0 0 > ??????? END > ??? LABEL > ??????? MINFEATURESIZE????? 80 > ??????????? TYPE????????????? TRUETYPE > ??????????? FONT????????????? "arial" > ??????????? SIZE????????????? 8 > ??????????? ANGLE???????????? FOLLOW > ??????????? COLOR???????????? 25 25 175 > ??????????? OUTLINECOLOR????? 255 255 255 > ??????????? MINDISTANCE?????? 600 > ??????????? PARTIALS????????? FALSE > ????? END > ??? END > ??? CLASS > ????? NAME 'Notificaci?' > ????? EXPRESSION ([estat] = 1) > ????? STYLE > ??????????????? SYMBOL "quadrat" > ??????????????? SIZE 15 > ??????????????? COLOR 226 226 0 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "circle" > ??????????????? SIZE 11.25 > ??????????????? COLOR 204 204 255 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "creu" > ??????????????? SIZE 6 > ??????????????? COLOR 0 0 0 > ??????? END > ??? ?LABEL > ??????? MINFEATURESIZE????? 80 > ??????????? TYPE????????????? TRUETYPE > ??????????? FONT????????????? "arial" > ??????????? SIZE????????????? 8 > ??????????? ANGLE???????????? FOLLOW > ??????????? COLOR???????????? 25 25 175 > ??????????? OUTLINECOLOR????? 255 255 255 > ??????????? MINDISTANCE?????? 600 > ??????????? PARTIALS????????? FALSE > ????? END > ??? END > ??? CLASS > ????? NAME 'Preav?s' > ????? EXPRESSION ([estat] = 2) > ????? STYLE > ??????????????? SYMBOL "quadrat" > ??????????????? SIZE 15 > ??????????????? COLOR 255 130 0 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "circle" > ??????????????? SIZE 11.25 > ??????????????? COLOR 204 204 255 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "creu" > ??????????????? SIZE 6 > ??????????????? COLOR 0 0 0 > ??????? END > ??? ? LABEL > ??????? MINFEATURESIZE????? 80 > ??????????? TYPE????????????? TRUETYPE > ??????????? FONT????????????? "arial" > ??????????? SIZE????????????? 8 > ??????????? ANGLE???????????? FOLLOW > ??????????? COLOR???????????? 25 25 175 > ??????????? OUTLINECOLOR????? 255 255 255 > ??????????? MINDISTANCE?????? 600 > ??????????? PARTIALS????????? FALSE > ????? END > ??? END > ??? CLASS > ????? NAME 'Atenci?' > ????? EXPRESSION ([estat] = 3) > ????? STYLE > ??????????????? SYMBOL "quadrat" > ??????????????? SIZE 15 > ??????????????? COLOR 212 0 0 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "circle" > ??????????????? SIZE 11.25 > ??????????????? COLOR 204 204 255 > ??????????????? OUTLINECOLOR 0 0 0 > ??????? END > ??????? STYLE > ??????????????? SYMBOL "creu" > ??????????????? SIZE 6 > ??????????????? COLOR 0 0 0 > ??????? END > ??? ? LABEL > ??????? MINFEATURESIZE????? 80 > ??????????? TYPE????????????? TRUETYPE > ??????????? FONT????????????? "arial" > ??????????? SIZE????????????? 8 > ??????????? ANGLE???????????? FOLLOW > ??????????? COLOR???????????? 25 25 175 > ??????????? OUTLINECOLOR????? 255 255 255 > ??????????? MINDISTANCE?????? 600 > ??????????? PARTIALS????????? FALSE > ????? END > ??? END > ??? PROJECTION > ??? ? "init=epsg:23031" > ??? END > ??? METADATA > ??? ??? "wms_srs" "EPSG:23031" > ??? ??? "wms_title" "Perns lectura" > ??? ??? "wms_include_items" "id" > ??? END > ??? TEMPLATE "templates/template.php" > ??? TOLERANCE 1 > ??? PROCESSING "LABEL_NO_CLIP=ON" > ??? TYPE ANNOTATION > ???? LABELITEM lectura_dif > ????? CLASS > ??????? LABEL > ??????????? COLOR 0 0 0 > ??????????? TYPE TRUETYPE > ??????????? FONT arial > ??????????? SIZE 10 > ??????????? ANTIALIAS TRUE > ??????????? POSITION AUTO > ??????????? FORCE TRUE > ??????????? PARTIALS FALSE > ??????????? MINDISTANCE 3000 > ??????????? BUFFER 4 > ??????????? PARTIALS FALSE > ??????? END > ????? END > ? END > > Any help will be greatly appreciated. > Regards, > Toni M. > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From tmartinh at gmail.com Mon Sep 26 09:02:45 2011 From: tmartinh at gmail.com (=?ISO-8859-1?Q?Toni_Mart=EDnez?=) Date: Mon, 26 Sep 2011 18:02:45 +0200 Subject: [mapserver-users] Displaying repeated values in label In-Reply-To: References: Message-ID: Thank you very much. You touched the right key. Regards, 2011/9/26 thomas bonfort > remove the MINDISTANCE keywords from your labels, they prevent > duplicate labels from appearing closer than the specified distance > (i.e. 600 in your case) which depending an your image size can mean > that your 0.0 is only displayed once. > > -- > thomas > > On Mon, Sep 26, 2011 at 17:52, Toni Mart?nez wrote: > > Hi all, > > I am using MapServer version 5.6.1 reading data from Postgis. > > One of the layers I am working with makes use of labels displaying data > from > > a Postgis column over a marker on the map. Everything seems to be working > > fine but some data to be displayed on labels is 0.0 In such case, > mapserver > > only displays one marker with its label. > > Because I need all markers and labels to be represented on that layer > even > > if values are the same, I have been trying some options that I read in > > mapserver official docs like MINDISTANCE or FORCE or PROCESSING > > "LABEL_NO_CLIP=ON" with no results. > > Please take a look at my layer's code. > > > > LAYER > > NAME pern_lectura > > GROUP overlays > > TYPE POINT > > STATUS OFF > > PROCESSING "CLOSE_CONNECTION=DEFER" > > CONNECTIONTYPE POSTGIS > > CONNECTION 'user=postgres password=xxxxxx dbname=UAS host=xxxxxxx > > port=5432' > > DATA "the_geom from gis_schema.perno_estat_geom using SRID=23031 > using > > unique id_perno" > > FILTER "nombre_anillo='A903'" > > OPACITY 100 > > CLASS > > NAME 'Normalitat' > > EXPRESSION ([estat] = 0) > > STYLE > > SYMBOL "quadrat" > > SIZE 15 > > COLOR 45 181 45 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "circle" > > SIZE 11.25 > > COLOR 204 204 255 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "creu" > > SIZE 6 > > COLOR 0 0 0 > > END > > LABEL > > MINFEATURESIZE 80 > > TYPE TRUETYPE > > FONT "arial" > > SIZE 8 > > ANGLE FOLLOW > > COLOR 25 25 175 > > OUTLINECOLOR 255 255 255 > > MINDISTANCE 600 > > PARTIALS FALSE > > END > > END > > CLASS > > NAME 'Notificaci?' > > EXPRESSION ([estat] = 1) > > STYLE > > SYMBOL "quadrat" > > SIZE 15 > > COLOR 226 226 0 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "circle" > > SIZE 11.25 > > COLOR 204 204 255 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "creu" > > SIZE 6 > > COLOR 0 0 0 > > END > > LABEL > > MINFEATURESIZE 80 > > TYPE TRUETYPE > > FONT "arial" > > SIZE 8 > > ANGLE FOLLOW > > COLOR 25 25 175 > > OUTLINECOLOR 255 255 255 > > MINDISTANCE 600 > > PARTIALS FALSE > > END > > END > > CLASS > > NAME 'Preav?s' > > EXPRESSION ([estat] = 2) > > STYLE > > SYMBOL "quadrat" > > SIZE 15 > > COLOR 255 130 0 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "circle" > > SIZE 11.25 > > COLOR 204 204 255 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "creu" > > SIZE 6 > > COLOR 0 0 0 > > END > > LABEL > > MINFEATURESIZE 80 > > TYPE TRUETYPE > > FONT "arial" > > SIZE 8 > > ANGLE FOLLOW > > COLOR 25 25 175 > > OUTLINECOLOR 255 255 255 > > MINDISTANCE 600 > > PARTIALS FALSE > > END > > END > > CLASS > > NAME 'Atenci?' > > EXPRESSION ([estat] = 3) > > STYLE > > SYMBOL "quadrat" > > SIZE 15 > > COLOR 212 0 0 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "circle" > > SIZE 11.25 > > COLOR 204 204 255 > > OUTLINECOLOR 0 0 0 > > END > > STYLE > > SYMBOL "creu" > > SIZE 6 > > COLOR 0 0 0 > > END > > LABEL > > MINFEATURESIZE 80 > > TYPE TRUETYPE > > FONT "arial" > > SIZE 8 > > ANGLE FOLLOW > > COLOR 25 25 175 > > OUTLINECOLOR 255 255 255 > > MINDISTANCE 600 > > PARTIALS FALSE > > END > > END > > PROJECTION > > "init=epsg:23031" > > END > > METADATA > > "wms_srs" "EPSG:23031" > > "wms_title" "Perns lectura" > > "wms_include_items" "id" > > END > > TEMPLATE "templates/template.php" > > TOLERANCE 1 > > PROCESSING "LABEL_NO_CLIP=ON" > > TYPE ANNOTATION > > LABELITEM lectura_dif > > CLASS > > LABEL > > COLOR 0 0 0 > > TYPE TRUETYPE > > FONT arial > > SIZE 10 > > ANTIALIAS TRUE > > POSITION AUTO > > FORCE TRUE > > PARTIALS FALSE > > MINDISTANCE 3000 > > BUFFER 4 > > PARTIALS FALSE > > END > > END > > END > > > > Any help will be greatly appreciated. > > Regards, > > Toni M. > > > > > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Mon Sep 26 10:54:37 2011 From: ian.walberg at airborne.aero (Ian Walberg) Date: Mon, 26 Sep 2011 13:54:37 -0400 Subject: [mapserver-users] PHP Mapscript - debugging help Message-ID: Hello, We have moved from 5.x to 6.x are chasing an issue causing a segmentation fault which appears to be related to the way we are defining the symbols. If we create the map object from an empty map file (with just MAP and END in it) then we do not get a segmentation fault, sounds like something not initialized I know... Any ideas on this appreciated but here is the real question (and it may really be a php question) :- We used to print_r the map object and then compare the one created from the map file and the one we had created programmatically, however with mapserver 6.x the print_r on the map object is empty. I am sure this is basic PHP but any help would be appreciated. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Mon Sep 26 19:12:05 2011 From: punk.kish at gmail.com (Puneet Kishor) Date: Mon, 26 Sep 2011 21:12:05 -0500 Subject: [mapserver-users] arrow head doesn't draw at the end Message-ID: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> My arrows look like so -->-- instead of ----> with declarations like so SYMBOL NAME "vert-line" TYPE vector POINTS 0 1 0 0 END END SYMBOL NAME "up" TYPE vector POINTS 0 1 0.5 0 1 1 END END CLASS STYLE SYMBOL 'vert-line' ANGLE [az] SIZE [rate] COLOR 0 0 0 WIDTH 1 END STYLE SYMBOL "up" ANGLE [az] SIZE 5 GEOMTRANSFORM "end" COLOR 0 0 0 END END But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so --^--. The heads are always pointed up, and are in the middle. Suggestions? -- Puneet Kishor From punk.kish at gmail.com Mon Sep 26 19:29:30 2011 From: punk.kish at gmail.com (Puneet Kishor) Date: Mon, 26 Sep 2011 21:29:30 -0500 Subject: [mapserver-users] passing cgi query params to wms layers Message-ID: I am using OpenLayers as the front-end, requesting a WMS layer from MapServer that is getting data from Pg. My DATA statement is like so DATA "the_geom FROM (SELECT gid, pc, the_geom FROM table) t USING UNIQUE gid USING srid=4326" FILTER "pc = 'na'" The above works fine. However, I would like to send the value of "pc" from OpenLayers (that is another problem that I am experiencing; I have asked on OL list on how to send query params to WMS layers, but if any of you know the solution, I would welcome that). In any case, I thought (naively), that I could change my FILTER statement like so FILTER "pc = '[pc]'" I tried sending a WMS query directly to test the above like so [http://server/cgi-bin/app?.. blah ..&pc=na] but no joy. Forcing a query error showed me that MapServer was executing the following select .. from (..) t where the_geom && GeomFromText(..) and (pc = '[pc]') How can I dynamically supply MapServer a filter value? -- Puneet Kishor From Jukka.Rahkonen at mmmtike.fi Mon Sep 26 21:01:45 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 27 Sep 2011 04:01:45 +0000 Subject: [mapserver-users] passing cgi query params to wms layers In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A63024733@suutari.haapa.mmm.fi> Hi, You haven't seen this http://mapserver.org/cgi/runsub.html#runsub or this http://mapserver.org/mapfile/variable_sub.html#variable-sub, have you? -Jukka Rahkonen- ________________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] käyttäjän Puneet Kishor [punk.kish at gmail.com] puolesta L?hetetty: 27. syyskuuta 2011 5:29 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [mapserver-users] passing cgi query params to wms layers I am using OpenLayers as the front-end, requesting a WMS layer from MapServer that is getting data from Pg. My DATA statement is like so DATA "the_geom FROM (SELECT gid, pc, the_geom FROM table) t USING UNIQUE gid USING srid=4326" FILTER "pc = 'na'" The above works fine. However, I would like to send the value of "pc" from OpenLayers (that is another problem that I am experiencing; I have asked on OL list on how to send query params to WMS layers, but if any of you know the solution, I would welcome that). In any case, I thought (naively), that I could change my FILTER statement like so FILTER "pc = '[pc]'" I tried sending a WMS query directly to test the above like so [http://server/cgi-bin/app?.. blah ..&pc=na] but no joy. Forcing a query error showed me that MapServer was executing the following select .. from (..) t where the_geom && GeomFromText(..) and (pc = '[pc]') How can I dynamically supply MapServer a filter value? -- Puneet Kishor _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From woodbri at swoodbridge.com Mon Sep 26 21:04:35 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 27 Sep 2011 00:04:35 -0400 Subject: [mapserver-users] passing cgi query params to wms layers In-Reply-To: References: Message-ID: <4E814B53.7070106@swoodbridge.com> On 9/26/2011 10:29 PM, Puneet Kishor wrote: > I am using OpenLayers as the front-end, requesting a WMS layer from MapServer that is getting data from Pg. My DATA statement is like so > > DATA "the_geom FROM (SELECT gid, pc, the_geom FROM table) t USING UNIQUE gid USING srid=4326" > FILTER "pc = 'na'" > > The above works fine. However, I would like to send the value of "pc" from OpenLayers (that is another problem that I am experiencing; I have asked on OL list on how to send query params to WMS layers, but if any of you know the solution, I would welcome that). In any case, I thought (naively), that I could change my FILTER statement like so > > FILTER "pc = '[pc]'" > > I tried sending a WMS query directly to test the above like so [http://server/cgi-bin/app?.. blah ..&pc=na] but no joy. Forcing a query error showed me that MapServer was executing the following > > select .. from (..) t where the_geom&& GeomFromText(..) and (pc = '[pc]') > > How can I dynamically supply MapServer a filter value? Does this doc answer your question? http://mapserver.org/cgi/runsub.html This should help from the mapserver side of things. In the OpenLayers side of things you will need to propagate the parameter values into the base URL for the WMS request and get OpenLayers to propagate that change into the layer object. If you expect the existing map to change when you change the values, then you will need to force OpenLayers to redraw the layer to request a new image or tiles based on the updated parameters. -Steve W From punk.kish at gmail.com Mon Sep 26 21:22:27 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Mon, 26 Sep 2011 23:22:27 -0500 Subject: [mapserver-users] passing cgi query params to wms layers In-Reply-To: <4E814B53.7070106@swoodbridge.com> References: <4E814B53.7070106@swoodbridge.com> Message-ID: <963DA906-2829-45A9-83EA-F0E2868A693A@gmail.com> On Sep 26, 2011, at 11:04 PM, Stephen Woodbridge wrote: > On 9/26/2011 10:29 PM, Puneet Kishor wrote: >> I am using OpenLayers as the front-end, requesting a WMS layer from MapServer that is getting data from Pg. My DATA statement is like so >> >> DATA "the_geom FROM (SELECT gid, pc, the_geom FROM table) t USING UNIQUE gid USING srid=4326" >> FILTER "pc = 'na'" >> >> The above works fine. However, I would like to send the value of "pc" from OpenLayers (that is another problem that I am experiencing; I have asked on OL list on how to send query params to WMS layers, but if any of you know the solution, I would welcome that). In any case, I thought (naively), that I could change my FILTER statement like so >> >> FILTER "pc = '[pc]'" >> >> I tried sending a WMS query directly to test the above like so [http://server/cgi-bin/app?.. blah ..&pc=na] but no joy. Forcing a query error showed me that MapServer was executing the following >> >> select .. from (..) t where the_geom&& GeomFromText(..) and (pc = '[pc]') >> >> How can I dynamically supply MapServer a filter value? > > Does this doc answer your question? > http://mapserver.org/cgi/runsub.html > Yes it does. I had not seen that doc (hence, I was naively trying [var] kinda sub). Man, this is hairy shiiite. Maybe I should concentrate on trying to get WMS via MapScript working again so I can work within the more familiar and comfy environs of the Perl DBI. MapServer is fast as heck and basically "joy to the world," but its Pg interface is a foreign world to me. > This should help from the mapserver side of things. In the OpenLayers side of things you will need to propagate the parameter values into the base URL for the WMS request and get OpenLayers to propagate that change into the layer object. I see. Thanks for answering this, because this too had me stumped. The so called optional JS object that was supposed to pass arbitrary parameters to the OL layer constructor wasn't bringing any success. So, essentially, I should construct the base URL and then make my WMS layer as usual. > If you expect the existing map to change when you change the values, then you will need to force OpenLayers to redraw the layer to request a new image or tiles based on the updated parameters. > Yeah, of course. The idea is that the user clicks on the map, and based on the location of the click, a new map layer is generated. Hopefully I will have this all working soon and be able to show it to the world. Many thanks Steve (and you too Jukka). Puneet. From havard.tveite at umb.no Tue Sep 27 00:18:12 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Tue, 27 Sep 2011 09:18:12 +0200 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> Message-ID: <4E8178B4.4000606@umb.no> Have you seen: http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol H?vard Tveite On 9/27/2011 4:12 AM, Puneet Kishor wrote: > My arrows look like so -->-- instead of ----> with declarations like so > > SYMBOL > NAME "vert-line" > TYPE vector > POINTS > 0 1 > 0 0 > END > END > > SYMBOL > NAME "up" > TYPE vector > POINTS > 0 1 > 0.5 0 > 1 1 > END > END > > CLASS > STYLE > SYMBOL 'vert-line' > ANGLE [az] > SIZE [rate] > COLOR 0 0 0 > WIDTH 1 > END > STYLE > SYMBOL "up" > ANGLE [az] > SIZE 5 > GEOMTRANSFORM "end" > COLOR 0 0 0 > END > END > > But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so --^--. The heads are always pointed up, and are in the middle. > > Suggestions? > > -- > Puneet Kishor_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From aboudreault at mapgears.com Tue Sep 27 05:40:59 2011 From: aboudreault at mapgears.com (Alan Boudreault) Date: Tue, 27 Sep 2011 08:40:59 -0400 Subject: [mapserver-users] PHP Mapscript - debugging help In-Reply-To: References: Message-ID: <201109270840.59867.aboudreault@mapgears.com> It's hard to help you without details. I'd suggest to try to minimize the mapfile to isolate the part that produces the seg fault. You can also try the utility valgrind to see where the application crashes: valgrind php myscript.php Alan On September 26, 2011 01:54:37 pm Ian Walberg wrote: > Hello, > > > > We have moved from 5.x to 6.x are chasing an issue causing a > segmentation fault which appears to be related to the way we are > defining the symbols. > > > > If we create the map object from an empty map file (with just MAP and > END in it) then we do not get a segmentation fault, sounds like > something not initialized I know... > > > > Any ideas on this appreciated but here is the real question (and it may > really be a php question) :- > > > > We used to print_r the map object and then compare the one created from > the map file and the one we had created programmatically, however with > mapserver 6.x the print_r on the map object is empty. > > > > I am sure this is basic PHP but any help would be appreciated. > > > > Thanks > > > > Ian -- Alan Boudreault Mapgears http://www.mapgears.com From punk.kish at gmail.com Tue Sep 27 06:27:30 2011 From: punk.kish at gmail.com (Puneet Kishor) Date: Tue, 27 Sep 2011 08:27:30 -0500 Subject: [mapserver-users] passing cgi query params to wms layers In-Reply-To: <963DA906-2829-45A9-83EA-F0E2868A693A@gmail.com> References: <4E814B53.7070106@swoodbridge.com> <963DA906-2829-45A9-83EA-F0E2868A693A@gmail.com> Message-ID: <632EE7A9-482C-4A08-B7F6-507C611A72A1@gmail.com> On Sep 26, 2011, at 11:22 PM, Mr. Puneet Kishor wrote: > On Sep 26, 2011, at 11:04 PM, Stephen Woodbridge wrote: > >> On 9/26/2011 10:29 PM, Puneet Kishor wrote: >>> I am using OpenLayers as the front-end, requesting a WMS layer from MapServer that is getting data from Pg. My DATA statement is like so >>> >>> DATA "the_geom FROM (SELECT gid, pc, the_geom FROM table) t USING UNIQUE gid USING srid=4326" >>> FILTER "pc = 'na'" >>> >>> The above works fine. However, I would like to send the value of "pc" from OpenLayers (that is another problem that I am experiencing; I have asked on OL list on how to send query params to WMS layers, but if any of you know the solution, I would welcome that). In any case, I thought (naively), that I could change my FILTER statement like so >>> >>> FILTER "pc = '[pc]'" >>> >>> I tried sending a WMS query directly to test the above like so [http://server/cgi-bin/app?.. blah ..&pc=na] but no joy. Forcing a query error showed me that MapServer was executing the following >>> >>> select .. from (..) t where the_geom&& GeomFromText(..) and (pc = '[pc]') >>> >>> How can I dynamically supply MapServer a filter value? >> >> Does this doc answer your question? >> http://mapserver.org/cgi/runsub.html >> > > > Yes it does. I had not seen that doc (hence, I was naively trying [var] kinda sub) So, it seems I can't use Perl compatible regexps inside the map file for runtime substitution. For example, the following fails 'pc_validation_pattern' '^\w\w$' with "msValidateParameter(): Regular expression error. Parameter pattern validation failed." But the following works 'pc_validation_pattern' '^[a-zA-Z][a-zA-Z]$' Is there a compile time switch to make MapServer Perl-savvy? -- Puneet Kishor From havard.tveite at umb.no Tue Sep 27 07:33:04 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Tue, 27 Sep 2011 16:33:04 +0200 Subject: [mapserver-users] WFS Typename behavior In-Reply-To: <84446DEF76453C439E9E97E438E13A63023CAB@suutari.haapa.mmm.fi> References: <000c01cc77c0$69e82730$3db87590$@aamdal.com> <4E7AD4F9.1090107@umb.no> <84446DEF76453C439E9E97E438E13A63023CAB@suutari.haapa.mmm.fi> Message-ID: <4E81DEA0.7010103@umb.no> You are right, Jukka. Multiple "typeName"s have been supported by WFS from the start (WFS 1.0.0), through a sequence of "Query"s, each containing a typeName. Sorry about the confusion. H?vard On 9/22/2011 1:35 PM, Rahkonen Jukka wrote: > Hi, > > I can see from the server logs that users of ArcGIS Data Interoperability extension are usually making first request so that all the feature types are listed in&typename and with&maxFeatures=30000. This will lead on our server to output that is truncated at the 30000th feature but it varies a bit on what feature type the limit is achieved. But according to the standard using a list of typenames is OK. TinyOWS does not have problems with such a request > http://188.64.1.61/cgi-bin/tinyows?service=WFS&version=1.0.0&request=GetFeature&typename=mml_airport,mml_asemat > > Check if the output is truncated at your maxFeatures. If it is then everything is OK. If maxFeatures is not reached then the result should be the same as when making two separate getFeatures for Traseer and Punkter. Otherwise it looks like a bug. > > -Jukka Rahkonen- > > > >> Havard Tveite wrote: >> L?hetetty: 22. syyskuuta 2011 9:26 > >> I think that you have to use only one Typename per WFS request. >> >> H?vard >> >> On 9/20/2011 8:09 PM, Hawk AA wrote: >>> Hi, >>> >>> It seems for me that by entering multiple layers in >> Typename, I am not getting the same results. For instance >> would using Typename=Traseer give me all of the geometries in >> the BBOX, but Typename=Traseer, Punkter will give me all in >> Punkter, but only some geometries from Traseer. Is it >> supposed to be that way? Any other way I can query a BBOX on >> multiple layers without running a WFS request per layer? >>> >>> Thanks in advance! >>> >>> Hawk >>> >> >> -- >> H?vard Tveite >> Department of Mathematical Sciences and Technology, UMB >> Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY >> Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From boolean10001 at yahoo.com Tue Sep 27 07:31:29 2011 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Tue, 27 Sep 2011 07:31:29 -0700 (PDT) Subject: [mapserver-users] PHP Mapscript - debugging help In-Reply-To: References: Message-ID: <1317133889.47031.YahooMailNeo@web38202.mail.mud.yahoo.com> Ian, >We have moved from 5.x to 6.x are chasing an issue causing a segmentation fault which appears to be related to the way we are > defining the symbols. Are you talking about the SYMBOLSET file definition ? The segmentation fault throws when you invoke map->draw() ? > We used to print_r the map object and then compare the one created from the map file and the one we had created programmatically, > however with mapserver 6.x the print_r on the map object is empty. If you can have both map objects (the one loaded and the other one created) I suggest you to use the map->save(file name) method to see the differences between them. Cheers from M?xico IC Carlos Ruiz ________________________________ From: Ian Walberg To: mapserver-users at lists.osgeo.org Sent: Monday, September 26, 2011 12:54 PM Subject: [mapserver-users] PHP Mapscript - debugging help Hello, ? We have moved from 5.x to 6.x are chasing an issue causing a segmentation fault which appears to be related to the way we are defining the symbols. ? If we create the map object from an empty map file (with just MAP and END in it) then we do not get a segmentation fault, sounds like something not initialized I know? ? Any ideas on this appreciated but here is the real question (and it may really be a php question) ?:- ? We used to print_r the map object and then compare the one created from the map file and the one we had created programmatically, however with mapserver 6.x the print_r on the map object is empty. ? I am sure this is basic PHP but any help would be appreciated. ? Thanks ? Ian _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Tue Sep 27 07:48:03 2011 From: punk.kish at gmail.com (Puneet Kishor) Date: Tue, 27 Sep 2011 09:48:03 -0500 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <4E8178B4.4000606@umb.no> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> Message-ID: <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: > Have you seen: > > http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear as crystal to the rest of the world, but I can't fathom anything there applicable to me. I am facing four problems -- 1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the same direction as the arrow stems. 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. When used with ANGLE AUTO, it can for instance be used to render an arrowhead." Well, no... it is *not* producing the *last point of the geometry* as I understand it. Instead, it is producing the middle point of the geometry. And it sure as as I can see is not working with ANGLE AUTO (see #1 above). 3. I have tried several variations on my arrow head to try shift its center, but I am failing to translate the information in the above document to be able to do it correctly. 4. Perhaps most important: the length of the arrow is varying based on [rate]. In other words, I want only the stem to be shorter or longer, but the arrow head to be the same size, and to be at the "end" of the stem always. In fact, there are instances in which [rate] could be equal to zero. In those instances I don't want any arrow to be drawn at all. *** In other words, I want an arrow stem to be as long as the varying [rate], and if the stem has a length greater than zero then and only then do I want an arrow head at the end of the stem pointing in the same direction as the stem. *** I even tried using a truetype font symbol, but I get no image at all but no error as well. I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I realize that if I could make that work, it would still be unsatisfactory because as MapServer would scale my arrow image, it would make the attached arrow head also larger, and that would look ugly. In any case, I couldn't get that to work as well... no image at all, but no error as well. Could be my compilation of MapServer was buggy, but I didn't see any compilation time errors, and other than the above oddities, it works quite well. $./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE I would love to know if my *** objective *** above can be accomplished with MapServer. If not, I would look at other workaround. I am currently rendering arrows using OpenLayers vector layer... it works quite well, but is slow... MapServer is much faster, and could be cached, hence my desire to use MapServer. Thanks. > > H?vard Tveite > > On 9/27/2011 4:12 AM, Puneet Kishor wrote: >> My arrows look like so -->-- instead of ----> with declarations like so >> >> SYMBOL >> NAME "vert-line" >> TYPE vector >> POINTS >> 0 1 >> 0 0 >> END >> END >> >> SYMBOL >> NAME "up" >> TYPE vector >> POINTS >> 0 1 >> 0.5 0 >> 1 1 >> END >> END >> >> CLASS >> STYLE >> SYMBOL 'vert-line' >> ANGLE [az] >> SIZE [rate] >> COLOR 0 0 0 >> WIDTH 1 >> END >> STYLE >> SYMBOL "up" >> ANGLE [az] >> SIZE 5 >> GEOMTRANSFORM "end" >> COLOR 0 0 0 >> END >> END >> >> But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so --^--. The heads are always pointed up, and are in the middle. >> >> Suggestions? From ian.walberg at airborne.aero Tue Sep 27 08:21:08 2011 From: ian.walberg at airborne.aero (Ian Walberg) Date: Tue, 27 Sep 2011 11:21:08 -0400 Subject: [mapserver-users] PHP mapscript - how to add label style Message-ID: Hello, I am sure it is staring me in the face but we cannot see how to add a style to a label (Mapserver 6.x) using PHP mapscript. Works fine via map file and we see the open issue with the save not including the geotransform line. What are we missing? Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Tue Sep 27 09:29:38 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 27 Sep 2011 12:29:38 -0400 Subject: [mapserver-users] passing cgi query params to wms layers In-Reply-To: <632EE7A9-482C-4A08-B7F6-507C611A72A1@gmail.com> References: <4E814B53.7070106@swoodbridge.com> <963DA906-2829-45A9-83EA-F0E2868A693A@gmail.com> <632EE7A9-482C-4A08-B7F6-507C611A72A1@gmail.com> Message-ID: <4E81F9F2.5060001@swoodbridge.com> On 9/27/2011 9:27 AM, Puneet Kishor wrote: > > On Sep 26, 2011, at 11:22 PM, Mr. Puneet Kishor wrote: > >> On Sep 26, 2011, at 11:04 PM, Stephen Woodbridge wrote: >> >>> On 9/26/2011 10:29 PM, Puneet Kishor wrote: >>>> I am using OpenLayers as the front-end, requesting a WMS layer from MapServer that is getting data from Pg. My DATA statement is like so >>>> >>>> DATA "the_geom FROM (SELECT gid, pc, the_geom FROM table) t USING UNIQUE gid USING srid=4326" >>>> FILTER "pc = 'na'" >>>> >>>> The above works fine. However, I would like to send the value of "pc" from OpenLayers (that is another problem that I am experiencing; I have asked on OL list on how to send query params to WMS layers, but if any of you know the solution, I would welcome that). In any case, I thought (naively), that I could change my FILTER statement like so >>>> >>>> FILTER "pc = '[pc]'" >>>> >>>> I tried sending a WMS query directly to test the above like so [http://server/cgi-bin/app?.. blah ..&pc=na] but no joy. Forcing a query error showed me that MapServer was executing the following >>>> >>>> select .. from (..) t where the_geom&& GeomFromText(..) and (pc = '[pc]') >>>> >>>> How can I dynamically supply MapServer a filter value? >>> >>> Does this doc answer your question? >>> http://mapserver.org/cgi/runsub.html >>> >> >> >> Yes it does. I had not seen that doc (hence, I was naively trying [var] kinda sub) > > > So, it seems I can't use Perl compatible regexps inside the map file for runtime substitution. For example, the following fails > > 'pc_validation_pattern' '^\w\w$' > > with "msValidateParameter(): Regular expression error. Parameter pattern validation failed." But the following works > > 'pc_validation_pattern' '^[a-zA-Z][a-zA-Z]$' > > Is there a compile time switch to make MapServer Perl-savvy? No, that would be a nice option. I'm not sure if there is a ticket or not for adding pcre support. If not you might want to add one. I find Perl expressions much easier to work with. -Steve W From bfraser at geoanalytic.com Tue Sep 27 10:31:39 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Tue, 27 Sep 2011 11:31:39 -0600 Subject: [mapserver-users] Rendering weather data Message-ID: <4E82087B.1050904@geoanalytic.com> At FOSS4G I was struck by the number of presentations involving weather data and time series display. Maybe I noticed because I have a need to render wind velocity in KML, and while I haven't settled on mapserver to do the rendering I've been wondering how to render wind barb symbols (see attached graphics) efficiently. One problem is the source data: the magnitude is in one raster file (GRIB format, float64) and the direction in another. GDAL's OGR library will read the GRIB files, but I don't know of any way to use two rasters to define a vector layer. I think there is some work going on with respect to displaying vector field data in mapserver, so maybe this will be solved by that work. Otherwise pre-processing the two rasters into a point datasource containing lon,lat,speed,direction attributes may be the way to go. The other issue of wind barb symbol rendering may have to be solved by hand constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , and having 50-ish corresponding classes (this could be a performance problem for mapserver). But I'm open to better ideas... SLD? HTTP/CGI request?, something like one class of: CLASS STYLE GEOMTRANSFORM "start" COLOR 0 255 0 SIZE 15.0 SYMBOL "http://localhost/symbolgen?[speed]" ANGLE [direction] END END but likely the cost of getting the symbol would be greater that creating 50 separate class objects. And for those interested in mapping and graphing weather data, have a look at http://www.ncl.ucar.edu/Applications/ especially http://www.ncl.ucar.edu/Applications/barb.shtml -- Best Regards, Brent Fraser -------------- next part -------------- A non-text attachment was scrubbed... Name: Wind_barbs.gif Type: image/gif Size: 6816 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: windbarbs.png Type: image/png Size: 4673 bytes Desc: not available URL: From Bob.Basques at ci.stpaul.mn.us Tue Sep 27 10:54:27 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Tue, 27 Sep 2011 12:54:27 -0500 Subject: [mapserver-users] Rendering weather data In-Reply-To: <4E82087B.1050904@geoanalytic.com> References: <4E82087B.1050904@geoanalytic.com> Message-ID: <4E81C783020000A80002E797@heckle> Could the barb class be built up from primitives, stem anddifferent flags on the tail, based on the numbers passed in. Basically you would be writing the barb symbol out for each label location needed, instead of sampling from a list of many? Just use a max/min thresholding to decide when the symbol has something added to it or not. Still a bit laborious to setup, but I think it gets you there. bobb >>> Brent Fraser wrote: At FOSS4G I was struck by the number of presentations involving weather data and time series display. Maybe I noticed because I have a need to render wind velocity in KML, and while I haven't settled on mapserver to do the rendering I've been wondering how to render wind barb symbols (see attached graphics) efficiently. One problem is the source data: the magnitude is in one raster file (GRIB format, float64) and the direction in another. GDAL's OGR library will read the GRIB files, but I don't know of any way to use two rasters to define a vector layer. I think there is some work going on with respect to displaying vector field data in mapserver, so maybe this will be solved by that work. Otherwise pre-processing the two rasters into a point datasource containing lon,lat,speed,direction attributes may be the way to go. The other issue of wind barb symbol rendering may have to be solved by hand constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , and having 50-ish corresponding classes (this could be a performance problem for mapserver). But I'm open to better ideas... SLD? HTTP/CGI request?, something like one class of: CLASS STYLE GEOMTRANSFORM "start" COLOR 0 255 0 SIZE 15.0 SYMBOL "http://localhost/symbolgen?[speed]" ANGLE [direction] END END but likely the cost of getting the symbol would be greater that creating 50 separate class objects. And for those interested in mapping and graphing weather data, have a look at http://www.ncl.ucar.edu/Applications/ especially http://www.ncl.ucar.edu/Applications/barb.shtml -- Best Regards, Brent Fraser -------------- next part -------------- An HTML attachment was scrubbed... URL: From pramsey at opengeo.org Tue Sep 27 11:03:34 2011 From: pramsey at opengeo.org (Paul Ramsey) Date: Tue, 27 Sep 2011 11:03:34 -0700 Subject: [mapserver-users] Rendering weather data In-Reply-To: <4E82087B.1050904@geoanalytic.com> References: <4E82087B.1050904@geoanalytic.com> Message-ID: Once you have vectors, the classic trick I've seen for doing the barbs is to do math to map the windspeed into an appropriate char() value and store the barbs as TTF font entries. So you only end up with one class, and the barb is an appropriately rotated label. P. On Tue, Sep 27, 2011 at 10:31 AM, Brent Fraser wrote: > ? ?At FOSS4G I was struck by the number of presentations involving weather > data and time series display. ?Maybe I noticed because I have a need to > render wind velocity in KML, and while I haven't settled on mapserver to do > the rendering I've been wondering how to render wind barb symbols (see > attached graphics) efficiently. > > ?One problem is the source data: the magnitude is in one raster file (GRIB > format, float64) ?and the direction in another. ?GDAL's OGR library will > read the GRIB files, but I don't know of any way to use two rasters to > define a vector layer. ?I think there is some work going on with respect to > displaying vector field data in mapserver, so maybe this will be solved by > that work. ?Otherwise pre-processing the two rasters into a point datasource > containing lon,lat,speed,direction attributes may be the way to go. > > ?The other issue of wind barb symbol rendering may have to be solved by hand > constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , and having > 50-ish corresponding classes (this could be a performance problem for > mapserver). ?But I'm open to better ideas... ?SLD? ?HTTP/CGI request?, > something like one class of: > > ?CLASS > ? ?STYLE > ? ? ?GEOMTRANSFORM "start" > ? ? ?COLOR 0 255 0 > ? ? ?SIZE 15.0 > ? ? ?SYMBOL "http://localhost/symbolgen?[speed]" > ? ? ?ANGLE [direction] > ? ?END > ?END > > ?but likely the cost of getting the symbol would be greater that creating 50 > separate class objects. > > And for those interested in mapping and graphing weather data, have a look > at http://www.ncl.ucar.edu/Applications/ > especially http://www.ncl.ucar.edu/Applications/barb.shtml > > -- > Best Regards, > Brent Fraser > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From nhv at cape.com Tue Sep 27 11:09:14 2011 From: nhv at cape.com (Norman Vine) Date: Tue, 27 Sep 2011 14:09:14 -0400 Subject: [mapserver-users] Rendering weather data In-Reply-To: References: <4E82087B.1050904@geoanalytic.com> Message-ID: <9256BAB6-D33D-407A-9718-B3B4F24EFAB8@cape.com> On Sep 27, 2011, at 2:03 PM, Paul Ramsey wrote: > Once you have vectors, the classic trick I've seen for doing the barbs > is to do math to map the windspeed into an appropriate char() value > and store the barbs as TTF font entries. So you only end up with one > class, and the barb is an appropriately rotated label. This might help http://carocoops.org/bb/viewtopic.php?t=169 > > P. > > On Tue, Sep 27, 2011 at 10:31 AM, Brent Fraser wrote: >> At FOSS4G I was struck by the number of presentations involving weather >> data and time series display. Maybe I noticed because I have a need to >> render wind velocity in KML, and while I haven't settled on mapserver to do >> the rendering I've been wondering how to render wind barb symbols (see >> attached graphics) efficiently. >> >> One problem is the source data: the magnitude is in one raster file (GRIB >> format, float64) and the direction in another. GDAL's OGR library will >> read the GRIB files, but I don't know of any way to use two rasters to >> define a vector layer. I think there is some work going on with respect to >> displaying vector field data in mapserver, so maybe this will be solved by >> that work. Otherwise pre-processing the two rasters into a point datasource >> containing lon,lat,speed,direction attributes may be the way to go. >> >> The other issue of wind barb symbol rendering may have to be solved by hand >> constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , and having >> 50-ish corresponding classes (this could be a performance problem for >> mapserver). But I'm open to better ideas... SLD? HTTP/CGI request?, >> something like one class of: >> >> CLASS >> STYLE >> GEOMTRANSFORM "start" >> COLOR 0 255 0 >> SIZE 15.0 >> SYMBOL "http://localhost/symbolgen?[speed]" >> ANGLE [direction] >> END >> END >> >> but likely the cost of getting the symbol would be greater that creating 50 >> separate class objects. >> >> And for those interested in mapping and graphing weather data, have a look >> at http://www.ncl.ucar.edu/Applications/ >> especially http://www.ncl.ucar.edu/Applications/barb.shtml >> >> -- >> Best Regards, >> Brent Fraser >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Tue Sep 27 12:11:34 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Tue, 27 Sep 2011 13:11:34 -0600 Subject: [mapserver-users] Rendering weather data In-Reply-To: <4E81C783020000A80002E797@heckle> References: <4E82087B.1050904@geoanalytic.com> <4E81C783020000A80002E797@heckle> Message-ID: <4E821FE6.7010506@geoanalytic.com> Bob, Maybe. I had considered some kind of programmed CGI-based URL function to create the wind barb (hence the interest in UCAR's NCL), but I don't think mapserver has the capability to use a URL as a symbol reference (would be a nice enhancement). I don't know how to procedurally add components within a map file using CLASS, STYLE, and SYMBOL. Could be done with MapScript I suppose.... Best Regards, Brent Fraser On 9/27/2011 11:54 AM, Bob Basques wrote: > > Could the barb class be built up from primitives, stem anddifferent > flags on the tail, based on the numbers passed in. Basically you > would be writing the barb symbol out for each label location needed, > instead of sampling from a list of many? Just use a max/min > thresholding to decide when the symbol has something added to it or > not. Still a bit laborious to setup, but I think it gets you there. > > > bobb > > > > > > > >>> Brent Fraser wrote: > > At FOSS4G I was struck by the number of presentations involving > weather data and time series display. Maybe I noticed because I have a > need to render wind velocity in KML, and while I haven't settled on > mapserver to do the rendering I've been wondering how to render wind > barb symbols (see attached graphics) efficiently. > > One problem is the source data: the magnitude is in one raster file > (GRIB format, float64) and the direction in another. GDAL's OGR > library will read the GRIB files, but I don't know of any way to use two > rasters to define a vector layer. I think there is some work going on > with respect to displaying vector field data in mapserver, so maybe this > will be solved by that work. Otherwise pre-processing the two rasters > into a point datasource containing lon,lat,speed,direction attributes > may be the way to go. > > The other issue of wind barb symbol rendering may have to be solved > by hand constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) > , and having 50-ish corresponding classes (this could be a performance > problem for mapserver). But I'm open to better ideas... SLD? HTTP/CGI > request?, something like one class of: > > CLASS > STYLE > GEOMTRANSFORM "start" > COLOR 0 255 0 > SIZE 15.0 > SYMBOL "http://localhost/symbolgen?[speed]" > ANGLE [direction] > END > END > > but likely the cost of getting the symbol would be greater that > creating 50 separate class objects. > > And for those interested in mapping and graphing weather data, have a > look at http://www.ncl.ucar.edu/Applications/ > especially http://www.ncl.ucar.edu/Applications/barb.shtml > > -- > Best Regards, > Brent Fraser > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Tue Sep 27 12:26:30 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Tue, 27 Sep 2011 13:26:30 -0600 Subject: [mapserver-users] Rendering weather data In-Reply-To: References: <4E82087B.1050904@geoanalytic.com> Message-ID: <4E822366.4070905@geoanalytic.com> Paul, Does mapserver have the capability to do the math in the mapfile (e.g. via RFC 64)? If not, it's another good reason to load the raster as a point table in a database. And the font/anno layer method has the added feature of automatically decluttering the map using the labelcache. I may have to write a loader script.... Best Regards, Brent Fraser On 9/27/2011 12:03 PM, Paul Ramsey wrote: > Once you have vectors, the classic trick I've seen for doing the barbs > is to do math to map the windspeed into an appropriate char() value > and store the barbs as TTF font entries. So you only end up with one > class, and the barb is an appropriately rotated label. > > P. > > On Tue, Sep 27, 2011 at 10:31 AM, Brent Fraser wrote: >> At FOSS4G I was struck by the number of presentations involving weather >> data and time series display. Maybe I noticed because I have a need to >> render wind velocity in KML, and while I haven't settled on mapserver to do >> the rendering I've been wondering how to render wind barb symbols (see >> attached graphics) efficiently. >> >> One problem is the source data: the magnitude is in one raster file (GRIB >> format, float64) and the direction in another. GDAL's OGR library will >> read the GRIB files, but I don't know of any way to use two rasters to >> define a vector layer. I think there is some work going on with respect to >> displaying vector field data in mapserver, so maybe this will be solved by >> that work. Otherwise pre-processing the two rasters into a point datasource >> containing lon,lat,speed,direction attributes may be the way to go. >> >> The other issue of wind barb symbol rendering may have to be solved by hand >> constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , and having >> 50-ish corresponding classes (this could be a performance problem for >> mapserver). But I'm open to better ideas... SLD? HTTP/CGI request?, >> something like one class of: >> >> CLASS >> STYLE >> GEOMTRANSFORM "start" >> COLOR 0 255 0 >> SIZE 15.0 >> SYMBOL "http://localhost/symbolgen?[speed]" >> ANGLE [direction] >> END >> END >> >> but likely the cost of getting the symbol would be greater that creating 50 >> separate class objects. >> >> And for those interested in mapping and graphing weather data, have a look >> at http://www.ncl.ucar.edu/Applications/ >> especially http://www.ncl.ucar.edu/Applications/barb.shtml >> >> -- >> Best Regards, >> Brent Fraser >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> From Bob.Basques at ci.stpaul.mn.us Tue Sep 27 12:38:41 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Tue, 27 Sep 2011 14:38:41 -0500 Subject: [mapserver-users] Rendering weather data In-Reply-To: <4E821FE6.7010506@geoanalytic.com> References: <4E82087B.1050904@geoanalytic.com> <4E81C783020000A80002E797@heckle> <4E821FE6.7010506@geoanalytic.com> Message-ID: <4E81DFF1020000A80002E7C7@heckle> Brent, I was thinking about a template approach where you could build a chunk of the mapfile and using an include (this might be a good spot for that URL call BTW, at least to ask the dev list about) to get at the new chunk. Paul's idea about using a TTF font is much more elegant a solution, but you would either need to make your own font or find one somewhere. That link sent by Norman leads to a TTF font with the symbols in it already. Another option, that I admit might become time consuming, the first time at least, would be to build the symbol pieces separately, and via thresholding/filtering in the MapFile display the correct pieces on top of each other. This would be very similar to displaying a highway symbol on a road. Which typically has three different symbols on top of one another for display (shield border, shield fill, number, etc). What increments are you trying to display in initially, 5 knot intervals, singles, or ?? bobb >>> Brent Fraser wrote: Bob, Maybe. I had considered some kind of programmed CGI-based URL function to create the wind barb (hence the interest in UCAR's NCL), but I don't think mapserver has the capability to use a URL as a symbol reference (would be a nice enhancement). I don't know how to procedurally add components within a map file using CLASS, STYLE, and SYMBOL. Could be done with MapScript I suppose.... Best Regards, Brent Fraser On 9/27/2011 11:54 AM, Bob Basques wrote: Could the barb class be built up from primitives, stem anddifferent flags on the tail, based on the numbers passed in. Basically you would be writing the barb symbol out for each label location needed, instead of sampling from a list of many? Just use a max/min thresholding to decide when the symbol has something added to it or not. Still a bit laborious to setup, but I think it gets you there. bobb >>> Brent Fraser ( mailto:bfraser at geoanalytic.com ) wrote: At FOSS4G I was struck by the number of presentations involving weather data and time series display. Maybe I noticed because I have a need to render wind velocity in KML, and while I haven't settled on mapserver to do the rendering I've been wondering how to render wind barb symbols (see attached graphics) efficiently. One problem is the source data: the magnitude is in one raster file (GRIB format, float64) and the direction in another. GDAL's OGR library will read the GRIB files, but I don't know of any way to use two rasters to define a vector layer. I think there is some work going on with respect to displaying vector field data in mapserver, so maybe this will be solved by that work. Otherwise pre-processing the two rasters into a point datasource containing lon,lat,speed,direction attributes may be the way to go. The other issue of wind barb symbol rendering may have to be solved by hand constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , and having 50-ish corresponding classes (this could be a performance problem for mapserver). But I'm open to better ideas... SLD? HTTP/CGI request?, something like one class of: CLASS STYLE GEOMTRANSFORM "start" COLOR 0 255 0 SIZE 15.0 SYMBOL "http://localhost/symbolgen?[speed]" ( http://localhost/symbolgen?[speed] ) ANGLE [direction] END END but likely the cost of getting the symbol would be greater that creating 50 separate class objects. And for those interested in mapping and graphing weather data, have a look at http://www.ncl.ucar.edu/Applications/ especially http://www.ncl.ucar.edu/Applications/barb.shtml -- Best Regards, Brent Fraser -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Tue Sep 27 12:57:21 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Tue, 27 Sep 2011 13:57:21 -0600 Subject: [mapserver-users] Rendering weather data In-Reply-To: <9256BAB6-D33D-407A-9718-B3B4F24EFAB8@cape.com> References: <4E82087B.1050904@geoanalytic.com> <9256BAB6-D33D-407A-9718-B3B4F24EFAB8@cape.com> Message-ID: <4E822AA1.4010206@geoanalytic.com> Norman, Many thanks for the link; it's good to see how others have approached the problem. The font referenced is an ESRI font so I don't think I can use it due to copyright, but perhaps I could construct my own using the same glyph indexes for compatibility. Best Regards, Brent Fraser On 9/27/2011 12:09 PM, Norman Vine wrote: > > On Sep 27, 2011, at 2:03 PM, Paul Ramsey wrote: > >> Once you have vectors, the classic trick I've seen for doing the barbs >> is to do math to map the windspeed into an appropriate char() value >> and store the barbs as TTF font entries. So you only end up with one >> class, and the barb is an appropriately rotated label. > > This might help > http://carocoops.org/bb/viewtopic.php?t=169 > > >> >> P. >> >> On Tue, Sep 27, 2011 at 10:31 AM, Brent Fraser >> > wrote: >>> At FOSS4G I was struck by the number of presentations involving >>> weather >>> data and time series display. Maybe I noticed because I have a need to >>> render wind velocity in KML, and while I haven't settled on >>> mapserver to do >>> the rendering I've been wondering how to render wind barb symbols (see >>> attached graphics) efficiently. >>> >>> One problem is the source data: the magnitude is in one raster file >>> (GRIB >>> format, float64) and the direction in another. GDAL's OGR library will >>> read the GRIB files, but I don't know of any way to use two rasters to >>> define a vector layer. I think there is some work going on with >>> respect to >>> displaying vector field data in mapserver, so maybe this will be >>> solved by >>> that work. Otherwise pre-processing the two rasters into a point >>> datasource >>> containing lon,lat,speed,direction attributes may be the way to go. >>> >>> The other issue of wind barb symbol rendering may have to be solved >>> by hand >>> constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , >>> and having >>> 50-ish corresponding classes (this could be a performance problem for >>> mapserver). But I'm open to better ideas... SLD? HTTP/CGI request?, >>> something like one class of: >>> >>> CLASS >>> STYLE >>> GEOMTRANSFORM "start" >>> COLOR 0 255 0 >>> SIZE 15.0 >>> SYMBOL "http://localhost/symbolgen?[speed]" >>> ANGLE [direction] >>> END >>> END >>> >>> but likely the cost of getting the symbol would be greater that >>> creating 50 >>> separate class objects. >>> >>> And for those interested in mapping and graphing weather data, have >>> a look >>> at http://www.ncl.ucar.edu/Applications/ >>> especially http://www.ncl.ucar.edu/Applications/barb.shtml >>> >>> -- >>> Best Regards, >>> Brent Fraser >>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >>> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pschweitzer at usgs.gov Tue Sep 27 13:55:39 2011 From: pschweitzer at usgs.gov (Peter N. Schweitzer) Date: Tue, 27 Sep 2011 16:55:39 -0400 Subject: [mapserver-users] minscaledenom puzzle, Mapserver 6.0.1 Message-ID: <4E82384B.2050308@usgs.gov> Surely I have misunderstood minscaledenom or otherwise have misused it. I just switched over to Mapserver 6.0.1 (Linux, CentOS, data in PostgreSQL+PostGIS) The web page is http://mrdata.usgs.gov/mineral-resources/mrds-us.html Feature type is point. The classes from the map file are these: labelitem "site_name" labelmaxscaledenom 250000 classitem "dev_stat" class maxscaledenom 7000000 expression ('[dev_stat]' == 'Producer' or '[dev_stat]' == 'Past Producer') name "Mine, past or present producer" color 160 0 0 symbol "mine" size 5 label color 0 0 0 size 10 type truetype font arial position cr offset 4 4 end end class maxscaledenom 7000000 expression ('[dev_stat]' == 'Prospect' or '[dev_stat]' == 'Occurrence') name "Prospect or occurrence" color 0 160 0 symbol "opensquare" size 5 end class maxscaledenom 7000000 expression ('[dev_stat]' == 'Plant') name "Processing plant" color 0 0 160 symbol "mine" size 6 label color 0 0 0 size 10 type truetype font arial position cr offset 4 4 end end class maxscaledenom 7000000 expression ('[dev_stat]' == 'Unknown') name "Unknown" color 0 0 0 symbol "occurrence" size 6 end class minscaledenom 7000000 color 160 0 0 symbol 0 end Under mapserver 5.6.7, this generated red pixels for every point when the map is zoomed out; those are replaced by the square symbols when the map is zoomed in. But under 6.0.1, I am not getting the 1-pixel symbols when zoomed out. I assumed that the last class defined above would apply when the scale is coarser than 1:7M. Here is the OpenLayers command that loads this layer: var wms = new OpenLayers.Layer.WMS( "Mineral Resources", "http://mrdata.usgs.gov/cgi-bin/mapserv?", { map: 'mrds.map', transparent: 'true', layers: 'mrds' }, { singleTile: 'true', ratio: 1 } ); Would some modification of my map file or my OpenLayers javascript bring back my little red pixels? Thanks for any help you might offer. Peter -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweitzer at usgs.gov From ian.walberg at airborne.aero Tue Sep 27 15:51:09 2011 From: ian.walberg at airborne.aero (Ian Walberg) Date: Tue, 27 Sep 2011 18:51:09 -0400 Subject: [mapserver-users] PHP mapscript - how to add label style Message-ID: We have spent some time chasing this with no success, is anyone out there using PHP mapscript and mapserver 6.x? Thanks Ian From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ian Walberg Sent: Tuesday, September 27, 2011 8:21 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] PHP mapscript - how to add label style Hello, I am sure it is staring me in the face but we cannot see how to add a style to a label (Mapserver 6.x) using PHP mapscript. Works fine via map file and we see the open issue with the save not including the geotransform line. What are we missing? Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at wildwalks.com Tue Sep 27 16:14:31 2011 From: matt at wildwalks.com (Matt McClelland) Date: Wed, 28 Sep 2011 09:14:31 +1000 Subject: [mapserver-users] Using a Symbol instead of text for a label Message-ID: Hi I have a bunch of symbols that overlap on a map. EG at a park where I want to show an symbol for playground, toilet and picnic tables. The data for each of these items are individual point data items. I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a group OR Use the main symbol like a label. So that I could have a dot where the play equipment is, then nearby have the symbol for the play equipment. This is obviously very easy to do with text, but is it possible with a symbol?? I have tried this CLASS EXPRESSION /play|playground/ NAME "Children's Playground" STYLE SYMBOL 'waypoint' color 255 0 0 SIZE 5 END LABEL STYLE SYMBOL '/var/www/osm/kml/icons/play.png' Size 10 END ...text styleing info.... END END I get my 'waypoint' dot and the play.png in the same location. I would like the play.png to be positioned AUTO like I can with text. Any ideas?? Thanks Matt :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaja0506 at gmail.com Tue Sep 27 16:15:02 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 27 Sep 2011 16:15:02 -0700 (PDT) Subject: [mapserver-users] output template trimlast doesn't work Message-ID: <1317165302152-6838218.post@n2.nabble.com> This is my template file. The *trimlast=','* statement doesn't work. Any idea on this? // mapserver template [resultset layer=pd] [ [feature trimlast=','] { "id": "[id]", "description": "[description]", "venue": "[venue]", "year": "[year]" }, [/feature] ] [/resultset] -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/output-template-trimlast-doesn-t-work-tp6838218p6838218.html Sent from the Mapserver - User mailing list archive at Nabble.com. From heuert at landcareresearch.co.nz Tue Sep 27 18:09:18 2011 From: heuert at landcareresearch.co.nz (Tim-Hinnerk Heuer) Date: Wed, 28 Sep 2011 14:09:18 +1300 Subject: [mapserver-users] PHP mapscript - how to add label style In-Reply-To: References: Message-ID: <4E8273BE.80300@landcareresearch.co.nz> I am not an experienced mapscript user, but I do know PHP and MapServer quite well, so if you have any questions which are related to that, I would be happy to answer if i can. Tim On 28/09/11 11:51, Ian Walberg wrote: > > We have spent some time chasing this with no success, is anyone out > there using PHP mapscript and mapserver 6.x? > > Thanks > > Ian > > *From:*mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Ian > Walberg > *Sent:* Tuesday, September 27, 2011 8:21 AM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] PHP mapscript - how to add label style > > Hello, > > I am sure it is staring me in the face but we cannot see how to add a > style to a label (Mapserver 6.x) using PHP mapscript. > > Works fine via map file and we see the open issue with the save not > including the geotransform line. > > What are we missing? > > Thanks > > Ian > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mercier.simon at gmail.com Tue Sep 27 22:48:59 2011 From: mercier.simon at gmail.com (Simon Mercier) Date: Wed, 28 Sep 2011 01:48:59 -0400 Subject: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 Message-ID: Hi list, I try to migrate a map service to Mapserver 6.0.1 that work perfectly with a Mapserver 5.0.3 and I have a strange behavior with a TILEINDEX layer. If you look the picture(in yellow you have the raster coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my image coverage is not the same scale? The raster coverage fit exactly with the WMS_EXTENT tag of my TILEINDEX layer. Moreover, if I comment the WMS_EXTENT tag no raster appears in my map. Images are ECW files and projection is EPSG:32187. The GETMAP is EPSG:32198. I had to compile GDAL 1.8.0 to use ECW driver. Did I miss something? Where should I look? /cgi-bin/orthos_sim?REQUEST= GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913 MAP NAME "orthos_sim" EXTENT -1100000 -23500 1100000 2253500 CONFIG MS_ERRORFILE "/var/services/mapserv/logs/mapserv-sim.log" WEB QUERYFORMAT "text/xml" BROWSEFORMAT "text/xml" IMAGEPATH "/tmp/" IMAGEURL "/ms_tmp/" METADATA "wms_title" "orthos" "wms_abstract" "Service web d'imagerie Orthosphoto" "wms_description" "Ce service " "wms_keywordlist" "orthophotographie" "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim?" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_getcontext_enabled" "1" "ows_enable_request" "*" END END PROJECTION "init=epsg:32198" END LAYER NAME "T_AN2000_MTM7" TYPE RASTER debug 5 EXTENT 160000 4960000 450000 5450000 TILEINDEX "/var/www/wms/tmp/AN2000_MTM07.shp" TILEITEM "location" METADATA "wms_title" "T_AN2000_MTM7" "wms_name" "an 2000 mtm 07" "wms_kaywordlist" "orthos" "wms_abstract" "Couche d'orthos" "wms_srs" "EPSG:32198 EPSG:900913 EPSG:32184 EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190" "wms_extent" "160000 4960000 450000 5450000" END PROJECTION "init=epsg:32187" END END END -- Simon Mercier Saint-Nicolas, QC Canada G7A 4Y2 www.mgeospatial.com linkedIn : http://ca.linkedin.com/in/simonmercier twitter : http://twitter.com/simonmercier -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Tue Sep 27 23:23:59 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 28 Sep 2011 06:23:59 +0000 Subject: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi> Hi, It must come from this new feature, capture from http://mapserver.org/ogc/wms_server.html "wms_extent WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6) Description: (Optional) Used for the layer's BoundingBox tag for cases where it is impossible (or very inefficient) for MapServer to probe the data source to figure its extents. The value for this metadata is "minx miny maxx maxy" separated by spaces, with the values in the layer's projection units. If wms_extent is provided then it has priority and MapServer will NOT try to read the source file's extents. For Rasters served through WMS, MapServer can now use the wms_extent metadata parameter to register the image. If a .wld file cannot be found, MapServer will then look for the wms_extent metadata parameter and use the extents of the image and the size of the image for georegistration" I would first remove the EXTENT from LAYER and wms_extent from layer metadata and see what happens then. You would get a visual hint about what happens by making the tileindex shapefile as a normal vector polygon layer and by showing it above the imagery layer. -Jukka Rahkonen- Simon Mercier wrote: > Hi list, I try to migrate a map service to Mapserver 6.0.1 that work perfectly with a Mapserver 5.0.3 and I have a strange behavior with a TILEINDEX layer. If you look the picture(in yellow you have the raster coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my image coverage is not the same scale? The raster coverage fit exactly with the WMS_EXTENT tag of my TILEINDEX layer. Moreover, if I comment the WMS_EXTENT tag no raster appears in my map. Images are ECW files and projection is EPSG:32187. The GETMAP is EPSG:32198. I had to compile GDAL 1.8.0 to use ECW driver. Did I miss something? Where should I look? /cgi-bin/orthos_sim?REQUEST= GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913 MAP NAME "orthos_sim" EXTENT -1100000 -23500 1100000 2253500 CONFIG MS_ERRORFILE "/var/services/mapserv/logs/mapserv-sim.log" WEB QUERYFORMAT "text/xml" BROWSEFORMAT "text/xml" IMAGEPATH "/tmp/" IMAGEURL "/ms_tmp/" METADATA "wms_title" "orthos" "wms_abstract" "Service web d'imagerie Orthosphoto" "wms_description" "Ce service " "wms_keywordlist" "orthophotographie" "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim?" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_getcontext_enabled" "1" "ows_enable_request" "*" END END PROJECTION "init=epsg:32198" END LAYER NAME "T_AN2000_MTM7" TYPE RASTER debug 5 EXTENT 160000 4960000 450000 5450000 TILEINDEX "/var/www/wms/tmp/AN2000_MTM07.shp" TILEITEM "location" METADATA "wms_title" "T_AN2000_MTM7" "wms_name" "an 2000 mtm 07" "wms_kaywordlist" "orthos" "wms_abstract" "Couche d'orthos" "wms_srs" "EPSG:32198 EPSG:900913 EPSG:32184 EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190" "wms_extent" "160000 4960000 450000 5450000" END PROJECTION "init=epsg:32187" END END END -- Simon Mercier Saint-Nicolas, QC Canada G7A 4Y2 www.mgeospatial.com linkedIn : http://ca.linkedin.com/in/simonmercier twitter : http://twitter.com/simonmercier -------------- next part -------------- An HTML attachment was scrubbed... URL: From mercier.simon at gmail.com Tue Sep 27 13:33:11 2011 From: mercier.simon at gmail.com (Simon Mercier) Date: Tue, 27 Sep 2011 16:33:11 -0400 Subject: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 Message-ID: Hi list, I try to migrate a map service to Mapserver 6.0.1 that work perfectly with a Mapserver 5.0.3 and I have a strange behavior with a TILEINDEX layer. If you look the picture(in yellow you have the raster coverage), you see that my image coverage is not the same scale? The raster coverage fit exactly with the WMS_EXTENT tag of my TILEINDEX layer. Moreover, if I comment the WMS_EXTENT tag no raster appears in my map. Images are ECW files and projection is EPSG:32187. The GETMAP is EPSG:32198. I had to compile GDAL 1.8.0 to use ECW driver. Did I miss something? /cgi-bin/orthos_sim?REQUEST= GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913 MAP NAME "orthos_sim" EXTENT -1100000 -23500 1100000 2253500 CONFIG MS_ERRORFILE "/var/services/mapserv/logs/mapserv-sim.log" WEB QUERYFORMAT "text/xml" BROWSEFORMAT "text/xml" IMAGEPATH "/tmp/" IMAGEURL "/ms_tmp/" METADATA "wms_title" "orthos" "wms_abstract" "Service web d'imagerie Orthosphoto" "wms_description" "Ce service " "wms_keywordlist" "orthophotographie" "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim?" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_getcontext_enabled" "1" "ows_enable_request" "*" END END PROJECTION "init=epsg:32198" END LAYER NAME "T_AN2000_MTM7" TYPE RASTER debug 5 EXTENT 160000 4960000 450000 5450000 TILEINDEX "/var/www/wms/tmp/AN2000_MTM07.shp" TILEITEM "location" METADATA "wms_title" "T_AN2000_MTM7" "wms_name" "an 2000 mtm 07" "wms_kaywordlist" "orthos" "wms_abstract" "Couche d'orthos" "wms_srs" "EPSG:32198 EPSG:900913 EPSG:32184 EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190" "wms_extent" "160000 4960000 450000 5450000" END PROJECTION "init=epsg:32187" END END END -- Simon Mercier Saint-Nicolas, QC Canada G7A 4Y2 www.mgeospatial.com linkedIn : http://ca.linkedin.com/in/simonmercier twitter : http://twitter.com/simonmercier -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bugorthos.JPG Type: image/jpeg Size: 182788 bytes Desc: not available URL: From luis.peinado at geodata.es Wed Sep 28 01:04:47 2011 From: luis.peinado at geodata.es (luis peinado) Date: Wed, 28 Sep 2011 10:04:47 +0200 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> Message-ID: Hi, just trying to help. I used some trick with arrows than maybe can help you with some variation. I use mapserver-5.X and the way it worked for me was a LINE type layer using a normal class (continous line) with an OVERLAYSYMBOL, using a ">" character. Maybe changin some parameters like GAP may be useful to you. This is my class on a TYPE LINE layer CLASS NAME "capa_tub" SYMBOL "continous" SIZE 2 COLOR 6 79 167 OVERLAYSYMBOL "arrow" OVERLAYSIZE 30 OVERLAYCOLOR 6 79 167 END And my continous and arrow are SYMBOL NAME "arrow" TYPE TRUETYPE FONT arial CHARACTER '>' FILLED true ANTIALIAS true GAP -100 END SYMBOL NAME "continous" TYPE ELLIPSE POINTS 1 1 END END Hope it helps. Llu?s 2011/9/27 Puneet Kishor > > On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: > > > Have you seen: > > > > > http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol > > > Yup, seen and read it from end to end until my eyes glazed. Perhaps it is > clear as crystal to the rest of the world, but I can't fathom anything there > applicable to me. I am facing four problems -- > > 1. As I mentioned below, per the docs, I am supposed to be able to declare > "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I > *have* to declare the angle the same as the angle of the stem of the arrow > "ANGLE [az]" in order to get arrow heads headed in the same direction as the > arrow stems. > > 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the > geometry. When used with ANGLE AUTO, it can for instance be used to render > an arrowhead." Well, no... it is *not* producing the *last point of the > geometry* as I understand it. Instead, it is producing the middle point of > the geometry. And it sure as as I can see is not working with ANGLE AUTO > (see #1 above). > > 3. I have tried several variations on my arrow head to try shift its > center, but I am failing to translate the information in the above document > to be able to do it correctly. > > 4. Perhaps most important: the length of the arrow is varying based on > [rate]. In other words, I want only the stem to be shorter or longer, but > the arrow head to be the same size, and to be at the "end" of the stem > always. In fact, there are instances in which [rate] could be equal to zero. > In those instances I don't want any arrow to be drawn at all. > > *** In other words, I want an arrow stem to be as long as the varying > [rate], and if the stem has a length greater than zero then and only then do > I want an arrow head at the end of the stem pointing in the same direction > as the stem. *** > > I even tried using a truetype font symbol, but I get no image at all but no > error as well. > > I even tried using a SYMBOL of TYPE pixmap pointing to an image of an > arrow. I realize that if I could make that work, it would still be > unsatisfactory because as MapServer would scale my arrow image, it would > make the attached arrow head also larger, and that would look ugly. In any > case, I couldn't get that to work as well... no image at all, but no error > as well. > > Could be my compilation of MapServer was buggy, but I didn't see any > compilation time errors, and other than the above oddities, it works quite > well. > > $./mapserv -v > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE > > I would love to know if my *** objective *** above can be accomplished with > MapServer. If not, I would look at other workaround. I am currently > rendering arrows using OpenLayers vector layer... it works quite well, but > is slow... MapServer is much faster, and could be cached, hence my desire to > use MapServer. > > Thanks. > > > > > > H?vard Tveite > > > > On 9/27/2011 4:12 AM, Puneet Kishor wrote: > >> My arrows look like so -->-- instead of ----> with declarations like so > >> > >> SYMBOL > >> NAME "vert-line" > >> TYPE vector > >> POINTS > >> 0 1 > >> 0 0 > >> END > >> END > >> > >> SYMBOL > >> NAME "up" > >> TYPE vector > >> POINTS > >> 0 1 > >> 0.5 0 > >> 1 1 > >> END > >> END > >> > >> CLASS > >> STYLE > >> SYMBOL 'vert-line' > >> ANGLE [az] > >> SIZE [rate] > >> COLOR 0 0 0 > >> WIDTH 1 > >> END > >> STYLE > >> SYMBOL "up" > >> ANGLE [az] > >> SIZE 5 > >> GEOMTRANSFORM "end" > >> COLOR 0 0 0 > >> END > >> END > >> > >> But, at least the arrow heads are aligned correctly. Because, if I use > "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown > above, my arrows draw like so --^--. The heads are always pointed up, and > are in the middle. > >> > >> Suggestions? > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- *Llu?s Peinado* ***Geodata Sistemas,SL.* luis.peinado at geodata.es T. 933 035 367 (ext. 21) F. 933 080 071 -------------- next part -------------- An HTML attachment was scrubbed... URL: From havard.tveite at umb.no Wed Sep 28 01:11:38 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Wed, 28 Sep 2011 10:11:38 +0200 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> Message-ID: <4E82D6BA.7090207@umb.no> GEOMTRANSFORM end only works for the lines of a line layer. Is your layer a line layer? H?vard On 9/27/2011 4:48 PM, Puneet Kishor wrote: > > On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: > >> Have you seen: >> >> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol > > > Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear as crystal to the rest of the world, but I can't fathom anything there applicable to me. I am facing four problems -- > > 1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the same direction as the arrow stems. > > 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. When used with ANGLE AUTO, it can for instance be used to render an arrowhead." Well, no... it is *not* producing the *last point of the geometry* as I understand it. Instead, it is producing the middle point of the geometry. And it sure as as I can see is not working with ANGLE AUTO (see #1 above). > > 3. I have tried several variations on my arrow head to try shift its center, but I am failing to translate the information in the above document to be able to do it correctly. > > 4. Perhaps most important: the length of the arrow is varying based on [rate]. In other words, I want only the stem to be shorter or longer, but the arrow head to be the same size, and to be at the "end" of the stem always. In fact, there are instances in which [rate] could be equal to zero. In those instances I don't want any arrow to be drawn at all. > > *** In other words, I want an arrow stem to be as long as the varying [rate], and if the stem has a length greater than zero then and only then do I want an arrow head at the end of the stem pointing in the same direction as the stem. *** > > I even tried using a truetype font symbol, but I get no image at all but no error as well. > > I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I realize that if I could make that work, it would still be unsatisfactory because as MapServer would scale my arrow image, it would make the attached arrow head also larger, and that would look ugly. In any case, I couldn't get that to work as well... no image at all, but no error as well. > > Could be my compilation of MapServer was buggy, but I didn't see any compilation time errors, and other than the above oddities, it works quite well. > > $./mapserv -v > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE > > I would love to know if my *** objective *** above can be accomplished with MapServer. If not, I would look at other workaround. I am currently rendering arrows using OpenLayers vector layer... it works quite well, but is slow... MapServer is much faster, and could be cached, hence my desire to use MapServer. > > Thanks. > > >> >> H?vard Tveite >> >> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>> My arrows look like so -->-- instead of ----> with declarations like so >>> >>> SYMBOL >>> NAME "vert-line" >>> TYPE vector >>> POINTS >>> 0 1 >>> 0 0 >>> END >>> END >>> >>> SYMBOL >>> NAME "up" >>> TYPE vector >>> POINTS >>> 0 1 >>> 0.5 0 >>> 1 1 >>> END >>> END >>> >>> CLASS >>> STYLE >>> SYMBOL 'vert-line' >>> ANGLE [az] >>> SIZE [rate] >>> COLOR 0 0 0 >>> WIDTH 1 >>> END >>> STYLE >>> SYMBOL "up" >>> ANGLE [az] >>> SIZE 5 >>> GEOMTRANSFORM "end" >>> COLOR 0 0 0 >>> END >>> END >>> >>> But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so --^--. The heads are always pointed up, and are in the middle. >>> >>> Suggestions? > > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From jorge.arevalo at deimos-space.com Wed Sep 28 02:12:46 2011 From: jorge.arevalo at deimos-space.com (=?ISO-8859-1?Q?Jorge_Ar=E9valo?=) Date: Wed, 28 Sep 2011 11:12:46 +0200 Subject: [mapserver-users] Mapserver + NDVI styling Message-ID: I'm serving a NDVI coverage via Mapserver. So, one band, float32 values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and generate a legend. I've tried 2 things: - Create two dummy classes, just for testing: CLASS NAME "rojo" EXPRESSION ([pixel] < 0.3) STYLE COLOR 255 0 0 END END CLASS NAME "azul" EXPRESSION ([pixel] >= 0.3) STYLE COLOR 0 0 255 END END So, my legend looks like this: http://dl.dropbox.com/u/6599273/leyenda.png And the image, obviously, is red and blue: http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png But I'd like to see the image in greyscale... The I've tried the next thing - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know what Mapserver internally does with this processing order, but I can see the image in greyscale: http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png The problem is now I can't see any legend, because I've not created any class. I'd like to see all the different levels of the grayscale image in my legend. How could I do it? Many thanks in advance -- Jorge Ar?valo Internet & Mobility Division, DEIMOS jorge.arevalo at deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g From punk.kish at gmail.com Wed Sep 28 05:58:10 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 28 Sep 2011 07:58:10 -0500 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <4E82D6BA.7090207@umb.no> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> <4E82D6BA.7090207@umb.no> Message-ID: <87957DF8-E44F-4D8D-B288-455FC5F60BA0@gmail.com> On Sep 28, 2011, at 3:11 AM, Havard Tveite wrote: > GEOMTRANSFORM end only works for the lines of a line layer. > Is your layer a line layer? Sigh. No, my layer is a POINT layer. Where on this page [http://mapserver.org/mapfile/style.html] is it documented that GEOMTRANSFORM is only for LINE layers? I could be wrong, but nowhere do I see that mentioned. In other words, is GEOMTRANSFORM simply not working at all because my layer is a POINT layer? That would explain why the symbol is not being produced at the "end" point of the symbol, even though I have specified GEOMTRANSFORM "end" Thanks H?vard. I will lose GEOMTRANSFORM from that STYLE definition. > > H?vard > > On 9/27/2011 4:48 PM, Puneet Kishor wrote: >> >> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: >> >>> Have you seen: >>> >>> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol >> >> >> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear as crystal to the rest of the world, but I can't fathom anything there applicable to me. I am facing four problems -- >> >> 1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the same direction as the arrow stems. >> >> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. When used with ANGLE AUTO, it can for instance be used to render an arrowhead." Well, no... it is *not* producing the *last point of the geometry* as I understand it. Instead, it is producing the middle point of the geometry. And it sure as as I can see is not working with ANGLE AUTO (see #1 above). >> >> 3. I have tried several variations on my arrow head to try shift its center, but I am failing to translate the information in the above document to be able to do it correctly. >> >> 4. Perhaps most important: the length of the arrow is varying based on [rate]. In other words, I want only the stem to be shorter or longer, but the arrow head to be the same size, and to be at the "end" of the stem always. In fact, there are instances in which [rate] could be equal to zero. In those instances I don't want any arrow to be drawn at all. >> >> *** In other words, I want an arrow stem to be as long as the varying [rate], and if the stem has a length greater than zero then and only then do I want an arrow head at the end of the stem pointing in the same direction as the stem. *** >> >> I even tried using a truetype font symbol, but I get no image at all but no error as well. >> >> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I realize that if I could make that work, it would still be unsatisfactory because as MapServer would scale my arrow image, it would make the attached arrow head also larger, and that would look ugly. In any case, I couldn't get that to work as well... no image at all, but no error as well. >> >> Could be my compilation of MapServer was buggy, but I didn't see any compilation time errors, and other than the above oddities, it works quite well. >> >> $./mapserv -v >> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE >> >> I would love to know if my *** objective *** above can be accomplished with MapServer. If not, I would look at other workaround. I am currently rendering arrows using OpenLayers vector layer... it works quite well, but is slow... MapServer is much faster, and could be cached, hence my desire to use MapServer. >> >> Thanks. >> >> >>> >>> H?vard Tveite >>> >>> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>>> My arrows look like so -->-- instead of ----> with declarations like so >>>> >>>> SYMBOL >>>> NAME "vert-line" >>>> TYPE vector >>>> POINTS >>>> 0 1 >>>> 0 0 >>>> END >>>> END >>>> >>>> SYMBOL >>>> NAME "up" >>>> TYPE vector >>>> POINTS >>>> 0 1 >>>> 0.5 0 >>>> 1 1 >>>> END >>>> END >>>> >>>> CLASS >>>> STYLE >>>> SYMBOL 'vert-line' >>>> ANGLE [az] >>>> SIZE [rate] >>>> COLOR 0 0 0 >>>> WIDTH 1 >>>> END >>>> STYLE >>>> SYMBOL "up" >>>> ANGLE [az] >>>> SIZE 5 >>>> GEOMTRANSFORM "end" >>>> COLOR 0 0 0 >>>> END >>>> END >>>> >>>> But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so --^--. The heads are always pointed up, and are in the middle. >>>> >>>> Suggestions? >> >> > > -- > H?vard Tveite > Department of Mathematical Sciences and Technology, UMB > Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY > Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From punk.kish at gmail.com Wed Sep 28 06:09:07 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 28 Sep 2011 08:09:07 -0500 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> Message-ID: <31D51EB1-D808-411D-83E5-936A393E747E@gmail.com> Hi luis, Thanks for helping out. I will try OVERLAYSYMBOL, but from the docs it seems it is no different that using two stacked symbols. I did try GAP, but that doesn't help at all. As I mentioned below, I am drawing these points, not unlike the recent thread started by Brent on drawing wind barbs. Except, in my case, these are GPS sensor readings. The reading values are always 0 or more (actually, they are close to 0, but let's say, the really tiny ones are identifiable). The readings have two values... rate and azimuth. The length of the arrows has to be drawn proportional to the rate, and arrows have to be pointed toward the azimuth. First, I don't want arrows on the 0 (or, close to 0) readings but I still want to show them. So, I've decided I will just select them out and draw them as a separate layer with just dots. Easy. Now, the ones that are to be drawn with an arrow: the problem I am facing is that I want the arrow head at the end of the arrow stem that is of a non-predictable length. Even though the docs imply that I can achieve this with GEOMTRANSFORM, I have failed to do so. And, of course, just now I learned that perhaps that could be because GEOMSTRANSFORM applies *only* to LINE layers. Seems to me the *only* reasonable way to achieve this would be to have a GEOMTRANSFORM kind of capability for POINT layers as well, so that the last (or first or whatever... the specified) point of the symbol geometry could be decorated with another symbol. I am open to all kinds of suggestions at this point. On Sep 28, 2011, at 3:04 AM, luis peinado wrote: > Hi, just trying to help. > I used some trick with arrows than maybe can help you with some variation. > I use mapserver-5.X and the way it worked for me was a LINE type layer using > a normal class (continous line) with an OVERLAYSYMBOL, using a ">" > character. > Maybe changin some parameters like GAP may be useful to you. > > This is my class on a TYPE LINE layer > CLASS > NAME "capa_tub" > SYMBOL "continous" > SIZE 2 > COLOR 6 79 167 > OVERLAYSYMBOL "arrow" > OVERLAYSIZE 30 > OVERLAYCOLOR 6 79 167 > END > > And my continous and arrow are > > SYMBOL > NAME "arrow" > TYPE TRUETYPE > FONT arial > CHARACTER '>' > FILLED true > ANTIALIAS true > GAP -100 > END > > SYMBOL > NAME "continous" > TYPE ELLIPSE > POINTS 1 1 END > END > > Hope it helps. > Llu?s > > 2011/9/27 Puneet Kishor > >> >> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: >> >>> Have you seen: >>> >>> >> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol >> >> >> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is >> clear as crystal to the rest of the world, but I can't fathom anything there >> applicable to me. I am facing four problems -- >> >> 1. As I mentioned below, per the docs, I am supposed to be able to declare >> "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I >> *have* to declare the angle the same as the angle of the stem of the arrow >> "ANGLE [az]" in order to get arrow heads headed in the same direction as the >> arrow stems. >> >> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the >> geometry. When used with ANGLE AUTO, it can for instance be used to render >> an arrowhead." Well, no... it is *not* producing the *last point of the >> geometry* as I understand it. Instead, it is producing the middle point of >> the geometry. And it sure as as I can see is not working with ANGLE AUTO >> (see #1 above). >> >> 3. I have tried several variations on my arrow head to try shift its >> center, but I am failing to translate the information in the above document >> to be able to do it correctly. >> >> 4. Perhaps most important: the length of the arrow is varying based on >> [rate]. In other words, I want only the stem to be shorter or longer, but >> the arrow head to be the same size, and to be at the "end" of the stem >> always. In fact, there are instances in which [rate] could be equal to zero. >> In those instances I don't want any arrow to be drawn at all. >> >> *** In other words, I want an arrow stem to be as long as the varying >> [rate], and if the stem has a length greater than zero then and only then do >> I want an arrow head at the end of the stem pointing in the same direction >> as the stem. *** >> >> I even tried using a truetype font symbol, but I get no image at all but no >> error as well. >> >> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an >> arrow. I realize that if I could make that work, it would still be >> unsatisfactory because as MapServer would scale my arrow image, it would >> make the attached arrow head also larger, and that would look ugly. In any >> case, I couldn't get that to work as well... no image at all, but no error >> as well. >> >> Could be my compilation of MapServer was buggy, but I didn't see any >> compilation time errors, and other than the above oddities, it works quite >> well. >> >> $./mapserv -v >> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ >> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER >> SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE >> >> I would love to know if my *** objective *** above can be accomplished with >> MapServer. If not, I would look at other workaround. I am currently >> rendering arrows using OpenLayers vector layer... it works quite well, but >> is slow... MapServer is much faster, and could be cached, hence my desire to >> use MapServer. >> >> Thanks. >> >> >>> >>> H?vard Tveite >>> >>> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>>> My arrows look like so -->-- instead of ----> with declarations like so >>>> >>>> SYMBOL >>>> NAME "vert-line" >>>> TYPE vector >>>> POINTS >>>> 0 1 >>>> 0 0 >>>> END >>>> END >>>> >>>> SYMBOL >>>> NAME "up" >>>> TYPE vector >>>> POINTS >>>> 0 1 >>>> 0.5 0 >>>> 1 1 >>>> END >>>> END >>>> >>>> CLASS >>>> STYLE >>>> SYMBOL 'vert-line' >>>> ANGLE [az] >>>> SIZE [rate] >>>> COLOR 0 0 0 >>>> WIDTH 1 >>>> END >>>> STYLE >>>> SYMBOL "up" >>>> ANGLE [az] >>>> SIZE 5 >>>> GEOMTRANSFORM "end" >>>> COLOR 0 0 0 >>>> END >>>> END >>>> >>>> But, at least the arrow heads are aligned correctly. Because, if I use >> "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown >> above, my arrows draw like so --^--. The heads are always pointed up, and >> are in the middle. >>>> >>>> Suggestions? >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > > > > -- > > *Llu?s Peinado* > > ***Geodata Sistemas,SL.* > > luis.peinado at geodata.es > > > > T. 933 035 367 (ext. 21) > > F. 933 080 071 From thomas.bonfort at gmail.com Wed Sep 28 06:15:38 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 28 Sep 2011 15:15:38 +0200 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <31D51EB1-D808-411D-83E5-936A393E747E@gmail.com> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> <31D51EB1-D808-411D-83E5-936A393E747E@gmail.com> Message-ID: On Wed, Sep 28, 2011 at 15:09, Mr. Puneet Kishor wrote: > Hi luis, > > Thanks for helping out. I will try OVERLAYSYMBOL, but from the docs it seems it is no different that using two stacked symbols. I did try GAP, but that doesn't help at all. > > As I mentioned below, I am drawing these points, not unlike the recent thread started by Brent on drawing wind barbs. Except, in my case, these are GPS sensor readings. The reading values are always 0 or more (actually, they are close to 0, but let's say, the really tiny ones are identifiable). The readings have two values... rate and azimuth. > > The length of the arrows has to be drawn proportional to the rate, and arrows have to be pointed toward the azimuth. > > First, I don't want arrows on the 0 (or, close to 0) readings but I still want to show them. So, I've decided I will just select them out and draw them as a separate layer with just dots. Easy. > > Now, the ones that are to be drawn with an arrow: the problem I am facing is that I want the arrow head at the end of the arrow stem that is of a non-predictable length. Even though the docs imply that I can achieve this with GEOMTRANSFORM, I have failed to do so. And, of course, just now I learned that perhaps that could be because GEOMSTRANSFORM applies *only* to LINE layers. The docs have *never* implied that, even if you might have wanted them to. "end: produces the last point of the geometry": the last point of a point geometry is the point itself, which is what is happening. > > Seems to me the *only* reasonable way to achieve this would be to have a GEOMTRANSFORM kind of capability for POINT layers as well, so that the last (or first or whatever... the specified) point of the symbol geometry could be decorated with another symbol. again, geomtransform applies to the underlying feature, not the symbol you are rendering on top of the feature. geomtransform will not help in your case. as paul suggested, you need to classify your data with a different symbol depending on your [rate], and use the azimuth for the orientation. > > I am open to all kinds of suggestions at this point. > > > On Sep 28, 2011, at 3:04 AM, luis peinado wrote: > >> Hi, just trying to help. >> I used some trick with arrows than maybe can help you with some variation. >> I use mapserver-5.X and the way it worked for me was a LINE type layer using >> a normal class (continous line) with an OVERLAYSYMBOL, using ?a ">" >> character. >> Maybe changin some parameters like GAP may be useful to you. >> >> This is my class on a TYPE LINE layer >> CLASS >> NAME "capa_tub" >> SYMBOL "continous" >> SIZE 2 >> COLOR 6 79 167 >> OVERLAYSYMBOL "arrow" >> OVERLAYSIZE 30 >> OVERLAYCOLOR 6 79 167 >> END >> >> And my continous and arrow are >> >> SYMBOL >> ?NAME "arrow" >> ?TYPE TRUETYPE >> ?FONT arial >> ?CHARACTER '>' >> ?FILLED true >> ?ANTIALIAS true >> ?GAP -100 >> END >> >> SYMBOL >> NAME "continous" >> TYPE ELLIPSE >> POINTS 1 1 END >> END >> >> Hope it helps. >> Llu?s >> >> 2011/9/27 Puneet Kishor >> >>> >>> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: >>> >>>> Have you seen: >>>> >>>> >>> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol >>> >>> >>> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is >>> clear as crystal to the rest of the world, but I can't fathom anything there >>> applicable to me. I am facing four problems -- >>> >>> 1. As I mentioned below, per the docs, I am supposed to be able to declare >>> "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I >>> *have* to declare the angle the same as the angle of the stem of the arrow >>> "ANGLE [az]" in order to get arrow heads headed in the same direction as the >>> arrow stems. >>> >>> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the >>> geometry. When used with ANGLE AUTO, it can for instance be used to render >>> an arrowhead." Well, no... it is *not* producing the *last point of the >>> geometry* as I understand it. Instead, it is producing the middle point of >>> the geometry. And it sure as as I can see is not working with ANGLE AUTO >>> (see #1 above). >>> >>> 3. I have tried several variations on my arrow head to try shift its >>> center, but I am failing to translate the information in the above document >>> to be able to do it correctly. >>> >>> 4. Perhaps most important: the length of the arrow is varying based on >>> [rate]. In other words, I want only the stem to be shorter or longer, but >>> the arrow head to be the same size, and to be at the "end" of the stem >>> always. In fact, there are instances in which [rate] could be equal to zero. >>> In those instances I don't want any arrow to be drawn at all. >>> >>> *** In other words, I want an arrow stem to be as long as the varying >>> [rate], and if the stem has a length greater than zero then and only then do >>> I want an arrow head at the end of the stem pointing in the same direction >>> as the stem. *** >>> >>> I even tried using a truetype font symbol, but I get no image at all but no >>> error as well. >>> >>> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an >>> arrow. I realize that if I could make that work, it would still be >>> unsatisfactory because as MapServer would scale my arrow image, it would >>> make the attached arrow head also larger, and that would look ugly. In any >>> case, I couldn't get that to work as well... no image at all, but no error >>> as well. >>> >>> Could be my compilation of MapServer was buggy, but I didn't see any >>> compilation time errors, and other than the above oddities, it works quite >>> well. >>> >>> $./mapserv -v >>> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ >>> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER >>> SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE >>> >>> I would love to know if my *** objective *** above can be accomplished with >>> MapServer. If not, I would look at other workaround. I am currently >>> rendering arrows using OpenLayers vector layer... it works quite well, but >>> is slow... MapServer is much faster, and could be cached, hence my desire to >>> use MapServer. >>> >>> Thanks. >>> >>> >>>> >>>> H?vard Tveite >>>> >>>> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>>>> My arrows look like so -->-- instead of ----> ?with declarations like so >>>>> >>>>> ? ?SYMBOL >>>>> ? ? ? ?NAME "vert-line" >>>>> ? ? ? ?TYPE vector >>>>> ? ? ? ?POINTS >>>>> ? ? ? ? ? ?0 1 >>>>> ? ? ? ? ? ?0 0 >>>>> ? ? ? ?END >>>>> ? ?END >>>>> >>>>> ? ? SYMBOL >>>>> ? ? ? ?NAME "up" >>>>> ? ? ? ?TYPE vector >>>>> ? ? ? ?POINTS >>>>> ? ? ? ? ? ?0 1 >>>>> ? ? ? ? ? ?0.5 0 >>>>> ? ? ? ? ? ?1 1 >>>>> ? ? ? ?END >>>>> ? ?END >>>>> >>>>> ? ?CLASS >>>>> ? ? ? ?STYLE >>>>> ? ? ? ? ? ?SYMBOL 'vert-line' >>>>> ? ? ? ? ? ?ANGLE [az] >>>>> ? ? ? ? ? ?SIZE [rate] >>>>> ? ? ? ? ? ?COLOR 0 0 0 >>>>> ? ? ? ? ? ?WIDTH 1 >>>>> ? ? ? ?END >>>>> ? ? ? ?STYLE >>>>> ? ? ? ? ? ?SYMBOL "up" >>>>> ? ? ? ? ? ?ANGLE [az] >>>>> ? ? ? ? ? ?SIZE 5 >>>>> ? ? ? ? ? ?GEOMTRANSFORM "end" >>>>> ? ? ? ? ? ?COLOR 0 0 0 >>>>> ? ? ? ?END >>>>> ? ?END >>>>> >>>>> But, at least the arrow heads are aligned correctly. Because, if I use >>> "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown >>> above, my arrows draw like so --^--. The heads are always pointed up, and >>> are in the middle. >>>>> >>>>> Suggestions? >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >> >> >> >> -- >> >> *Llu?s Peinado* >> >> ***Geodata Sistemas,SL.* >> >> luis.peinado at geodata.es >> >> >> >> T. 933 035 367 (ext. 21) >> >> F. 933 080 071 > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From punk.kish at gmail.com Wed Sep 28 06:32:15 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 28 Sep 2011 08:32:15 -0500 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> <31D51EB1-D808-411D-83E5-936A393E747E@gmail.com> Message-ID: <3EC8B021-8BEE-403C-A342-C9B98F349BF6@gmail.com> Hi Thomas, On Sep 28, 2011, at 8:15 AM, thomas bonfort wrote: > On Wed, Sep 28, 2011 at 15:09, Mr. Puneet Kishor wrote: >> Hi luis, >> >> Thanks for helping out. I will try OVERLAYSYMBOL, but from the docs it seems it is no different that using two stacked symbols. I did try GAP, but that doesn't help at all. >> >> As I mentioned below, I am drawing these points, not unlike the recent thread started by Brent on drawing wind barbs. Except, in my case, these are GPS sensor readings. The reading values are always 0 or more (actually, they are close to 0, but let's say, the really tiny ones are identifiable). The readings have two values... rate and azimuth. >> >> The length of the arrows has to be drawn proportional to the rate, and arrows have to be pointed toward the azimuth. >> >> First, I don't want arrows on the 0 (or, close to 0) readings but I still want to show them. So, I've decided I will just select them out and draw them as a separate layer with just dots. Easy. >> >> Now, the ones that are to be drawn with an arrow: the problem I am facing is that I want the arrow head at the end of the arrow stem that is of a non-predictable length. Even though the docs imply that I can achieve this with GEOMTRANSFORM, I have failed to do so. And, of course, just now I learned that perhaps that could be because GEOMSTRANSFORM applies *only* to LINE layers. > > The docs have *never* implied that, even if you might have wanted them to. > "end: produces the last point of the geometry": the last point of a > point geometry is the point itself, which is what is happening. Now it makes crystal clear sense. Nevertheless, consider that until as of this moment, I did take the docs to imply that the geometry in this case was the geometry of the symbol. When I say "imply," I am not accusing anyone of misleading. I am asserting that the way "a truth" has been stated in the document can and has appeared as "another truth" to someone else. Just changing the docs to what you explained above would be fantastic. Additionally, per Havard, GEOMTRANSFORM apparently doesn't even apply to POINTs. Which now makes sense, since a point geometry's start, middle and end are exactly the same. However, again, stating this in the docs would be super helpful. > > >> >> Seems to me the *only* reasonable way to achieve this would be to have a GEOMTRANSFORM kind of capability for POINT layers as well, so that the last (or first or whatever... the specified) point of the symbol geometry could be decorated with another symbol. > > again, geomtransform applies to the underlying feature, not the symbol > you are rendering on top of the feature. geomtransform will not help > in your case. > > as paul suggested, you need to classify your data with a different > symbol depending on your [rate], and use the azimuth for the > orientation. > Hmmm.... I am trying to figure out which "Paul" suggested "where" in this thread. Perhaps you are referring to the wind barb thread. In any case, I am not sure what you mean by "classify your data with a different symbol depending on your [rate]." The way I am understanding that sentence is that I should have an actual different symbol for every different rate. Well, that will not only not work for me, it would defeat the purpose of all this automation. I have ~3000 points, each with a different rate. I can't possibly have 3000 symbols. Not just that, these rates change on a daily basis. Background -- these are readings from almost 3000 stations around the world reporting the rates daily. I get new values on a daily basis, so every day I would have a different map. (actually, it is a lot more complicated than that, but that is a good depiction of the problem). Many thanks again for your assistance, but I hope the above clarifies the issues. >> >> I am open to all kinds of suggestions at this point. >> >> >> On Sep 28, 2011, at 3:04 AM, luis peinado wrote: >> >>> Hi, just trying to help. >>> I used some trick with arrows than maybe can help you with some variation. >>> I use mapserver-5.X and the way it worked for me was a LINE type layer using >>> a normal class (continous line) with an OVERLAYSYMBOL, using a ">" >>> character. >>> Maybe changin some parameters like GAP may be useful to you. >>> >>> This is my class on a TYPE LINE layer >>> CLASS >>> NAME "capa_tub" >>> SYMBOL "continous" >>> SIZE 2 >>> COLOR 6 79 167 >>> OVERLAYSYMBOL "arrow" >>> OVERLAYSIZE 30 >>> OVERLAYCOLOR 6 79 167 >>> END >>> >>> And my continous and arrow are >>> >>> SYMBOL >>> NAME "arrow" >>> TYPE TRUETYPE >>> FONT arial >>> CHARACTER '>' >>> FILLED true >>> ANTIALIAS true >>> GAP -100 >>> END >>> >>> SYMBOL >>> NAME "continous" >>> TYPE ELLIPSE >>> POINTS 1 1 END >>> END >>> >>> Hope it helps. >>> Llu?s >>> >>> 2011/9/27 Puneet Kishor >>> >>>> >>>> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: >>>> >>>>> Have you seen: >>>>> >>>>> >>>> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol >>>> >>>> >>>> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is >>>> clear as crystal to the rest of the world, but I can't fathom anything there >>>> applicable to me. I am facing four problems -- >>>> >>>> 1. As I mentioned below, per the docs, I am supposed to be able to declare >>>> "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I >>>> *have* to declare the angle the same as the angle of the stem of the arrow >>>> "ANGLE [az]" in order to get arrow heads headed in the same direction as the >>>> arrow stems. >>>> >>>> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the >>>> geometry. When used with ANGLE AUTO, it can for instance be used to render >>>> an arrowhead." Well, no... it is *not* producing the *last point of the >>>> geometry* as I understand it. Instead, it is producing the middle point of >>>> the geometry. And it sure as as I can see is not working with ANGLE AUTO >>>> (see #1 above). >>>> >>>> 3. I have tried several variations on my arrow head to try shift its >>>> center, but I am failing to translate the information in the above document >>>> to be able to do it correctly. >>>> >>>> 4. Perhaps most important: the length of the arrow is varying based on >>>> [rate]. In other words, I want only the stem to be shorter or longer, but >>>> the arrow head to be the same size, and to be at the "end" of the stem >>>> always. In fact, there are instances in which [rate] could be equal to zero. >>>> In those instances I don't want any arrow to be drawn at all. >>>> >>>> *** In other words, I want an arrow stem to be as long as the varying >>>> [rate], and if the stem has a length greater than zero then and only then do >>>> I want an arrow head at the end of the stem pointing in the same direction >>>> as the stem. *** >>>> >>>> I even tried using a truetype font symbol, but I get no image at all but no >>>> error as well. >>>> >>>> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an >>>> arrow. I realize that if I could make that work, it would still be >>>> unsatisfactory because as MapServer would scale my arrow image, it would >>>> make the attached arrow head also larger, and that would look ugly. In any >>>> case, I couldn't get that to work as well... no image at all, but no error >>>> as well. >>>> >>>> Could be my compilation of MapServer was buggy, but I didn't see any >>>> compilation time errors, and other than the above oddities, it works quite >>>> well. >>>> >>>> $./mapserv -v >>>> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ >>>> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER >>>> SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE >>>> >>>> I would love to know if my *** objective *** above can be accomplished with >>>> MapServer. If not, I would look at other workaround. I am currently >>>> rendering arrows using OpenLayers vector layer... it works quite well, but >>>> is slow... MapServer is much faster, and could be cached, hence my desire to >>>> use MapServer. >>>> >>>> Thanks. >>>> >>>> >>>>> >>>>> H?vard Tveite >>>>> >>>>> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>>>>> My arrows look like so -->-- instead of ----> with declarations like so >>>>>> >>>>>> SYMBOL >>>>>> NAME "vert-line" >>>>>> TYPE vector >>>>>> POINTS >>>>>> 0 1 >>>>>> 0 0 >>>>>> END >>>>>> END >>>>>> >>>>>> SYMBOL >>>>>> NAME "up" >>>>>> TYPE vector >>>>>> POINTS >>>>>> 0 1 >>>>>> 0.5 0 >>>>>> 1 1 >>>>>> END >>>>>> END >>>>>> >>>>>> CLASS >>>>>> STYLE >>>>>> SYMBOL 'vert-line' >>>>>> ANGLE [az] >>>>>> SIZE [rate] >>>>>> COLOR 0 0 0 >>>>>> WIDTH 1 >>>>>> END >>>>>> STYLE >>>>>> SYMBOL "up" >>>>>> ANGLE [az] >>>>>> SIZE 5 >>>>>> GEOMTRANSFORM "end" >>>>>> COLOR 0 0 0 >>>>>> END >>>>>> END >>>>>> >>>>>> But, at least the arrow heads are aligned correctly. Because, if I use >>>> "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown >>>> above, my arrows draw like so --^--. The heads are always pointed up, and >>>> are in the middle. >>>>>> >>>>>> Suggestions? >>>> >>>> _______________________________________________ >>>> mapserver-users mailing list >>>> mapserver-users at lists.osgeo.org >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >>> >>> >>> >>> -- >>> >>> *Llu?s Peinado* >>> >>> ***Geodata Sistemas,SL.* >>> >>> luis.peinado at geodata.es >>> >>> >>> >>> T. 933 035 367 (ext. 21) >>> >>> F. 933 080 071 >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> From david.fawcett at state.mn.us Wed Sep 28 06:47:40 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Wed, 28 Sep 2011 08:47:40 -0500 Subject: [mapserver-users] Using a Symbol instead of text for a label In-Reply-To: References: Message-ID: Matt, I haven't fully thought it through, but maybe the new Cluster functionality might work for this. You could have a generic park symbol for the cluster symbol. http://mapserver.org/mapfile/cluster.html David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Matt McClelland Sent: Tuesday, September 27, 2011 6:15 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Using a Symbol instead of text for a label Hi I have a bunch of symbols that overlap on a map. EG at a park where I want to show an symbol for playground, toilet and picnic tables. The data for each of these items are individual point data items. I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a group OR Use the main symbol like a label. So that I could have a dot where the play equipment is, then nearby have the symbol for the play equipment. This is obviously very easy to do with text, but is it possible with a symbol?? I have tried this CLASS EXPRESSION /play|playground/ NAME "Children's Playground" STYLE SYMBOL 'waypoint' color 255 0 0 SIZE 5 END LABEL STYLE SYMBOL '/var/www/osm/kml/icons/play.png' Size 10 END ...text styleing info.... END END I get my 'waypoint' dot and the play.png in the same location. I would like the play.png to be positioned AUTO like I can with text. Any ideas?? Thanks Matt :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From boolean10001 at yahoo.com Wed Sep 28 07:16:53 2011 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Wed, 28 Sep 2011 07:16:53 -0700 (PDT) Subject: [mapserver-users] PHP mapscript - how to add label style In-Reply-To: References: Message-ID: <1317219413.98619.YahooMailNeo@web38204.mail.mud.yahoo.com> Ian, Why don't you post your script ? ? IC Carlos Ruiz ________________________________ From: Ian Walberg To: mapserver-users at lists.osgeo.org Sent: Tuesday, September 27, 2011 5:51 PM Subject: RE: [mapserver-users] PHP mapscript - how to add label style We have spent some time chasing this with no success, is anyone out there using PHP mapscript and mapserver 6.x? ? Thanks ? Ian ? ? From:mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ian Walberg Sent: Tuesday, September 27, 2011 8:21 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] PHP mapscript - how to add label style ? Hello, ? I am sure it is staring me in the face but we cannot see how to add a style to a label (Mapserver 6.x) using PHP mapscript. ? Works fine via map file and we see the open issue with the save not including the geotransform line. ? What are we missing? ? Thanks ? Ian _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From havard.tveite at umb.no Wed Sep 28 07:25:11 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Wed, 28 Sep 2011 16:25:11 +0200 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> Message-ID: <4E832E47.6070504@umb.no> With a point layer, you can fix this using the offset trick I referred to in my earlier post: The following works for me using Mapserver 6 (the arrow head is centred at the point, but you can shift it using the same technique as shown for the arrow line) SYMBOL NAME "up" TYPE vector POINTS 0 10 5 0 10 10 END END SYMBOL NAME "vert-line" TYPE vector POINTS 0 5 0 10 END END ... CLASS STYLE SYMBOL "vert-line" ANGLE [az] SIZE [rate] COLOR 0 0 0 WIDTH 1 END # STYLE STYLE SYMBOL "up" ANGLE [az] SIZE 5 WIDTH 2 COLOR 0 0 0 END # STYLE END # CLASS In my opinion, the best thing would be to be able to specify the "centre/origin" of the point explicitly, as suggested in RFC45. But this part of the RFC has not yet been implemented. H?vard On 9/27/2011 4:48 PM, Puneet Kishor wrote: > > On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: > >> Have you seen: >> >> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol > > > Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear as crystal to the rest of the world, but I can't fathom anything there applicable to me. I am facing four problems -- > > 1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the same direction as the arrow stems. > > 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. When used with ANGLE AUTO, it can for instance be used to render an arrowhead." Well, no... it is *not* producing the *last point of the geometry* as I understand it. Instead, it is producing the middle point of the geometry. And it sure as as I can see is not working with ANGLE AUTO (see #1 above). > > 3. I have tried several variations on my arrow head to try shift its center, but I am failing to translate the information in the above document to be able to do it correctly. > > 4. Perhaps most important: the length of the arrow is varying based on [rate]. In other words, I want only the stem to be shorter or longer, but the arrow head to be the same size, and to be at the "end" of the stem always. In fact, there are instances in which [rate] could be equal to zero. In those instances I don't want any arrow to be drawn at all. > > *** In other words, I want an arrow stem to be as long as the varying [rate], and if the stem has a length greater than zero then and only then do I want an arrow head at the end of the stem pointing in the same direction as the stem. *** > > I even tried using a truetype font symbol, but I get no image at all but no error as well. > > I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I realize that if I could make that work, it would still be unsatisfactory because as MapServer would scale my arrow image, it would make the attached arrow head also larger, and that would look ugly. In any case, I couldn't get that to work as well... no image at all, but no error as well. > > Could be my compilation of MapServer was buggy, but I didn't see any compilation time errors, and other than the above oddities, it works quite well. > > $./mapserv -v > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE > > I would love to know if my *** objective *** above can be accomplished with MapServer. If not, I would look at other workaround. I am currently rendering arrows using OpenLayers vector layer... it works quite well, but is slow... MapServer is much faster, and could be cached, hence my desire to use MapServer. > > Thanks. > > >> >> H?vard Tveite >> >> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>> My arrows look like so -->-- instead of ----> with declarations like so >>> >>> SYMBOL >>> NAME "vert-line" >>> TYPE vector >>> POINTS >>> 0 1 >>> 0 0 >>> END >>> END >>> >>> SYMBOL >>> NAME "up" >>> TYPE vector >>> POINTS >>> 0 1 >>> 0.5 0 >>> 1 1 >>> END >>> END >>> >>> CLASS >>> STYLE >>> SYMBOL 'vert-line' >>> ANGLE [az] >>> SIZE [rate] >>> COLOR 0 0 0 >>> WIDTH 1 >>> END >>> STYLE >>> SYMBOL "up" >>> ANGLE [az] >>> SIZE 5 >>> GEOMTRANSFORM "end" >>> COLOR 0 0 0 >>> END >>> END >>> >>> But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so --^--. The heads are always pointed up, and are in the middle. >>> >>> Suggestions? > > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From jorge.arevalo at deimos-space.com Wed Sep 28 07:30:16 2011 From: jorge.arevalo at deimos-space.com (=?ISO-8859-1?Q?Jorge_Ar=E9valo?=) Date: Wed, 28 Sep 2011 16:30:16 +0200 Subject: [mapserver-users] Re: Mapserver + NDVI styling In-Reply-To: References: Message-ID: 2011/9/28 Jorge Ar?valo : > I'm serving a NDVI coverage via Mapserver. So, one band, float32 > values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and > generate a legend. I've tried 2 things: > > - Create two dummy classes, just for testing: > > CLASS > ? ?NAME "rojo" > ? ?EXPRESSION ([pixel] < 0.3) > ? ?STYLE > ? ? ? ?COLOR 255 0 0 > ? ?END > END > > CLASS > ? ?NAME "azul" > ? ?EXPRESSION ([pixel] >= 0.3) > ? ?STYLE > ? ? ? ?COLOR 0 0 255 > ? ?END > END > > So, my legend looks like this: http://dl.dropbox.com/u/6599273/leyenda.png > > And the image, obviously, is red and blue: > http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png > > But I'd like to see the image in greyscale... The I've tried the next thing > > - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know > what Mapserver internally does with this processing order, but I can > see the image in greyscale: > http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png > > The problem is now I can't see any legend, because I've not created > any class. I'd like to see all the different levels of the grayscale > image in my legend. > > How could I do it? > > Many thanks in advance > > -- > Jorge Ar?valo > Internet & Mobility Division, DEIMOS > jorge.arevalo at deimos-space.com > http://es.linkedin.com/in/jorgearevalo80 > http://mobility.grupodeimos.com/ > http://gis4free.wordpress.com > http://geohash.org/ezjqgrgzz0g > Ok, I've found a way, but I'm sure it isn't the shortest path. Basically, I've generated a legend using GRASS (r.colors to add grey color as color interpretation for band and d.legend to generate the legend). The legend is generated from the ndvi file. So, I guess I can create a HTML template as Mapserver legend, using the legend generated by grass (here: http://dl.dropbox.com/u/6599273/grass/grass_legend.png) On the other hand, I know how to generate a legend in Mapserver using CLASS objects in the mapfile, but I don't know how to generate that legend without the CLASS options in the mapfile. Am I taking the long way on this? Is there an easier way to generate a legend for a NDVI file in Mapserver? Many thanks in advance -- Jorge Ar?valo Internet & Mobility Division, DEIMOS jorge.arevalo at deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g From havard.tveite at umb.no Wed Sep 28 07:36:38 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Wed, 28 Sep 2011 16:36:38 +0200 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <4E832E47.6070504@umb.no> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> <4E832E47.6070504@umb.no> Message-ID: <4E8330F6.40502@umb.no> One possible problem with my suggested approach is that the lines will only be the half of the value given in [rate]. H?vard On 9/28/2011 4:25 PM, H?vard Tveite wrote: > With a point layer, you can fix this using the offset trick I > referred to in my earlier post: > > The following works for me using Mapserver 6 (the arrow head is > centred at the point, but you can shift it using the same > technique as shown for the arrow line) > > SYMBOL > NAME "up" > TYPE vector > POINTS > 0 10 > 5 0 > 10 10 > END > END > > SYMBOL > NAME "vert-line" > TYPE vector > POINTS > 0 5 > 0 10 > END > END > > ... > CLASS > STYLE > SYMBOL "vert-line" > ANGLE [az] > SIZE [rate] > COLOR 0 0 0 > WIDTH 1 > END # STYLE > STYLE > SYMBOL "up" > ANGLE [az] > SIZE 5 > WIDTH 2 > COLOR 0 0 0 > END # STYLE > END # CLASS > > In my opinion, the best thing would be to be able to specify > the "centre/origin" of the point explicitly, as suggested in > RFC45. But this part of the RFC has not yet been implemented. > > H?vard > > > On 9/27/2011 4:48 PM, Puneet Kishor wrote: >> >> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote: >> >>> Have you seen: >>> >>> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol >> >> >> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear as crystal to the rest of the world, but I can't fathom anything there applicable to me. I am facing four problems -- >> >> 1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the same direction as the arrow stems. >> >> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. When used with ANGLE AUTO, it can for instance be used to render an arrowhead." Well, no... it is *not* producing the *last point of the geometry* as I understand it. Instead, it is producing the middle point of the geometry. And it sure as as I can see is not working with ANGLE AUTO (see #1 above). >> >> 3. I have tried several variations on my arrow head to try shift its center, but I am failing to translate the information in the above document to be able to do it correctly. >> >> 4. Perhaps most important: the length of the arrow is varying based on [rate]. In other words, I want only the stem to be shorter or longer, but the arrow head to be the same size, and to be at the "end" of the stem always. In fact, there are instances in which [rate] could be equal to zero. In those instances I don't want any arrow to be drawn at all. >> >> *** In other words, I want an arrow stem to be as long as the varying [rate], and if the stem has a length greater than zero then and only then do I want an arrow head at the end of the stem pointing in the same direction as the stem. *** >> >> I even tried using a truetype font symbol, but I get no image at all but no error as well. >> >> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I realize that if I could make that work, it would still be unsatisfactory because as MapServer would scale my arrow image, it would make the attached arrow head also larger, and that would look ugly. In any case, I couldn't get that to work as well... no image at all, but no error as well. >> >> Could be my compilation of MapServer was buggy, but I didn't see any compilation time errors, and other than the above oddities, it works quite well. >> >> $./mapserv -v >> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE >> >> I would love to know if my *** objective *** above can be accomplished with MapServer. If not, I would look at other workaround. I am currently rendering arrows using OpenLayers vector layer... it works quite well, but is slow... MapServer is much faster, and could be cached, hence my desire to use MapServer. >> >> Thanks. >> >> >>> >>> H?vard Tveite >>> >>> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>>> My arrows look like so -->-- instead of ----> with declarations like so >>>> >>>> SYMBOL >>>> NAME "vert-line" >>>> TYPE vector >>>> POINTS >>>> 0 1 >>>> 0 0 >>>> END >>>> END >>>> >>>> SYMBOL >>>> NAME "up" >>>> TYPE vector >>>> POINTS >>>> 0 1 >>>> 0.5 0 >>>> 1 1 >>>> END >>>> END >>>> >>>> CLASS >>>> STYLE >>>> SYMBOL 'vert-line' >>>> ANGLE [az] >>>> SIZE [rate] >>>> COLOR 0 0 0 >>>> WIDTH 1 >>>> END >>>> STYLE >>>> SYMBOL "up" >>>> ANGLE [az] >>>> SIZE 5 >>>> GEOMTRANSFORM "end" >>>> COLOR 0 0 0 >>>> END >>>> END >>>> >>>> But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so --^--. The heads are always pointed up, and are in the middle. >>>> >>>> Suggestions? >> >> > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From punk.kish at gmail.com Wed Sep 28 07:38:31 2011 From: punk.kish at gmail.com (Puneet Kishor) Date: Wed, 28 Sep 2011 09:38:31 -0500 Subject: [mapserver-users] arrow head doesn't draw at the end In-Reply-To: <3EC8B021-8BEE-403C-A342-C9B98F349BF6@gmail.com> References: <3C6FC3A1-2AFA-40F3-AD52-5CD6E768B9E3@gmail.com> <4E8178B4.4000606@umb.no> <2DA8EB6A-AEBE-4D7E-B80D-E6D3BDD5C52F@gmail.com> <31D51EB1-D808-411D-83E5-936A393E747E@gmail.com> <3EC8B021-8BEE-403C-A342-C9B98F349BF6@gmail.com> Message-ID: On Sep 28, 2011, at 8:32 AM, Mr. Puneet Kishor wrote: > >>>>>> .. >>>>>> >>>>>> On 9/27/2011 4:12 AM, Puneet Kishor wrote: >>>>>>> My arrows look like so -->-- instead of ----> with declarations like so >>>>>>> >>>>>>> SYMBOL >>>>>>> NAME "vert-line" >>>>>>> TYPE vector >>>>>>> POINTS >>>>>>> 0 1 >>>>>>> 0 0 >>>>>>> END >>>>>>> END >>>>>>> >>>>>>> SYMBOL >>>>>>> NAME "up" >>>>>>> TYPE vector >>>>>>> POINTS >>>>>>> 0 1 >>>>>>> 0.5 0 >>>>>>> 1 1 >>>>>>> END >>>>>>> END >>>>>>> >>>>>>> CLASS >>>>>>> STYLE >>>>>>> SYMBOL 'vert-line' >>>>>>> ANGLE [az] >>>>>>> SIZE [rate] >>>>>>> COLOR 0 0 0 >>>>>>> WIDTH 1 >>>>>>> END >>>>>>> STYLE >>>>>>> SYMBOL "up" >>>>>>> ANGLE [az] >>>>>>> SIZE 5 >>>>>>> GEOMTRANSFORM "end" >>>>>>> COLOR 0 0 0 >>>>>>> END >>>>>>> END >>>>>>> >>>>>>> But, at least the arrow heads are aligned correctly. Because, if I use >>>>> "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown >>>>> above, my arrows draw like so --^--. The heads are always pointed up, and >>>>> are in the middle. >>>>>>> >>>>>>> Suggestions? >>>>> Time to show my full hand -- - go to http://mumbai.geology.wisc.edu/geoplates/ - zoom out two clicks so the entire world is visible - click on the round grey button with the arrow pointing NW in the top left (just below the blue pan/zoom buttons) - now click once on the map, say, on North America The GPS readings load as arrow symbols. This is an OpenLayers vector layer, each point being drawn using an external graphic. The problem is speed. Not only does it take a perceptible time to load, when it has loaded, the entire map is very sluggish repainting as you pan and zoom. Now, go to http://mumbai.geology.wisc.edu/test/gps_vecs.html where I have the same layer being loaded by MapServer. It is much quicker, but, most important, since these are images, the map is really responsive. Of course, the markers are no good. My style definition is as shown below. Of course, I can use the same externalGraphic with MapServer as the one I used with OpenLayers. But that also doesn't produce much joy. The markers get drawn really tiny, for some reason. -- Puneet Kishor From gus.fava at gmail.com Wed Sep 28 09:19:38 2011 From: gus.fava at gmail.com (Gustavo) Date: Wed, 28 Sep 2011 13:19:38 -0300 Subject: [mapserver-users] Re: Mapserver + NDVI styling In-Reply-To: References: Message-ID: I'm not sure but if you just display your raster without any styling i think MapSever would show it in grayscale. I'm new with MapServer so i'm feeling a bit insolent posting a reply :) El 28 de septiembre de 2011 11:30, Jorge Ar?valo < jorge.arevalo at deimos-space.com> escribi?: > 2011/9/28 Jorge Ar?valo : > > I'm serving a NDVI coverage via Mapserver. So, one band, float32 > > values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and > > generate a legend. I've tried 2 things: > > > > - Create two dummy classes, just for testing: > > > > CLASS > > NAME "rojo" > > EXPRESSION ([pixel] < 0.3) > > STYLE > > COLOR 255 0 0 > > END > > END > > > > CLASS > > NAME "azul" > > EXPRESSION ([pixel] >= 0.3) > > STYLE > > COLOR 0 0 255 > > END > > END > > > > So, my legend looks like this: > http://dl.dropbox.com/u/6599273/leyenda.png > > > > And the image, obviously, is red and blue: > > http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png > > > > But I'd like to see the image in greyscale... The I've tried the next > thing > > > > - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know > > what Mapserver internally does with this processing order, but I can > > see the image in greyscale: > > http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png > > > > The problem is now I can't see any legend, because I've not created > > any class. I'd like to see all the different levels of the grayscale > > image in my legend. > > > > How could I do it? > > > > Many thanks in advance > > > > -- > > Jorge Ar?valo > > Internet & Mobility Division, DEIMOS > > jorge.arevalo at deimos-space.com > > http://es.linkedin.com/in/jorgearevalo80 > > http://mobility.grupodeimos.com/ > > http://gis4free.wordpress.com > > http://geohash.org/ezjqgrgzz0g > > > > Ok, I've found a way, but I'm sure it isn't the shortest path. > > Basically, I've generated a legend using GRASS (r.colors to add grey > color as color interpretation for band and d.legend to generate the > legend). The legend is generated from the ndvi file. So, I guess I can > create a HTML template as Mapserver legend, using the legend generated > by grass (here: > http://dl.dropbox.com/u/6599273/grass/grass_legend.png) > > On the other hand, I know how to generate a legend in Mapserver using > CLASS objects in the mapfile, but I don't know how to generate that > legend without the CLASS options in the mapfile. > > Am I taking the long way on this? Is there an easier way to generate a > legend for a NDVI file in Mapserver? > > Many thanks in advance > > -- > Jorge Ar?valo > Internet & Mobility Division, DEIMOS > jorge.arevalo at deimos-space.com > http://es.linkedin.com/in/jorgearevalo80 > http://mobility.grupodeimos.com/ > http://gis4free.wordpress.com > http://geohash.org/ezjqgrgzz0g > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mercier.simon at gmail.com Wed Sep 28 09:55:56 2011 From: mercier.simon at gmail.com (Simon Mercier) Date: Wed, 28 Sep 2011 12:55:56 -0400 Subject: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 In-Reply-To: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi> Message-ID: Thank you for your reply Jukka I tried but still dont work. My raster is ecw file with an .xml file for the spatial reference specification. I try to add a .wld extension but no result. If I remove the WMS_EXTENT tag, no raster appears on my map. In my previous message you can see the raster index shapefile. Realy strange ! /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld My log with NO WMS_EXTENT [Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7): entering. [Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.211s My log with WMS_EXTENT [Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7): entering. [Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].444422 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.571s 2011/9/28 Rahkonen Jukka > ** > Hi, > > It must come from this new feature, capture from > http://mapserver.org/ogc/wms_server.html > > "wms_extent > WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6) > Description: (Optional) Used for the layer?s BoundingBox tag for cases > where it is impossible (or very inefficient) for MapServer to probe the data > source to figure its extents. The value for this metadata is ?minx miny maxx > maxy? separated by spaces, with the values in the layer?s projection units. > If wms_extent is provided then it has priority and MapServer will NOT try to > read the source file?s extents. > For Rasters served through WMS, MapServer can now use the wms_extent > metadata parameter to register the image. If a .wld file cannot be found, > MapServer will then look for the wms_extent metadata parameter and use the > extents of the image and the size of the image for georegistration" > I would first remove the EXTENT from LAYER and wms_extent from layer > metadata and see what happens then. You would get a visual hint about what > happens by making the tileindex shapefile as a normal vector polygon layer > and by showing it above the imagery layer. > > -Jukka Rahkonen- > > Simon Mercier wrote: > > > Hi list, I try to migrate a map service to Mapserver 6.0.1 that work > perfectly with a Mapserver 5.0.3 and I have a strange behavior with a > TILEINDEX layer. If you look the picture(in yellow you have the raster > coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my > image coverage is not the same scale? The raster coverage fit exactly with > the WMS_EXTENT tag of my TILEINDEX layer. Moreover, if I comment the > WMS_EXTENT tag no raster appears in my map. Images are ECW files and > projection is EPSG:32187. The GETMAP is EPSG:32198. I had to compile GDAL > 1.8.0 to use ECW driver. Did I miss something? Where should I look? > > > /cgi-bin/orthos_sim?REQUEST= > > GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913 > > MAP > NAME "orthos_sim" > EXTENT -1100000 -23500 1100000 2253500 > CONFIG MS_ERRORFILE > "/var/services/mapserv/logs/mapserv-sim.log" > WEB > QUERYFORMAT "text/xml" > BROWSEFORMAT "text/xml" > IMAGEPATH "/tmp/" > IMAGEURL "/ms_tmp/" > METADATA > "wms_title" "orthos" > "wms_abstract" "Service web d'imagerie > Orthosphoto" > "wms_description" "Ce service " > "wms_keywordlist" "orthophotographie" > "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim > ?" > "wms_server_version" "1.1.1" > "wms_format" "image/png" > "wms_getcontext_enabled" "1" > "ows_enable_request" "*" > END > END > PROJECTION > "init=epsg:32198" > END > LAYER > NAME "T_AN2000_MTM7" > TYPE RASTER > debug 5 > EXTENT 160000 4960000 450000 5450000 > TILEINDEX "/var/www/wms/tmp/AN2000_MTM07.shp" > TILEITEM "location" > METADATA > "wms_title" "T_AN2000_MTM7" > "wms_name" "an 2000 mtm 07" > "wms_kaywordlist" "orthos" > "wms_abstract" "Couche d'orthos" > "wms_srs" "EPSG:32198 EPSG:900913 EPSG:32184 > EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190" > "wms_extent" "160000 4960000 450000 5450000" > END > PROJECTION > "init=epsg:32187" > END > END > END > > -- > Simon Mercier > Saint-Nicolas, QC > Canada G7A 4Y2 > www.mgeospatial.com > linkedIn : http://ca.linkedin.com/in/simonmercier > twitter : http://twitter.com/simonmercier > > -- Simon Mercier LinkedIn : http://ca.linkedin.com/in/simonmercier Twitter : http://twitter.com/simonmercier -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Wed Sep 28 10:17:02 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 28 Sep 2011 17:17:02 +0000 Subject: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 In-Reply-To: References: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi>, Message-ID: <84446DEF76453C439E9E97E438E13A63024B4A@suutari.haapa.mmm.fi> Hi, Could you send also a gdalinfo report about one of the your .ecw images? -Jukka Rahkonen- ________________________________ L?hett?j?: Simon Mercier [mercier.simon at gmail.com] L?hetetty: 28. syyskuuta 2011 19:55 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users at lists.osgeo.org Aihe: Re: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 Thank you for your reply Jukka I tried but still dont work. My raster is ecw file with an .xml file for the spatial reference specification. I try to add a .wld extension but no result. If I remove the WMS_EXTENT tag, no raster appears on my map. In my previous message you can see the raster index shapefile. Realy strange ! /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld My log with NO WMS_EXTENT [Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7): entering. [Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.211s My log with WMS_EXTENT [Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7): entering. [Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].444422 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.571s 2011/9/28 Rahkonen Jukka > Hi, It must come from this new feature, capture from http://mapserver.org/ogc/wms_server.html "wms_extent WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6) Description: (Optional) Used for the layer?s BoundingBox tag for cases where it is impossible (or very inefficient) for MapServer to probe the data source to figure its extents. The value for this metadata is ?minx miny maxx maxy? separated by spaces, with the values in the layer?s projection units. If wms_extent is provided then it has priority and MapServer will NOT try to read the source file?s extents. For Rasters served through WMS, MapServer can now use the wms_extent metadata parameter to register the image. If a .wld file cannot be found, MapServer will then look for the wms_extent metadata parameter and use the extents of the image and the size of the image for georegistration" I would first remove the EXTENT from LAYER and wms_extent from layer metadata and see what happens then. You would get a visual hint about what happens by making the tileindex shapefile as a normal vector polygon layer and by showing it above the imagery layer. -Jukka Rahkonen- Simon Mercier wrote: > Hi list, I try to migrate a map service to Mapserver 6.0.1 that work perfectly with a Mapserver 5.0.3 and I have a strange behavior with a TILEINDEX layer. If you look the picture(in yellow you have the raster coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my image coverage is not the same scale? The raster coverage fit exactly with the WMS_EXTENT tag of my TILEINDEX layer. Moreover, if I comment the WMS_EXTENT tag no raster appears in my map. Images are ECW files and projection is EPSG:32187. The GETMAP is EPSG:32198. I had to compile GDAL 1.8.0 to use ECW driver. Did I miss something? Where should I look? /cgi-bin/orthos_sim?REQUEST= GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913 MAP NAME "orthos_sim" EXTENT -1100000 -23500 1100000 2253500 CONFIG MS_ERRORFILE "/var/services/mapserv/logs/mapserv-sim.log" WEB QUERYFORMAT "text/xml" BROWSEFORMAT "text/xml" IMAGEPATH "/tmp/" IMAGEURL "/ms_tmp/" METADATA "wms_title" "orthos" "wms_abstract" "Service web d'imagerie Orthosphoto" "wms_description" "Ce service " "wms_keywordlist" "orthophotographie" "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim?" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_getcontext_enabled" "1" "ows_enable_request" "*" END END PROJECTION "init=epsg:32198" END LAYER NAME "T_AN2000_MTM7" TYPE RASTER debug 5 EXTENT 160000 4960000 450000 5450000 TILEINDEX "/var/www/wms/tmp/AN2000_MTM07.shp" TILEITEM "location" METADATA "wms_title" "T_AN2000_MTM7" "wms_name" "an 2000 mtm 07" "wms_kaywordlist" "orthos" "wms_abstract" "Couche d'orthos" "wms_srs" "EPSG:32198 EPSG:900913 EPSG:32184 EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190" "wms_extent" "160000 4960000 450000 5450000" END PROJECTION "init=epsg:32187" END END END -- Simon Mercier Saint-Nicolas, QC Canada G7A 4Y2 www.mgeospatial.com linkedIn : http://ca.linkedin.com/in/simonmercier twitter : http://twitter.com/simonmercier -- Simon Mercier LinkedIn : http://ca.linkedin.com/in/simonmercier Twitter : http://twitter.com/simonmercier From mercier.simon at gmail.com Wed Sep 28 10:36:39 2011 From: mercier.simon at gmail.com (Simon Mercier) Date: Wed, 28 Sep 2011 13:36:39 -0400 Subject: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 In-Reply-To: <84446DEF76453C439E9E97E438E13A63024B4A@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63024B4A@suutari.haapa.mmm.fi> Message-ID: Hi, here: simmer01 at sigtest:~$ gdalinfo /mnt/EntrepotImageJPG/ BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw ERROR 1: Maximum number of characters allowed reached. Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x) Files: /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml Size is 8000, 8000 Coordinate System is: PROJCS["NAD_1983_MTM_7", GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",304800.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",-70.5], PARAMETER["Scale_Factor",0.9999], PARAMETER["Latitude_Of_Origin",0.0], UNIT["Meter",1.0]] Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 8000.0) Upper Right ( 8000.0, 0.0) Lower Right ( 8000.0, 8000.0) Center ( 4000.0, 4000.0) Band 1 Block=8000x1 Type=Byte, ColorInterp=Gray Overviews: 4000x4000, 2000x2000, 1000x1000, 500x500, 250x250 2011/9/28 Rahkonen Jukka > Hi, > > Could you send also a gdalinfo report about one of the your .ecw images? > > -Jukka Rahkonen- > > > ________________________________ > L?hett?j?: Simon Mercier [mercier.simon at gmail.com] > L?hetetty: 28. syyskuuta 2011 19:55 > Vastaanottaja: Rahkonen Jukka > Kopio: mapserver-users at lists.osgeo.org > Aihe: Re: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 > > Thank you for your reply Jukka > > I tried but still dont work. My raster is ecw file with an .xml file for > the spatial reference specification. I try to add a .wld extension but no > result. If I remove the WMS_EXTENT tag, no raster appears on my map. In my > previous message you can see the raster index shapefile. Realy strange ! > > > /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw > > /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml > > /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld > > > My log with NO WMS_EXTENT > [Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7): > entering. > [Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no > result. > [Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no > result. > [Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no > result. > [Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7), > 0.211s > > My log with WMS_EXTENT > [Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7): > entering. > [Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize = > 36.250000 > [Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using > RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 > [Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL(): > red,green,blue,alpha bands = 1,0,0,0 > [Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize = > 36.250000 > [Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using > RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 > [Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL(): > red,green,blue,alpha bands = 1,0,0,0 > [Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize = > 36.250000 > [Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using > RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 > [Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL(): > red,green,blue,alpha bands = 1,0,0,0 > [Wed Sep 28 12:53:33 2011].444422 msDrawMap(): Layer 0 (T_AN2000_MTM7), > 0.571s > > > > 2011/9/28 Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi>> > Hi, > > It must come from this new feature, capture from > http://mapserver.org/ogc/wms_server.html > > "wms_extent > WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6) > Description: (Optional) Used for the layer?s BoundingBox tag for cases > where it is impossible (or very inefficient) for MapServer to probe the data > source to figure its extents. The value for this metadata is ?minx miny maxx > maxy? separated by spaces, with the values in the layer?s projection units. > If wms_extent is provided then it has priority and MapServer will NOT try to > read the source file?s extents. > For Rasters served through WMS, MapServer can now use the wms_extent > metadata parameter to register the image. If a .wld file cannot be found, > MapServer will then look for the wms_extent metadata parameter and use the > extents of the image and the size of the image for georegistration" > I would first remove the EXTENT from LAYER and wms_extent from layer > metadata and see what happens then. You would get a visual hint about what > happens by making the tileindex shapefile as a normal vector polygon layer > and by showing it above the imagery layer. > > -Jukka Rahkonen- > > Simon Mercier wrote: > > > Hi list, I try to migrate a map service to Mapserver 6.0.1 that work > perfectly with a Mapserver 5.0.3 and I have a strange behavior with a > TILEINDEX layer. If you look the picture(in yellow you have the raster > coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my > image coverage is not the same scale? The raster coverage fit exactly with > the WMS_EXTENT tag of my TILEINDEX layer. Moreover, if I comment the > WMS_EXTENT tag no raster appears in my map. Images are ECW files and > projection is EPSG:32187. The GETMAP is EPSG:32198. I had to compile GDAL > 1.8.0 to use ECW driver. Did I miss something? Where should I look? > > /cgi-bin/orthos_sim?REQUEST= > > GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913 > > MAP > NAME "orthos_sim" > EXTENT -1100000 -23500 1100000 2253500 > CONFIG MS_ERRORFILE "/var/services/mapserv/logs/mapserv-sim.log" > WEB > QUERYFORMAT "text/xml" > BROWSEFORMAT "text/xml" > IMAGEPATH "/tmp/" > IMAGEURL "/ms_tmp/" > METADATA > "wms_title" "orthos" > "wms_abstract" "Service web d'imagerie > Orthosphoto" > "wms_description" "Ce service " > "wms_keywordlist" "orthophotographie" > "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim > ?" > "wms_server_version" "1.1.1" > "wms_format" "image/png" > "wms_getcontext_enabled" "1" > "ows_enable_request" "*" > END > END > PROJECTION > "init=epsg:32198" > END > LAYER > NAME "T_AN2000_MTM7" > TYPE RASTER > debug 5 > EXTENT 160000 4960000 450000 5450000 > TILEINDEX "/var/www/wms/tmp/AN2000_MTM07.shp" > TILEITEM "location" > METADATA > "wms_title" "T_AN2000_MTM7" > "wms_name" "an 2000 mtm 07" > "wms_kaywordlist" "orthos" > "wms_abstract" "Couche d'orthos" > "wms_srs" "EPSG:32198 EPSG:900913 EPSG:32184 > EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190" > "wms_extent" "160000 4960000 450000 5450000" > END > PROJECTION > "init=epsg:32187" > END > END > END > > -- > Simon Mercier > Saint-Nicolas, QC > Canada G7A 4Y2 > www.mgeospatial.com > linkedIn : http://ca.linkedin.com/in/simonmercier > twitter : http://twitter.com/simonmercier > > > > -- > Simon Mercier > > LinkedIn : http://ca.linkedin.com/in/simonmercier > Twitter : http://twitter.com/simonmercier > > -- Simon Mercier LinkedIn : http://ca.linkedin.com/in/simonmercier Twitter : http://twitter.com/simonmercier -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Wed Sep 28 11:57:26 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 28 Sep 2011 18:57:26 +0000 Subject: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 In-Reply-To: References: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63024B4A@suutari.haapa.mmm.fi>, Message-ID: <84446DEF76453C439E9E97E438E13A63024E01@suutari.haapa.mmm.fi> So gdalinfo with Upper Left ( 0.0, 0.0) etc. means that gdal cannot get the correct georeferencing for your images. They are placed at coordinates (0,0) instead and then the WMS BBOX does not intersect the image area and server is sending a white map for you. And "ERROR 1: Maximum number of characters allowed reached." suggests that for some part of the system the file path is too long. I have never seen such an error but I would still take it seriously and have a try placing the images into a a place like /mnt/pathtest/image_01.ecw -Jukka Rahkonen- ________________________________ L?hett?j?: Simon Mercier [mercier.simon at gmail.com] L?hetetty: 28. syyskuuta 2011 20:36 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 Hi, here: simmer01 at sigtest:~$ gdalinfo /mnt/EntrepotImageJPG/ BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw ERROR 1: Maximum number of characters allowed reached. Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x) Files: /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml Size is 8000, 8000 Coordinate System is: PROJCS["NAD_1983_MTM_7", GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",304800.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",-70.5], PARAMETER["Scale_Factor",0.9999], PARAMETER["Latitude_Of_Origin",0.0], UNIT["Meter",1.0]] Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 8000.0) Upper Right ( 8000.0, 0.0) Lower Right ( 8000.0, 8000.0) Center ( 4000.0, 4000.0) Band 1 Block=8000x1 Type=Byte, ColorInterp=Gray Overviews: 4000x4000, 2000x2000, 1000x1000, 500x500, 250x250 2011/9/28 Rahkonen Jukka > Hi, Could you send also a gdalinfo report about one of the your .ecw images? -Jukka Rahkonen- ________________________________ L?hett?j?: Simon Mercier [mercier.simon at gmail.com] L?hetetty: 28. syyskuuta 2011 19:55 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users at lists.osgeo.org Aihe: Re: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 Thank you for your reply Jukka I tried but still dont work. My raster is ecw file with an .xml file for the spatial reference specification. I try to add a .wld extension but no result. If I remove the WMS_EXTENT tag, no raster appears on my map. In my previous message you can see the raster index shapefile. Realy strange ! /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld My log with NO WMS_EXTENT [Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7): entering. [Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no result. [Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.211s My log with WMS_EXTENT [Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7): entering. [Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize = 36.250000 [Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102 [Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0 [Wed Sep 28 12:53:33 2011].444422 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.571s 2011/9/28 Rahkonen Jukka >> Hi, It must come from this new feature, capture from http://mapserver.org/ogc/wms_server.html "wms_extent WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6) Description: (Optional) Used for the layer?s BoundingBox tag for cases where it is impossible (or very inefficient) for MapServer to probe the data source to figure its extents. The value for this metadata is ?minx miny maxx maxy? separated by spaces, with the values in the layer?s projection units. If wms_extent is provided then it has priority and MapServer will NOT try to read the source file?s extents. For Rasters served through WMS, MapServer can now use the wms_extent metadata parameter to register the image. If a .wld file cannot be found, MapServer will then look for the wms_extent metadata parameter and use the extents of the image and the size of the image for georegistration" I would first remove the EXTENT from LAYER and wms_extent from layer metadata and see what happens then. You would get a visual hint about what happens by making the tileindex shapefile as a normal vector polygon layer and by showing it above the imagery layer. -Jukka Rahkonen- Simon Mercier wrote: > Hi list, I try to migrate a map service to Mapserver 6.0.1 that work perfectly with a Mapserver 5.0.3 and I have a strange behavior with a TILEINDEX layer. If you look the picture(in yellow you have the raster coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my image coverage is not the same scale? The raster coverage fit exactly with the WMS_EXTENT tag of my TILEINDEX layer. Moreover, if I comment the WMS_EXTENT tag no raster appears in my map. Images are ECW files and projection is EPSG:32187. The GETMAP is EPSG:32198. I had to compile GDAL 1.8.0 to use ECW driver. Did I miss something? Where should I look? /cgi-bin/orthos_sim?REQUEST= GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913 MAP NAME "orthos_sim" EXTENT -1100000 -23500 1100000 2253500 CONFIG MS_ERRORFILE "/var/services/mapserv/logs/mapserv-sim.log" WEB QUERYFORMAT "text/xml" BROWSEFORMAT "text/xml" IMAGEPATH "/tmp/" IMAGEURL "/ms_tmp/" METADATA "wms_title" "orthos" "wms_abstract" "Service web d'imagerie Orthosphoto" "wms_description" "Ce service " "wms_keywordlist" "orthophotographie" "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim?" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_getcontext_enabled" "1" "ows_enable_request" "*" END END PROJECTION "init=epsg:32198" END LAYER NAME "T_AN2000_MTM7" TYPE RASTER debug 5 EXTENT 160000 4960000 450000 5450000 TILEINDEX "/var/www/wms/tmp/AN2000_MTM07.shp" TILEITEM "location" METADATA "wms_title" "T_AN2000_MTM7" "wms_name" "an 2000 mtm 07" "wms_kaywordlist" "orthos" "wms_abstract" "Couche d'orthos" "wms_srs" "EPSG:32198 EPSG:900913 EPSG:32184 EPSG:32186 EPSG:32187 EPSG:32188 EPSG:32189 EPSG:32190" "wms_extent" "160000 4960000 450000 5450000" END PROJECTION "init=epsg:32187" END END END -- Simon Mercier Saint-Nicolas, QC Canada G7A 4Y2 www.mgeospatial.com linkedIn : http://ca.linkedin.com/in/simonmercier twitter : http://twitter.com/simonmercier -- Simon Mercier LinkedIn : http://ca.linkedin.com/in/simonmercier Twitter : http://twitter.com/simonmercier -- Simon Mercier LinkedIn : http://ca.linkedin.com/in/simonmercier Twitter : http://twitter.com/simonmercier From dshorthouse at eol.org Wed Sep 28 14:04:19 2011 From: dshorthouse at eol.org (Shorthouse, David) Date: Wed, 28 Sep 2011 17:04:19 -0400 Subject: [mapserver-users] PHP-mapscript before/after draw discrepancy Message-ID: I am using PHP-mapscript and am bumping into this old issue: http://osgeo-org.1803224.n2.nabble.com/Mapscript-extent-prediction-td1991453.html, which is now a show-stopper for me. I tried using CONFIG 'MS_NONSQUARE' 'yes', which does *initially* produce an extent after draw precisely the same as provided with setExtent. However, my application also make heavy use of zoompoint and zoomrectangle, which no longer work as expected after having set this CONFIG. Anyone have any suggestions on how to get an extent that is precisely the same before and after the draw method? Thanks in advance, David P. Shorthouse From matt at wildwalks.com Wed Sep 28 14:31:31 2011 From: matt at wildwalks.com (Matt McClelland) Date: Thu, 29 Sep 2011 07:31:31 +1000 Subject: [mapserver-users] Using a Symbol instead of text for a label In-Reply-To: References: Message-ID: Thanks David That Cluster function is very impressive (as is Mapserver). Using expressions to find common cluster problems I can fairly easily resolve about 90% of my issues, a good solution. Thanks Matt :) On Wed, Sep 28, 2011 at 11:47 PM, Fawcett, David (MPCA) < david.fawcett at state.mn.us> wrote: > Matt, **** > > ** ** > > I haven?t fully thought it through, but maybe the new Cluster functionality > might work for this. You could have a generic park symbol for the cluster > symbol.**** > > ** ** > > http://mapserver.org/mapfile/cluster.html**** > > ** ** > > David.**** > > ** ** > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Matt McClelland > *Sent:* Tuesday, September 27, 2011 6:15 PM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] Using a Symbol instead of text for a label*** > * > > ** ** > > Hi > > I have a bunch of symbols that overlap on a map. EG at a park where I want > to show an symbol for playground, toilet and picnic tables. The data for > each of these items are individual point data items. > > I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a > group > OR > Use the main symbol like a label. So that I could have a dot where the > play equipment is, then nearby have the symbol for the play equipment. This > is obviously very easy to do with text, but is it possible with a symbol?? > > I have tried this > CLASS > EXPRESSION /play|playground/ > NAME "Children's Playground" > STYLE > SYMBOL 'waypoint' > color 255 0 0 > SIZE 5 > END > LABEL > STYLE > SYMBOL '/var/www/osm/kml/icons/play.png' > Size 10 > END > ...text styleing info.... > END > END > > I get my 'waypoint' dot and the play.png in the same location. I would > like the play.png to be positioned AUTO like I can with text. > Any ideas?? > > Thanks > Matt :)**** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dshorthouse at eol.org Wed Sep 28 17:08:48 2011 From: dshorthouse at eol.org (Shorthouse, David) Date: Wed, 28 Sep 2011 20:08:48 -0400 Subject: [mapserver-users] PHP-mapscript before/after draw discrepancy In-Reply-To: References: Message-ID: On Wed, Sep 28, 2011 at 5:51 PM, Cristiano Sumariva wrote: > Well after reading the discussion in the link I guess you need to implement > double msAdjustExtent(rectObj *rect, int width, int height) mapserver > function in your language > and update size then the extent on map object using the mapscript API. Thanks for the response Christiano. Indeed, I *might* be able to pre-calculate what the eventual extent will be after the draw() method as Tamas suggested, assuming I don't bungle the logic. However, this feels backward, especially since I have to design a front-end to compensate for it. Why is the extent being mysteriously (read inaccessibly) adjusted in the the first place? David P. Shorthouse > 2011/9/28 Shorthouse, David >> >> I am using PHP-mapscript and am bumping into this old issue: >> >> http://osgeo-org.1803224.n2.nabble.com/Mapscript-extent-prediction-td1991453.html, >> which is now a show-stopper for me. >> >> I tried using CONFIG 'MS_NONSQUARE' 'yes', which does *initially* >> produce an extent after draw precisely the same as provided with >> setExtent. However, my application also make heavy use of zoompoint >> and zoomrectangle, which no longer work as expected after having set >> this CONFIG. >> >> Anyone have any suggestions on how to get an extent that is precisely >> the same before and after the draw method? >> >> Thanks in advance, >> >> David P. Shorthouse >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From sdlime at gmail.com Wed Sep 28 20:27:25 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 28 Sep 2011 22:27:25 -0500 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> Message-ID: What happens if you quote the variable in the CGI call, that is: ?/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png'" Note the single quotes in the DATA value... I'll try to whip up local test case. Steve On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah wrote: > Steve, > > DATA in ?the URL has quotes as: > > ?/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > amsreDate + ".png" > > I unquoted the value in mapfile but there was no error. Any more suggestion? > > > > Thanks, > > > > Asad > > > > > > From: Steve Lime [mailto:sdlime at gmail.com] > Sent: Friday, September 23, 2011 4:55 AM > To: Asad Ullah > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Parameter substitution problem > > > > My guess is the validation is correct but the syntax of the URL parameter is > is wrong in that the value passed for DATA is not quoted. If you unquote the > default value in your mapfile does that result in a error? That would be an > easy way to test the need for quotes. > > One last idea, while map_layer... should work, try map.layer... instead as > you variable name. > > If you're really are just replacing the date part you could do that by doing > a runtime sub... > > ?DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" > ?VALIDATION > ? ? ?date 'regex' > ?END > > And then you pass date as a CGI variable. > > Steve > > On Thursday, September 22, 2011, Asad Ullah > wrote: >> List, >> I am trying to substitute DATA parameter in my mapfile with a call from >> Openlayers as follow: >> >> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png" >> >> The mapfile is: >> >> LAYER >> ?NAME "OMI_CP" >> ??? TYPE RASTER >> ??? STATUS DEFAULT >> ??? OFFSITE 0 0 0 >> ?PROJECTION >> ??? "init=epsg:4326" >> ? END >> ??? DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" >> VALIDATION >> ? 'DATA' '^OMI_.*\.png$' >> END >> >> The call should change the date part (20110922) of the png filename but it >> is not doing it. Can anyone point to what I am doing wrong here? >> >> Thanks, >> >> Asad >> From sdlime at gmail.com Wed Sep 28 20:29:35 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 28 Sep 2011 22:29:35 -0500 Subject: [mapserver-users] PHP mapscript - how to add label style In-Reply-To: References: Message-ID: I'm guessing this is a bug, could you quick file a ticket and we'll make sure this is addressed in 6.0.2? Steve On Tue, Sep 27, 2011 at 10:21 AM, Ian Walberg wrote: > Hello, > > > > I am sure it is staring me in the face but we cannot see how to add a style > to a label (Mapserver 6.x) using PHP mapscript. > > > > Works fine via map file and we see the open issue with the save not > including the geotransform line. > > > > What are we missing? > > > > Thanks > > > > Ian > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From sdlime at gmail.com Wed Sep 28 20:40:40 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 28 Sep 2011 22:40:40 -0500 Subject: [mapserver-users] PHP-mapscript before/after draw discrepancy In-Reply-To: References: Message-ID: Extents are adjusted to deal with the fact the supplied extent often doesn't match the aspect ratio of the output image. One set of coordinates (x's or y's) is left alone and the other is adjusted to compensate for the image aspect ratio. By default MapServer likes square pixels. I don't know enough to about the zoompoint/zoomrect methods to really comment on why they don't work well with the non-square pixels, except that non-square pixels are really a WMS/WCS phenomena in MapServer... Steve On Wed, Sep 28, 2011 at 7:08 PM, Shorthouse, David wrote: > On Wed, Sep 28, 2011 at 5:51 PM, Cristiano Sumariva wrote: >> Well after reading the discussion in the link I guess you need to implement >> double msAdjustExtent(rectObj *rect, int width, int height) mapserver >> function in your language >> and update size then the extent on map object using the mapscript API. > > Thanks for the response Christiano. Indeed, I *might* be able to > pre-calculate what the eventual extent will be after the draw() method > as Tamas suggested, assuming I don't bungle the logic. However, this > feels backward, especially since I have to design a front-end to > compensate for it. Why is the extent being mysteriously (read > inaccessibly) adjusted in the the first place? > > David P. Shorthouse > >> 2011/9/28 Shorthouse, David >>> >>> I am using PHP-mapscript and am bumping into this old issue: >>> >>> http://osgeo-org.1803224.n2.nabble.com/Mapscript-extent-prediction-td1991453.html, >>> which is now a show-stopper for me. >>> >>> I tried using CONFIG 'MS_NONSQUARE' 'yes', which does *initially* >>> produce an extent after draw precisely the same as provided with >>> setExtent. However, my application also make heavy use of zoompoint >>> and zoomrectangle, which no longer work as expected after having set >>> this CONFIG. >>> >>> Anyone have any suggestions on how to get an extent that is precisely >>> the same before and after the draw method? >>> >>> Thanks in advance, >>> >>> David P. Shorthouse >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Wed Sep 28 21:02:14 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 28 Sep 2011 23:02:14 -0500 Subject: [mapserver-users] minscaledenom puzzle, Mapserver 6.0.1 In-Reply-To: <4E82384B.2050308@usgs.gov> References: <4E82384B.2050308@usgs.gov> Message-ID: Hmmm... What if you use one layer with the various class/expressions and MAXSCALEDENOM set at the layer level for all the various squares and then a second layer with just one class for the pixels with MINSCALEDENOM set. I typically use layer scales far more than class scale and that setup would perform much better than what you have since there would be no expressions or scale computations in the scale > 7000000 case. E.g.: LAYER NAME 'sites_high' GROUP 'sites' MAXSCALE 7000000 ...multi-class... END LAYER NAME 'sites_low' GROUP 'sites' MINSCALE 7000000 ...one class... END If the second layer indeed renders then it's a class handling issue. If the second layer (with pixels) doesn't render then it's a drawing issue. What backend is used, GD or AGG? Steve On Tue, Sep 27, 2011 at 3:55 PM, Peter N. Schweitzer wrote: > Surely I have misunderstood minscaledenom or otherwise have misused it. > > I just switched over to Mapserver 6.0.1 (Linux, CentOS, data in > PostgreSQL+PostGIS) > > The web page is http://mrdata.usgs.gov/mineral-resources/mrds-us.html > Feature type is point. ?The classes from the map file are these: > > ?labelitem "site_name" > ?labelmaxscaledenom 250000 > ?classitem "dev_stat" > ?class > ? ?maxscaledenom 7000000 > ? ?expression ('[dev_stat]' == 'Producer' or '[dev_stat]' == 'Past > Producer') > ? ?name "Mine, past or present producer" > ? ?color 160 0 0 > ? ?symbol "mine" > ? ?size 5 > ? ?label > ? ? ?color 0 0 0 > ? ? ?size 10 > ? ? ?type truetype > ? ? ?font arial > ? ? ?position cr > ? ? ?offset 4 4 > ? ? ?end > ? ?end > ?class > ? ?maxscaledenom 7000000 > ? ?expression ('[dev_stat]' == 'Prospect' or '[dev_stat]' == 'Occurrence') > ? ?name "Prospect or occurrence" > ? ?color 0 160 0 > ? ?symbol "opensquare" > ? ?size 5 > ? ?end > ?class > ? ?maxscaledenom 7000000 > ? ?expression ('[dev_stat]' == 'Plant') > ? ?name "Processing plant" > ? ?color 0 0 160 > ? ?symbol "mine" > ? ?size 6 > ? ?label > ? ? ?color 0 0 0 > ? ? ?size 10 > ? ? ?type truetype > ? ? ?font arial > ? ? ?position cr > ? ? ?offset 4 4 > ? ? ?end > ? ?end > ?class > ? ?maxscaledenom 7000000 > ? ?expression ('[dev_stat]' == 'Unknown') > ? ?name "Unknown" > ? ?color 0 0 0 > ? ?symbol "occurrence" > ? ?size 6 > ? ?end > ?class > ? ?minscaledenom 7000000 > ? ?color 160 0 0 > ? ?symbol 0 > ? ?end > > Under mapserver 5.6.7, this generated red pixels for every point when > the map is zoomed out; those are replaced by the square symbols when > the map is zoomed in. > > But under 6.0.1, I am not getting the 1-pixel symbols when zoomed out. > I assumed that the last class defined above would apply when the scale > is coarser than 1:7M. > > Here is the OpenLayers command that loads this layer: > > ?var wms = new OpenLayers.Layer.WMS( > ? ?"Mineral Resources", > ? ?"http://mrdata.usgs.gov/cgi-bin/mapserv?", > ? ?{ > ? ? ?map: 'mrds.map', > ? ? ?transparent: 'true', > ? ? ?layers: 'mrds' > ? ? ?}, > ? ?{ > ? ? ?singleTile: 'true', > ? ? ?ratio: 1 > ? ? ?} > ? ?); > > Would some modification of my map file or my OpenLayers javascript > bring back my little red pixels? > > Thanks for any help you might offer. > > Peter > -- > Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) > (703) 648-6533 ?FAX: (703) 648-6252 ?email: pschweitzer at usgs.gov > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Wed Sep 28 21:04:14 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 28 Sep 2011 23:04:14 -0500 Subject: [mapserver-users] output template trimlast doesn't work In-Reply-To: <1317165302152-6838218.post@n2.nabble.com> References: <1317165302152-6838218.post@n2.nabble.com> Message-ID: Which version of MapServer? Template certainly looks ok. What happens if you pull the closing feature tag up like so: },[/feature] Steve On Tue, Sep 27, 2011 at 6:15 PM, jjwang wrote: > This is my template file. > The *trimlast=','* statement doesn't work. > Any idea on this? > > // mapserver template > [resultset layer=pd] > [ > ? ?[feature trimlast=','] > ? ?{ > ? ? ?"id": "[id]", > ? ? ?"description": "[description]", > ? ? ?"venue": "[venue]", > ? ? ?"year": "[year]" > ? ?}, > ? ?[/feature] > ] > [/resultset] > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/output-template-trimlast-doesn-t-work-tp6838218p6838218.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Wed Sep 28 21:21:21 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 28 Sep 2011 23:21:21 -0500 Subject: [mapserver-users] Re: Mapserver + NDVI styling In-Reply-To: References: Message-ID: Unfortunately MapServer isn't bright enough to generate a legend solely from an image itself. The legend code just wasn't built for such a task.Sorry... Steve 2011/9/28 Jorge Ar?valo : > 2011/9/28 Jorge Ar?valo : >> I'm serving a NDVI coverage via Mapserver. So, one band, float32 >> values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and >> generate a legend. I've tried 2 things: >> >> - Create two dummy classes, just for testing: >> >> CLASS >> ? ?NAME "rojo" >> ? ?EXPRESSION ([pixel] < 0.3) >> ? ?STYLE >> ? ? ? ?COLOR 255 0 0 >> ? ?END >> END >> >> CLASS >> ? ?NAME "azul" >> ? ?EXPRESSION ([pixel] >= 0.3) >> ? ?STYLE >> ? ? ? ?COLOR 0 0 255 >> ? ?END >> END >> >> So, my legend looks like this: http://dl.dropbox.com/u/6599273/leyenda.png >> >> And the image, obviously, is red and blue: >> http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png >> >> But I'd like to see the image in greyscale... The I've tried the next thing >> >> - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know >> what Mapserver internally does with this processing order, but I can >> see the image in greyscale: >> http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png >> >> The problem is now I can't see any legend, because I've not created >> any class. I'd like to see all the different levels of the grayscale >> image in my legend. >> >> How could I do it? >> >> Many thanks in advance >> >> -- >> Jorge Ar?valo >> Internet & Mobility Division, DEIMOS >> jorge.arevalo at deimos-space.com >> http://es.linkedin.com/in/jorgearevalo80 >> http://mobility.grupodeimos.com/ >> http://gis4free.wordpress.com >> http://geohash.org/ezjqgrgzz0g >> > > Ok, I've found a way, but I'm sure it isn't the shortest path. > > Basically, I've generated a legend using GRASS (r.colors to add grey > color as color interpretation for band and d.legend to generate the > legend). The legend is generated from the ndvi file. So, I guess I can > create a HTML template as Mapserver legend, using the legend generated > by grass (here: > http://dl.dropbox.com/u/6599273/grass/grass_legend.png) > > On the other hand, I know how to generate a legend in Mapserver using > CLASS objects in the mapfile, but I don't know how to generate that > legend without the CLASS options in the mapfile. > > Am I taking the long way on this? Is there an easier way to generate a > legend for a NDVI file in Mapserver? > > Many thanks in advance > > -- > Jorge Ar?valo > Internet & Mobility Division, DEIMOS > jorge.arevalo at deimos-space.com > http://es.linkedin.com/in/jorgearevalo80 > http://mobility.grupodeimos.com/ > http://gis4free.wordpress.com > http://geohash.org/ezjqgrgzz0g > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From jaja0506 at gmail.com Wed Sep 28 22:17:16 2011 From: jaja0506 at gmail.com (jjwang) Date: Wed, 28 Sep 2011 22:17:16 -0700 (PDT) Subject: [mapserver-users] Re: output template trimlast doesn't work In-Reply-To: References: <1317165302152-6838218.post@n2.nabble.com> Message-ID: <1317273436122-6842760.post@n2.nabble.com> 6.0.1 There is no difference. Did I miss something? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/output-template-trimlast-doesn-t-work-tp6838218p6842760.html Sent from the Mapserver - User mailing list archive at Nabble.com. From bteluk at gmail.com Wed Sep 28 22:25:06 2011 From: bteluk at gmail.com (bteluk at gmail.com) Date: Wed, 28 Sep 2011 22:25:06 -0700 (PDT) Subject: [mapserver-users] WFS 1.1.0 Namespace quirk for PropertyName attribute restricting Message-ID: <1317273906142-6842768.post@n2.nabble.com> Hi, I think I've found a quirk in MapServer V5.6.0 WFS behaviour - but I'm not really sure as I don't understand enough about reading an XSD to know whether or not this is "expected behaviour". This particular issue is not causing me any grief at the moment as I know the work-around, but perhaps it might be of interest to others. I noticed the problem when hand-crafting a WFS request for an Intersect Filter - I specified some PropertyName elements at the head of the request in order to retrieve only a select set of attributes. I specified the namespace (because I based the XML on what I read in the WFS 1.1.0 recommendation) and because it had apparently worked in another previous request. However this time it didn't work in as much as the request responded with only the spatial data and not the attributes. With a bit of mucking around I noticed that apparently this version of MapServer allows namespace to be specified on "PropertyName" elements within the "Filter" section, but not outside it. My XML below: The XML above works fine and responds with the spatial info and the attributes. However, if you code the namespace into say the elements like "ms:esa_code" - it no longer returns the attributes (and yet it works fine if the namespace is removed.) I think if I read ticket 1350 correctly, it indicates the MSv5.2 strips out namespaces ? Maybe that was changed later? It's not really a problem to me. But just a quirk that took me a hour or two of mucking around to find what caused the problem. (Is there a recommended approach on writing WFS XML requests for MapServer eg. should all namespaces be removed?) ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-1-1-0-Namespace-quirk-for-PropertyName-attribute-restricting-tp6842768p6842768.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jaja0506 at gmail.com Wed Sep 28 23:31:25 2011 From: jaja0506 at gmail.com (jjwang) Date: Wed, 28 Sep 2011 23:31:25 -0700 (PDT) Subject: [mapserver-users] GetFeatureInfo or GetFeature? Message-ID: <1317277885471-6842879.post@n2.nabble.com> The data I have is suburb boundaries (polygon). I want the server can do this: when I pass a coordinate to the server and it could return the info of the suburb who covers this coordinate. For getfeatureinfo request, there are two required parameters X and Y. But they are not longitude and latitude . So I don't know how to get what I want. For getfeature request, I think the filter might be able to do this. But I couldn't find the documentations teache how to use Spatial Capabilities, like Touches,Within,Overlaps,Contains,DWithin. Someone help me. Thanks JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-or-GetFeature-tp6842879p6842879.html Sent from the Mapserver - User mailing list archive at Nabble.com. From Jukka.Rahkonen at mmmtike.fi Wed Sep 28 23:52:26 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 29 Sep 2011 06:52:26 +0000 Subject: VS: [mapserver-users] GetFeatureInfo or GetFeature? In-Reply-To: <1317277885471-6842879.post@n2.nabble.com> References: <1317277885471-6842879.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A63024F84@suutari.haapa.mmm.fi> Hi, X and Y in GetFeatureInfo are pixel coordinates and you can calculate the coordinates for any pixel in the image because you know the BBOX and the size of the image in pixels (WIDTHxHEIGHT). When it comes to filters in WFS you must read some parts of that WFS standard version you are going to use, for WFS 1.0.0 http://portal.opengeospatial.org/files/?artifact_id=7176 and also another stasndard about how the filters must be used http://portal.opengeospatial.org/files/?artifact_id=1171 A filter uses with http POST could look like myns:PATH 50,40 100,60 It is also possible to use filter with http GET but urls tend to come very long. This example, as the previuos one, is from the WFS 1.0.0 standard FILTER=INWATERA_1M/WKB_GEOM 10,10 20,20 -Jukka Rahkonen- jjwang wrote: > > The data I have is suburb boundaries (polygon). > I want the server can do this: when I pass a coordinate to > the server and it > could return the info of the suburb who covers this coordinate. > For getfeatureinfo request, there are two required parameters > X and Y. But > they are not longitude and latitude . So I don't know how to > get what I > want. > For getfeature request, I think the filter might be able to > do this. But I > couldn't find the documentations teache how to use Spatial > Capabilities, > like Touches,Within,Overlaps,Contains,DWithin. > > Someone help me. > Thanks > > JJ > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-or-GetFe ature-tp6842879p6842879.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From knasia at poczta.fm Thu Sep 29 01:03:34 2011 From: knasia at poczta.fm (knasia) Date: Thu, 29 Sep 2011 01:03:34 -0700 (PDT) Subject: [mapserver-users] traffic queues visualization Message-ID: <1317283414159-6843102.post@n2.nabble.com> hi, I have to visualize traffic queues at the crossroads. I have data in Postgres/PostGIS database. It would be to the best to show each car separatedly. So far I have tried some cases, but none of them come out to be useful. The best would be to mark as many arrows as cars, but I don't know how to mark arrows on the geometry that would be one next to another marked from the node (crossroad) along the road geometry. Can somebody help to do this or find another idea? Thank you a lot in advance. KN -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/traffic-queues-visualization-tp6843102p6843102.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jorge.arevalo at deimos-space.com Thu Sep 29 03:49:34 2011 From: jorge.arevalo at deimos-space.com (=?ISO-8859-1?Q?Jorge_Ar=E9valo?=) Date: Thu, 29 Sep 2011 12:49:34 +0200 Subject: [mapserver-users] Re: Mapserver + NDVI styling In-Reply-To: References: Message-ID: Thanks for the response. Now, I'm sure I must generate the legend based on the classification specified in the mapfile or generate it by myself and manually include it in a template. Good to know it. 2011/9/29 Steve Lime : > Unfortunately MapServer isn't bright enough to generate a legend > solely from an image itself. The legend code > just wasn't built for such a task.Sorry... Steve > > 2011/9/28 Jorge Ar?valo : >> 2011/9/28 Jorge Ar?valo : >>> I'm serving a NDVI coverage via Mapserver. So, one band, float32 >>> values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and >>> generate a legend. I've tried 2 things: >>> >>> - Create two dummy classes, just for testing: >>> >>> CLASS >>> ? ?NAME "rojo" >>> ? ?EXPRESSION ([pixel] < 0.3) >>> ? ?STYLE >>> ? ? ? ?COLOR 255 0 0 >>> ? ?END >>> END >>> >>> CLASS >>> ? ?NAME "azul" >>> ? ?EXPRESSION ([pixel] >= 0.3) >>> ? ?STYLE >>> ? ? ? ?COLOR 0 0 255 >>> ? ?END >>> END >>> >>> So, my legend looks like this: http://dl.dropbox.com/u/6599273/leyenda.png >>> >>> And the image, obviously, is red and blue: >>> http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png >>> >>> But I'd like to see the image in greyscale... The I've tried the next thing >>> >>> - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know >>> what Mapserver internally does with this processing order, but I can >>> see the image in greyscale: >>> http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png >>> >>> The problem is now I can't see any legend, because I've not created >>> any class. I'd like to see all the different levels of the grayscale >>> image in my legend. >>> >>> How could I do it? >>> >>> Many thanks in advance >>> >>> -- >>> Jorge Ar?valo >>> Internet & Mobility Division, DEIMOS >>> jorge.arevalo at deimos-space.com >>> http://es.linkedin.com/in/jorgearevalo80 >>> http://mobility.grupodeimos.com/ >>> http://gis4free.wordpress.com >>> http://geohash.org/ezjqgrgzz0g >>> >> >> Ok, I've found a way, but I'm sure it isn't the shortest path. >> >> Basically, I've generated a legend using GRASS (r.colors to add grey >> color as color interpretation for band and d.legend to generate the >> legend). The legend is generated from the ndvi file. So, I guess I can >> create a HTML template as Mapserver legend, using the legend generated >> by grass (here: >> http://dl.dropbox.com/u/6599273/grass/grass_legend.png) >> >> On the other hand, I know how to generate a legend in Mapserver using >> CLASS objects in the mapfile, but I don't know how to generate that >> legend without the CLASS options in the mapfile. >> >> Am I taking the long way on this? Is there an easier way to generate a >> legend for a NDVI file in Mapserver? >> >> Many thanks in advance >> >> -- >> Jorge Ar?valo >> Internet & Mobility Division, DEIMOS >> jorge.arevalo at deimos-space.com >> http://es.linkedin.com/in/jorgearevalo80 >> http://mobility.grupodeimos.com/ >> http://gis4free.wordpress.com >> http://geohash.org/ezjqgrgzz0g >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -- Jorge Ar?valo Internet & Mobility Division, DEIMOS jorge.arevalo at deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g From jorge.arevalo at deimos-space.com Thu Sep 29 03:51:52 2011 From: jorge.arevalo at deimos-space.com (=?ISO-8859-1?Q?Jorge_Ar=E9valo?=) Date: Thu, 29 Sep 2011 12:51:52 +0200 Subject: [mapserver-users] Re: Mapserver + NDVI styling In-Reply-To: References: Message-ID: Yes, it does it in that way. I have no problem with this. But I need a legend for the image. After reading the response from Steve Lime, I think I'll generate the image with GRASS, to include it in the HTML template. And all replies are welcome :-). Thanks. 2011/9/28 Gustavo : > I'm not sure but if you just display your raster without any styling i think > MapSever would show it in grayscale. > > I'm new with MapServer so i'm feeling a bit insolent posting a reply :) > > > El 28 de septiembre de 2011 11:30, Jorge Ar?valo > escribi?: >> >> 2011/9/28 Jorge Ar?valo : >> > I'm serving a NDVI coverage via Mapserver. So, one band, float32 >> > values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and >> > generate a legend. I've tried 2 things: >> > >> > - Create two dummy classes, just for testing: >> > >> > CLASS >> > ? ?NAME "rojo" >> > ? ?EXPRESSION ([pixel] < 0.3) >> > ? ?STYLE >> > ? ? ? ?COLOR 255 0 0 >> > ? ?END >> > END >> > >> > CLASS >> > ? ?NAME "azul" >> > ? ?EXPRESSION ([pixel] >= 0.3) >> > ? ?STYLE >> > ? ? ? ?COLOR 0 0 255 >> > ? ?END >> > END >> > >> > So, my legend looks like this: >> > http://dl.dropbox.com/u/6599273/leyenda.png >> > >> > And the image, obviously, is red and blue: >> > http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png >> > >> > But I'd like to see the image in greyscale... The I've tried the next >> > thing >> > >> > - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know >> > what Mapserver internally does with this processing order, but I can >> > see the image in greyscale: >> > http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png >> > >> > The problem is now I can't see any legend, because I've not created >> > any class. I'd like to see all the different levels of the grayscale >> > image in my legend. >> > >> > How could I do it? >> > >> > Many thanks in advance >> > >> > -- >> > Jorge Ar?valo >> > Internet & Mobility Division, DEIMOS >> > jorge.arevalo at deimos-space.com >> > http://es.linkedin.com/in/jorgearevalo80 >> > http://mobility.grupodeimos.com/ >> > http://gis4free.wordpress.com >> > http://geohash.org/ezjqgrgzz0g >> > >> >> Ok, I've found a way, but I'm sure it isn't the shortest path. >> >> Basically, I've generated a legend using GRASS (r.colors to add grey >> color as color interpretation for band and d.legend to generate the >> legend). The legend is generated from the ndvi file. So, I guess I can >> create a HTML template as Mapserver legend, using the legend generated >> by grass (here: >> http://dl.dropbox.com/u/6599273/grass/grass_legend.png) >> >> On the other hand, I know how to generate a legend in Mapserver using >> CLASS objects in the mapfile, but I don't know how to generate that >> legend without the CLASS options in the mapfile. >> >> Am I taking the long way on this? Is there an easier way to generate a >> legend for a NDVI file in Mapserver? >> >> Many thanks in advance >> >> -- >> Jorge Ar?valo >> Internet & Mobility Division, DEIMOS >> jorge.arevalo at deimos-space.com >> http://es.linkedin.com/in/jorgearevalo80 >> http://mobility.grupodeimos.com/ >> http://gis4free.wordpress.com >> http://geohash.org/ezjqgrgzz0g >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- Jorge Ar?valo Internet & Mobility Division, DEIMOS jorge.arevalo at deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g From brfr at metrico.lu Thu Sep 29 02:48:38 2011 From: brfr at metrico.lu (Frank Broniewski) Date: Thu, 29 Sep 2011 11:48:38 +0200 Subject: [mapserver-users] layer.dump not saved with mapscript Message-ID: <4E843EF6.7050105@metrico.lu> Hi, I have noticed a possible bug with mapscript. The value of layer.dump gets not saved in version 6 to the map file, which used to work in 5.6.5. Please see the following examples: Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mapscript >>> mapscript.msGetVersion() 'MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE' >>> m = mapscript.mapObj() >>> l = mapscript.layerObj() >>> l.dump = mapscript.MS_TRUE >>> m.insertLayer(l) 0 >>> m.save('/home/brfr/test.map') 0 creates a layer as follows: 76 LAYER 77 DUMP TRUE 78 NAME "(null)" 79 STATUS OFF 80 UNITS METERS 81 END while: Python 2.5.2 (r252:60911, Jan 20 2010, 23:14:04) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mapscript >>> mapscript.msGetVersion() 'MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE' >>> m = mapscript.mapObj() >>> l = mapscript.layerObj() >>> l.dump = mapscript.MS_TRUE >>> m.insertLayer(l) 0 >>> m.save('/home/brfr/test.map') 0 creates a layer as follows: LAYER STATUS OFF TILEITEM "location" UNITS METERS END # LAYER Dump is still in the docs as a valid parameter, so I presume the behaviour is not wanted. The above examples are only that, examples. I discovered the behaviour with a working mapfile ... Can someone else confirm this? Or is it only me? Frank -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From dmorissette at mapgears.com Thu Sep 29 05:06:15 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 29 Sep 2011 08:06:15 -0400 Subject: [mapserver-users] layer.dump not saved with mapscript In-Reply-To: <4E843EF6.7050105@metrico.lu> References: <4E843EF6.7050105@metrico.lu> Message-ID: <4E845F37.1050305@mapgears.com> The DUMP keyword has been made obsolete by the mechanism introduced in RFC-67 (http://mapserver.org/es/development/rfc/ms-rfc-67.html) to enable/disable OGC requests at the mapfile and layer level. It seems that we failed to document this change in the migration guide and to update the docs accordingly. I have reopened ticket #3830 about the docs update: http://trac.osgeo.org/mapserver/ticket/3830 Daniel On 11-09-29 05:48 AM, Frank Broniewski wrote: > Hi, > > I have noticed a possible bug with mapscript. The value of layer.dump > gets not saved in version 6 to the map file, which used to work in 5.6.5. > > Please see the following examples: > Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import mapscript > >>> mapscript.msGetVersion() > 'MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP > OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE > SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER > SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS > SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL > INPUT=SHAPEFILE' > >>> m = mapscript.mapObj() > >>> l = mapscript.layerObj() > >>> l.dump = mapscript.MS_TRUE > >>> m.insertLayer(l) > 0 > >>> m.save('/home/brfr/test.map') > 0 > > creates a layer as follows: > 76 LAYER > 77 DUMP TRUE > 78 NAME "(null)" > 79 STATUS OFF > 80 UNITS METERS > 81 END > > > while: > Python 2.5.2 (r252:60911, Jan 20 2010, 23:14:04) > [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import mapscript > >>> mapscript.msGetVersion() > 'MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ > SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV > SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER > SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS > INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE' > >>> m = mapscript.mapObj() > >>> l = mapscript.layerObj() > >>> l.dump = mapscript.MS_TRUE > >>> m.insertLayer(l) > 0 > >>> m.save('/home/brfr/test.map') > 0 > > creates a layer as follows: > LAYER > STATUS OFF > TILEITEM "location" > UNITS METERS > END # LAYER > > Dump is still in the docs as a valid parameter, so I presume the > behaviour is not wanted. The above examples are only that, examples. I > discovered the behaviour with a working mapfile ... > > Can someone else confirm this? Or is it only me? > > Frank > > > -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From punk.kish at gmail.com Thu Sep 29 05:44:14 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 29 Sep 2011 07:44:14 -0500 Subject: [mapserver-users] output template trimlast doesn't work In-Reply-To: <1317165302152-6838218.post@n2.nabble.com> References: <1317165302152-6838218.post@n2.nabble.com> Message-ID: On Sep 27, 2011, at 6:15 PM, jjwang wrote: > This is my template file. > The *trimlast=','* statement doesn't work. > Any idea on this? > > // mapserver template > [resultset layer=pd] > [ > [feature trimlast=','] > { > "id": "[id]", > "description": "[description]", > "venue": "[venue]", > "year": "[year]" > }, > [/feature] > ] > [/resultset] > I experienced the same. -- Puneet Kishor From Asad.Ullah at sigmaspace.com Thu Sep 29 06:22:39 2011 From: Asad.Ullah at sigmaspace.com (Asad Ullah) Date: Thu, 29 Sep 2011 13:22:39 +0000 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> Message-ID: <05CB785138CBDC42B993061A0161A57E04B825F4@stimpy.sigmaspace.local> Steve, Thanks very much for your help. Adding quote did not change anything. However, if I change file name from, for example, "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" to " OMI_OMCLDRRclpWMSNRT_20110922.png" and do the substitution as: "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI_OMCLDRRclpWMSNRT_"+ amsreDate + ".png" It would work. Where the validation block is same as: VALIDATION 'DATA' '^OMI_.*\.png$' END So, do you think the problem is with validation definition? Thanks, Asad -----Original Message----- From: Steve Lime [mailto:sdlime at gmail.com] Sent: Wednesday, September 28, 2011 11:27 PM To: Asad Ullah; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Parameter substitution problem What happens if you quote the variable in the CGI call, that is: "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png'" Note the single quotes in the DATA value... I'll try to whip up local test case. Steve On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah wrote: > Steve, > > DATA in ?the URL has quotes as: > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > amsreDate + ".png" > > I unquoted the value in mapfile but there was no error. Any more suggestion? > > > > Thanks, > > > > Asad > > > > > > From: Steve Lime [mailto:sdlime at gmail.com] > Sent: Friday, September 23, 2011 4:55 AM > To: Asad Ullah > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Parameter substitution problem > > > > My guess is the validation is correct but the syntax of the URL parameter is > is wrong in that the value passed for DATA is not quoted. If you unquote the > default value in your mapfile does that result in a error? That would be an > easy way to test the need for quotes. > > One last idea, while map_layer... should work, try map.layer... instead as > you variable name. > > If you're really are just replacing the date part you could do that by doing > a runtime sub... > > ?DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" > ?VALIDATION > ? ? ?date 'regex' > ?END > > And then you pass date as a CGI variable. > > Steve > > On Thursday, September 22, 2011, Asad Ullah > wrote: >> List, >> I am trying to substitute DATA parameter in my mapfile with a call from >> Openlayers as follow: >> >> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png" >> >> The mapfile is: >> >> LAYER >> ?NAME "OMI_CP" >> ??? TYPE RASTER >> ??? STATUS DEFAULT >> ??? OFFSITE 0 0 0 >> ?PROJECTION >> ??? "init=epsg:4326" >> ? END >> ??? DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" >> VALIDATION >> ? 'DATA' '^OMI_.*\.png$' >> END >> >> The call should change the date part (20110922) of the png filename but it >> is not doing it. Can anyone point to what I am doing wrong here? >> >> Thanks, >> >> Asad >> From punk.kish at gmail.com Thu Sep 29 06:47:26 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Thu, 29 Sep 2011 08:47:26 -0500 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: <05CB785138CBDC42B993061A0161A57E04B825F4@stimpy.sigmaspace.local> References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B825F4@stimpy.sigmaspace.local> Message-ID: <6322AF28-CE19-4BA0-8BF6-C6F6E97A2F61@gmail.com> On Sep 29, 2011, at 8:22 AM, Asad Ullah wrote: > Steve, > Thanks very much for your help. Adding quote did not change anything. However, if I change file name from, for example, "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" to " OMI_OMCLDRRclpWMSNRT_20110922.png" and do the substitution as: > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI_OMCLDRRclpWMSNRT_"+ amsreDate + ".png" > > It would work. Where the validation block is same as: > > VALIDATION > 'DATA' '^OMI_.*\.png$' > END > > So, do you think the problem is with validation definition? Could it be the dashes (-) in the problematic file name? > > Thanks, > > Asad > > > -----Original Message----- > From: Steve Lime [mailto:sdlime at gmail.com] > Sent: Wednesday, September 28, 2011 11:27 PM > To: Asad Ullah; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Parameter substitution problem > > What happens if you quote the variable in the CGI call, that is: > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > amsreDate + ".png'" > > Note the single quotes in the DATA value... I'll try to whip up local test case. > > Steve > > On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah wrote: >> Steve, >> >> DATA in the URL has quotes as: >> >> "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ >> amsreDate + ".png" >> >> I unquoted the value in mapfile but there was no error. Any more suggestion? >> >> >> >> Thanks, >> >> >> >> Asad >> >> >> >> >> >> From: Steve Lime [mailto:sdlime at gmail.com] >> Sent: Friday, September 23, 2011 4:55 AM >> To: Asad Ullah >> Cc: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Parameter substitution problem >> >> >> >> My guess is the validation is correct but the syntax of the URL parameter is >> is wrong in that the value passed for DATA is not quoted. If you unquote the >> default value in your mapfile does that result in a error? That would be an >> easy way to test the need for quotes. >> >> One last idea, while map_layer... should work, try map.layer... instead as >> you variable name. >> >> If you're really are just replacing the date part you could do that by doing >> a runtime sub... >> >> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" >> VALIDATION >> date 'regex' >> END >> >> And then you pass date as a CGI variable. >> >> Steve >> >> On Thursday, September 22, 2011, Asad Ullah >> wrote: >>> List, >>> I am trying to substitute DATA parameter in my mapfile with a call from >>> Openlayers as follow: >>> >>> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png" >>> >>> The mapfile is: >>> >>> LAYER >>> NAME "OMI_CP" >>> TYPE RASTER >>> STATUS DEFAULT >>> OFFSITE 0 0 0 >>> PROJECTION >>> "init=epsg:4326" >>> END >>> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" >>> VALIDATION >>> 'DATA' '^OMI_.*\.png$' >>> END >>> >>> The call should change the date part (20110922) of the png filename but it >>> is not doing it. Can anyone point to what I am doing wrong here? >>> >>> Thanks, >>> >>> Asad >>> > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From brfr at metrico.lu Thu Sep 29 06:52:55 2011 From: brfr at metrico.lu (Frank Broniewski) Date: Thu, 29 Sep 2011 15:52:55 +0200 Subject: [mapserver-users] layer.dump not saved with mapscript In-Reply-To: <4E845F37.1050305@mapgears.com> References: <4E843EF6.7050105@metrico.lu> <4E845F37.1050305@mapgears.com> Message-ID: <4E847837.6080501@metrico.lu> thanks for the hint, Daniel. I was guessing in that direction, but wasn't sure about the consequences. Frank Am 29.09.2011 14:06, schrieb Daniel Morissette: > The DUMP keyword has been made obsolete by the mechanism introduced in > RFC-67 (http://mapserver.org/es/development/rfc/ms-rfc-67.html) to > enable/disable OGC requests at the mapfile and layer level. It seems > that we failed to document this change in the migration guide and to > update the docs accordingly. > > I have reopened ticket #3830 about the docs update: > http://trac.osgeo.org/mapserver/ticket/3830 > > Daniel > > > On 11-09-29 05:48 AM, Frank Broniewski wrote: >> Hi, >> >> I have noticed a possible bug with mapscript. The value of layer.dump >> gets not saved in version 6 to the map file, which used to work in 5.6.5. >> >> Please see the following examples: >> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) >> [GCC 4.4.5] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import mapscript >> >>> mapscript.msGetVersion() >> 'MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP >> OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE >> SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT >> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER >> SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS >> SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL >> INPUT=SHAPEFILE' >> >>> m = mapscript.mapObj() >> >>> l = mapscript.layerObj() >> >>> l.dump = mapscript.MS_TRUE >> >>> m.insertLayer(l) >> 0 >> >>> m.save('/home/brfr/test.map') >> 0 >> >> creates a layer as follows: >> 76 LAYER >> 77 DUMP TRUE >> 78 NAME "(null)" >> 79 STATUS OFF >> 80 UNITS METERS >> 81 END >> >> >> while: >> Python 2.5.2 (r252:60911, Jan 20 2010, 23:14:04) >> [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import mapscript >> >>> mapscript.msGetVersion() >> 'MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ >> SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV >> SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT >> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER >> SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS >> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE' >> >>> m = mapscript.mapObj() >> >>> l = mapscript.layerObj() >> >>> l.dump = mapscript.MS_TRUE >> >>> m.insertLayer(l) >> 0 >> >>> m.save('/home/brfr/test.map') >> 0 >> >> creates a layer as follows: >> LAYER >> STATUS OFF >> TILEITEM "location" >> UNITS METERS >> END # LAYER >> >> Dump is still in the docs as a valid parameter, so I presume the >> behaviour is not wanted. The above examples are only that, examples. I >> discovered the behaviour with a working mapfile ... >> >> Can someone else confirm this? Or is it only me? >> >> Frank >> >> >> > > -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From Asad.Ullah at sigmaspace.com Thu Sep 29 06:53:06 2011 From: Asad.Ullah at sigmaspace.com (Asad Ullah) Date: Thu, 29 Sep 2011 13:53:06 +0000 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: <6322AF28-CE19-4BA0-8BF6-C6F6E97A2F61@gmail.com> References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B825F4@stimpy.sigmaspace.local> <6322AF28-CE19-4BA0-8BF6-C6F6E97A2F61@gmail.com> Message-ID: <05CB785138CBDC42B993061A0161A57E04B8262F@stimpy.sigmaspace.local> I don't think (-) is a problem because I have tried changing (-) with (_) in the file name without success. -----Original Message----- From: Mr. Puneet Kishor [mailto:punk.kish at gmail.com] Sent: Thursday, September 29, 2011 9:47 AM To: Asad Ullah Cc: Steve Lime; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Parameter substitution problem On Sep 29, 2011, at 8:22 AM, Asad Ullah wrote: > Steve, > Thanks very much for your help. Adding quote did not change anything. However, if I change file name from, for example, "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" to " OMI_OMCLDRRclpWMSNRT_20110922.png" and do the substitution as: > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI_OMCLDRRclpWMSNRT_"+ amsreDate + ".png" > > It would work. Where the validation block is same as: > > VALIDATION > 'DATA' '^OMI_.*\.png$' > END > > So, do you think the problem is with validation definition? Could it be the dashes (-) in the problematic file name? > > Thanks, > > Asad > > > -----Original Message----- > From: Steve Lime [mailto:sdlime at gmail.com] > Sent: Wednesday, September 28, 2011 11:27 PM > To: Asad Ullah; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Parameter substitution problem > > What happens if you quote the variable in the CGI call, that is: > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > amsreDate + ".png'" > > Note the single quotes in the DATA value... I'll try to whip up local test case. > > Steve > > On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah wrote: >> Steve, >> >> DATA in the URL has quotes as: >> >> "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ >> amsreDate + ".png" >> >> I unquoted the value in mapfile but there was no error. Any more suggestion? >> >> >> >> Thanks, >> >> >> >> Asad >> >> >> >> >> >> From: Steve Lime [mailto:sdlime at gmail.com] >> Sent: Friday, September 23, 2011 4:55 AM >> To: Asad Ullah >> Cc: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Parameter substitution problem >> >> >> >> My guess is the validation is correct but the syntax of the URL parameter is >> is wrong in that the value passed for DATA is not quoted. If you unquote the >> default value in your mapfile does that result in a error? That would be an >> easy way to test the need for quotes. >> >> One last idea, while map_layer... should work, try map.layer... instead as >> you variable name. >> >> If you're really are just replacing the date part you could do that by doing >> a runtime sub... >> >> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" >> VALIDATION >> date 'regex' >> END >> >> And then you pass date as a CGI variable. >> >> Steve >> >> On Thursday, September 22, 2011, Asad Ullah >> wrote: >>> List, >>> I am trying to substitute DATA parameter in my mapfile with a call from >>> Openlayers as follow: >>> >>> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png" >>> >>> The mapfile is: >>> >>> LAYER >>> NAME "OMI_CP" >>> TYPE RASTER >>> STATUS DEFAULT >>> OFFSITE 0 0 0 >>> PROJECTION >>> "init=epsg:4326" >>> END >>> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" >>> VALIDATION >>> 'DATA' '^OMI_.*\.png$' >>> END >>> >>> The call should change the date part (20110922) of the png filename but it >>> is not doing it. Can anyone point to what I am doing wrong here? >>> >>> Thanks, >>> >>> Asad >>> > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From pschweitzer at usgs.gov Thu Sep 29 07:16:32 2011 From: pschweitzer at usgs.gov (Peter N. Schweitzer) Date: Thu, 29 Sep 2011 10:16:32 -0400 Subject: [mapserver-users] minscaledenom puzzle, Mapserver 6.0.1 In-Reply-To: References: <4E82384B.2050308@usgs.gov> Message-ID: <4E847DC0.5010504@usgs.gov> Thanks Thomas and Steve! Thomas is right that I needed a real symbol and not "symbol 0" within the pixel-sized class. I was confused by the docs under class:symbol, which says "Default is 0, which results in a single pixel, ..." Is that part now out of date? But I like Steve's suggestion that using two layer definitions and setting the scale denominator for the entire layer in each case might save time that mapserver would have spent deciding how to draw each point's symbol. Of course the most important optimization I can make is the one that I have not yet learned to implement--tiling. But I want to get the basics done as well as I can first. I appreciate being pointed to "group"--this is something I had not learned about before, perhaps because I had not seen its practical use until now. Works very nicely. I don't know how to answer the question "what renderer are you using" beyond doing mapserv -v; its output is MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE and in my openlayers code that calls this layer I'm not specifying an image format. So I assume that mapserv is falling into a default that is based on my compilation options. Based on the docs, it looks like I'm defaulting to AGG for png images (which my openlayers is requesting by default). My map now (at version 6) appears "fuzzier" than it did at version 5. Perhaps this renderer does more anti-aliasing? Anyway thanks for your help. I will continue to explore. Peter On 09/29/2011 12:02 AM, Steve Lime wrote: > Hmmm... What if you use one layer with the various class/expressions > and MAXSCALEDENOM set at the layer level for > all the various squares and then a second layer with just one class > for the pixels with MINSCALEDENOM set. I typically > use layer scales far more than class scale and that setup would > perform much better than what you have since there would > be no expressions or scale computations in the scale> 7000000 case. E.g.: > > LAYER > NAME 'sites_high' > GROUP 'sites' > MAXSCALE 7000000 > ...multi-class... > END > LAYER > NAME 'sites_low' > GROUP 'sites' > MINSCALE 7000000 > ...one class... > END > > If the second layer indeed renders then it's a class handling issue. > If the second layer (with pixels) doesn't render then > it's a drawing issue. What backend is used, GD or AGG? On 09/28/2011 01:53 PM, thomas bonfort wrote: > You have to define a valid ellipse type symbol and reference it in the classes/styles where you want the circles to appear. > On Tue, Sep 27, 2011 at 3:55 PM, Peter N. Schweitzer > wrote: >> Surely I have misunderstood minscaledenom or otherwise have misused it. >> >> I just switched over to Mapserver 6.0.1 (Linux, CentOS, data in >> PostgreSQL+PostGIS) >> >> The web page is http://mrdata.usgs.gov/mineral-resources/mrds-us.html >> Feature type is point. The classes from the map file are these: >> >> labelitem "site_name" >> labelmaxscaledenom 250000 >> classitem "dev_stat" >> class >> maxscaledenom 7000000 >> expression ('[dev_stat]' == 'Producer' or '[dev_stat]' == 'Past >> Producer') >> name "Mine, past or present producer" >> color 160 0 0 >> symbol "mine" >> size 5 >> label >> color 0 0 0 >> size 10 >> type truetype >> font arial >> position cr >> offset 4 4 >> end >> end >> class >> maxscaledenom 7000000 >> expression ('[dev_stat]' == 'Prospect' or '[dev_stat]' == 'Occurrence') >> name "Prospect or occurrence" >> color 0 160 0 >> symbol "opensquare" >> size 5 >> end >> class >> maxscaledenom 7000000 >> expression ('[dev_stat]' == 'Plant') >> name "Processing plant" >> color 0 0 160 >> symbol "mine" >> size 6 >> label >> color 0 0 0 >> size 10 >> type truetype >> font arial >> position cr >> offset 4 4 >> end >> end >> class >> maxscaledenom 7000000 >> expression ('[dev_stat]' == 'Unknown') >> name "Unknown" >> color 0 0 0 >> symbol "occurrence" >> size 6 >> end >> class >> minscaledenom 7000000 >> color 160 0 0 >> symbol 0 >> end >> >> Under mapserver 5.6.7, this generated red pixels for every point when >> the map is zoomed out; those are replaced by the square symbols when >> the map is zoomed in. >> >> But under 6.0.1, I am not getting the 1-pixel symbols when zoomed out. >> I assumed that the last class defined above would apply when the scale >> is coarser than 1:7M. >> >> Here is the OpenLayers command that loads this layer: >> >> var wms = new OpenLayers.Layer.WMS( >> "Mineral Resources", >> "http://mrdata.usgs.gov/cgi-bin/mapserv?", >> { >> map: 'mrds.map', >> transparent: 'true', >> layers: 'mrds' >> }, >> { >> singleTile: 'true', >> ratio: 1 >> } >> ); >> >> Would some modification of my map file or my OpenLayers javascript >> bring back my little red pixels? >> >> Thanks for any help you might offer. -- Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 FAX: (703) 648-6252 email: pschweitzer at usgs.gov From Bob.Basques at ci.stpaul.mn.us Thu Sep 29 07:23:23 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Thu, 29 Sep 2011 09:23:23 -0500 Subject: [mapserver-users] Using a Symbol instead of text for a label In-Reply-To: References: Message-ID: <4E84390B020000A80002E88F@heckle> Matt, Interesting problem. My gut solution would be to build (or find) a TTF font of the symbols you want to display, and simply use this font to label, just like text, only via the ttf symbols instead. You would then be able to group the symbols, even label with multiple rows via a WRAP parameter. Each Symbol, would become a single character in the label. Might make the label assembly into a chore. But it sounds like it's gets you what you are looking for. If you have symbols that are multi-colored, never fear (with even more work) you can stack the symbols on top of each other to achieve most desired effects. bobb >>> Matt McClelland wrote: Hi I have a bunch of symbols that overlap on a map. EG at a park where I want to show an symbol for playground, toilet and picnic tables. The data for each of these items are individual point data items. I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a group OR Use the main symbol like a label. So that I could have a dot where the play equipment is, then nearby have the symbol for the play equipment. This is obviously very easy to do with text, but is it possible with a symbol?? I have tried this CLASS EXPRESSION /play|playground/ NAME "Children's Playground" STYLE SYMBOL 'waypoint' color 255 0 0 SIZE 5 END LABEL STYLE SYMBOL '/var/www/osm/kml/icons/play.png' Size 10 END ...text styleing info.... END END I get my 'waypoint' dot and the play.png in the same location. I would like the play.png to be positioned AUTO like I can with text. Any ideas?? Thanks Matt :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Thu Sep 29 07:25:57 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 29 Sep 2011 14:25:57 +0000 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: <05CB785138CBDC42B993061A0161A57E04B8262F@stimpy.sigmaspace.local> References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B825F4@stimpy.sigmaspace.local> <6322AF28-CE19-4BA0-8BF6-C6F6E97A2F61@gmail.com> <05CB785138CBDC42B993061A0161A57E04B8262F@stimpy.sigmaspace.local> Message-ID: <84446DEF76453C439E9E97E438E13A630250F6@suutari.haapa.mmm.fi> Hi, A couple of days ago somebody seemed to have troubles with imagery because of too long paths or filenames. Could you try to shorten your filename by removing some normal characters from it and see it starts to work at some limit? -Jukka Rahkonen- Asad Ullah wrote: > > I don't think (-) is a problem because I have tried changing > (-) with (_) in the file name without success. > > > > -----Original Message----- > From: Mr. Puneet Kishor [mailto:punk.kish at gmail.com] > Sent: Thursday, September 29, 2011 9:47 AM > To: Asad Ullah > Cc: Steve Lime; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Parameter substitution problem > > > On Sep 29, 2011, at 8:22 AM, Asad Ullah wrote: > > > Steve, > > Thanks very much for your help. Adding quote did not change > anything. However, if I change file name from, for example, > "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" to " > OMI_OMCLDRRclpWMSNRT_20110922.png" and do the substitution as: > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI_OMCLDRRclpWMS NRT_"+ amsreDate + ".png" > > > > It would work. Where the validation block is same as: > > > > VALIDATION > > 'DATA' '^OMI_.*\.png$' > > END > > > > So, do you think the problem is with validation definition? > > > > Could it be the dashes (-) in the problematic file name? > > > > > > > Thanks, > > > > Asad > > > > > > -----Original Message----- > > From: Steve Lime [mailto:sdlime at gmail.com] > > Sent: Wednesday, September 28, 2011 11:27 PM > > To: Asad Ullah; mapserver-users at lists.osgeo.org > > Subject: Re: [mapserver-users] Parameter substitution problem > > > > What happens if you quote the variable in the CGI call, that is: > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCL DRRclpWMSNRT_"+ > > amsreDate + ".png'" > > > > Note the single quotes in the DATA value... I'll try to > whip up local test case. > > > > Steve > > > > On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah > wrote: > >> Steve, > >> > >> DATA in the URL has quotes as: > >> > >> > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLD RRclpWMSNRT_"+ > >> amsreDate + ".png" > >> > >> I unquoted the value in mapfile but there was no error. > Any more suggestion? > >> > >> > >> > >> Thanks, > >> > >> > >> > >> Asad > >> > >> > >> > >> > >> > >> From: Steve Lime [mailto:sdlime at gmail.com] > >> Sent: Friday, September 23, 2011 4:55 AM > >> To: Asad Ullah > >> Cc: mapserver-users at lists.osgeo.org > >> Subject: Re: [mapserver-users] Parameter substitution problem > >> > >> > >> > >> My guess is the validation is correct but the syntax of > the URL parameter is > >> is wrong in that the value passed for DATA is not quoted. > If you unquote the > >> default value in your mapfile does that result in a error? > That would be an > >> easy way to test the need for quotes. > >> > >> One last idea, while map_layer... should work, try > map.layer... instead as > >> you variable name. > >> > >> If you're really are just replacing the date part you > could do that by doing > >> a runtime sub... > >> > >> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" > >> VALIDATION > >> date 'regex' > >> END > >> > >> And then you pass date as a CGI variable. > >> > >> Steve > >> > >> On Thursday, September 22, 2011, Asad Ullah > > >> wrote: > >>> List, > >>> I am trying to substitute DATA parameter in my mapfile > with a call from > >>> Openlayers as follow: > >>> > >>> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > amsreDate + ".png" > >>> > >>> The mapfile is: > >>> > >>> LAYER > >>> NAME "OMI_CP" > >>> TYPE RASTER > >>> STATUS DEFAULT > >>> OFFSITE 0 0 0 > >>> PROJECTION > >>> "init=epsg:4326" > >>> END > >>> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" > >>> VALIDATION > >>> 'DATA' '^OMI_.*\.png$' > >>> END > >>> > >>> The call should change the date part (20110922) of the > png filename but it > >>> is not doing it. Can anyone point to what I am doing wrong here? > >>> > >>> Thanks, > >>> > >>> Asad > >>> > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From thomas.bonfort at gmail.com Thu Sep 29 07:26:16 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 29 Sep 2011 16:26:16 +0200 Subject: [mapserver-users] minscaledenom puzzle, Mapserver 6.0.1 In-Reply-To: <4E847DC0.5010504@usgs.gov> References: <4E82384B.2050308@usgs.gov> <4E847DC0.5010504@usgs.gov> Message-ID: > Thomas is right that I needed a real symbol and not "symbol 0" > within the pixel-sized class. ?I was confused by the docs under > class:symbol, which says "Default is 0, which results in a single > pixel, ..." ?Is that part now out of date? Yes, it's out of date. The default symbol at index 0 should probably be updated so it becomes a circle symbol. -- thomas From brfr at metrico.lu Thu Sep 29 07:33:12 2011 From: brfr at metrico.lu (Frank Broniewski) Date: Thu, 29 Sep 2011 16:33:12 +0200 Subject: [mapserver-users] How to remove the label of a class with mapscript Message-ID: <4E8481A8.1060203@metrico.lu> Hi, how can I remove the label of a class with mapscript, or disable labeling? Doing this by hand, I would simply delete the label definition part in the mapfile but apparently this is not possible with mapscript since the label property is immutable .. Thanks for any hints Frank -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From thomas.bonfort at gmail.com Thu Sep 29 07:35:56 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 29 Sep 2011 16:35:56 +0200 Subject: [mapserver-users] How to remove the label of a class with mapscript In-Reply-To: <4E8481A8.1060203@metrico.lu> References: <4E8481A8.1060203@metrico.lu> Message-ID: remove the layer->labelitem and label->text -- thomas On Thu, Sep 29, 2011 at 16:33, Frank Broniewski wrote: > Hi, > > how can I remove the label of a class with mapscript, or disable labeling? > Doing this by hand, I would simply delete the label definition part in the > mapfile but apparently this is not possible with mapscript since the label > property is immutable .. > Thanks for any hints > > Frank > -- > Frank BRONIEWSKI > > METRICO s.? r.l. > g?om?tres > technologies d'information g?ographique > rue des Romains 36 > L-5433 NIEDERDONVEN > > t?l.: +352 26 74 94 - 28 > fax.: +352 26 74 94 99 > http://www.metrico.lu > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Asad.Ullah at sigmaspace.com Thu Sep 29 07:30:55 2011 From: Asad.Ullah at sigmaspace.com (Asad Ullah) Date: Thu, 29 Sep 2011 14:30:55 +0000 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: <84446DEF76453C439E9E97E438E13A630250F6@suutari.haapa.mmm.fi> References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B825F4@stimpy.sigmaspace.local> <6322AF28-CE19-4BA0-8BF6-C6F6E97A2F61@gmail.com> <05CB785138CBDC42B993061A0161A57E04B8262F@stimpy.sigmaspace.local> <84446DEF76453C439E9E97E438E13A630250F6@suutari.haapa.mmm.fi> Message-ID: <05CB785138CBDC42B993061A0161A57E04B82683@stimpy.sigmaspace.local> Thanks Jukka, Shortening file names worked. Asad -----Original Message----- From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] Sent: Thursday, September 29, 2011 10:26 AM To: Asad Ullah; 'Mr. Puneet Kishor' Cc: 'mapserver-users at lists.osgeo.org' Subject: Re: [mapserver-users] Parameter substitution problem Hi, A couple of days ago somebody seemed to have troubles with imagery because of too long paths or filenames. Could you try to shorten your filename by removing some normal characters from it and see it starts to work at some limit? -Jukka Rahkonen- Asad Ullah wrote: > > I don't think (-) is a problem because I have tried changing > (-) with (_) in the file name without success. > > > > -----Original Message----- > From: Mr. Puneet Kishor [mailto:punk.kish at gmail.com] > Sent: Thursday, September 29, 2011 9:47 AM > To: Asad Ullah > Cc: Steve Lime; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Parameter substitution problem > > > On Sep 29, 2011, at 8:22 AM, Asad Ullah wrote: > > > Steve, > > Thanks very much for your help. Adding quote did not change > anything. However, if I change file name from, for example, > "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" to " > OMI_OMCLDRRclpWMSNRT_20110922.png" and do the substitution as: > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI_OMCLDRRclpWMS NRT_"+ amsreDate + ".png" > > > > It would work. Where the validation block is same as: > > > > VALIDATION > > 'DATA' '^OMI_.*\.png$' > > END > > > > So, do you think the problem is with validation definition? > > > > Could it be the dashes (-) in the problematic file name? > > > > > > > Thanks, > > > > Asad > > > > > > -----Original Message----- > > From: Steve Lime [mailto:sdlime at gmail.com] > > Sent: Wednesday, September 28, 2011 11:27 PM > > To: Asad Ullah; mapserver-users at lists.osgeo.org > > Subject: Re: [mapserver-users] Parameter substitution problem > > > > What happens if you quote the variable in the CGI call, that is: > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCL DRRclpWMSNRT_"+ > > amsreDate + ".png'" > > > > Note the single quotes in the DATA value... I'll try to > whip up local test case. > > > > Steve > > > > On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah > wrote: > >> Steve, > >> > >> DATA in the URL has quotes as: > >> > >> > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLD RRclpWMSNRT_"+ > >> amsreDate + ".png" > >> > >> I unquoted the value in mapfile but there was no error. > Any more suggestion? > >> > >> > >> > >> Thanks, > >> > >> > >> > >> Asad > >> > >> > >> > >> > >> > >> From: Steve Lime [mailto:sdlime at gmail.com] > >> Sent: Friday, September 23, 2011 4:55 AM > >> To: Asad Ullah > >> Cc: mapserver-users at lists.osgeo.org > >> Subject: Re: [mapserver-users] Parameter substitution problem > >> > >> > >> > >> My guess is the validation is correct but the syntax of > the URL parameter is > >> is wrong in that the value passed for DATA is not quoted. > If you unquote the > >> default value in your mapfile does that result in a error? > That would be an > >> easy way to test the need for quotes. > >> > >> One last idea, while map_layer... should work, try > map.layer... instead as > >> you variable name. > >> > >> If you're really are just replacing the date part you > could do that by doing > >> a runtime sub... > >> > >> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" > >> VALIDATION > >> date 'regex' > >> END > >> > >> And then you pass date as a CGI variable. > >> > >> Steve > >> > >> On Thursday, September 22, 2011, Asad Ullah > > >> wrote: > >>> List, > >>> I am trying to substitute DATA parameter in my mapfile > with a call from > >>> Openlayers as follow: > >>> > >>> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > amsreDate + ".png" > >>> > >>> The mapfile is: > >>> > >>> LAYER > >>> NAME "OMI_CP" > >>> TYPE RASTER > >>> STATUS DEFAULT > >>> OFFSITE 0 0 0 > >>> PROJECTION > >>> "init=epsg:4326" > >>> END > >>> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" > >>> VALIDATION > >>> 'DATA' '^OMI_.*\.png$' > >>> END > >>> > >>> The call should change the date part (20110922) of the > png filename but it > >>> is not doing it. Can anyone point to what I am doing wrong here? > >>> > >>> Thanks, > >>> > >>> Asad > >>> > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Jukka.Rahkonen at mmmtike.fi Thu Sep 29 07:47:13 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 29 Sep 2011 14:47:13 +0000 Subject: [mapserver-users] Parameter substitution problem In-Reply-To: <05CB785138CBDC42B993061A0161A57E04B82683@stimpy.sigmaspace.local> References: <05CB785138CBDC42B993061A0161A57E04B7FD9A@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B81A01@stimpy.sigmaspace.local> <05CB785138CBDC42B993061A0161A57E04B825F4@stimpy.sigmaspace.local> <6322AF28-CE19-4BA0-8BF6-C6F6E97A2F61@gmail.com> <05CB785138CBDC42B993061A0161A57E04B8262F@stimpy.sigmaspace.local> <84446DEF76453C439E9E97E438E13A630250F6@suutari.haapa.mmm.fi> <05CB785138CBDC42B993061A0161A57E04B82683@stimpy.sigmaspace.local> Message-ID: <84446DEF76453C439E9E97E438E13A63025149@suutari.haapa.mmm.fi> Hi, Tell what was the character count when the file name was accepted so the developers can start thinking if it is a bug or just something that should be mentioned in the documents. It may be that version 5.x did accept longer file names. -Jukka Rahkonen- Asad Ullah wrote: > > Thanks Jukka, Shortening file names worked. > > Asad > > > -----Original Message----- > From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] > Sent: Thursday, September 29, 2011 10:26 AM > To: Asad Ullah; 'Mr. Puneet Kishor' > Cc: 'mapserver-users at lists.osgeo.org' > Subject: Re: [mapserver-users] Parameter substitution problem > > Hi, > > A couple of days ago somebody seemed to have troubles with > imagery because of too long paths or filenames. Could you try > to shorten your filename by removing some normal characters > from it and see it starts to work at some limit? > > -Jukka Rahkonen- > > Asad Ullah wrote: > > > > > I don't think (-) is a problem because I have tried changing > > (-) with (_) in the file name without success. > > > > > > > > -----Original Message----- > > From: Mr. Puneet Kishor [mailto:punk.kish at gmail.com] > > Sent: Thursday, September 29, 2011 9:47 AM > > To: Asad Ullah > > Cc: Steve Lime; mapserver-users at lists.osgeo.org > > Subject: Re: [mapserver-users] Parameter substitution problem > > > > > > On Sep 29, 2011, at 8:22 AM, Asad Ullah wrote: > > > > > Steve, > > > Thanks very much for your help. Adding quote did not change > > anything. However, if I change file name from, for example, > > "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" to " > > OMI_OMCLDRRclpWMSNRT_20110922.png" and do the substitution as: > > > > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI_OMCLDRRclpWMS > NRT_"+ amsreDate + ".png" > > > > > > It would work. Where the validation block is same as: > > > > > > VALIDATION > > > 'DATA' '^OMI_.*\.png$' > > > END > > > > > > So, do you think the problem is with validation definition? > > > > > > > > Could it be the dashes (-) in the problematic file name? > > > > > > > > > > > > Thanks, > > > > > > Asad > > > > > > > > > -----Original Message----- > > > From: Steve Lime [mailto:sdlime at gmail.com] > > > Sent: Wednesday, September 28, 2011 11:27 PM > > > To: Asad Ullah; mapserver-users at lists.osgeo.org > > > Subject: Re: [mapserver-users] Parameter substitution problem > > > > > > What happens if you quote the variable in the CGI call, that is: > > > > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCL > DRRclpWMSNRT_"+ > > > amsreDate + ".png'" > > > > > > Note the single quotes in the DATA value... I'll try to > > whip up local test case. > > > > > > Steve > > > > > > On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah > > wrote: > > >> Steve, > > >> > > >> DATA in the URL has quotes as: > > >> > > >> > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLD > RRclpWMSNRT_"+ > > >> amsreDate + ".png" > > >> > > >> I unquoted the value in mapfile but there was no error. > > Any more suggestion? > > >> > > >> > > >> > > >> Thanks, > > >> > > >> > > >> > > >> Asad > > >> > > >> > > >> > > >> > > >> > > >> From: Steve Lime [mailto:sdlime at gmail.com] > > >> Sent: Friday, September 23, 2011 4:55 AM > > >> To: Asad Ullah > > >> Cc: mapserver-users at lists.osgeo.org > > >> Subject: Re: [mapserver-users] Parameter substitution problem > > >> > > >> > > >> > > >> My guess is the validation is correct but the syntax of > > the URL parameter is > > >> is wrong in that the value passed for DATA is not quoted. > > If you unquote the > > >> default value in your mapfile does that result in a error? > > That would be an > > >> easy way to test the need for quotes. > > >> > > >> One last idea, while map_layer... should work, try > > map.layer... instead as > > >> you variable name. > > >> > > >> If you're really are just replacing the date part you > > could do that by doing > > >> a runtime sub... > > >> > > >> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" > > >> VALIDATION > > >> date 'regex' > > >> END > > >> > > >> And then you pass date as a CGI variable. > > >> > > >> Steve > > >> > > >> On Thursday, September 22, 2011, Asad Ullah > > > > >> wrote: > > >>> List, > > >>> I am trying to substitute DATA parameter in my mapfile > > with a call from > > >>> Openlayers as follow: > > >>> > > >>> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > > amsreDate + ".png" > > >>> > > >>> The mapfile is: > > >>> > > >>> LAYER > > >>> NAME "OMI_CP" > > >>> TYPE RASTER > > >>> STATUS DEFAULT > > >>> OFFSITE 0 0 0 > > >>> PROJECTION > > >>> "init=epsg:4326" > > >>> END > > >>> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" > > >>> VALIDATION > > >>> 'DATA' '^OMI_.*\.png$' > > >>> END > > >>> > > >>> The call should change the date part (20110922) of the > > png filename but it > > >>> is not doing it. Can anyone point to what I am doing wrong here? > > >>> > > >>> Thanks, > > >>> > > >>> Asad > > >>> > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > From brfr at metrico.lu Thu Sep 29 07:50:30 2011 From: brfr at metrico.lu (Frank Broniewski) Date: Thu, 29 Sep 2011 16:50:30 +0200 Subject: [mapserver-users] How to remove the label of a class with mapscript In-Reply-To: References: <4E8481A8.1060203@metrico.lu> Message-ID: <4E8485B6.5010206@metrico.lu> Evidently *facepalm*, thanks. sometimes I don't see the forest because of so many trees :D (or whatever one says in english when you don't see the evident) Frank Am 29.09.2011 16:35, schrieb thomas bonfort: > remove the layer->labelitem and label->text > > -- > thomas > > On Thu, Sep 29, 2011 at 16:33, Frank Broniewski wrote: >> Hi, >> >> how can I remove the label of a class with mapscript, or disable labeling? >> Doing this by hand, I would simply delete the label definition part in the >> mapfile but apparently this is not possible with mapscript since the label >> property is immutable .. >> Thanks for any hints >> >> Frank >> -- >> Frank BRONIEWSKI >> >> METRICO s.? r.l. >> g?om?tres >> technologies d'information g?ographique >> rue des Romains 36 >> L-5433 NIEDERDONVEN >> >> t?l.: +352 26 74 94 - 28 >> fax.: +352 26 74 94 99 >> http://www.metrico.lu >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From dmorissette at mapgears.com Thu Sep 29 08:54:17 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 29 Sep 2011 11:54:17 -0400 Subject: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 In-Reply-To: <84446DEF76453C439E9E97E438E13A63024E01@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63024B4A@suutari.haapa.mmm.fi>, <84446DEF76453C439E9E97E438E13A63024E01@suutari.haapa.mmm.fi> Message-ID: <4E8494A9.5070102@mapgears.com> On 11-09-28 02:57 PM, Rahkonen Jukka wrote: > So gdalinfo with Upper Left ( 0.0, 0.0) etc. means that gdal cannot get the correct georeferencing for your images. They are placed at coordinates (0,0) instead and then the WMS BBOX does not intersect the image area and server is sending a white map for you. Your analysis is correct, the invalid extents returned by GDAL are likely the source of the problem for MapServer. I am checking with Simon off-list to try to understand why this is happening. > And "ERROR 1: Maximum number of characters allowed reached." suggests that for some part of the system the file path is too long. I have never seen such an error but I would still take it seriously and have a try placing the images into a a place like /mnt/pathtest/image_01.ecw > I did a quick grep on the GDAL source, and it seems that this error message would be returned by the CPLReadLine2L() function, so I'd think it is unlikely to be related to the length of the file path. -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From hawk at aamdal.com Thu Sep 29 09:07:55 2011 From: hawk at aamdal.com (Hawk AA) Date: Thu, 29 Sep 2011 18:07:55 +0200 Subject: [mapserver-users] WFS Typename behavior Message-ID: <000901cc7ec1$f3531cc0$d9f95640$@aamdal.com> Hi, The results are not truncated by my maxFeatures, I use 100 as maxFeatures, and I request for about 20 items. As I am a little tired of the WFS interface, i made a PHP mapscript one instead. There i loop through all layers, and collect the results. I've had other WFS issues since i upgraded to mapserver 6.0 , like that I can't query by FeatureID or filter. I've done the necessary upgrade steps posted in the documentation, but it's still no good. That's why I have started using MapScript. Thank you. Hawk Message: 3 Date: Tue, 27 Sep 2011 16:33:04 +0200 From: Havard Tveite Subject: Re: [mapserver-users] WFS Typename behavior To: mapserver-users at lists.osgeo.org Message-ID: <4E81DEA0.7010103 at umb.no> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed You are right, Jukka. Multiple "typeName"s have been supported by WFS from the start (WFS 1.0.0), through a sequence of "Query"s, each containing a typeName. Sorry about the confusion. Hevard On 9/22/2011 1:35 PM, Rahkonen Jukka wrote: > Hi, > > I can see from the server logs that users of ArcGIS Data Interoperability extension are usually making first request so that all the feature types are listed in&typename and with&maxFeatures=30000. This will lead on our server to output that is truncated at the 30000th feature but it varies a bit on what feature type the limit is achieved. But according to the standard using a list of typenames is OK. TinyOWS does not have problems with such a request > http://188.64.1.61/cgi-bin/tinyows?service=WFS&version=1.0.0&request=GetFeat ure&typename=mml_airport,mml_asemat > > Check if the output is truncated at your maxFeatures. If it is then everything is OK. If maxFeatures is not reached then the result should be the same as when making two separate getFeatures for Traseer and Punkter. Otherwise it looks like a bug. > > -Jukka Rahkonen- > > > >> Havard Tveite wrote: >> Ldhetetty: 22. syyskuuta 2011 9:26 > >> I think that you have to use only one Typename per WFS request. >> >> Hevard >> >> On 9/20/2011 8:09 PM, Hawk AA wrote: >>> Hi, >>> >>> It seems for me that by entering multiple layers in >> Typename, I am not getting the same results. For instance >> would using Typename=Traseer give me all of the geometries in >> the BBOX, but Typename=Traseer, Punkter will give me all in >> Punkter, but only some geometries from Traseer. Is it >> supposed to be that way? Any other way I can query a BBOX on >> multiple layers without running a WFS request per layer? >>> >>> Thanks in advance! >>> >>> Hawk >>> >> >> -- >> Hevard Tveite >> Department of Mathematical Sciences and Technology, UMB >> Drxbakveien 31, POBox 5003, N-1432 Es, NORWAY >> Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Hevard Tveite Department of Mathematical Sciences and Technology, UMB Drxbakveien 31, POBox 5003, N-1432 Es, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From lists at remoteinformation.com.au Thu Sep 29 05:05:24 2011 From: lists at remoteinformation.com.au (Ben Madin) Date: Thu, 29 Sep 2011 20:05:24 +0800 Subject: [mapserver-users] traffic queues visualization In-Reply-To: <20110930160020.378CAE025E3@lists.osgeo.org> References: <20110930160020.378CAE025E3@lists.osgeo.org> Message-ID: <660CBF22-4B12-419E-BB74-1C2FBB087EEB@remoteinformation.com.au> I think a bit more information on the data you have would help? Do you have the locations of the cars, or just a number of cars at an intersection, or a number of cars on any road leading into the intersection? Are you only every talking a couple of cars, or up to hundreds... Are your roads stored as lines, or are you just working with points? I guess I'm saying there are many ways to skin a cat, but it does help to know what a cat looks like first! cheers Ben On 01/10/2011, at 12:00 AM, mapserver-users-request at lists.osgeo.org wrote: > From: knasia > Date: 29 September 2011 4:03:34 PM AWST > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] traffic queues visualization > > > hi, > I have to visualize traffic queues at the crossroads. I have data in > Postgres/PostGIS database. > It would be to the best to show each car separatedly. > > So far I have tried some cases, but none of them come out to be useful. > > The best would be to mark as many arrows as cars, but I don't know how to > mark arrows on the geometry that would be one next to another marked from > the node (crossroad) along the road geometry. > > Can somebody help to do this or find another idea? > > Thank you a lot in advance. > > KN -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at wildwalks.com Thu Sep 29 14:56:13 2011 From: matt at wildwalks.com (Matt McClelland) Date: Fri, 30 Sep 2011 07:56:13 +1000 Subject: [mapserver-users] Using a Symbol instead of text for a label In-Reply-To: <4E84390B020000A80002E88F@heckle> References: <4E84390B020000A80002E88F@heckle> Message-ID: Thanks Bob You are a genius. I started playing with the TTF font idea yesterday, but struggled with the idea because of the lack of colour within the font. I never considered using mapserver to stack the colours, brilliant. I think I will use a mix of Davids suggestions using Cluster function, and this font idea. Is there anyway of getting map server to draw a line between the point on the map and the label whilst using position auto. If I have a fixed position I can include the line as part of my icon. But in Auto position is there a way of drawing such a line? I guess it would be similar to the call out box concept in Google Maps. BTW I came across a few interesting font pages for people looking at a similar solution. http://www.nps.gov/hfc/carto/map-symbols.htm US National Parks fonts, a good mix of general recreation and mapping symbols http://georezo.net/jparis/MI_Enviro/TTFsymbols/ttf4mapping.htm a listing of fonts helpful for mapping. Zip download of the TTF files. The page says that the fonts are are freely available but no idea on the copyright status is on the collection. Thanks again Matt :) On Fri, Sep 30, 2011 at 12:23 AM, Bob Basques wrote: > Matt, > > Interesting problem. My gut solution would be to build (or find) a TTF > font of the symbols you want to display, and simply use this font to label, > just like text, only via the ttf symbols instead. You would then be able to > group the symbols, even label with multiple rows via a WRAP parameter. Each > Symbol, would become a single character in the label. Might make the label > assembly into a chore. But it sounds like it's gets you what you are > looking for. > > If you have symbols that are multi-colored, never fear (with even more > work) you can stack the symbols on top of each other to achieve most desired > effects. > > bobb > > > > >>> Matt McClelland wrote: > > Hi > > I have a bunch of symbols that overlap on a map. EG at a park where I want > to show an symbol for playground, toilet and picnic tables. The data for > each of these items are individual point data items. > > I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a > group > OR > Use the main symbol like a label. So that I could have a dot where the play > equipment is, then nearby have the symbol for the play equipment. This is > obviously very easy to do with text, but is it possible with a symbol?? > > I have tried this > CLASS > EXPRESSION /play|playground/ > NAME "Children's Playground" > STYLE > SYMBOL 'waypoint' > color 255 0 0 > SIZE 5 > END > LABEL > STYLE > SYMBOL '/var/www/osm/kml/icons/play.png' > Size 10 > END > ...text styleing info.... > END > END > > I get my 'waypoint' dot and the play.png in the same location. I would like > the play.png to be positioned AUTO like I can with text. > Any ideas?? > > Thanks > Matt :) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaja0506 at gmail.com Thu Sep 29 17:17:48 2011 From: jaja0506 at gmail.com (jjwang) Date: Thu, 29 Sep 2011 17:17:48 -0700 (PDT) Subject: VS: [mapserver-users] GetFeatureInfo or GetFeature? In-Reply-To: <84446DEF76453C439E9E97E438E13A63024F84@suutari.haapa.mmm.fi> References: <1317277885471-6842879.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A63024F84@suutari.haapa.mmm.fi> Message-ID: <1317341868888-6845908.post@n2.nabble.com> Thank you for your reply Jukka. I found a easy way to do this. I just made the BBOX as one coordinate like (151.17786,-33.89,151.17786,-33.89). And it seems work fine. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-or-GetFeature-tp6842879p6845908.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jachym.cepicky at gmail.com Fri Sep 30 04:12:49 2011 From: jachym.cepicky at gmail.com (Jachym Cepicky) Date: Fri, 30 Sep 2011 13:12:49 +0200 Subject: [mapserver-users] bug in mapscript colorObj ? Message-ID: <4E85A431.7060600@gmail.com> Hi, I try to set transparent color to REFERENCE map, so that the box is outlined-only. According to documentation, i use -1 for indication, that the color should be transparent color = mapscript.colorObj(-1,-1,-1) but this seems to be understood as invalid color, according to #define MS_VALID_COLOR(color) (((color).red==-1 || (color).green==-1 || (color).blue==-1)?MS_FALSE:MS_TRUE) and the box is filled with red color (default value) When I use -255 for the colors triplet, it is converted to positive integer (and so the box is black). When I tried to set alpha directly color.alpha = 0 It did not help Any hint what to do? Is that a bug in mapserver/mapscript ? Jachym P.S. Sorry for cross posting, not sure, where to find the right answer. From Bob.Bistrais at maine.gov Fri Sep 30 06:51:41 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Fri, 30 Sep 2011 09:51:41 -0400 Subject: [mapserver-users] Need help with Expression Message-ID: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> I'm trying to create an Expression to select features in a Class, MapServer 6.0.1. I want to do something such as a wildcard or a Like statement, to select records with certain item values. Something similar to this: EXPRESSION ('[RDNAME]' = 'Main%' ) Or perhaps EXPRESSION ('[RDNAME]' like 'Main%') -neither of these formats worked for me. I checked the MS documentation under Expression, but could not find the solution. Can anyone shed some light on this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Fri Sep 30 07:02:50 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Fri, 30 Sep 2011 16:02:50 +0200 Subject: [mapserver-users] Need help with Expression In-Reply-To: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: You can use a regular expression CLASSITEM RDNAME CLASS EXPRESSION /^Main/ ... END -- thomas On Fri, Sep 30, 2011 at 15:51, Bistrais, Bob wrote: > I?m trying to create an Expression to select features in a Class, MapServer > 6.0.1.? I want to do something such as a wildcard or a Like statement, to > select records with certain item values.? Something similar to this: > > > > EXPRESSION (?[RDNAME]? = ?Main%? ) > > > > Or perhaps > > > > EXPRESSION (?[RDNAME]? like ?Main%?) > > > > -neither of these formats worked for me.? I checked the MS documentation > under Expression, but could not find the solution.? Can anyone shed some > light on this? > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From flavio at tydac.ch Fri Sep 30 07:06:33 2011 From: flavio at tydac.ch (Flavio Hendry) Date: Fri, 30 Sep 2011 16:06:33 +0200 Subject: [mapserver-users] Need help with Expression In-Reply-To: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: <4E85CCE9.3030400@tydac.ch> Hi Bob regexp would do the job: CLASSITEM "RDNAME" ... EXPRESSION /Main/ Mit freundlichem Gruss / Best regards Flavio Hendry ---------------------------------------------------------------- TYDAC Inc. - http://www.tydac.ch Web Mapping - http://www.mapserver.ch Swiss Maps - http://www.mapplus.ch ---------------------------------------------------------------- ############ Mit freundlichen Gruessen / Kind Regards ############ Flavio Hendry, CEO - mailto:flavio at tydac.ch ############ TYDAC AG - http://www.tydac.ch #### #### Geographic Information Solutions #### #### Optingenstrasse 27 -- CH-3013 Bern ############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860 ---------------------------------------------------------------- Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27 ---------------------------------------------------------------- From havard.tveite at umb.no Fri Sep 30 07:30:05 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Fri, 30 Sep 2011 16:30:05 +0200 Subject: [mapserver-users] Need help with Expression In-Reply-To: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> References: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> Message-ID: <4E85D26D.7050802@umb.no> Have you seen: http://www.mapserver.org/mapfile/expressions.html Feedback on the contents of that page would be appreciated. H?vard On 9/30/2011 3:51 PM, Bistrais, Bob wrote: > I?m trying to create an Expression to select features in a Class, MapServer 6.0.1. I want to do something such as a wildcard or a Like statement, to select records with certain item values. Something similar to this: > > EXPRESSION (?[RDNAME]? = ?Main%? ) > > Or perhaps > > EXPRESSION (?[RDNAME]? like ?Main%?) > > -neither of these formats worked for me. I checked the MS documentation under Expression, but could not find the solution. Can anyone shed some light on this? > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From woodbri at swoodbridge.com Fri Sep 30 07:34:52 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Fri, 30 Sep 2011 10:34:52 -0400 Subject: [mapserver-users] Need help with Expression In-Reply-To: <4E85D26D.7050802@umb.no> References: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4E85D26D.7050802@umb.no> Message-ID: <4E85D38C.1050002@swoodbridge.com> On 9/30/2011 10:30 AM, Havard Tveite wrote: > Have you seen: > > http://www.mapserver.org/mapfile/expressions.html > > Feedback on the contents of that page would be appreciated. > > H?vard > > On 9/30/2011 3:51 PM, Bistrais, Bob wrote: >> I?m trying to create an Expression to select features in a Class, >> MapServer 6.0.1. I want to do something such as a wildcard or a Like >> statement, to select records with certain item values. Something >> similar to this: >> >> EXPRESSION (?[RDNAME]? = ?Main%? ) >> >> Or perhaps >> >> EXPRESSION (?[RDNAME]? like ?Main%?) >> >> -neither of these formats worked for me. I checked the MS >> documentation under Expression, but could not find the solution. Can >> anyone shed some light on this? >> > H?vard, You can use a regular expression like: CLASSITEM "RDNAME" EXPRESSION /^Main\.*/ -Steve W From Bob.Bistrais at maine.gov Fri Sep 30 08:44:42 2011 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Fri, 30 Sep 2011 11:44:42 -0400 Subject: [mapserver-users] Need help with Expression In-Reply-To: <4E85D38C.1050002@swoodbridge.com> References: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us><4E85D26D.7050802@umb.no> <4E85D38C.1050002@swoodbridge.com> Message-ID: <4EFF8BB964547748A07CA32961810C041C256679@SOM-TEAQASMAIL1.som.w2k.state.me.us> Thanks guys, As it turns out, it was a more complex problem than originally thought, involving two datasets. It turned out to be easier and quicker to simply make a new shapefile containing the few routes that I needed. -----Original Message----- From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com] Sent: Friday, September 30, 2011 10:35 AM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Need help with Expression On 9/30/2011 10:30 AM, Havard Tveite wrote: > Have you seen: > > http://www.mapserver.org/mapfile/expressions.html > > Feedback on the contents of that page would be appreciated. > > H?vard > > On 9/30/2011 3:51 PM, Bistrais, Bob wrote: >> I'm trying to create an Expression to select features in a Class, >> MapServer 6.0.1. I want to do something such as a wildcard or a Like >> statement, to select records with certain item values. Something >> similar to this: >> >> EXPRESSION ('[RDNAME]' = 'Main%' ) >> >> Or perhaps >> >> EXPRESSION ('[RDNAME]' like 'Main%') >> >> -neither of these formats worked for me. I checked the MS >> documentation under Expression, but could not find the solution. Can >> anyone shed some light on this? >> > H?vard, You can use a regular expression like: CLASSITEM "RDNAME" EXPRESSION /^Main\.*/ -Steve W From mercier.simon at gmail.com Fri Sep 30 11:57:10 2011 From: mercier.simon at gmail.com (Simon Mercier) Date: Fri, 30 Sep 2011 14:57:10 -0400 Subject: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1 In-Reply-To: <4E8494A9.5070102@mapgears.com> References: <84446DEF76453C439E9E97E438E13A630249A3@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63024B4A@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63024E01@suutari.haapa.mmm.fi> <4E8494A9.5070102@mapgears.com> Message-ID: Hi Jukka, Daniel find it :-) This was a problem with the spatial reference file of ECW format. This problem was already identified and well fixed in GDAL 1.8.1. http://trac.osgeo.org/gdal/ticket/4131 thank's a lot simon mercier 2011/9/29 Daniel Morissette > On 11-09-28 02:57 PM, Rahkonen Jukka wrote: > >> So gdalinfo with Upper Left ( 0.0, 0.0) etc. means that gdal cannot >> get the correct georeferencing for your images. They are placed at >> coordinates (0,0) instead and then the WMS BBOX does not intersect the image >> area and server is sending a white map for you. >> > > Your analysis is correct, the invalid extents returned by GDAL are likely > the source of the problem for MapServer. I am checking with Simon off-list > to try to understand why this is happening. > > > > And "ERROR 1: Maximum number of characters allowed reached." suggests that >> for some part of the system the file path is too long. I have never seen >> such an error but I would still take it seriously and have a try placing the >> images into a a place like /mnt/pathtest/image_01.ecw >> >> > I did a quick grep on the GDAL source, and it seems that this error message > would be returned by the CPLReadLine2L() function, so I'd think it is > unlikely to be related to the length of the file path. > > > -- > Daniel Morissette > http://www.mapgears.com/ > Provider of Professional MapServer Support since 2000 > > ______________________________**_________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.**org > http://lists.osgeo.org/**mailman/listinfo/mapserver-**users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From havard.tveite at umb.no Fri Sep 30 13:47:33 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Fri, 30 Sep 2011 22:47:33 +0200 Subject: [mapserver-users] Need help with Expression In-Reply-To: <4E85D38C.1050002@swoodbridge.com> References: <4EFF8BB964547748A07CA32961810C041C25657E@SOM-TEAQASMAIL1.som.w2k.state.me.us> <4E85D26D.7050802@umb.no> <4E85D38C.1050002@swoodbridge.com> Message-ID: <4E862AE5.1000001@umb.no> Thanks, the example has been added. Good idea to show also this alternative (it was only mentioned in the introduction to the regexp section). H?vard On 30/09/11 16:34, Stephen Woodbridge wrote: > On 9/30/2011 10:30 AM, Havard Tveite wrote: >> Have you seen: >> >> http://www.mapserver.org/mapfile/expressions.html >> >> Feedback on the contents of that page would be appreciated. >> >> H?vard >> >> On 9/30/2011 3:51 PM, Bistrais, Bob wrote: >>> I?m trying to create an Expression to select features in a Class, >>> MapServer 6.0.1. I want to do something such as a wildcard or a Like >>> statement, to select records with certain item values. Something >>> similar to this: >>> >>> EXPRESSION (?[RDNAME]? = ?Main%? ) >>> >>> Or perhaps >>> >>> EXPRESSION (?[RDNAME]? like ?Main%?) >>> >>> -neither of these formats worked for me. I checked the MS >>> documentation under Expression, but could not find the solution. Can >>> anyone shed some light on this? >>> >> > > H?vard, > > You can use a regular expression like: > > CLASSITEM "RDNAME" > EXPRESSION /^Main\.*/ > > -Steve W From fx.gamoy at geomatika.fr Wed Sep 28 12:55:09 2011 From: fx.gamoy at geomatika.fr (fx gamoy) Date: Wed, 28 Sep 2011 21:55:09 +0200 Subject: [mapserver-users] html legend template Message-ID: <4E837B9D.2020202@geomatika.fr> Hello I ve got somme difficulties with html legend and template basic works fine. [leg_layer_html opt_flag=3]
[if name=layer_status oper=eq value=1]Hello[/if][if name=any_layer_metadata isset value=title][metadata name=title][/if] ([leg_layer_minscale]-[leg_layer_maxscale])
[/leg_layer_html] The first "if" works fine -> if layer->status==MS_ON returns hello the second if don't work. i would like to get the value of the metadata "title" if the metadata is set for my layer but the "if" is not processed and the processing return the all if syntax witouth any translation... you can see un screenshot in this email. mapserv-5.6.7on linux debian box.. Any suggestion will be appreciated.. Thanks Best regards, fx -------------- next part -------------- A non-text attachment was scrubbed... Name: legend.png Type: image/png Size: 32518 bytes Desc: not available URL: