From schepers at rvr-online.de Fri Jul 1 00:14:02 2016 From: schepers at rvr-online.de (Schepers, Benjamin) Date: Fri, 1 Jul 2016 07:14:02 +0000 Subject: [mapserver-users] Map file, Label WRAP Function in mapbook removes character it In-Reply-To: <36CA828A36E29F45B7CF0A1766E5DFA371903E4D@swmail01.r8nssis.local> References: <36CA828A36E29F45B7CF0A1766E5DFA371903E4D@swmail01.r8nssis.local> Message-ID: <7088A26751CB34409B159B4237D510A87AAFE463@W2K8-EXDB02.VERBAND.LOCAL> Hi Carrie, in my opinion the easiest way would be converting the data to spatialite-DB (you get a lot of database-functions in a file based-DB - no client-server-architecture, just a file; at best you use ogr2ogr or QGIS for conversion) and then use replace function in your SQL-QUERY i.e. to dynamically insert pipe "|" as wrap-character it should look like that (fieldname is "parcel_no"): SELECT *, replace(parcel_no, '.', '.|') AS parcel_no_wrap FROM parcel_table If you have a shapefile and your parcel-no have a strict pattern (ie. 2digits.3digits.4digits) then it should also be possible to use OGR generic "concat" and "substring"-function, which were introduced with GDAL 1.8 (according to documentation at http://www.gdal.org/ogr_sql.html#ogr_sql_flist_ops and http://www.gdal.org/ogr_sql.html#ogr_sql_functions): Example, also with pipe as wrap-character: SELECT *, CONCAT(SUBSTR(parcel_no,1,2),'.|',SUBSTR(parcel_no,4,3),'.|',SUBSTR(parcel_no,8,4)) AS parcel_no_wrap FROM parcel_table In both examples the new virtual field "parcel_no_wrap" could be used for displaying text with wrap character... Sincerely, Benjamin Schepers Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Mark Volz Gesendet: Donnerstag, 30. Juni 2016 15:09 An: mapserver-users at lists.osgeo.org Betreff: Re: [mapserver-users] Map file, Label WRAP Function in mapbook removes character it Carrie, Our trick is to wrap on a character that you would otherwise not normally see in the string. LAYER .... CLASS TEXT ([LastName] * [PIN]) #overrides LABELITEM ..... LABEL WRAP "*" END #Parcel Label END #Parcel Class END #Parcel Layer Sincerely, Mark Volz, GISP -----Original Message----- From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of mapserver-users-request at lists.osgeo.org Sent: Wednesday, June 29, 2016 11:04 AM To: mapserver-users at lists.osgeo.org Subject: mapserver-users Digest, Vol 101, Issue 37 Send mapserver-users mailing list submissions to mapserver-users at lists.osgeo.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.osgeo.org/mailman/listinfo/mapserver-users or, via email, send a message with subject or body 'help' to mapserver-users-request at lists.osgeo.org You can reach the person managing the list at mapserver-users-owner at lists.osgeo.org When replying, please edit your Subject line so it is more specific than "Re: Contents of mapserver-users digest..." Today's Topics: 1. Map file, Label WRAP Function in mapbook removes character it is wrapping on. (Carrie Quast) ---------------------------------------------------------------------- Message: 1 Date: Wed, 29 Jun 2016 15:58:59 +0000 From: Carrie Quast To: "'mapserver-users at lists.osgeo.org'" Subject: [mapserver-users] Map file, Label WRAP Function in mapbook removes character it is wrapping on. Message-ID: <77b9eefcc9264bddb77bd9a85bd037e1 at MSEXCHANGE1.bc.local> Content-Type: text/plain; charset="utf-8" Hello - I'm working on updating my .MAP Documents to Mapserver 7.0.1. I'm trying to get the labels in my Parcel Layer to wrap on the decimal point (example 002.001.001.01.010) to make for a better a fit. I'm using the WRAP function, which works wonderfully , except it removes the character I am wrapping on. In this case, the point (.) In my parcel numbers. Each of the numbers should have a decimal between it. Any idea of how to get the line to wrap on a character, but also keep it in the displayed label? The MAXLENGTH works well too, but still removes all decimal points. I'm using Mapserver 7.0.1 with GeoMoose 2.9 Thank You - Carrie Quast, Brown County MN GIS Specialist [cid:image002.png at 01D1D1F5.3D5294F0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 66665 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 31355 bytes Desc: image002.png URL: ------------------------------ Subject: Digest Footer _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ------------------------------ End of mapserver-users Digest, Vol 101, Issue 37 ************************************************ _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From jmckenna at gatewaygeomatics.com Fri Jul 1 04:27:30 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 1 Jul 2016 08:27:30 -0300 Subject: [mapserver-users] Map file, Label WRAP Function in mapbook removes character it In-Reply-To: <7088A26751CB34409B159B4237D510A87AAFE463@W2K8-EXDB02.VERBAND.LOCAL> References: <36CA828A36E29F45B7CF0A1766E5DFA371903E4D@swmail01.r8nssis.local> <7088A26751CB34409B159B4237D510A87AAFE463@W2K8-EXDB02.VERBAND.LOCAL> Message-ID: Great work Benjamin! (I was looking at that page but didn't think of using substring) Benjamin's solution works great (assuming your data is always in 111.222.333.44.555 Here is a working example: map output: http://pasteboard.co/25N6NcOV.png layer snippet: LAYER NAME "test" TYPE POINT STATUS ON CONNECTIONTYPE OGR CONNECTION "cities.shp" DATA "SELECT CONCAT(SUBSTR(PARCEL,1,3),'.+',SUBSTR(PARCEL,5,3),'.+',SUBSTR(PARCEL,9,3),'.+',SUBSTR(PARCEL,13,2),'.+',SUBSTR(PARCEL,16,4)) AS parcel_wrap from cities" LabelItem "parcel_wrap" CLASS NAME "mycities" LABEL COLOR 0 0 0 FONT sans TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE OUTLINECOLOR 255 255 255 WRAP "+" END STYLE SYMBOL 7 SIZE 6 COLOR 0 0 0 END END END # Layer -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-01 4:14 AM, Schepers, Benjamin wrote: > Hi Carrie, > > in my opinion the easiest way would be converting the data to spatialite-DB (you get a lot of database-functions in a file based-DB - no client-server-architecture, just a file; at best you use ogr2ogr or QGIS for conversion) and then use replace function in your SQL-QUERY > > i.e. to dynamically insert pipe "|" as wrap-character it should look like that (fieldname is "parcel_no"): > SELECT *, replace(parcel_no, '.', '.|') AS parcel_no_wrap FROM parcel_table > > If you have a shapefile and your parcel-no have a strict pattern (ie. 2digits.3digits.4digits) then it should also be possible to use OGR generic "concat" and "substring"-function, which were introduced with GDAL 1.8 (according to documentation at http://www.gdal.org/ogr_sql.html#ogr_sql_flist_ops and http://www.gdal.org/ogr_sql.html#ogr_sql_functions): > > Example, also with pipe as wrap-character: > SELECT *, CONCAT(SUBSTR(parcel_no,1,2),'.|',SUBSTR(parcel_no,4,3),'.|',SUBSTR(parcel_no,8,4)) AS parcel_no_wrap FROM parcel_table > > In both examples the new virtual field "parcel_no_wrap" could be used for displaying text with wrap character... > > Sincerely, > Benjamin Schepers > > > > Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Mark Volz > Gesendet: Donnerstag, 30. Juni 2016 15:09 > An: mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] Map file, Label WRAP Function in mapbook removes character it > > Carrie, > > Our trick is to wrap on a character that you would otherwise not normally see in the string. > > LAYER > .... > CLASS > TEXT ([LastName] * [PIN]) #overrides LABELITEM > ..... > LABEL > WRAP "*" > END #Parcel Label > END #Parcel Class > END #Parcel Layer > > > Sincerely, > Mark Volz, GISP > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of mapserver-users-request at lists.osgeo.org > Sent: Wednesday, June 29, 2016 11:04 AM > To: mapserver-users at lists.osgeo.org > Subject: mapserver-users Digest, Vol 101, Issue 37 > > Send mapserver-users mailing list submissions to > mapserver-users at lists.osgeo.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.osgeo.org/mailman/listinfo/mapserver-users > or, via email, send a message with subject or body 'help' to > mapserver-users-request at lists.osgeo.org > > You can reach the person managing the list at > mapserver-users-owner at lists.osgeo.org > > When replying, please edit your Subject line so it is more specific than "Re: Contents of mapserver-users digest..." > > > Today's Topics: > > 1. Map file, Label WRAP Function in mapbook removes character it > is wrapping on. (Carrie Quast) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 29 Jun 2016 15:58:59 +0000 > From: Carrie Quast > To: "'mapserver-users at lists.osgeo.org'" > > Subject: [mapserver-users] Map file, Label WRAP Function in mapbook > removes character it is wrapping on. > Message-ID: <77b9eefcc9264bddb77bd9a85bd037e1 at MSEXCHANGE1.bc.local> > Content-Type: text/plain; charset="utf-8" > > Hello - I'm working on updating my .MAP Documents to Mapserver 7.0.1. > > I'm trying to get the labels in my Parcel Layer to wrap on the decimal point (example 002.001.001.01.010) to make for a better a fit. I'm using the WRAP function, which works wonderfully , except it removes the character I am wrapping on. In this case, the point (.) In my parcel numbers. > > Each of the numbers should have a decimal between it. Any idea of how to get the line to wrap on a character, but also keep it in the displayed label? The MAXLENGTH works well too, but still removes all decimal points. > > I'm using Mapserver 7.0.1 with GeoMoose 2.9 > > Thank You - Carrie Quast, Brown County MN GIS Specialist > > [cid:image002.png at 01D1D1F5.3D5294F0] > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: image001.png > Type: image/png > Size: 66665 bytes > Desc: image001.png > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: image002.png > Type: image/png > Size: 31355 bytes > Desc: image002.png > URL: > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > ------------------------------ > > End of mapserver-users Digest, Vol 101, Issue 37 > ************************************************ > _______________________________________________ > 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 maanmittauslaitos.fi Fri Jul 1 07:31:39 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 1 Jul 2016 14:31:39 +0000 Subject: [mapserver-users] Map file, Label WRAP Function in mapbook removes character it Message-ID: <9131176a48e748238919329b34442e27@C119S212VM017.msvyvi.vaha.local> Hi, I just wonder if the aim was to put every part of the list to their own lines 111. 222. 333. 44. 555 If it was, then the "add wrap character with SQL" is fine. If the aim was to keep the label on as few lines as possible and space admitting have 111.222.333.44.555 or 111.222.333. 44.555 then I fear that no workaround is usable and the real solution would be to change the code to support option "don't eat wrap characters" -Jukka Rahkonen- Jeff McKenna wrote: Great work Benjamin! (I was looking at that page but didn't think of using substring) Benjamin's solution works great (assuming your data is always in 111.222.333.44.555 Here is a working example: map output: http://pasteboard.co/25N6NcOV.png layer snippet: LAYER NAME "test" TYPE POINT STATUS ON CONNECTIONTYPE OGR CONNECTION "cities.shp" DATA "SELECT CONCAT(SUBSTR(PARCEL,1,3),'.+',SUBSTR(PARCEL,5,3),'.+',SUBSTR(PARCEL,9,3),'.+',SUBSTR(PARCEL,13,2),'.+',SUBSTR(PARCEL,16,4)) AS parcel_wrap from cities" LabelItem "parcel_wrap" CLASS NAME "mycities" LABEL COLOR 0 0 0 FONT sans TYPE truetype SIZE 8 POSITION AUTO PARTIALS FALSE OUTLINECOLOR 255 255 255 WRAP "+" END STYLE SYMBOL 7 SIZE 6 COLOR 0 0 0 END END END # Layer -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-01 4:14 AM, Schepers, Benjamin wrote: > Hi Carrie, > > in my opinion the easiest way would be converting the data to > spatialite-DB (you get a lot of database-functions in a file based-DB > - no client-server-architecture, just a file; at best you use ogr2ogr > or QGIS for conversion) and then use replace function in your > SQL-QUERY > > i.e. to dynamically insert pipe "|" as wrap-character it should look like that (fieldname is "parcel_no"): > SELECT *, replace(parcel_no, '.', '.|') AS parcel_no_wrap FROM > parcel_table > > If you have a shapefile and your parcel-no have a strict pattern (ie. 2digits.3digits.4digits) then it should also be possible to use OGR generic "concat" and "substring"-function, which were introduced with GDAL 1.8 (according to documentation at http://www.gdal.org/ogr_sql.html#ogr_sql_flist_ops and http://www.gdal.org/ogr_sql.html#ogr_sql_functions): > > Example, also with pipe as wrap-character: > SELECT *, > CONCAT(SUBSTR(parcel_no,1,2),'.|',SUBSTR(parcel_no,4,3),'.|',SUBSTR(pa > rcel_no,8,4)) AS parcel_no_wrap FROM parcel_table > > In both examples the new virtual field "parcel_no_wrap" could be used for displaying text with wrap character... > > Sincerely, > Benjamin Schepers > > > > Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > Im Auftrag von Mark Volz > Gesendet: Donnerstag, 30. Juni 2016 15:09 > An: mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] Map file, Label WRAP Function in > mapbook removes character it > > Carrie, > > Our trick is to wrap on a character that you would otherwise not normally see in the string. > > LAYER > .... > CLASS > TEXT ([LastName] * [PIN]) #overrides LABELITEM > ..... > LABEL > WRAP "*" > END #Parcel Label > END #Parcel Class > END #Parcel Layer > > > Sincerely, > Mark Volz, GISP > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of mapserver-users-request at lists.osgeo.org > Sent: Wednesday, June 29, 2016 11:04 AM > To: mapserver-users at lists.osgeo.org > Subject: mapserver-users Digest, Vol 101, Issue 37 > > Send mapserver-users mailing list submissions to > mapserver-users at lists.osgeo.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.osgeo.org/mailman/listinfo/mapserver-users > or, via email, send a message with subject or body 'help' to > mapserver-users-request at lists.osgeo.org > > You can reach the person managing the list at > mapserver-users-owner at lists.osgeo.org > > When replying, please edit your Subject line so it is more specific than "Re: Contents of mapserver-users digest..." > > > Today's Topics: > > 1. Map file, Label WRAP Function in mapbook removes character it > is wrapping on. (Carrie Quast) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 29 Jun 2016 15:58:59 +0000 > From: Carrie Quast > To: "'mapserver-users at lists.osgeo.org'" > > Subject: [mapserver-users] Map file, Label WRAP Function in mapbook > removes character it is wrapping on. > Message-ID: <77b9eefcc9264bddb77bd9a85bd037e1 at MSEXCHANGE1.bc.local> > Content-Type: text/plain; charset="utf-8" > > Hello - I'm working on updating my .MAP Documents to Mapserver 7.0.1. > > I'm trying to get the labels in my Parcel Layer to wrap on the decimal point (example 002.001.001.01.010) to make for a better a fit. I'm using the WRAP function, which works wonderfully , except it removes the character I am wrapping on. In this case, the point (.) In my parcel numbers. > > Each of the numbers should have a decimal between it. Any idea of how to get the line to wrap on a character, but also keep it in the displayed label? The MAXLENGTH works well too, but still removes all decimal points. > > I'm using Mapserver 7.0.1 with GeoMoose 2.9 > > Thank You - Carrie Quast, Brown County MN GIS Specialist > > [cid:image002.png at 01D1D1F5.3D5294F0] > > > -------------- next part -------------- An HTML attachment was > scrubbed... > URL: > /8bda4b92/attachment.html> > -------------- next part -------------- A non-text attachment was > scrubbed... > Name: image001.png > Type: image/png > Size: 66665 bytes > Desc: image001.png > URL: > /8bda4b92/attachment.png> > -------------- next part -------------- A non-text attachment was > scrubbed... > Name: image002.png > Type: image/png > Size: 31355 bytes > Desc: image002.png > URL: > /8bda4b92/attachment-0001.png> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > ------------------------------ > > End of mapserver-users Digest, Vol 101, Issue 37 > ************************************************ > _______________________________________________ > 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 jmckenna at gatewaygeomatics.com Mon Jul 4 09:34:06 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 4 Jul 2016 13:34:06 -0300 Subject: [mapserver-users] Mapfile editor with GUI In-Reply-To: <7167bdff-5e0f-8f7d-346d-3b1a2799b0d9@gatewaygeomatics.com> References: <7167bdff-5e0f-8f7d-346d-3b1a2799b0d9@gatewaygeomatics.com> Message-ID: I notice a Magnacarto presentation at FOSSGIS in Salzburg today: CartoCSS to MapServer https://github.com/omniscale/magnacarto I've added this to our MapServer wiki at https://github.com/mapserver/mapserver/wiki/MapFile-Editors Thanks to everyone for maintaining that wiki page. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From Robert.Fritz at win.ch Wed Jul 6 23:28:46 2016 From: Robert.Fritz at win.ch (Fritz Robert) Date: Thu, 7 Jul 2016 06:28:46 +0000 Subject: [mapserver-users] looking for symbols / line style definitions Message-ID: <5488DE260B608940A3CADE0C2D09F2D7014AE88CAC@wsstadt204.stadt.winroot.net> Hi, I'm looking for symbols/line style definitions for Swiss SIA 405 (?Leitungskataster?). We need to implement a map for utilities assets following SIA 405. I would like to avoid creating the symbols if they are already publicly available or someone would be willing to share them? Thank you, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Thu Jul 7 04:28:04 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 7 Jul 2016 08:28:04 -0300 Subject: [mapserver-users] looking for symbols / line style definitions In-Reply-To: <5488DE260B608940A3CADE0C2D09F2D7014AE88CAC@wsstadt204.stadt.winroot.net> References: <5488DE260B608940A3CADE0C2D09F2D7014AE88CAC@wsstadt204.stadt.winroot.net> Message-ID: <8120934c-b9d4-11fb-4a89-e1aab014059c@gatewaygeomatics.com> As you travel down this path, it would be great to also populate your findings on the "MapServer Symbology Exchange" wiki page, to share the symbol definitions with everyone, thanks! https://github.com/mapserver/mapserver/wiki/MapServer-Symbology-Exchange -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-07 3:28 AM, Fritz Robert wrote: > Hi, > > I?m looking for symbols/line style definitions for Swiss SIA 405 > (?Leitungskataster?). > We need to implement a map for utilities assets following SIA 405. > I would like to avoid creating the symbols if they are already publicly > available or someone would be willing to share them? > > Thank you, Robert > > > From evka.jelinkova at gmail.com Mon Jul 11 08:39:46 2016 From: evka.jelinkova at gmail.com (=?UTF-8?B?RXZhIEplbMOtbmtvdsOh?=) Date: Mon, 11 Jul 2016 17:39:46 +0200 Subject: [mapserver-users] run-time substitution Message-ID: Dear mapserv people, does anybody has an experience with runtime substitution in MAP->WEB: METADATA section of mapfile (MapServer 7)? http://mapserver.org/cgi/runsub.html#parameters-supported I am trying to substitute part of 'wms_onlineresource' value, using default value in VALIDATION. GetCapabilities request gives me string with %name_of_parameter% in the URL. Other substitutions (in LAYER: CONNECTION) work well. My *mapfile* looks like this: MAP NAME test SHAPEPATH '/path/to/data/' STATUS ON SIZE 600 600 EXTENT -12370335 5011146 -11573462 5632806 UNITS METERS IMAGECOLOR 255 255 255 OUTPUTFORMAT NAME 'png' DRIVER AGG/PNG MIMETYPE 'image/png' IMAGEMODE RGB EXTENSION 'png' END IMAGETYPE png PROJECTION 'init=epsg:3857' END WEB VALIDATION 'ma_name' '[a-z\-]+' 'db_name' '[a-z\_]+' 'db_schema' '[a-z\_]+' 'db_user' '[a-zA-Z\-]+' 'db_pw' '[a-zA-Z\-]+' 'default_db_user' 'user' 'default_db_pw' 'pw' 'default_ma_name' 'test-ma' 'default_db_name' 'test_ma' 'default_db_schema' 'test' END METADATA 'wms_title' 'MapServer WMS' 'wms_abstract' 'test' 'wms_srs' 'EPSG:3857 EPSG:900913 EPSG:4326' 'wms_encoding' 'UTF-8' 'wms_onlineresource' 'http://url/cgi-bin/gp_%ma_name%_com_wms?' 'wms_enable_request' '*' END END LAYER NAME 'polygons' CONNECTIONTYPE postgis CONNECTION 'user=%db_user% password=%db_pw% dbname=%db_name% host=db.server.url' DATA 'geom FROM %db_schema%.polygons' STATUS ON TYPE POLYGON METADATA 'wms_title' 'polygons' END PROJECTION 'init=epsg:3857' END PROCESSING 'LABEL_NO_CLIP=ON' LABELITEM 'id' CLASS LABEL TYPE truetype FONT ubuntu ANTIALIAS false SIZE 10 COLOR 10 10 10 OFFSET 2 -3 BUFFER 5 END END END END *GetCapabilities* request gives me: ]> OGC:WMS MapServer WMS test application/vnd.ogc.wms_xml ... If I add my *parameter to URL request*: http://url/cgi-bin/mapserv7.fcgi?MAP=/path/to/mapfile.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&ma_name=testing I get: "msWMSDispatch(): WMS server error. Incomplete or unsupported WMS request" If anyone has ever tried to use this substitution, please, let me know. Thanks, Eva -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Jul 11 11:50:53 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 11 Jul 2016 15:50:53 -0300 Subject: [mapserver-users] run-time substitution In-Reply-To: References: Message-ID: Hello Eva, Testing with MS4W 3.1.4 (MapServer 7.0.1) on Windows, I am able to pass "&ma_name=testing" in the url and the resulting GetCapabilities response correctly replaces that in the wms_onlineresource value. Note that my validation block is slightly different than yours: WEB VALIDATION "ma_name" "[a-z]+" END METADATA "wms_onlineresource" "http://url/cgi-bin/gp_%ma_name%_com_wms?" ... END ... END -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-11 12:39 PM, Eva Jel?nkov? wrote: > Dear mapserv people, > > does anybody has an experience with runtime substitution in MAP->WEB: > METADATA section of mapfile (MapServer 7)? > http://mapserver.org/cgi/runsub.html#parameters-supported > > I am trying to substitute part of 'wms_onlineresource' value, using > default value in VALIDATION. GetCapabilities request gives me string > with %name_of_parameter% in the URL. > From evka.jelinkova at gmail.com Tue Jul 12 08:52:35 2016 From: evka.jelinkova at gmail.com (=?UTF-8?B?RXZhIEplbMOtbmtvdsOh?=) Date: Tue, 12 Jul 2016 17:52:35 +0200 Subject: [mapserver-users] run-time substitution In-Reply-To: References: Message-ID: Hi Jeff, thanks a lot! It really works with your validation expression. Looking forward to see you in Bonn! Eva 2016-07-11 20:50 GMT+02:00 Jeff McKenna : > Hello Eva, > > Testing with MS4W 3.1.4 (MapServer 7.0.1) on Windows, I am able to pass > "&ma_name=testing" in the url and the resulting GetCapabilities response > correctly replaces that in the wms_onlineresource value. Note that my > validation block is slightly different than yours: > > WEB > VALIDATION > "ma_name" "[a-z]+" > END > METADATA > "wms_onlineresource" "http://url/cgi-bin/gp_%ma_name%_com_wms?" > ... > END > ... > END > > > -jeff > > > -- > Jeff McKenna > MapServer Consulting and Training Services > http://www.gatewaygeomatics.com/ > > > > On 2016-07-11 12:39 PM, Eva Jel?nkov? wrote: > >> Dear mapserv people, >> >> does anybody has an experience with runtime substitution in MAP->WEB: >> METADATA section of mapfile (MapServer 7)? >> http://mapserver.org/cgi/runsub.html#parameters-supported >> >> I am trying to substitute part of 'wms_onlineresource' value, using >> default value in VALIDATION. GetCapabilities request gives me string >> with %name_of_parameter% in the URL. >> >> > > > > > _______________________________________________ > 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 andy at squeakycode.net Tue Jul 12 18:52:05 2016 From: andy at squeakycode.net (Andy Colson) Date: Tue, 12 Jul 2016 20:52:05 -0500 Subject: [mapserver-users] compile 7.0.1 error, glib.h not found Message-ID: <0549ca51-c153-0e5b-83ed-6cd01352d182@squeakycode.net> Hi all. I tried: cmake .. -DWITH_PERL=1 Scanning dependencies of target mapserver [ 1%] Building C object CMakeFiles/mapserver.dir/fontcache.c.o In file included from /usr/include/fribidi/fribidi.h:35:0, from /tmp/SBo/mapserver-7.0.1/fontcache.h:13, from /tmp/SBo/mapserver-7.0.1/fontcache.c:32: /usr/include/fribidi/fribidi-common.h:61:20: fatal error: glib.h: No such file or directory compilation terminated. CMakeFiles/mapserver.dir/build.make:62: recipe for target 'CMakeFiles/mapserver.dir/fontcache.c.o' failed I found a prior reference to this: http://osgeo-org.1560.x6.nabble.com/Error-building-Mapserver-6-4-1-with-fribidi-td5099725.html#a5099926 # pkg-config --cflags fribidi -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include # ls /usr/include/glib-2.0 gio/ glib/ glib-object.h glib-unix.h glib.h gmodule.h gobject/ # cmake --version cmake version 3.5.2 Slackware64 14.2 If I use: cmake .. -DWITH_PERL=1 -DFRIBIDI_INCLUDE_DIR='/usr/include/fribidi;/usr/include/glib-2.0;/usr/lib64/glib-2.0/include' It compiles fine. I thought I'd just report that this still seems to be a problem. -Andy From woodbri at swoodbridge.com Wed Jul 13 08:59:44 2016 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 13 Jul 2016 11:59:44 -0400 Subject: [mapserver-users] How to make uvraster background transparent? Message-ID: Hi All, I'm trying to use a CONNECTIONTYPE uvraster, andand it works very well, except I would like the black background to be transparent so I can overlay it on other data. A typical LAYER definition follows. Is there a way to do this? Thanks, -Steve W LAYER NAME "uv1_0" GROUP "0" TYPE POINT STATUS ON MINSCALEDENOM 1000000 CONNECTIONTYPE uvraster OFFSITE 0 0 0 TRANSPARENCY 100 DATA "/maps/wms/data/HYCOM/HYCOM-currents.tif" PROCESSING "BANDS=1,2" #PROCESSING "NODATA=10000" PROCESSING "NODATA=1.2676506002282e+30" PROCESSING "UV_SPACING=15" PROCESSING "UV_SIZE_SCALE=15.0" # factor CLASS EXPRESSION ([uv_length] > 100) END CLASS EXPRESSION ([uv_length] < 4.5) # 0.3 * factor STYLE SYMBOL "horizline" ANGLE [uv_angle] SIZE [uv_length] WIDTH 1 COLOR "#3840F2" END # style STYLE SYMBOL "arrowhead" ANGLE [uv_angle] SIZE 4 COLOR "#3840F2" POLAROFFSET [uv_length_2] [uv_angle] END # style END # class # ... more CLASSes END --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From thomas.bonfort at gmail.com Wed Jul 13 09:06:47 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 13 Jul 2016 18:06:47 +0200 Subject: [mapserver-users] How to make uvraster background transparent? In-Reply-To: References: Message-ID: Steve, The black color is coming from somewhere else, uvraster layers are transparent, c.f. change/set the imagecolor in msautotest/renderers/uvraster.map to see for yourself. -- thomas On 13 July 2016 at 17:59, Stephen Woodbridge wrote: > Hi All, > > I'm trying to use a CONNECTIONTYPE uvraster, andand it works very well, > except I would like the black background to be transparent so I can overlay > it on other data. A typical LAYER definition follows. > > Is there a way to do this? > > Thanks, > -Steve W > > LAYER > NAME "uv1_0" > GROUP "0" > TYPE POINT > STATUS ON > MINSCALEDENOM 1000000 > CONNECTIONTYPE uvraster > OFFSITE 0 0 0 > TRANSPARENCY 100 > DATA "/maps/wms/data/HYCOM/HYCOM-currents.tif" > PROCESSING "BANDS=1,2" > #PROCESSING "NODATA=10000" > PROCESSING "NODATA=1.2676506002282e+30" > PROCESSING "UV_SPACING=15" > PROCESSING "UV_SIZE_SCALE=15.0" # factor > CLASS > EXPRESSION ([uv_length] > 100) > END > CLASS > EXPRESSION ([uv_length] < 4.5) # 0.3 * factor > STYLE > SYMBOL "horizline" > ANGLE [uv_angle] > SIZE [uv_length] > WIDTH 1 > COLOR "#3840F2" > END # style > STYLE > SYMBOL "arrowhead" > ANGLE [uv_angle] > SIZE 4 > COLOR "#3840F2" > POLAROFFSET [uv_length_2] [uv_angle] > END # style > END # class > # ... more CLASSes > END > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From aperi2007 at gmail.com Wed Jul 13 09:25:29 2016 From: aperi2007 at gmail.com (Andrea Peri) Date: Wed, 13 Jul 2016 18:25:29 +0200 Subject: [mapserver-users] How exclude some items in a text/plain response for a GetFeatureInfo request Message-ID: Hi, Doing a GetFeatureInfo request, I notice the gml_exclude_items for exclude some items from response is working only for GML response. But if the request is for a text/plain response it return always all the items. There is a command to exclude some items from a text response ? Thx, -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From thomas.bonfort at gmail.com Wed Jul 13 09:27:47 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 13 Jul 2016 18:27:47 +0200 Subject: [mapserver-users] How exclude some items in a text/plain response for a GetFeatureInfo request In-Reply-To: References: Message-ID: wms_exclude_items -- thomas On 13 July 2016 at 18:25, Andrea Peri wrote: > Hi, > Doing a GetFeatureInfo request, > I notice the > gml_exclude_items for exclude some items from response > is working only for GML response. > But if the request is for a text/plain response it return always all the items. > There is a command to exclude some items from a text response ? > > Thx, > > > -- > ----------------- > Andrea Peri > . . . . . . . . . > qwerty ????? > ----------------- > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From aperi2007 at gmail.com Wed Jul 13 09:33:40 2016 From: aperi2007 at gmail.com (Andrea Peri) Date: Wed, 13 Jul 2016 18:33:40 +0200 Subject: [mapserver-users] How exclude some items in a text/plain response for a GetFeatureInfo request In-Reply-To: References: Message-ID: Thx Thomas, is what I'm searching. 2016-07-13 18:27 GMT+02:00 thomas bonfort : > wms_exclude_items > > -- > thomas > > On 13 July 2016 at 18:25, Andrea Peri wrote: >> Hi, >> Doing a GetFeatureInfo request, >> I notice the >> gml_exclude_items for exclude some items from response >> is working only for GML response. >> But if the request is for a text/plain response it return always all the items. >> There is a command to exclude some items from a text response ? >> >> Thx, >> >> >> -- >> ----------------- >> Andrea Peri >> . . . . . . . . . >> qwerty ????? >> ----------------- >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From tom.kralidis at canada.ca Wed Jul 13 09:55:07 2016 From: tom.kralidis at canada.ca (Kralidis, Tom (EC)) Date: Wed, 13 Jul 2016 16:55:07 +0000 Subject: [mapserver-users] Python MapScript via WSGI examples Message-ID: Hi all: we are looking into updating our Python MapScript (CGI-based) wrappers to leverage WSGI, and are having integration issues as part of testing. We are using 6.4.2 on Ubuntu 14.04. See example in [1] (against any mapfile is fine). Simple run with python ./mapscript-wsgi.py which makes the server available on localhost:8000 by default. Issues: - the value in https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297#file-mapscript-wsgi-py-L18 ends up being a Python None type for some reason when it should be a string of the content-type - issuing a, say, WMS 1.3.0 GetCapabilities request yields the venerable MapServer "This script can ...." default message, when I am expecting Capabilities XML Any ideas what I'm doing wrong here? ..Tom [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297 From woodbri at swoodbridge.com Wed Jul 13 11:57:40 2016 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 13 Jul 2016 14:57:40 -0400 Subject: [mapserver-users] How to make uvraster background transparent? In-Reply-To: References: Message-ID: <19beb34f-27f1-5f8e-ba4e-cd816678123a@swoodbridge.com> Ooops, you are correct. The layer was setup as a jpeg in OL. I changed it to png and that fixed the issue. Thanks, -Steve W On 7/13/2016 12:06 PM, thomas bonfort wrote: > Steve, > > The black color is coming from somewhere else, uvraster layers are > transparent, c.f. change/set the imagecolor in > msautotest/renderers/uvraster.map to see for yourself. > > -- > thomas > > On 13 July 2016 at 17:59, Stephen Woodbridge wrote: >> Hi All, >> >> I'm trying to use a CONNECTIONTYPE uvraster, andand it works very well, >> except I would like the black background to be transparent so I can overlay >> it on other data. A typical LAYER definition follows. >> >> Is there a way to do this? >> >> Thanks, >> -Steve W >> >> LAYER >> NAME "uv1_0" >> GROUP "0" >> TYPE POINT >> STATUS ON >> MINSCALEDENOM 1000000 >> CONNECTIONTYPE uvraster >> OFFSITE 0 0 0 >> TRANSPARENCY 100 >> DATA "/maps/wms/data/HYCOM/HYCOM-currents.tif" >> PROCESSING "BANDS=1,2" >> #PROCESSING "NODATA=10000" >> PROCESSING "NODATA=1.2676506002282e+30" >> PROCESSING "UV_SPACING=15" >> PROCESSING "UV_SIZE_SCALE=15.0" # factor >> CLASS >> EXPRESSION ([uv_length] > 100) >> END >> CLASS >> EXPRESSION ([uv_length] < 4.5) # 0.3 * factor >> STYLE >> SYMBOL "horizline" >> ANGLE [uv_angle] >> SIZE [uv_length] >> WIDTH 1 >> COLOR "#3840F2" >> END # style >> STYLE >> SYMBOL "arrowhead" >> ANGLE [uv_angle] >> SIZE 4 >> COLOR "#3840F2" >> POLAROFFSET [uv_length_2] [uv_angle] >> END # style >> END # class >> # ... more CLASSes >> END >> >> --- >> This email has been checked for viruses by Avast antivirus software. >> https://www.avast.com/antivirus >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From woodbri at swoodbridge.com Wed Jul 13 12:41:50 2016 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 13 Jul 2016 15:41:50 -0400 Subject: [mapserver-users] mapserver 6.4.1 crash on raster query Message-ID: Hi all, I am getting a crash with memory corruption in mapserver 6.4.1 when doing a query. The strange this is that I have two identical mapfiles where the only difference is the tif files being referenced by it and while they both crash the errors are slightly different as can be seen in the gdb backtrace below. Any thoughts on how to fix this? -Steve W # /usr/lib/cgi-bin/mapserv -v MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG 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=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE The details follow: LAYER NAME "query" STATUS ON TYPE raster PROJECTION "init=epsg:4326" END TOLERANCE 0 TOLERANCEUNITS pixels DATA "/maps/wms/data/HYCOM/HYCOM-today-currents.tif" #PROCESSING "NODATA=10000" PROCESSING "NODATA=1.2676506002282e+30" TEMPLATE "/maps/wms/pixel.list.html" END # /usr/lib/cgi-bin/mapserv QUERY_STRING='map=/maps/wms/hycom_currents_1.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125' Content-Type: text/html 0.0090429913,0.11866909,0.003122841,-0.013737384,-0.0049919467,-0.024963228,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30 *** Error in `/usr/lib/cgi-bin/mapserv': double free or corruption (out): 0x00000000006768a0 *** Aborted (core dumped) # /usr/lib/cgi-bin/mapserv QUERY_STRING='map=/maps/wms/hycom_currents_2.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125' *** Error in `/usr/lib/cgi-bin/mapserv': malloc(): memory corruption: 0x00000000006781e0 *** Aborted (core dumped) If I run it in gdb I get the following backtraces: (gdb) run QUERY_STRING='map=/maps/wms/hycom_currents_1.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125' Starting program: /usr/lib/cgi-bin/mapserv QUERY_STRING='map=/maps/wms/hycom_currents_1.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Content-Type: text/html 0.0090429913,0.11866909,0.003122841,-0.013737384,-0.0049919467,-0.024963228,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30 *** Error in `/usr/lib/cgi-bin/mapserv': double free or corruption (out): 0x00000000006768b0 *** Program received signal SIGABRT, Aborted. 0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff7465028 in __GI_abort () at abort.c:89 #2 0x00007ffff749e2a4 in __libc_message (do_abort=do_abort at entry=1, fmt=fmt at entry=0x7ffff75ac6b0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007ffff74aa55e in malloc_printerr (ptr=, str=0x7ffff75ac7e0 "double free or corruption (out)", action=1) at malloc.c:4996 #4 _int_free (av=, p=, have_lock=0) at malloc.c:3840 #5 0x00007ffff7ae810c in msFreeCharArray () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #6 0x00007ffff7a9a86a in msLayerClose () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #7 0x00007ffff7aef300 in freeLayer () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #8 0x00007ffff7ace33e in msFreeMap () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #9 0x00007ffff7a8576f in msFreeMapServObj () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #10 0x000000000040120e in main () (gdb) run QUERY_STRING='map=/maps/wms/hycom_currents_2.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125' Starting program: /usr/lib/cgi-bin/mapserv QUERY_STRING='map=/maps/wms/hycom_currents_2.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". *** Error in `/usr/lib/cgi-bin/mapserv': malloc(): memory corruption: 0x00000000006781f0 *** Program received signal SIGABRT, Aborted. 0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff7465028 in __GI_abort () at abort.c:89 #2 0x00007ffff749e2a4 in __libc_message (do_abort=1, fmt=fmt at entry=0x7ffff75ac6b0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007ffff74abe26 in malloc_printerr (ptr=0x6781f0, str=0x7ffff75a8882 "malloc(): memory corruption", action=) at malloc.c:4996 #4 _int_malloc (av=0x7ffff77e9760 , bytes=4) at malloc.c:3447 #5 0x00007ffff74ad6c0 in __GI___libc_malloc (bytes=4) at malloc.c:2891 #6 0x00007ffff74b372a in __GI___strdup (s=0x7ffff7b6c3b3 "gif") at strdup.c:42 #7 0x00007ffff7a663aa in msStrdup () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #8 0x00007ffff7a46a01 in msCreateDefaultOutputFormat () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #9 0x00007ffff7a47712 in msSelectOutputFormat () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #10 0x00007ffff7a47768 in msApplyDefaultOutputFormats () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #11 0x00007ffff7a85cb6 in msReturnTemplateQuery () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #12 0x00007ffff7a55a7c in msCGIDispatchQueryRequest () from /usr/lib/x86_64-linux-gnu/libmapserver.so.1 #13 0x000000000040118f in main () --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From mandschulz at googlemail.com Wed Jul 13 23:54:15 2016 From: mandschulz at googlemail.com (Michael Schulz) Date: Thu, 14 Jul 2016 08:54:15 +0200 Subject: [mapserver-users] GetFeatureInfo with template-driven outputformat Message-ID: Hi, we are using the template-driven outputformat with a html-template to replace the old-style templating. I wanted to use the [metadata_metadata_key] placeholder in the [resultset] section, but it isn't replaced with the actual value. In the [feature] section it worked. Are all the query template variables available only within the [feature]..[/feature] section? Cheers, Michael -- ----------------------------------------------------------- Michael Schulz -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlacroix at mapgears.com Thu Jul 14 08:19:22 2016 From: jlacroix at mapgears.com (Julien-Samuel Lacroix) Date: Thu, 14 Jul 2016 11:19:22 -0400 Subject: [mapserver-users] Python MapScript via WSGI examples In-Reply-To: References: Message-ID: <5787AD7A.7060709@mapgears.com> Hi Tom, When I run your script, I get the following response: This script can only be used to decode form results and should be initiated as a CGI process via a httpd server. This answer does not contain any content-type that can be stripped with msIO_getStdoutBufferBytes(). That's why it returns None. Before your OWSRequest call, you need to set the Environment variable that MapServer needs. Otherwise they are passed in the env variable and not to MapServer. Code to add: # List of all environment variable used by MapServer mapserv_env = [ 'CONTENT_LENGTH', 'CONTENT_TYPE', 'CURL_CA_BUNDLE', 'HTTP_COOKIE', 'HTTP_HOST', 'HTTPS', 'HTTP_X_FORWARDED_HOST', 'HTTP_X_FORWARDED_PORT', 'HTTP_X_FORWARDED_PROTO', 'MS_DEBUGLEVEL', 'MS_ENCRYPTION_KEY', 'MS_ERRORFILE', 'MS_MAPFILE', 'MS_MAPFILE_PATTERN', 'MS_MAP_NO_PATH', 'MS_MAP_PATTERN', 'MS_MODE', 'MS_OPENLAYERS_JS_URL', 'MS_TEMPPATH', 'MS_XMLMAPFILE_XSLT', 'PROJ_LIB', 'QUERY_STRING', 'REMOTE_ADDR', 'REQUEST_METHOD', 'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT' ] for key in mapserv_env: if key in env: os.environ[key] = env[key] else: os.unsetenv(key) request = mapscript.OWSRequest() Best regards, Julien On 16-07-13 12:55 PM, Kralidis, Tom (EC) wrote: > Hi all: we are looking into updating our Python MapScript (CGI-based) wrappers > to leverage WSGI, and are having integration issues as part of testing. > > We are using 6.4.2 on Ubuntu 14.04. See example in [1] (against > any mapfile is fine). Simple run with python ./mapscript-wsgi.py which makes > the server available on localhost:8000 by default. > > Issues: > > - the value in https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297#file-mapscript-wsgi-py-L18 ends up being a Python None type for some reason when it should be a string of the content-type > - issuing a, say, WMS 1.3.0 GetCapabilities request yields the venerable MapServer "This script can ...." default message, when I am expecting Capabilities XML > > Any ideas what I'm doing wrong here? > > ..Tom > > [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297 > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Julien-Samuel Lacroix T: +1 418-696-5056 #202 Mapgears http://www.mapgears.com/ From stephan at meissl.name Thu Jul 14 08:57:09 2016 From: stephan at meissl.name (=?UTF-8?Q?Stephan_Mei=c3=9fl?=) Date: Thu, 14 Jul 2016 17:57:09 +0200 Subject: [mapserver-users] Python MapScript via WSGI examples In-Reply-To: <5787AD7A.7060709@mapgears.com> References: <5787AD7A.7060709@mapgears.com> Message-ID: <5787B655.5050406@meissl.name> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Tom, adding to Julien's response you could also replace `request.loadParams()` with `request.loadParamsFromURL(env['QUERY_STRING'])`. As Julien said, key is that the environment variables are not set automatically. cu Stephan On 07/14/2016 05:19 PM, Julien-Samuel Lacroix wrote: > Hi Tom, > > When I run your script, I get the following response: > > This script can only be used to decode form results and > should be initiated as a CGI process via a httpd server. > > This answer does not contain any content-type that can be stripped wit h > msIO_getStdoutBufferBytes(). That's why it returns None. > > Before your OWSRequest call, you need to set the Environment variable > that MapServer needs. Otherwise they are passed in the env variable an d > not to MapServer. Code to add: > > > # List of all environment variable used by MapServer > mapserv_env = [ > 'CONTENT_LENGTH', 'CONTENT_TYPE', 'CURL_CA_BUNDLE', 'HTTP_COOKIE', > 'HTTP_HOST', 'HTTPS', 'HTTP_X_FORWARDED_HOST', 'HTTP_X_FORWARDED_PORT ', > 'HTTP_X_FORWARDED_PROTO', 'MS_DEBUGLEVEL', 'MS_ENCRYPTION_KEY', > 'MS_ERRORFILE', 'MS_MAPFILE', 'MS_MAPFILE_PATTERN', 'MS_MAP_NO_PATH', > 'MS_MAP_PATTERN', 'MS_MODE', 'MS_OPENLAYERS_JS_URL', 'MS_TEMPPATH', > 'MS_XMLMAPFILE_XSLT', 'PROJ_LIB', 'QUERY_STRING', 'REMOTE_ADDR', > 'REQUEST_METHOD', 'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT' > ] > for key in mapserv_env: > if key in env: > os.environ[key] = env[key] > else: > os.unsetenv(key) > request = mapscript.OWSRequest() > > > Best regards, > Julien > > On 16-07-13 12:55 PM, Kralidis, Tom (EC) wrote: >> Hi all: we are looking into updating our Python MapScript (CGI-based) >> wrappers >> to leverage WSGI, and are having integration issues as part of testin g. >> >> We are using 6.4.2 on Ubuntu 14.04. See example in [1] (against >> any mapfile is fine). Simple run with python ./mapscript-wsgi.py >> which makes >> the server available on localhost:8000 by default. >> >> Issues: >> >> - the value in >> https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297# file-mapscript-wsgi-py-L18 >> ends up being a Python None type for some reason when it should be a >> string of the content-type >> - issuing a, say, WMS 1.3.0 GetCapabilities request yields the >> venerable MapServer "This script can ...." default message, when I am >> expecting Capabilities XML >> >> Any ideas what I'm doing wrong here? >> >> ..Tom >> >> [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33 297 >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXh7ZVAAoJEKNQXeNWi+qtf9UP/1k7tdKlqkLm2wZ3449qcY5F f8c9OfudiF3UAcIM5+V6+MDMRYFBC4u55g7tsfXRp/iiL4IaDYL5S5xmCViGaEwK T3fcB+F1UsJ68q7QWRyrJwQW8CPXDACTnDppIGE4yspSxCQHubbrbDCNzvQhqlx2 7YcnqTTNghcPMM4AKg0etzH+9I73nYYzukiZe0ZGvI+g0caotEAdY/Xb5kb3GuzJ aWV4fgTJSgS/r0R6O1UP+I41jHEUrgqoT7qLNqdKOyv502YZ/EGwkclhnPQst2Bq 1jFeNqsfvju4D3Ob/EGl4GnQEfptYqh+KwRmxeB+tW8kzRdIVD1D9R0MlbM5NC4d JHY1/4fpeBcFjbA+MVIWr2tbV7gDV4Mht/4lUszDNCUt055vV47sd+NNXl78+Fk8 lrdqbqtxJzKW0mKAsr44jmn65iMrqm+ts06iHTLPfKFkHL7kxqDWk8wIy8Xq6rGE 5c5cbHQOj6bXqlgZGxxcLq3kZu/Tpg1VOnD+DorpnVLrR7JOnDV+JDSaU7YCfhzI yV2WYbEGuJCZKEH7bLY/8oQ3XKCiH8+0a+RRU1efLjzCquLSCYXAOUc6pCPNzlrY JCV8VT6Fmnp/+brrCxCMgse39LWK8x9RuxSbi8UocFhDnmtbDgojA7xrzt/onqBJ 6Fzq/t4Wnl3ifjK1vjlK =Gj2e -----END PGP SIGNATURE----- From jmckenna at gatewaygeomatics.com Thu Jul 14 10:48:53 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 14 Jul 2016 14:48:53 -0300 Subject: [mapserver-users] Python MapScript via WSGI examples In-Reply-To: References: Message-ID: <4503e8bb-e1e0-8d95-89ab-4054d4d0c059@gatewaygeomatics.com> Hi Tom, I have added a link to your example from the MapServer wiki[1]. Once you solve it, it would be great if you could update your example page with the working code. VIP [1] https://github.com/mapserver/mapserver/wiki -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-13 1:55 PM, Kralidis, Tom (EC) wrote: > Hi all: we are looking into updating our Python MapScript (CGI-based) wrappers > to leverage WSGI, and are having integration issues as part of testing. > > We are using 6.4.2 on Ubuntu 14.04. See example in [1] (against > any mapfile is fine). Simple run with python ./mapscript-wsgi.py which makes > the server available on localhost:8000 by default. > > Issues: > > - the value in https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297#file-mapscript-wsgi-py-L18 ends up being a Python None type for some reason when it should be a string of the content-type > - issuing a, say, WMS 1.3.0 GetCapabilities request yields the venerable MapServer "This script can ...." default message, when I am expecting Capabilities XML > > Any ideas what I'm doing wrong here? > > ..Tom > > [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297 From Robert.Vogt at rcis.com Thu Jul 14 11:51:32 2016 From: Robert.Vogt at rcis.com (Vogt, Robert (RCIS)) Date: Thu, 14 Jul 2016 18:51:32 +0000 Subject: [mapserver-users] Blank tiles Message-ID: <1491EB4E1D75164E940399B1F62D23CE5C67B985@PDEXCH10DB1.corp.rcis.com> Hey everyone, I'm using OL3 with mapserver...the problem I'm having is that MapServer seems to be running fine, I have a .map file say for "States" like this... MAP IMAGETYPE PNG24 CONFIG "PROJ_LIB" "C:/Program Files/MapServer/projlib/" EXTENT -180 -90 180 90 SIZE 256 256 FONTSET "E:/RCIS/Web/MapServerDlls/content/fontset.txt" IMAGECOLOR 255 255 255 TRANSPARENT ON PROJECTION AUTO END LAYER GROUP "Base" NAME "States" TYPE POLYGON STATUS ON LABELCACHE ON PROCESSING 'LABEL_NO_CLIP=1' CONNECTIONTYPE PLUGIN PLUGIN "msplugin_mssql2008.dll" CONNECTION "server=stbisqlr3.dvcorp.rcis.com,5208;uid=Mapping01D;pwd=9GreenSnap#4D;Initial Catalog=NATIONALDB;Integrated Security=False" DATA "shape(geography),ST_NAME_MC from NATIONALDB.sde.STATES USING INDEX STATES_SIDX USING UNIQUE STATES_ID USING SRID=4269" LABELITEM "ST_NAME_MC" CLASS STYLE OUTLINECOLOR 000 153 000 WIDTH 3 END LABEL COLOR 000 153 000 TYPE TRUETYPE FONT Arial SIZE 12 ANTIALIAS FALSE POSITION AUTO PARTIALS FALSE MINDISTANCE 2000 MINSCALEDENOM 20.00 END END PROJECTION AUTO END END END And I build my map like so in OL3... control.map = new ol.Map({ target: 'map', renderer: 'canvas', layers: [], view: new ol.View({ projection: 'EPSG:4326', center: [0, 0], zoom: 12 }) }); Create a vector layer that determines the extent, creates the view, and shows vector objects...which works!! vectorObjs.promise.then(function () { //Create empty extent var extent = ol.extent.createEmpty(); //Loop through vector layers to add them to map and determine extent var totalExtent = ol.extent; angular.forEach(webMapValues.vectorFieldLayer, function (Field, key) { control.map.addLayer(Field); extent = Field.getSource().getExtent(); totalExtent = ol.extent.extend(extent, totalExtent); }) control.map.getView().fit(totalExtent, control.map.getSize()); var view = new ol.View({ center: control.map.getView().getCenter(), zoom: 8, minZoom: 1, maxZoom: 19 }); control.map.view = view; Then I try to add the states layer to the map and everything seems like it's working but I don't see any state tiles? var States = new ol.layer.Tile({ name: 'States', extent: totalExtent, source: new ol.source.TileWMS({ url: 'http://dvfmweb2:80/mapserver/mapserv.exe?map=E:/RCIS/Web/Mapfiles/MappingBase.map&', params: { 'LAYERS': 'States', 'BBOX': totalExtent, 'TILED': true } }) }); control.map.addLayer(States); When I execute the call I see several line items in Chrome dev tools indicating state tiles i.e. http://dvfmweb2/mapserver/mapserv.exe?map=E:/RCIS/Web/Mapfiles/MappingState.map&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=States&BBOX=47.318115234375%2C-109.423828125%2C47.3291015625%2C-109.412841796875&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A4326&STYLES However I just see white? Any help is greatly appreciated, I've been banging my head on this too long!! -Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom.kralidis at canada.ca Fri Jul 15 11:05:50 2016 From: tom.kralidis at canada.ca (Kralidis, Tom (EC)) Date: Fri, 15 Jul 2016 18:05:50 +0000 Subject: [mapserver-users] Python MapScript via WSGI examples In-Reply-To: <5787B655.5050406@meissl.name> References: <5787AD7A.7060709@mapgears.com> <5787B655.5050406@meissl.name> Message-ID: Thanks Julien and Stephan: I've updated my example in [1], however I get the following traceback when issuing a WMS 1.1.1 GetMap request: Traceback (most recent call last): File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "mapscript-wsgi.py", line 40, in application start_response('200 OK', [('Content-type', content_type)]) File "/usr/lib/python2.7/wsgiref/handlers.py", line 180, in start_response assert type(val) is StringType,"Header values must be strings" AssertionError: Header values must be string Any idea? ..Tom [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297 > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Stephan Mei?l > Sent: 14 July 2016 11:57 > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Python MapScript via WSGI examples > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Tom, > > adding to Julien's response you could also replace > `request.loadParams()` with > `request.loadParamsFromURL(env['QUERY_STRING'])`. > > As Julien said, key is that the environment variables are not set > automatically. > > cu > Stephan > > > On 07/14/2016 05:19 PM, Julien-Samuel Lacroix wrote: > > Hi Tom, > > > > When I run your script, I get the following response: > > > > This script can only be used to decode form results and > > should be initiated as a CGI process via a httpd server. > > > > This answer does not contain any content-type that can be stripped wit > h > > msIO_getStdoutBufferBytes(). That's why it returns None. > > > > Before your OWSRequest call, you need to set the Environment variable > > that MapServer needs. Otherwise they are passed in the env variable an > d > > not to MapServer. Code to add: > > > > > > # List of all environment variable used by MapServer > > mapserv_env = [ > > 'CONTENT_LENGTH', 'CONTENT_TYPE', 'CURL_CA_BUNDLE', > 'HTTP_COOKIE', > > 'HTTP_HOST', 'HTTPS', 'HTTP_X_FORWARDED_HOST', > 'HTTP_X_FORWARDED_PORT > ', > > 'HTTP_X_FORWARDED_PROTO', 'MS_DEBUGLEVEL', > 'MS_ENCRYPTION_KEY', > > 'MS_ERRORFILE', 'MS_MAPFILE', 'MS_MAPFILE_PATTERN', > 'MS_MAP_NO_PATH', > > 'MS_MAP_PATTERN', 'MS_MODE', 'MS_OPENLAYERS_JS_URL', > 'MS_TEMPPATH', > > 'MS_XMLMAPFILE_XSLT', 'PROJ_LIB', 'QUERY_STRING', 'REMOTE_ADDR', > > 'REQUEST_METHOD', 'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT' > > ] > > for key in mapserv_env: > > if key in env: > > os.environ[key] = env[key] > > else: > > os.unsetenv(key) > > request = mapscript.OWSRequest() > > > > > > Best regards, > > Julien > > > > On 16-07-13 12:55 PM, Kralidis, Tom (EC) wrote: > >> Hi all: we are looking into updating our Python MapScript (CGI-based) > >> wrappers > >> to leverage WSGI, and are having integration issues as part of testin > g. > >> > >> We are using 6.4.2 on Ubuntu 14.04. See example in [1] (against > >> any mapfile is fine). Simple run with python ./mapscript-wsgi.py > >> which makes > >> the server available on localhost:8000 by default. > >> > >> Issues: > >> > >> - the value in > >> > https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297# > file-mapscript-wsgi-py-L18 > >> ends up being a Python None type for some reason when it should be a > >> string of the content-type > >> - issuing a, say, WMS 1.3.0 GetCapabilities request yields the > >> venerable MapServer "This script can ...." default message, when I am > >> expecting Capabilities XML > >> > >> Any ideas what I'm doing wrong here? > >> > >> ..Tom > >> > >> [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33 > 297 > >> _______________________________________________ > >> mapserver-users mailing list > >> mapserver-users at lists.osgeo.org > >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >> > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.22 (GNU/Linux) > > iQIcBAEBAgAGBQJXh7ZVAAoJEKNQXeNWi+qtf9UP/1k7tdKlqkLm2wZ3449qcY > 5F > f8c9OfudiF3UAcIM5+V6+MDMRYFBC4u55g7tsfXRp/iiL4IaDYL5S5xmCViGaEw > K > T3fcB+F1UsJ68q7QWRyrJwQW8CPXDACTnDppIGE4yspSxCQHubbrbDCNzvQh > qlx2 > 7YcnqTTNghcPMM4AKg0etzH+9I73nYYzukiZe0ZGvI+g0caotEAdY/Xb5kb3GuzJ > aWV4fgTJSgS/r0R6O1UP+I41jHEUrgqoT7qLNqdKOyv502YZ/EGwkclhnPQst2B > q > 1jFeNqsfvju4D3Ob/EGl4GnQEfptYqh+KwRmxeB+tW8kzRdIVD1D9R0MlbM5N > C4d > JHY1/4fpeBcFjbA+MVIWr2tbV7gDV4Mht/4lUszDNCUt055vV47sd+NNXl78+Fk > 8 > lrdqbqtxJzKW0mKAsr44jmn65iMrqm+ts06iHTLPfKFkHL7kxqDWk8wIy8Xq6rG > E > 5c5cbHQOj6bXqlgZGxxcLq3kZu/Tpg1VOnD+DorpnVLrR7JOnDV+JDSaU7YCfhz > I > yV2WYbEGuJCZKEH7bLY/8oQ3XKCiH8+0a+RRU1efLjzCquLSCYXAOUc6pCPNzl > rY > JCV8VT6Fmnp/+brrCxCMgse39LWK8x9RuxSbi8UocFhDnmtbDgojA7xrzt/onq > BJ > 6Fzq/t4Wnl3ifjK1vjlK > =Gj2e > -----END PGP SIGNATURE----- > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From jlacroix at mapgears.com Fri Jul 15 12:25:11 2016 From: jlacroix at mapgears.com (Julien-Samuel Lacroix) Date: Fri, 15 Jul 2016 15:25:11 -0400 Subject: [mapserver-users] Python MapScript via WSGI examples In-Reply-To: References: <5787AD7A.7060709@mapgears.com> <5787B655.5050406@meissl.name> Message-ID: <57893897.5060008@mapgears.com> Hi Tom, I tried your script and simply changed the mapfile to use the one in mapserver/tests/ I got a valid response from the following URL: http://127.0.0.1:8001/?service=wms&request=GetMap&layers=Testing&version=1.1.1&format=image/png&srs=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=600&HEIGHT=300 What are you using? Julien On 16-07-15 02:05 PM, Kralidis, Tom (EC) wrote: > Thanks Julien and Stephan: I've updated my example in [1], however I get > the following traceback when issuing a WMS 1.1.1 GetMap request: > > Traceback (most recent call last): > File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run > self.result = application(self.environ, self.start_response) > File "mapscript-wsgi.py", line 40, in application > start_response('200 OK', [('Content-type', content_type)]) > File "/usr/lib/python2.7/wsgiref/handlers.py", line 180, in start_response > assert type(val) is StringType,"Header values must be strings" > AssertionError: Header values must be string > > Any idea? > > ..Tom > > [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297 > >> -----Original Message----- >> From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] >> On Behalf Of Stephan Mei?l >> Sent: 14 July 2016 11:57 >> To: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Python MapScript via WSGI examples >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Hi Tom, >> >> adding to Julien's response you could also replace >> `request.loadParams()` with >> `request.loadParamsFromURL(env['QUERY_STRING'])`. >> >> As Julien said, key is that the environment variables are not set >> automatically. >> >> cu >> Stephan >> >> >> On 07/14/2016 05:19 PM, Julien-Samuel Lacroix wrote: >>> Hi Tom, >>> >>> When I run your script, I get the following response: >>> >>> This script can only be used to decode form results and >>> should be initiated as a CGI process via a httpd server. >>> >>> This answer does not contain any content-type that can be stripped wit >> h >>> msIO_getStdoutBufferBytes(). That's why it returns None. >>> >>> Before your OWSRequest call, you need to set the Environment variable >>> that MapServer needs. Otherwise they are passed in the env variable an >> d >>> not to MapServer. Code to add: >>> >>> >>> # List of all environment variable used by MapServer >>> mapserv_env = [ >>> 'CONTENT_LENGTH', 'CONTENT_TYPE', 'CURL_CA_BUNDLE', >> 'HTTP_COOKIE', >>> 'HTTP_HOST', 'HTTPS', 'HTTP_X_FORWARDED_HOST', >> 'HTTP_X_FORWARDED_PORT >> ', >>> 'HTTP_X_FORWARDED_PROTO', 'MS_DEBUGLEVEL', >> 'MS_ENCRYPTION_KEY', >>> 'MS_ERRORFILE', 'MS_MAPFILE', 'MS_MAPFILE_PATTERN', >> 'MS_MAP_NO_PATH', >>> 'MS_MAP_PATTERN', 'MS_MODE', 'MS_OPENLAYERS_JS_URL', >> 'MS_TEMPPATH', >>> 'MS_XMLMAPFILE_XSLT', 'PROJ_LIB', 'QUERY_STRING', 'REMOTE_ADDR', >>> 'REQUEST_METHOD', 'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT' >>> ] >>> for key in mapserv_env: >>> if key in env: >>> os.environ[key] = env[key] >>> else: >>> os.unsetenv(key) >>> request = mapscript.OWSRequest() >>> >>> >>> Best regards, >>> Julien >>> >>> On 16-07-13 12:55 PM, Kralidis, Tom (EC) wrote: >>>> Hi all: we are looking into updating our Python MapScript (CGI-based) >>>> wrappers >>>> to leverage WSGI, and are having integration issues as part of testin >> g. >>>> >>>> We are using 6.4.2 on Ubuntu 14.04. See example in [1] (against >>>> any mapfile is fine). Simple run with python ./mapscript-wsgi.py >>>> which makes >>>> the server available on localhost:8000 by default. >>>> >>>> Issues: >>>> >>>> - the value in >>>> >> https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297# >> file-mapscript-wsgi-py-L18 >>>> ends up being a Python None type for some reason when it should be a >>>> string of the content-type >>>> - issuing a, say, WMS 1.3.0 GetCapabilities request yields the >>>> venerable MapServer "This script can ...." default message, when I am >>>> expecting Capabilities XML >>>> >>>> Any ideas what I'm doing wrong here? >>>> >>>> ..Tom >>>> >>>> [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33 >> 297 >>>> _______________________________________________ >>>> mapserver-users mailing list >>>> mapserver-users at lists.osgeo.org >>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >>> >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v2.0.22 (GNU/Linux) >> >> iQIcBAEBAgAGBQJXh7ZVAAoJEKNQXeNWi+qtf9UP/1k7tdKlqkLm2wZ3449qcY >> 5F >> f8c9OfudiF3UAcIM5+V6+MDMRYFBC4u55g7tsfXRp/iiL4IaDYL5S5xmCViGaEw >> K >> T3fcB+F1UsJ68q7QWRyrJwQW8CPXDACTnDppIGE4yspSxCQHubbrbDCNzvQh >> qlx2 >> 7YcnqTTNghcPMM4AKg0etzH+9I73nYYzukiZe0ZGvI+g0caotEAdY/Xb5kb3GuzJ >> aWV4fgTJSgS/r0R6O1UP+I41jHEUrgqoT7qLNqdKOyv502YZ/EGwkclhnPQst2B >> q >> 1jFeNqsfvju4D3Ob/EGl4GnQEfptYqh+KwRmxeB+tW8kzRdIVD1D9R0MlbM5N >> C4d >> JHY1/4fpeBcFjbA+MVIWr2tbV7gDV4Mht/4lUszDNCUt055vV47sd+NNXl78+Fk >> 8 >> lrdqbqtxJzKW0mKAsr44jmn65iMrqm+ts06iHTLPfKFkHL7kxqDWk8wIy8Xq6rG >> E >> 5c5cbHQOj6bXqlgZGxxcLq3kZu/Tpg1VOnD+DorpnVLrR7JOnDV+JDSaU7YCfhz >> I >> yV2WYbEGuJCZKEH7bLY/8oQ3XKCiH8+0a+RRU1efLjzCquLSCYXAOUc6pCPNzl >> rY >> JCV8VT6Fmnp/+brrCxCMgse39LWK8x9RuxSbi8UocFhDnmtbDgojA7xrzt/onq >> BJ >> 6Fzq/t4Wnl3ifjK1vjlK >> =Gj2e >> -----END PGP SIGNATURE----- >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Julien-Samuel Lacroix T: +1 418-696-5056 #202 Mapgears http://www.mapgears.com/ From jmckenna at gatewaygeomatics.com Fri Jul 15 14:46:24 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 15 Jul 2016 18:46:24 -0300 Subject: [mapserver-users] Python MapScript via WSGI examples In-Reply-To: <20160715180557.9EA3A611D7A7@lists.osgeo.org> References: <5787AD7A.7060709@mapgears.com> <5787B655.5050406@meissl.name> <20160715180557.9EA3A611D7A7@lists.osgeo.org> Message-ID: Hi Tom, I believe I have your test working here, on Windows with mod_wsgi, Python 3.5.1, and MapScript7. Googling your error I believe your header problem occurs just for Python2 responses (maybe both Julien and I are using Python3 ?) What happens if you try to force the content-type to utf8 ? Change line#40 to: start_response('200 OK', [('Content-type', 'text/html; charset=utf-8')]) Just a guess as I have Python3. A try anyway... -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-15 3:05 PM, Kralidis, Tom (EC) wrote: > Thanks Julien and Stephan: I've updated my example in [1], however I get > the following traceback when issuing a WMS 1.1.1 GetMap request: > > Traceback (most recent call last): > File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run > self.result = application(self.environ, self.start_response) > File "mapscript-wsgi.py", line 40, in application > start_response('200 OK', [('Content-type', content_type)]) > File "/usr/lib/python2.7/wsgiref/handlers.py", line 180, in start_response > assert type(val) is StringType,"Header values must be strings" > AssertionError: Header values must be string > > Any idea? > > ..Tom > > [1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297 > From jmckenna at gatewaygeomatics.com Fri Jul 15 14:55:55 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 15 Jul 2016 18:55:55 -0300 Subject: [mapserver-users] Python MapScript via WSGI examples In-Reply-To: References: <5787AD7A.7060709@mapgears.com> <5787B655.5050406@meissl.name> <20160715180557.9EA3A611D7A7@lists.osgeo.org> Message-ID: On 2016-07-15 6:46 PM, Jeff McKenna wrote: > Hi Tom, > > I believe I have your test working here, on Windows with mod_wsgi, > Python 3.5.1, and MapScript7. Googling your error I believe your header > problem occurs just for Python2 responses (maybe both Julien and I are > using Python3 ?) What happens if you try to force the content-type to > utf8 ? Change line#40 to: > > start_response('200 OK', [('Content-type', 'text/html; charset=utf-8')]) > > Just a guess as I have Python3. A try anyway... > Or maybe the output should be bytes, as: start_response('200 OK', [('Content-type', 'application/octet-stream; charset=utf-8')]) I'd need a Python2 to test though.....hard without. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From abrabacabra at openmailbox.org Sun Jul 17 20:45:10 2016 From: abrabacabra at openmailbox.org (prototron) Date: Sun, 17 Jul 2016 20:45:10 -0700 (PDT) Subject: [mapserver-users] Mapcache: Can't get transparency from WMS layer Message-ID: <1468813510647-5276797.post@n6.nabble.com> Hello, I have a Mapserver up and running, sharing WMS layers. Those layers are rendered with transparency, but not with Mapcache. I can add the layers in QGIS, and the caching works. But not the transparency. I tried to add tag into the tag of the source. No reference to JPEG format, only PNG. Here is my config file: http://pastebin.com/gHx0eiw3 -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapcache-Can-t-get-transparency-from-WMS-layer-tp5276797.html Sent from the Mapserver - User mailing list archive at Nabble.com. From aperi2007 at gmail.com Sun Jul 17 23:54:00 2016 From: aperi2007 at gmail.com (Andrea Peri) Date: Mon, 18 Jul 2016 08:54:00 +0200 Subject: [mapserver-users] feature_id not found as wfs feature_id in a spatialite db Message-ID: Hi, I have a dataset in a spatialite and try to set a wfs 2.0.0 service. It seem work all ok but I have this warning: The result of thi warning is that the gml feture as numberes as this: .1 .2 .3 Not really beautiful. :( This is my mapfile setting: "wfs_featureid" "PK_UID" And I verify that the PK_UID field is an integer and primary key fied in my spatialite table. I like to understand why mapserver seem don't recognize a field that is primary key as feature_id field. Any hint is welcome. Thx, Andrea -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From even.rouault at spatialys.com Mon Jul 18 01:02:07 2016 From: even.rouault at spatialys.com (Even Rouault) Date: Mon, 18 Jul 2016 10:02:07 +0200 Subject: [mapserver-users] feature_id not found as wfs feature_id in a spatialite db In-Reply-To: References: Message-ID: <201607181002.07656.even.rouault@spatialys.com> Andrea, > I like to understand why mapserver seem don't recognize a field that > is primary key as feature_id field. The issue is that PK_UID is recognized by OGR as the field for the OGR featureid and thus not exposed as an item to MapServer. One way to workaround this is to make the PK_UID field available as a regular field with a SELECT For example, like this : NAME towns DATA "SELECT ROWID as msFID, * FROM towns" CONNECTIONTYPE OGR CONNECTION "./data/db.sqlite" METADATA "ows_title" "towns" "wfs_featureid" "msFID" "gml_exclude_items" "msFID" "gml_include_items" "all" "gml_types" "auto" END Even -- Spatialys - Geospatial professional services http://www.spatialys.com From aperi2007 at gmail.com Mon Jul 18 02:24:30 2016 From: aperi2007 at gmail.com (Andrea Peri) Date: Mon, 18 Jul 2016 11:24:30 +0200 Subject: [mapserver-users] feature_id not found as wfs feature_id in a spatialite db In-Reply-To: <201607181002.07656.even.rouault@spatialys.com> References: <201607181002.07656.even.rouault@spatialys.com> Message-ID: Hi Even, Your workaround is work and is perfect for me. Thx, A. 2016-07-18 10:02 GMT+02:00 Even Rouault : > Andrea, > >> I like to understand why mapserver seem don't recognize a field that >> is primary key as feature_id field. > > The issue is that PK_UID is recognized by OGR as the field for the OGR > featureid and thus not exposed as an item to MapServer. One way to workaround > this is to make the PK_UID field available as a regular field with a SELECT > > For example, like this : > > NAME towns > DATA "SELECT ROWID as msFID, * FROM towns" > CONNECTIONTYPE OGR > CONNECTION "./data/db.sqlite" > METADATA > "ows_title" "towns" > "wfs_featureid" "msFID" > "gml_exclude_items" "msFID" > "gml_include_items" "all" > "gml_types" "auto" > END > > Even > > -- > Spatialys - Geospatial professional services > http://www.spatialys.com -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From tkirstine at firstbasesolutions.com Mon Jul 18 06:40:47 2016 From: tkirstine at firstbasesolutions.com (Travis Kirstine) Date: Mon, 18 Jul 2016 13:40:47 +0000 Subject: [mapserver-users] Mapcache: Can't get transparency from WMS layer In-Reply-To: <1468813510647-5276797.post@n6.nabble.com> References: <1468813510647-5276797.post@n6.nabble.com> Message-ID: <5d8964624acd4f8f8d301935d9b3b50b@MBX12B-IAD3.mex08.mlsrvr.com> In your WMS requests logs (i.e. Apache) does mapcache make a request for a transparent image and is the image returned transparent, if you copy the mapcache generated request into your browser or fetch the wms via curl is the image transparent? -----Original Message----- From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of prototron Sent: July-17-16 11:45 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Mapcache: Can't get transparency from WMS layer Hello, I have a Mapserver up and running, sharing WMS layers. Those layers are rendered with transparency, but not with Mapcache. I can add the layers in QGIS, and the caching works. But not the transparency. I tried to add tag into the tag of the source. No reference to JPEG format, only PNG. Here is my config file: http://pastebin.com/gHx0eiw3 -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapcache-Can-t-get-transparency-from-WMS-layer-tp5276797.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 socrtwo at s2services.com Mon Jul 18 12:40:20 2016 From: socrtwo at s2services.com (Paul D Pruitt) Date: Mon, 18 Jul 2016 15:40:20 -0400 Subject: [mapserver-users] unsubscribe Message-ID: unsubscribe Best Wishes, Paul D Pruitt socrtwo at s2services.com (301) 493-4982 9006 Friars Rd. Bethesda, MD 20817-3320 - Have a manuscript lying around gathering dust? Let me help you self-publish it . On Mon, Jul 18, 2016 at 5:24 AM, Andrea Peri wrote: > Hi Even, > Your workaround is work and is perfect for me. > > Thx, > > A. > > > 2016-07-18 10:02 GMT+02:00 Even Rouault : > > Andrea, > > > >> I like to understand why mapserver seem don't recognize a field that > >> is primary key as feature_id field. > > > > The issue is that PK_UID is recognized by OGR as the field for the OGR > > featureid and thus not exposed as an item to MapServer. One way to > workaround > > this is to make the PK_UID field available as a regular field with a > SELECT > > > > For example, like this : > > > > NAME towns > > DATA "SELECT ROWID as msFID, * FROM towns" > > CONNECTIONTYPE OGR > > CONNECTION "./data/db.sqlite" > > METADATA > > "ows_title" "towns" > > "wfs_featureid" "msFID" > > "gml_exclude_items" "msFID" > > "gml_include_items" "all" > > "gml_types" "auto" > > END > > > > Even > > > > -- > > Spatialys - Geospatial professional services > > http://www.spatialys.com > > > > -- > ----------------- > Andrea Peri > . . . . . . . . . > qwerty ????? > ----------------- > _______________________________________________ > 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 mathias.cunault at inrap.fr Tue Jul 19 04:18:45 2016 From: mathias.cunault at inrap.fr (mathias cunault) Date: Tue, 19 Jul 2016 13:18:45 +0200 Subject: [mapserver-users] ogrinfo : couldn't fetch requested layer Message-ID: Hello, I have created an odbc connexion named basol to use csv and vrt files in Mapserver. Ogrinfo can open basol (using driver ODBC successfully) `ogrinfo ODBC:@basol test.csv but says "FAILURE : Couldn't fetch requested layer test.csv" Is it a problem with system environnment variables ? Does it mean that mapserver will not be able to draw the layer later ? Thanks Apache version 2.2.22 PHP version 5.4.3 MapServer 6.0.3 CGI and MapScript (CSharp, Java, PHP, Python) GDAL 1.9.1 mapserver utilities gdal/ogr utilities windows -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From tkirstine at firstbasesolutions.com Tue Jul 19 07:48:55 2016 From: tkirstine at firstbasesolutions.com (Travis Kirstine) Date: Tue, 19 Jul 2016 14:48:55 +0000 Subject: [mapserver-users] ogrinfo : couldn't fetch requested layer In-Reply-To: References: Message-ID: Are you trying to read a CSV file? You shouldn?t need a odbc connection to do that. What does your vrt file look like? From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of mathias cunault Sent: July-19-16 7:19 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] ogrinfo : couldn't fetch requested layer Hello, I have created an odbc connexion named basol to use csv and vrt files in Mapserver. Ogrinfo can open basol (using driver ODBC successfully) `ogrinfo ODBC:@basol test.csv but says "FAILURE : Couldn't fetch requested layer test.csv" Is it a problem with system environnment variables ? Does it mean that mapserver will not be able to draw the layer later ? Thanks Apache version 2.2.22 PHP version 5.4.3 MapServer 6.0.3 CGI and MapScript (CSharp, Java, PHP, Python) GDAL 1.9.1 mapserver utilities gdal/ogr utilities windows -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From diregola at gmail.com Thu Jul 21 04:46:48 2016 From: diregola at gmail.com (Margherita Di Leo) Date: Thu, 21 Jul 2016 13:46:48 +0200 Subject: [mapserver-users] Multiple offsite values Message-ID: Hello, Is there a way to set multiple offsite values in mapserver? I've been googling without success, and I've also made some trials indicating two offsite, but the last one overwrites the first. Perhaps there is another form to do so? It would be a useful feature if not yet implemented. Thank you in advance for any help. -- Margherita Di Leo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Thu Jul 21 07:16:51 2016 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Thu, 21 Jul 2016 14:16:51 +0000 Subject: [mapserver-users] Multiple offsite values In-Reply-To: References: Message-ID: That?s not possible using just the keyword. I wonder if it might be possible by using: - MapServer CLASSes to map multiple values to a single color and then use OFFSITE with that color? - GDAL lookup tables via MapServer processing directives See http://mapserver.org/input/raster.html. Steve From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Margherita Di Leo Sent: Thursday, July 21, 2016 6:47 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Multiple offsite values Hello, Is there a way to set multiple offsite values in mapserver? I've been googling without success, and I've also made some trials indicating two offsite, but the last one overwrites the first. Perhaps there is another form to do so? It would be a useful feature if not yet implemented. Thank you in advance for any help. -- Margherita Di Leo -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenia.ivlev at gmail.com Sat Jul 23 15:46:15 2016 From: jenia.ivlev at gmail.com (jenia mtl) Date: Sat, 23 Jul 2016 18:46:15 -0400 Subject: [mapserver-users] How to point mapserv to my mapfile? Message-ID: Hello. How can I specify the mapfile path to the mapserv fastcgi process? My problem is that I get a 502 error when try to access http://localhost/cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map I get: 2016/07/23 17:45:22 [error] 1768#1768: *7 upstream prematurely closed FastCGI stdout while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/example1- 1.map&layer=states&mode=map HTTP/1.1", upstream: "fastcgi://127.0.0.1:8001", host: "localhost" This is how I start mapserver: `spawn-fcgi -a 127.0.0.1 -p 8001 /usr/bin/mapserv` I'm thinking it's because I didn't specify a `mapfile`. And in any case, I'd like to see the error logs from mapserver (error logs configs go to the mapfile apperently). So again, where is the `mapfile` or how do I specify the `mapfile` path for the `mapserv`instance? Thanks in advance for your kind help. Jenia P.S. This is my nginx config: server { listen 80; server_name localhost; error_log /home/jenia/error.log; access_log /home/jenia/access.log; location ~ / { fastcgi_pass 127.0.0.1:8001; error_log /home/jenia/error.log; access_log /home/jenia/access.log; } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenia.ivlev at gmail.com Sat Jul 23 15:51:30 2016 From: jenia.ivlev at gmail.com (jenia mtl) Date: Sat, 23 Jul 2016 18:51:30 -0400 Subject: [mapserver-users] How to point mapserv to my mapfile? In-Reply-To: References: Message-ID: I got it. It's the `map`parameter in the URL. Thanks in any case everyone. Writing this email helped me discover the answer ;) On Sat, Jul 23, 2016 at 6:46 PM, jenia mtl wrote: > Hello. > > > How can I specify the mapfile path to the mapserv fastcgi process? > > My problem is that I get a 502 error when try to access > > http://localhost/cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map > > I get: > > 2016/07/23 17:45:22 [error] 1768#1768: *7 upstream prematurely closed > FastCGI stdout while reading response header from upstream, client: > 127.0.0.1, server: localhost, request: "GET > /cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/example1- > 1.map&layer=states&mode=map > HTTP/1.1", upstream: "fastcgi://127.0.0.1:8001", host: "localhost" > > > This is how I start mapserver: > > `spawn-fcgi -a 127.0.0.1 -p 8001 /usr/bin/mapserv` > > > I'm thinking it's because I didn't specify a `mapfile`. And in any case, > I'd like to see the error logs from mapserver (error logs configs go to > the mapfile apperently). > > So again, where is the `mapfile` or how do I specify the `mapfile` path > for the `mapserv`instance? > > > Thanks in advance for your kind help. > Jenia > > > P.S. This is my nginx config: > > server { > > listen 80; > server_name localhost; > error_log /home/jenia/error.log; > access_log /home/jenia/access.log; > > location ~ / { > fastcgi_pass 127.0.0.1:8001; > error_log /home/jenia/error.log; > access_log /home/jenia/access.log; > } > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenia.ivlev at gmail.com Sun Jul 24 12:52:33 2016 From: jenia.ivlev at gmail.com (jenia mtl) Date: Sun, 24 Jul 2016 15:52:33 -0400 Subject: [mapserver-users] Where is the error log file? Message-ID: Hello I want to do the first example in the MS docs but I get: 502 errors: 20 upstream prematurely closed FastCGI stdout while reading response header from upstream. So I decided that I definitely need to read the error log from Mapserver but I can't find it. So my question is, where is the error log of MapServer? I launch MS like this: spawn-fcgi -a 127.0.0.1 -p 8001 /usr/bin/mapserv I use archlinux. Typically in systemd (which archlinux uses) the error logs go to a standard place (journalctl). But I can't find them there. Specifically, I tried do `journalctl --no-pager | grep mapserv`. Didn't find anything from mapserv. So my question again is where is the error log of MapServer? I tried to set a custom error log path, but it didn't work. The error.txt file is not being written to. Here is the relevant part of the config: CONFIG "MS_ERRORFILE" "/home/jenia/mapserver-exercises/error.txt" DEBUG 5 The rest is just this mapfile (with the paths changed ofcourse): http://mapserver.org/tutorial/example1-1-map.html#example1-1-map And I access it using this url: http://localhost/cgi-bin/mapserv?map=/home/jenia/mapserver-exercises/example1-1.map&layer=states&mode=map That's the mapfile's ls output: [jenia at localhost mapserver-exercises]$ ls -l /home/jenia/mapserver-exercises/example1-1.map -rw-r--r-- 1 jenia jenia 2328 Jul 24 14:04 /home/jenia/mapserver-exercises/example1-1.map To reiterate, I have two quesiton. 1. Most importantly, where is the default Mapserver error log? 2. What did I do wrong in setting the custom error log? Thanks in advance for your time and kind help Jenia -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Sanson at asurequality.com Sun Jul 24 13:43:14 2016 From: Robert.Sanson at asurequality.com (Robert Sanson) Date: Sun, 24 Jul 2016 20:43:14 +0000 Subject: [mapserver-users] Where is the error log file? In-Reply-To: References: Message-ID: Hi Jenia I configure the location of my Mapserver error log file in my map file: CONFIG "MS_ERRORFILE" "/mnt/gisdata/tmp/ms_tmp/ms_error.txt" Regards, Robert From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of jenia mtl Sent: Monday, 25 July 2016 7:53 a.m. To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Where is the error log file? Hello I want to do the first example in the MS docs but I get: 502 errors: 20 upstream prematurely closed FastCGI stdout while reading response header from upstream. So I decided that I definitely need to read the error log from Mapserver but I can't find it. So my question is, where is the error log of MapServer? I launch MS like this: spawn-fcgi -a 127.0.0.1 -p 8001 /usr/bin/mapserv I use archlinux. Typically in systemd (which archlinux uses) the error logs go to a standard place (journalctl). But I can't find them there. Specifically, I tried do `journalctl --no-pager | grep mapserv`. Didn't find anything from mapserv. So my question again is where is the error log of MapServer? I tried to set a custom error log path, but it didn't work. The error.txt file is not being written to. Here is the relevant part of the config: CONFIG "MS_ERRORFILE" "/home/jenia/mapserver-exercises/error.txt" DEBUG 5 The rest is just this mapfile (with the paths changed ofcourse): http://mapserver.org/tutorial/example1-1-map.html#example1-1-map And I access it using this url: http://localhost/cgi-bin/mapserv?map=/home/jenia/mapserver-exercises/example1-1.map&layer=states&mode=map That's the mapfile's ls output: [jenia at localhost mapserver-exercises]$ ls -l /home/jenia/mapserver-exercises/example1-1.map -rw-r--r-- 1 jenia jenia 2328 Jul 24 14:04 /home/jenia/mapserver-exercises/example1-1.map To reiterate, I have two quesiton. 1. Most importantly, where is the default Mapserver error log? 2. What did I do wrong in setting the custom error log? Thanks in advance for your time and kind help Jenia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Sun Jul 24 14:16:05 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Sun, 24 Jul 2016 18:16:05 -0300 Subject: [mapserver-users] Where is the error log file? In-Reply-To: References: Message-ID: Hello, I recommend that you spend some effort reading through the entire 'MapServer Debugging' document: http://www.mapserver.org/optimization/debugging.html I know myself that I refer to that document often, as I'm trying to see error messages and logs from the various parts of the MapServer family. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-24 4:52 PM, jenia mtl wrote: > Hello > > I want to do the first example in the MS docs but I get: > > From ullas at maptell.com Mon Jul 25 21:45:24 2016 From: ullas at maptell.com (Ullas Dastakar) Date: Tue, 26 Jul 2016 10:15:24 +0530 Subject: [mapserver-users] GUI for map file creation/edit Message-ID: <5CA8BADC-14CF-4B44-89DD-CB5FFE340540@maptell.com> Dear All We are developing a GUI for map file maker named as Crowmap. This is available in beta form under Github. This is a standalone application that can run in a browser. This application can be used to create/ edit map files. No map server is required for running this tool . Please try the tool and give your valuable feedbacks. Currently the tool is written for Mapserver 7.0.1 The github link is given below. https://github.com/Maptell/crowmap Looking forward to hear from you, Thanks & Rgds, Ullas Dastakar, CTO,Maptell Geosystems Private Limited, TC 14/1936, Sunny Meads Lane, Bakery Jn., Thiruvananthapuram - 695034 Kerala, India. Ph: +91 471 2320123 Mobile: +919633303053 Web: http://www.maptell.com Thanks & Rgds, Ullas Dastakar, CTO,Maptell Geosystems Private Limited, TC 14/1936, Sunny Meads Lane, Bakery Jn., Thiruvananthapuram - 695034 Kerala, India. Ph: +91 471 2320123 Mobile: +919633303053 Web: http://www.maptell.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahmettemiz88 at gmail.com Tue Jul 26 00:12:58 2016 From: ahmettemiz88 at gmail.com (Ahmet Temiz) Date: Tue, 26 Jul 2016 10:12:58 +0300 Subject: [mapserver-users] mapserver-cgi displays nothing Message-ID: Our mapserver-cgi displays nothing. http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/trdem1.map&layer=runtimeSubstitution&yuk=50 ? VALIDATION 'yuk' '^[0-9]$' END CLASS EXPRESSION ([pixel] >= 'yuk' ) STYLE COLOR 255 0 0 END END #end class ? ?What am I doing wrong? regards? -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Bilgi ??lem Dairesi Ba?kanl???-CBS Grubu ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency -------------- next part -------------- An HTML attachment was scrubbed... URL: From yves.jacolin at camptocamp.com Tue Jul 26 00:17:38 2016 From: yves.jacolin at camptocamp.com (Yves Jacolin) Date: Tue, 26 Jul 2016 09:17:38 +0200 Subject: [mapserver-users] mapserver-cgi displays nothing In-Reply-To: References: Message-ID: <3686202.gF9ifiKd2b@tatras> On Tuesday, July 26, 2016 10:12:58 Ahmet Temiz wrote: > Our mapserver-cgi displays nothing. > > http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/trdem1.map&layer=runt > imeSubstitution&yuk=50 > > ? VALIDATION > 'yuk' '^[0-9]$' > END > > CLASS > EXPRESSION ([pixel] >= 'yuk' ) > STYLE COLOR 255 0 0 END > END #end class > ? > ?What am I doing wrong? > regards? Hello, You should probably use %: EXPRESSION ([pixel] >= '%yuk%' ) Y. -- Responsable Formation et Support Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel (France) : +33 4 58 48 20 43 (new !) Tel (Suisse) : +41 21 619 10 43 Mob. : +33 6 18 75 42 21 Fax : 04 79 70 15 81 Mail : yves.jacolin at camptocamp.com http://www.camptocamp.com From ahmettemiz88 at gmail.com Tue Jul 26 03:48:44 2016 From: ahmettemiz88 at gmail.com (Ahmet Temiz) Date: Tue, 26 Jul 2016 13:48:44 +0300 Subject: [mapserver-users] mapserver-cgi displays nothing In-Reply-To: References: Message-ID: Thank you, I tried . But it did not work. I also checked the map without runtime substitution. as: CLASS EXPRESSION ([pixel] >= 100 ) STYLE COLOR 255 0 0 END END #end class it looks OK. On Tue, Jul 26, 2016 at 10:12 AM, Ahmet Temiz wrote: > Our mapserver-cgi displays nothing. > > > http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/trdem1.map&layer=runtimeSubstitution&yuk=50 > > ? VALIDATION > 'yuk' '^[0-9]$' > END > > CLASS > EXPRESSION ([pixel] >= 'yuk' ) > STYLE COLOR 255 0 0 END > END #end class > ? > ?What am I doing wrong? > regards? > > -- > Ahmet Temiz > Jeoloji M?h. > Afet ve Acil Durum Y?netimi Ba?kanl??? > Bilgi ??lem Dairesi Ba?kanl???-CBS Grubu > > > ________________________ > > Ahmet Temiz > Geological Eng. > Information Systems - GIS Group > Disaster and Emergency Management > of Presidency > -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Bilgi ??lem Dairesi Ba?kanl???-CBS Grubu ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Tue Jul 26 05:12:24 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 26 Jul 2016 09:12:24 -0300 Subject: [mapserver-users] GUI for map file creation/edit In-Reply-To: <5CA8BADC-14CF-4B44-89DD-CB5FFE340540@maptell.com> References: <5CA8BADC-14CF-4B44-89DD-CB5FFE340540@maptell.com> Message-ID: <62abb9b0-5b4a-1fbf-bc4c-e2c7f455c774@gatewaygeomatics.com> Thanks for sharing. I have also added this to the wiki page of MapFile Editors: https://github.com/mapserver/mapserver/wiki/MapFile-Editors Note that anyone can edit that page, as it is a wiki page. (surprisingly I was asked to edit it myself). I want to stress again: the MapServer wiki can be edited by anyone. That is everyone. Everyone on this planet :) The wiki is there for anyone to create a page, add a link, and share their passion for MapServer. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-26 1:45 AM, Ullas Dastakar wrote: > Dear All > > > We are developing a GUI for map file maker named as Crowmap. This > is available in beta form under Github. > > This is a standalone application that can run in a browser. This > application can be used to create/ edit map files. > > No map server is required for running this tool . Please try the tool > and give your valuable feedbacks. > > Currently the tool is written for Mapserver 7.0.1 > > > The github link is given below. > > > https://github.com/Maptell/crowmap > > > Looking forward to hear from you, From jukka.rahkonen at maanmittauslaitos.fi Tue Jul 26 05:35:07 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Tue, 26 Jul 2016 12:35:07 +0000 Subject: [mapserver-users] mapserver-cgi displays nothing In-Reply-To: <3686202.gF9ifiKd2b@tatras> References: , <3686202.gF9ifiKd2b@tatras> Message-ID: <1469536527295.66323@maanmittauslaitos.fi> Hi Test systematically. If you test your validation with some service like http://www.regexpal.com/ you will find that yuk=50 does not validate because it has more than one number in the string. Try to validate with ^[0-9]+$ And yes, variable must be enclosed between %%. That is well documented in http://mapserver.org/cgi/runsub.html. -Jukka Rahkonen- ________________________________________ L?hett?j?: mapserver-users k?ytt?j?n puolestaYves Jacolin L?hetetty: 26. hein?kuuta 2016 10:17 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] mapserver-cgi displays nothing On Tuesday, July 26, 2016 10:12:58 Ahmet Temiz wrote: > Our mapserver-cgi displays nothing. > > http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/trdem1.map&layer=runt > imeSubstitution&yuk=50 > > ? VALIDATION > 'yuk' '^[0-9]$' > END > > CLASS > EXPRESSION ([pixel] >= 'yuk' ) > STYLE COLOR 255 0 0 END > END #end class > ? > ?What am I doing wrong? > regards? Hello, You should probably use %: EXPRESSION ([pixel] >= '%yuk%' ) Y. -- Responsable Formation et Support Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel (France) : +33 4 58 48 20 43 (new !) Tel (Suisse) : +41 21 619 10 43 Mob. : +33 6 18 75 42 21 Fax : 04 79 70 15 81 Mail : yves.jacolin at camptocamp.com http://www.camptocamp.com _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Steve.Lime at state.mn.us Tue Jul 26 05:27:33 2016 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 26 Jul 2016 12:27:33 +0000 Subject: [mapserver-users] mapserver-cgi displays nothing In-Reply-To: References: , Message-ID: Get rid of the quotes around %yuk% so that you're comparing number to number. --Steve ________________________________________ From: mapserver-users [mapserver-users-bounces at lists.osgeo.org] on behalf of Ahmet Temiz [ahmettemiz88 at gmail.com] Sent: Tuesday, July 26, 2016 5:48 AM To: mapserver-users Subject: Re: [mapserver-users] mapserver-cgi displays nothing Thank you, I tried . But it did not work. I also checked the map without runtime substitution. as: CLASS EXPRESSION ([pixel] >= 100 ) STYLE COLOR 255 0 0 END END #end class it looks OK. On Tue, Jul 26, 2016 at 10:12 AM, Ahmet Temiz > wrote: Our mapserver-cgi displays nothing. http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/trdem1.map&layer=runtimeSubstitution&yuk=50 ? VALIDATION 'yuk' '^[0-9]$' END CLASS EXPRESSION ([pixel] >= 'yuk' ) STYLE COLOR 255 0 0 END END #end class ? ?What am I doing wrong? regards? -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Bilgi ??lem Dairesi Ba?kanl???-CBS Grubu ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Bilgi ??lem Dairesi Ba?kanl???-CBS Grubu ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency From ahmettemiz88 at gmail.com Tue Jul 26 06:06:46 2016 From: ahmettemiz88 at gmail.com (Ahmet Temiz) Date: Tue, 26 Jul 2016 16:06:46 +0300 Subject: [mapserver-users] mapserver-cgi displays nothing In-Reply-To: <1469536527295.66323@maanmittauslaitos.fi> References: <3686202.gF9ifiKd2b@tatras> <1469536527295.66323@maanmittauslaitos.fi> Message-ID: Thank you all, But the problem still exists. complete layer portion in the map : LAYER NAME 'runtimeSubstitution' TYPE RASTER DUMP true METADATA "wms_title" "WMS Demo Server" "wms_onlineresource" " http://localhost/cgi-bin/mapserv?map=/var/www/trdem1.map&" "wms_srs" "EPSG:3857" "WMS_ENABLE_REQUEST" "*" "wms_feature_info_mime_type" "text/html" "wms_format" "image/png" END PROCESSING "NODATA=0" PROCESSING "SCALE=AUTO" PROCESSING "CLOSE_CONNECTION=DEFER" EXTENT 2857613.741389 4274927.875099 4989786.191152 5176940.449967 DATA 'PG: dbname=tr22 host=localhost user=orkun password=222222 port=5432 schema=public table=o_16_rdem3857 mode=2' STATUS ON OPACITY 50 VALIDATION 'yuk' '^[0-9]+$' END CLASS EXPRESSION ([pixel] >= %yuk% ) STYLE COLOR 255 0 0 END END #end class END # layer =trdem_4326 http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/trdem1.map&layer=runtimeSubstitution&yuk=500 On Tue, Jul 26, 2016 at 3:35 PM, Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi > > Test systematically. If you test your validation with some service like > http://www.regexpal.com/ you will find that yuk=50 does not validate > because it has more than one number in the string. > Try to validate with ^[0-9]+$ > > And yes, variable must be enclosed between %%. That is well documented in > http://mapserver.org/cgi/runsub.html. > > -Jukka Rahkonen- > > > ________________________________________ > L?hett?j?: mapserver-users > k?ytt?j?n puolestaYves Jacolin > L?hetetty: 26. hein?kuuta 2016 10:17 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: Re: [mapserver-users] mapserver-cgi displays nothing > > On Tuesday, July 26, 2016 10:12:58 Ahmet Temiz wrote: > > Our mapserver-cgi displays nothing. > > > > > http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/trdem1.map&layer=runt > > imeSubstitution&yuk=50 > > > > ? VALIDATION > > 'yuk' '^[0-9]$' > > END > > > > CLASS > > EXPRESSION ([pixel] >= 'yuk' ) > > STYLE COLOR 255 0 0 END > > END #end class > > ? > > ?What am I doing wrong? > > regards? > Hello, > > You should probably use %: > > EXPRESSION ([pixel] >= '%yuk%' ) > > Y. > -- > Responsable Formation et Support > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > Tel (France) : +33 4 58 48 20 43 (new !) > Tel (Suisse) : +41 21 619 10 43 > Mob. : +33 6 18 75 42 21 > Fax : 04 79 70 15 81 > Mail : yves.jacolin at camptocamp.com > http://www.camptocamp.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 -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Bilgi ??lem Dairesi Ba?kanl???-CBS Grubu ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Tue Jul 26 06:41:10 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 26 Jul 2016 10:41:10 -0300 Subject: [mapserver-users] mapserver-cgi displays nothing In-Reply-To: References: <3686202.gF9ifiKd2b@tatras> <1469536527295.66323@maanmittauslaitos.fi> Message-ID: <8594fc5c-b5fe-6898-a998-418fc807ddba@gatewaygeomatics.com> Hello Ahmet, I just ran your test locally here (MapServer 7.0.1, MS4W 3.1.4), using your last validation example and expression on a raster layer, and I received a proper map image. It must be something with your data I think. Maybe try another local file (not in that same database?). My test was with a GeoTIFF file. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-26 10:06 AM, Ahmet Temiz wrote: > Thank you all, > But the problem still exists. > > complete layer portion in the map : > From jmckenna at gatewaygeomatics.com Tue Jul 26 06:51:21 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 26 Jul 2016 10:51:21 -0300 Subject: [mapserver-users] mapserver-cgi displays nothing In-Reply-To: References: <3686202.gF9ifiKd2b@tatras> <1469536527295.66323@maanmittauslaitos.fi> Message-ID: Also, I tested locally by modifying the value passed, starting with '&yuk=1' and then trying '&yuk=10' etc. It could be that your value of 500 just isn't in your data. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-26 10:06 AM, Ahmet Temiz wrote: > Thank you all, > But the problem still exists. > From MarkVolz at co.lyon.mn.us Tue Jul 26 12:25:06 2016 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Tue, 26 Jul 2016 19:25:06 +0000 Subject: [mapserver-users] unable to build spatial index when running shptree from ArcGIS model Message-ID: <36CA828A36E29F45B7CF0A1766E5DFA371913FF7@swmail01.r8nssis.local> Hello, I am in the process of trying to automate the update process for my mapserver GIS data. As part of the process I am using shptree to build spatial indexes. I created a batch file (.bat) that will set all the paths and environment variables then run shptree on my new GIS layers. This batch file works fine on its own. My next that I would like to do is call this batch file from ArcGIS so that I can run the "update shptree" script immediately after I update my GIS data. Although I can use python to open up my "update shptree" batch file, it appears that shptree does not get run at all. Please let me know If anyone has had any success in using ArcGIS to run shptree.exe. Working Method Window Explorer --> UpdateShptree.bat: Works great Not Working ArcGIS Catalog / Model Builder -->Python Script to run UpdateShptree.bat --> UpdateShptree.bat: does not work Scripts: Python file: # Import native arcgisscripting module import sys, string, os, arcgisscripting # Create the geoprocessor object gp = arcgisscripting.create() os.system('C:\\ GIS\\ PublishUpdates\\UpdateMooseQIX.bat') gp.SetParameterAsText(0,"True") Batch file: set PATH=C:\ms4w\Apache\cgi-bin;C:\ms4w\tools\gdal-ogr;C:\ms4w\tools\mapserv;C:\ms4w\tools\shapelib;C:\ms4w\proj\bin;C:\ms4w\tools\shp2tile;C:\ms4w\tools\shpdiff;C:\ms4w\tools\avce00;C:\ms4w\tools\demtools;%PATH% set GDAL_DATA=C:\ms4w\gdaldata set GDAL_DRIVER_PATH=C:\ms4w\gdalplugins set PROJ_LIB=C:\ms4w\proj\nad cd C:\ GIS\ PublishUpdates\MOOSEStagingArea\ shptree ParcelsLyon.shp shptree Plats.shp shptree Lots.shp Sincerely, Mark Volz, GISP Lyon County GIS Coordinator -------------- next part -------------- An HTML attachment was scrubbed... URL: From TMa at edrnet.com Tue Jul 26 12:08:25 2016 From: TMa at edrnet.com (TMa Teng) Date: Tue, 26 Jul 2016 19:08:25 +0000 Subject: [mapserver-users] Create tile index for a directories with many layers of subfolders Message-ID: Hi, I am trying to create tile index for a very big dataset of historic images. I used to be able to create tile index for a directory of images but this dataset has several layers of subfolders in it such as \NY\1968\LOC\1.tif and \NY\1972\UPA\2.tif. The goal is to create one tile index for the whole dataset without change the physical storage. And I am having difficulty using wildcards to make gdaltindex command working. Any suggestions or possible solutions? Is there a way for gdaltindex function works like gdalbuildvrt with a parameter(-input_file_list) using a file listing all the image paths? Thanks in advance, Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From starling.lucky at gmail.com Tue Jul 26 14:42:27 2016 From: starling.lucky at gmail.com (Hari Pradhan) Date: Tue, 26 Jul 2016 14:42:27 -0700 (PDT) Subject: [mapserver-users] Create tile index for a directories with many layers of subfolders In-Reply-To: References: Message-ID: <1469569347409-5278273.post@n6.nabble.com> Martin, You can simply specify a set of files separated by spaces. See gdal_file in the link: http://www.gdal.org/gdaltindex.html Example: gdaltindex output.shp /1.tif /2.tif /n.tif -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Create-tile-index-for-a-directories-with-many-layers-of-subfolders-tp5278271p5278273.html Sent from the Mapserver - User mailing list archive at Nabble.com. From mbrown at al811.com Tue Jul 26 15:03:12 2016 From: mbrown at al811.com (Matt Brown) Date: Tue, 26 Jul 2016 17:03:12 -0500 Subject: [mapserver-users] unable to build spatial index when running shptree from ArcGIS model In-Reply-To: <36CA828A36E29F45B7CF0A1766E5DFA371913FF7@swmail01.r8nssis.local> References: <36CA828A36E29F45B7CF0A1766E5DFA371913FF7@swmail01.r8nssis.local> Message-ID: Mark, I just ran a test and was able to execute shptree through a script in arcmap. this is the script I ran: import subprocess subprocess.Popen(['D:/GIS/testqix.bat']) which opened this batch file: call d:\ms4w\setenv.bat shptree d:\gis\nm.shp I was also able to just point directly to the batch file when I defined the script which also works for me. Hope this helps, Matt Matt Brown Technology Systems Director Alabama 811 mbrown at al811.com On Tue, Jul 26, 2016 at 2:25 PM, Mark Volz wrote: > Hello, > > > > I am in the process of trying to automate the update process for my > mapserver GIS data. As part of the process I am using shptree to build > spatial indexes. I created a batch file (.bat) that will set all the paths > and environment variables then run shptree on my new GIS layers. This > batch file works fine on its own. My next that I would like to do is call > this batch file from ArcGIS so that I can run the ?update shptree? script > immediately after I update my GIS data. Although I can use python to open > up my ?update shptree? batch file, it appears that shptree does not get > run at all. > > > > Please let me know If anyone has had any success in using ArcGIS to run > shptree.exe. > > > > *Working Method* > > Window Explorer ? UpdateShptree.bat: Works great > > *Not Working* > > ArcGIS Catalog / Model Builder ?Python Script to run UpdateShptree.bat ? > UpdateShptree.bat: does not work > > > > Scripts: > > > > Python file: > > # Import native arcgisscripting module > > import sys, string, os, arcgisscripting > > # Create the geoprocessor object > > gp = arcgisscripting.create() > > os.system('C:\\ GIS\\ PublishUpdates\\UpdateMooseQIX.bat') > > gp.SetParameterAsText(0,"True") > > > > Batch file: > > set > PATH=C:\ms4w\Apache\cgi-bin;C:\ms4w\tools\gdal-ogr;C:\ms4w\tools\mapserv;C:\ms4w\tools\shapelib;C:\ms4w\proj\bin;C:\ms4w\tools\shp2tile;C:\ms4w\tools\shpdiff;C:\ms4w\tools\avce00;C:\ms4w\tools\demtools;%PATH% > > set GDAL_DATA=C:\ms4w\gdaldata > > set GDAL_DRIVER_PATH=C:\ms4w\gdalplugins > > set PROJ_LIB=C:\ms4w\proj\nad > > cd C:\ GIS\ PublishUpdates\MOOSEStagingArea\ > > shptree ParcelsLyon.shp > > shptree Plats.shp > > shptree Lots.shp > > > > > > Sincerely, > > *Mark Volz, GISP* > > *Lyon County GIS Coordinator* > > _______________________________________________ > 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 jmckenna at gatewaygeomatics.com Tue Jul 26 16:09:57 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 26 Jul 2016 20:09:57 -0300 Subject: [mapserver-users] unable to build spatial index when running shptree from ArcGIS model In-Reply-To: References: <36CA828A36E29F45B7CF0A1766E5DFA371913FF7@swmail01.r8nssis.local> Message-ID: Very cool stuff Matt and Mark!!! -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-26 7:03 PM, Matt Brown wrote: > Mark, > > I just ran a test and was able to execute shptree through a script in > arcmap. > From mathias.cunault at inrap.fr Tue Jul 26 23:40:02 2016 From: mathias.cunault at inrap.fr (Leehan) Date: Tue, 26 Jul 2016 23:40:02 -0700 (PDT) Subject: [mapserver-users] mapserver vrt et mapfile : file not found or unsupported format Message-ID: <1469601602513-5278305.post@n6.nabble.com> Hello, I try to create a mapfile with data in a csv file. I have failed to draw the layer with a Virtual Format and a OGR connectiontype directly in the mapfile. So I have decided to store the connection in a different file like here http://mapserver.org/input/vector/VirtualSpatialData.html#steps-for-display mapfile : LAYER CONNECTION "basol_auv.ovf" CONNECTIONTYPE OGR DATA "test" METADATA "wms-srs" "2154" "wms-title" "test" END NAME "pollution" TYPE POINT CLASS NAME "pollution" STYLE SYMBOL "pollution" SIZE 10 END #----fin style END #-----fin class END #-----fin layer sols pollu?s basol_auv.ovf : C:\OSGeo4W\Apache\htdocs\data\test.csv test wkbPoint I have a new error message : msDrawMap(): Image handling error. Failed to draw layer named 'pollution'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `pollution'. File not found or unsupported format. I dont'know what to do to verify if it is a matter of path or format. ogrinfo command gives the correct answer : ogrinfo basol_auv.ovf test -- View this message in context: http://osgeo-org.1560.x6.nabble.com/mapserver-vrt-et-mapfile-file-not-found-or-unsupported-format-tp5278305.html Sent from the Mapserver - User mailing list archive at Nabble.com. From mathias.cunault at inrap.fr Wed Jul 27 00:15:58 2016 From: mathias.cunault at inrap.fr (Leehan) Date: Wed, 27 Jul 2016 00:15:58 -0700 (PDT) Subject: [mapserver-users] mapserver vrt et mapfile : file not found or unsupported format In-Reply-To: <1469601602513-5278305.post@n6.nabble.com> References: <1469601602513-5278305.post@n6.nabble.com> Message-ID: <1469603758575-5278309.post@n6.nabble.com> full file path in CONNECTION solve the problem. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/mapserver-vrt-et-mapfile-file-not-found-or-unsupported-format-tp5278305p5278309.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jmckenna at gatewaygeomatics.com Wed Jul 27 10:44:39 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 27 Jul 2016 14:44:39 -0300 Subject: [mapserver-users] mapserver vrt et mapfile : file not found or unsupported format In-Reply-To: <1469603758575-5278309.post@n6.nabble.com> References: <1469601602513-5278305.post@n6.nabble.com> <1469603758575-5278309.post@n6.nabble.com> Message-ID: <19b499ef-70df-bb74-a4e2-ec6de0d39bbf@gatewaygeomatics.com> Thank you Leehan, I've added a note on the connection rules to that document (http://mapserver.org/input/vector/VirtualSpatialData.html#mapfile-layer). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-27 4:15 AM, Leehan wrote: > full file path in CONNECTION solve the problem. > > From mbrown at al811.com Wed Jul 27 15:13:15 2016 From: mbrown at al811.com (Matt Brown) Date: Wed, 27 Jul 2016 17:13:15 -0500 Subject: [mapserver-users] Mapcache Azure Cache Https Message-ID: ------------------------------ Hello Everyone, I am trying to set up an azure rest cache in Mapcache running on windows but receive the following error trying to connect through https "curl_easy_perform() failed in rest get: Peer certificate cannot be authenticated with given CA certificates" The cache works fine over http. While I was testing I found that I would receive a similar error if I pointed to a secure wms as a source in mapcache, but am able to access the same url through mapserver with no errors. Has anyone else had an issue with https in Mapcache? Tested with MS4W versions 3.1.3 and 3.1.4 on Windows Server 2008 R2 Datacenter and Windows 10 Thanks, Matt Matt Brown Technology Systems Director Alabama 811 mbrown at al811.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From coolhandluka at gmail.com Wed Jul 27 15:34:57 2016 From: coolhandluka at gmail.com (Luke) Date: Thu, 28 Jul 2016 08:34:57 +1000 Subject: [mapserver-users] Create tile index for a directories with many layers of subfolders In-Reply-To: <1469569347409-5278273.post@n6.nabble.com> References: <1469569347409-5278273.post@n6.nabble.com> Message-ID: Try this flag --optfile tiff_list.txt On Wednesday, 27 July 2016, Hari Pradhan wrote: > Martin, You can simply specify a set of files separated by spaces. See > gdal_file in the link: http://www.gdal.org/gdaltindex.html > > Example: > gdaltindex output.shp /1.tif /2.tif /n.tif > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Create-tile-index-for-a-directories-with-many-layers-of-subfolders-tp5278271p5278273.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 -- *Luke Bassett* * *Melbourne Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From erwin.bimueller at lkee.de Fri Jul 29 04:36:22 2016 From: erwin.bimueller at lkee.de (bimuellererwin) Date: Fri, 29 Jul 2016 11:36:22 +0000 Subject: [mapserver-users] Confirmation Message-ID: confirm efe2e3b7aa7d0fe58dc7d8e117a4d1efe5a1d838 Mit freundlichen Gr??en Im Auftrag Erwin Bim?ller _____________________________________________________ Landkreis Elbe-Elster Stabstelle Kreisentwicklung SB GIS Ludwig-Jahn-Str. 2 04916 Herzberg Tel.: 03535 46-1277 Fax : 03535 46-9111 E-Mail: erwin.bimueller at lkee.de Internet: www.landkreis-elbe-elster.de _____________________________________________________ Wichtige Hinweise Diese E-Mail enth?lt vertrauliche und rechtlich gesch?tzte Informationen. Wenn Sie nicht der richtige Adressat sind und diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das Kopieren von Inhalten dieser E-Mail, die Weitergabe ohne Genehmigung ist nicht erlaubt und stellt eine Urheberrechtsverletzung dar. Rechtsverbindliche Erkl?rungen und Antr?ge, die nach geltendem Recht der Schriftform bed?rfen, k?nnen digital mit einer qualifizierten elektronischen Signatur an die E-Mail-Adresse Landrat at lkee.de gesendet werden. N?heres dazu finden Sie im Impressum auf www.lkee.de. Alle weiteren von der Kreisverwaltung Elbe-Elster angegebenen E-Mail-Adressen dienen nur zum Empfang einfacher Mitteilungen ohne Signatur und/oder Verschl?sselung. Sie dienen nicht der ?bermittlung rechtsverbindlicher Erkl?rungen und Antr?ge, die nach geltendem Recht der Schriftform bed?rfen. Der Empfang von Dateianh?ngen ist auf eine Gr??e von 10 MB pro E-Mail begrenzt. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CLIP-014A9E67.JPG Type: image/jpeg Size: 3274 bytes Desc: not available URL: From erwin.bimueller at lkee.de Fri Jul 29 05:25:50 2016 From: erwin.bimueller at lkee.de (bimuellererwin) Date: Fri, 29 Jul 2016 12:25:50 +0000 Subject: [mapserver-users] Mapserver as WMS on Windows Message-ID: Hello, I am trying to set up MS4W 3.1.4 on Windows Server 2008 R2 Standard as a WMS Server for internal use of the WMS. I have successfully installed Apache, created a mapfile with a layer and I am able to post requests to Mapserver. My mapfile has the following content: # Mapfile fuer die autarke Darstellung von Rasterdaten fuer den Katastrophenschutz im Landkreis Elbe-Elster MAP EXTENT 345000 5682322 440000 5754034 FONTSET "D:\ms4w\Apache\Fonts\fonts.list" IMAGECOLOR 255 255 255 IMAGETYPE png SYMBOLSET "D:\ms4w\Apache\Symbols\symbol.sym" SIZE 600 500 STATUS ON UNITS METERS NAME "Rasterdaten autark" DEBUG ON OUTPUTFORMAT NAME png MIMETYPE image/png DRIVER GD/PNG EXTENSION png IMAGEMODE RGB TRANSPARENT FALSE END PROJECTION "init=epsg:25833" END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 25 15 KEYSPACING 5 5 LABEL ANGLE 0.000000 ANTIALIAS TRUE FONT arial MAXSIZE 256 MINSIZE 4 SIZE 10 TYPE TRUETYPE BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL STATUS ON END QUERYMAP COLOR 255 255 0 SIZE 300 300 STATUS ON STYLE HILITE END REFERENCE COLOR -1 -1 -1 EXTENT 3.35726e+06 5.68232e+06 3.42886e+06 5.75403e+06 IMAGE "D:\ms4w\Apache\images\reference.png" OUTLINECOLOR 255 0 0 SIZE 150 150 STATUS ON MARKER 0 MARKERSIZE 0 MINBOXSIZE 3 MAXBOXSIZE 0 END SCALEBAR BACKGROUNDCOLOR 255 255 255 COLOR 0 0 0 IMAGECOLOR 255 255 255 INTERVALS 4 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END OUTLINECOLOR 0 0 0 POSITION LL SIZE 300 5 STATUS ON STYLE 0 UNITS METERS END WEB EMPTY "D:\ms4w\Apache\html\emptytemplate.html" FOOTER "D:\ms4w\Apache\html\footer.html" HEADER "D:\ms4w\Apache\html\header.html" IMAGEPATH "D:\ms4w\Apache\tmp" IMAGEURL "D:\ms4w\Apache\tmp" LOG "D:\ms4w\Apache\logs" METADATA "wms_onlineresource" "http://10.224.160.25:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&" "ows_schemas_location" "http://10.224.160.25/cgi-bin" "wms_title" "Rasterdaten autark" "wms_enable_request" "*" "ows_enable_request" "*" END QUERYFORMAT text/html TEMPLATE "D:\ms4w\Apache\html\lkee.html" END LAYER NAME "dtk10far" OFFSITE 255 255 255 SIZEUNITS PIXELS STATUS ON TILEINDEX "D:\Disma5\geodaten\TKs\TKs2009\DTK10\DTK10FAR\25833\dtk10far.shp" TILEITEM "location" TOLERANCE 0 TOLERANCEUNITS PIXELS TYPE RASTER UNITS METERS CLASS NAME "dtk10far" METADATA END STYLE END END END END This file is a modified copy of an older mapfile that was used on a linux system and worked well as WMS server. When I send the request http://disma:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&SERVICE=WMS&REQUEST=Getmap&VERSION=1.1.1&LAYERS=dtk10far&SRS=EPSG:25833&BBOX=360575,5688787,425797,5752560&FORMAT=PNG&WIDTH=600&HEIGHT=600 I get a map image as I expected. So far so good. But I want to use Mapserver as Mapserver for use in the intranet. It will be requested by a single client on the same host that has a WMS interface. Now, when I send a GetCapabilities request http://disma:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&request=GetCapabilities I simply get nothing, a white page, no error message, no entry in error.log I wonder if the somewhat ugly wms_onlineresource is responsible ("wms_onlineresource" "http://10.224.160.25:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&"). But when I comment this line out, the result is unchanged. What do I have to change to make Mapserver work as a WMS server? Sincerely Erwin Erwin Bim?ller GIS-Verantwortlicher im Landkreis Elbe-Elster -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Fri Jul 29 06:13:27 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 29 Jul 2016 10:13:27 -0300 Subject: [mapserver-users] Mapserver as WMS on Windows In-Reply-To: References: Message-ID: <63fdb556-976a-c75c-b30f-11b757df92ae@gatewaygeomatics.com> Hello Erwin, I should note that MS4W comes pre-configured for IMAGEPATH and IMAGEURL, but I see that you have configured your own locations, which is fine (you can see the syntax in any one of the 63 working mapfiles that are distributed with MS4W applications, or also actually inside the WMS Server document at http://mapserver.org/ogc/wms_server.html#sample-wms-server-mapfile). This isn't affecting your question, but I thought I would mention it for the record. In terms of your question: what is the response for the following WMS GetCapabilities request? http://10.224.160.25:8080/cgi-bin/mapserv.exe?map=/ms4w/Apache/cgi-bin/mapfile.map&SERVICE=wms&VERSION=1.1.1&REQUEST=GetCapabilities If that gives you a valid GetCapabilities response, with no "WARNING" messages, then I would use the following in your WMS client: http://10.224.160.25:8080/cgi-bin/mapserv.exe?map=/ms4w/Apache/cgi-bin/mapfile.map? It is nice to hear that the MS4W product is working so well for your organization. Please be sure to contact me directly to help fund this great product, that allows your organization to share; that assistance will help keep MS4W growing and sustainable. Thank you so much. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-07-29 9:25 AM, bimuellererwin wrote: > Hello, > > I am trying to set up MS4W 3.1.4 on Windows Server 2008 R2 Standard as a > WMS Server for internal use of the WMS. I have successfully installed > Apache, created a mapfile with a layer and I am able to post requests to > Mapserver. My mapfile has the following content: > From ahmettemiz88 at gmail.com Sat Jul 30 23:39:13 2016 From: ahmettemiz88 at gmail.com (Ahmet Temiz) Date: Sun, 31 Jul 2016 09:39:13 +0300 Subject: [mapserver-users] Which Java for javamapscript Message-ID: Hi, Which Java do you recommend for javamapscript? Open Java or oracle Java? Regards -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Bilgi ??lem Dairesi Ba?kanl???-CBS Grubu ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency -------------- next part -------------- An HTML attachment was scrubbed... URL: