From thomas.bonfort at gmail.com Fri Apr 1 02:25:47 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Fri, 1 Apr 2016 11:25:47 +0200 Subject: [mapserver-users] Shapefile features = 0 (zero integer value) are empty and ignored? [SEC=UNCLASSIFIED] In-Reply-To: References: Message-ID: What expression syntax are you using in your mapfile to select/filter these features? -- Thomas On 1 April 2016 at 02:40, Inna Nogeste wrote: > I'm using MapServer 6.4 and have a shapefile where features have an > attribute = 0 (zero integer value). I want to display these features = 0 > but they seem to be regarded as null/empty features in MapServer so are > ignored and won?t display on the map. > > Other integer values in the same field can be displayed on the map, > including the value of -1, but not 0. > I can select these records = 0 in ArcGIS and QGIS 2.8.2 > > Can anyone tell me how, or if, shapefile features with attribute = 0 > integer value can be used in a MapServer expression, or how to enter values > = 0 in to a shapefile for MapServer Expressions? > > Regards, > Inna Nogeste | Spatial Information Specialist > Geospatial Data and Services > Information Systems and Services Division > Bureau of Meteorology > www.bom.gov.au > _______________________________________________ > 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 Fri Apr 1 05:55:40 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 1 Apr 2016 09:55:40 -0300 Subject: [mapserver-users] Shapefile features = 0 (zero integer value) are empty and ignored? [SEC=UNCLASSIFIED] In-Reply-To: References: Message-ID: <56FE6FCC.4090108@gatewaygeomatics.com> Hello Inna, I am able to properly display features with an integer value of 0 through an expression, as follows: LAYER NAME "prov" TYPE POLYGON STATUS ON DATA "province.shp" CLASSITEM "INT_TEST" CLASS NAME "Provinces" EXPRESSION "0" STYLE COLOR 255 255 0 END END END # Layer You might also want to verify the attributes, by using the ogrinfo commandline tool, where you can check the column types etc, such as: ogrinfo data.shp data -summary I am testing with MS4W 3.1.3 (MapServer 7.0.1). http://ms4w.com -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-03-31 9:40 PM, Inna Nogeste wrote: > I'm using MapServer 6.4 and have a shapefile where features have an attribute = 0 (zero integer value). I want to display these features = 0 but they seem to be regarded as null/empty features in MapServer so are ignored and won?t display on the map. > > Other integer values in the same field can be displayed on the map, including the value of -1, but not 0. > I can select these records = 0 in ArcGIS and QGIS 2.8.2 > > Can anyone tell me how, or if, shapefile features with attribute = 0 integer value can be used in a MapServer expression, or how to enter values = 0 in to a shapefile for MapServer Expressions? > > Regards, > Inna Nogeste | Spatial Information Specialist > Geospatial Data and Services > Information Systems and Services Division > Bureau of Meteorology > www.bom.gov.au > _______________________________________________ From I.Nogeste at bom.gov.au Sun Apr 3 20:33:47 2016 From: I.Nogeste at bom.gov.au (Inna Nogeste) Date: Mon, 4 Apr 2016 03:33:47 +0000 Subject: [mapserver-users] Shapefile features = 0 (zero integer value) are empty and ignored? [SEC=UNCLASSIFIED] In-Reply-To: References: Message-ID: Hi Thomas, After many attempts using the same expression syntax it finally worked. Is there any reason as to why the following expression syntax didn?t work the first time? .layer.part CLASSITEM "class" .style.part CLASS EXPRESSION "0" I also needed to map the following attributes which all displayed the first time with no problems EXPRESSION "-1" EXPRESSION "1" EXPRESSION "2" Regards, Inna Nogeste | Spatial Information Specialist Geospatial Data and Services Information Systems and Services Division Bureau of Meteorology From: thomas bonfort [mailto:thomas.bonfort at gmail.com] Sent: Friday, 1 April 2016 8:26 PM To: Inna Nogeste Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Shapefile features = 0 (zero integer value) are empty and ignored? [SEC=UNCLASSIFIED] What expression syntax are you using in your mapfile to select/filter these features? -- Thomas On 1 April 2016 at 02:40, Inna Nogeste > wrote: I'm using MapServer 6.4 and have a shapefile where features have an attribute = 0 (zero integer value). I want to display these features = 0 but they seem to be regarded as null/empty features in MapServer so are ignored and won?t display on the map. Other integer values in the same field can be displayed on the map, including the value of -1, but not 0. I can select these records = 0 in ArcGIS and QGIS 2.8.2 Can anyone tell me how, or if, shapefile features with attribute = 0 integer value can be used in a MapServer expression, or how to enter values = 0 in to a shapefile for MapServer Expressions? Regards, Inna Nogeste | Spatial Information Specialist Geospatial Data and Services Information Systems and Services Division Bureau of Meteorology www.bom.gov.au _______________________________________________ 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 p.laranci at terrasystem.it Mon Apr 4 01:56:10 2016 From: p.laranci at terrasystem.it (pippi) Date: Mon, 4 Apr 2016 01:56:10 -0700 (PDT) Subject: [mapserver-users] selecting a wms layer Message-ID: <1459760170390-5259459.post@n6.nabble.com> hello, I can correctly visualize a wms layer with mapserver and pmapper as: CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto'. If I add the &layer parameter, it still works, but no selection of the choosen layers is done (while in Qgis it is possible): CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt' Can someone give me any clue please? how can I choose just the layers that I need? this is the complete code of the layer: LAYER NAME 'Catasto-Toscana' GROUP "Catasto" TYPE RASTER DUMP true TEMPLATE "map.html" CONNECTIONTYPE WMS CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt' MAXSCALEDENOM 10000 METADATA "DESCRIPTION" "Catastale terreni (test)" 'ows_name' 'rt_cat' 'wms_server_version' '1.1.1' # con 1.3.0 come da metadati si blocca 'ows_srs' 'EPSG:32632' 'wms_format' 'image/png' 'wms_style' 'default' END STATUS OFF TRANSPARENCY 100 PROJECTION "init=epsg:32632" END END Peter -- View this message in context: http://osgeo-org.1560.x6.nabble.com/selecting-a-wms-layer-tp5259459.html Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at gmail.com Mon Apr 4 02:16:21 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 4 Apr 2016 11:16:21 +0200 Subject: [mapserver-users] selecting a wms layer In-Reply-To: <1459760170390-5259459.post@n6.nabble.com> References: <1459760170390-5259459.post@n6.nabble.com> Message-ID: Peter, It never hurts to read the documentation: http://mapserver.org/ogc/wms_client.html#mapfile-configuration . Namely the part where the "wms_name" metadata key is required and what you need. -- Thomas On 4 April 2016 at 10:56, pippi wrote: > hello, > > I can correctly visualize a wms layer with mapserver and pmapper as: > CONNECTION > ' > http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto > '. > > If I add the &layer parameter, it still works, but no selection of the > choosen layers is done (while in Qgis it is possible): > CONNECTION > ' > http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt > ' > > Can someone give me any clue please? how can I choose just the layers that > I > need? > > > this is the complete code of the layer: > > LAYER > NAME 'Catasto-Toscana' > GROUP "Catasto" > TYPE RASTER > DUMP true > TEMPLATE "map.html" > CONNECTIONTYPE WMS > CONNECTION > ' > http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt > ' > > MAXSCALEDENOM 10000 > METADATA > "DESCRIPTION" "Catastale terreni (test)" > 'ows_name' 'rt_cat' > 'wms_server_version' '1.1.1' # con 1.3.0 come da metadati si blocca > 'ows_srs' 'EPSG:32632' > 'wms_format' 'image/png' > 'wms_style' 'default' > END > STATUS OFF > TRANSPARENCY 100 > PROJECTION > "init=epsg:32632" > END > END > > > Peter > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/selecting-a-wms-layer-tp5259459.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Mon Apr 4 02:23:45 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Mon, 4 Apr 2016 09:23:45 +0000 Subject: [mapserver-users] selecting a wms layer In-Reply-To: References: <1459760170390-5259459.post@n6.nabble.com> Message-ID: Hi, It never hurts to read the whole documentation ? There is 'ows_name' 'rt_cat' in the mapfile and the manual page says also: Note Note that each of the above metadata can also be referred to as ?ows_*? instead of ?wms_*?. MapServer tries the ?wms_*? metadata first, and if not found it tries the corresponding ?ows_*? name. Using this reduces the amount of duplication in mapfiles that support multiple OGC interfaces since ?ows_*? metadata can be used almost everywhere for common metadata items shared by multiple OGC interfaces. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta thomas bonfort L?hetetty: 4. huhtikuuta 2016 12:16 Vastaanottaja: pippi Kopio: MapserverList OSGEO Aihe: Re: [mapserver-users] selecting a wms layer Peter, It never hurts to read the documentation: http://mapserver.org/ogc/wms_client.html#mapfile-configuration . Namely the part where the "wms_name" metadata key is required and what you need. -- Thomas On 4 April 2016 at 10:56, pippi > wrote: hello, I can correctly visualize a wms layer with mapserver and pmapper as: CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto'. If I add the &layer parameter, it still works, but no selection of the choosen layers is done (while in Qgis it is possible): CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt' Can someone give me any clue please? how can I choose just the layers that I need? this is the complete code of the layer: LAYER NAME 'Catasto-Toscana' GROUP "Catasto" TYPE RASTER DUMP true TEMPLATE "map.html" CONNECTIONTYPE WMS CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt' MAXSCALEDENOM 10000 METADATA "DESCRIPTION" "Catastale terreni (test)" 'ows_name' 'rt_cat' 'wms_server_version' '1.1.1' # con 1.3.0 come da metadati si blocca 'ows_srs' 'EPSG:32632' 'wms_format' 'image/png' 'wms_style' 'default' END STATUS OFF TRANSPARENCY 100 PROJECTION "init=epsg:32632" END END Peter -- View this message in context: http://osgeo-org.1560.x6.nabble.com/selecting-a-wms-layer-tp5259459.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Mon Apr 4 03:38:35 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Mon, 4 Apr 2016 10:38:35 +0000 Subject: [mapserver-users] selecting a wms layer Message-ID: <7ee7474b0fff4fc4a1b28239760ee6cc@C119S212VM022.msvyvi.vaha.local> Hi, Repeating myself: It never hurts to read the whole documentation. You should not include layers etc. into CONNECTION as stated in the WMS client documentation. ?CONNECTION - this is the remote server?s online resource URL, just the base URL without any of the WMS parameters. The server version, image format, layer name, etc. will be provided via metadata, see below.? This LAYER works for me. It reads all these layers together: ?rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt? If that is not what you aim at but you want to access layers one by one then you must create a separate LAYER for each cascaded layer. My test confirms also that explicit ?wms_name? is not needed but ?ows_name? works as well just as documented. LAYER NAME 'Catasto-Toscana' GROUP "Catasto" TYPE RASTER DUMP true debug 5 # TEMPLATE "map.html" CONNECTIONTYPE WMS CONNECTION "http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto" MAXSCALEDENOM 10000 METADATA "DESCRIPTION" "Catastale terreni (test)" 'ows_name' 'rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt' 'wms_server_version' '1.1.1' # con 1.3.0 come da metadati si blocca 'ows_srs' 'EPSG:32632' 'wms_format' 'image/png' 'wms_style' 'default' END STATUS OFF TRANSPARENCY 100 PROJECTION "init=epsg:32632" END END -Jukka Rahkonen- Rahkonen Jukka (MML) wrote: Hi, It never hurts to read the whole documentation ? There is 'ows_name' 'rt_cat' in the mapfile and the manual page says also: Note Note that each of the above metadata can also be referred to as ?ows_*? instead of ?wms_*?. MapServer tries the ?wms_*? metadata first, and if not found it tries the corresponding ?ows_*? name. Using this reduces the amount of duplication in mapfiles that support multiple OGC interfaces since ?ows_*? metadata can be used almost everywhere for common metadata items shared by multiple OGC interfaces. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta thomas bonfort L?hetetty: 4. huhtikuuta 2016 12:16 Vastaanottaja: pippi Kopio: MapserverList OSGEO Aihe: Re: [mapserver-users] selecting a wms layer Peter, It never hurts to read the documentation: http://mapserver.org/ogc/wms_client.html#mapfile-configuration . Namely the part where the "wms_name" metadata key is required and what you need. -- Thomas On 4 April 2016 at 10:56, pippi > wrote: hello, I can correctly visualize a wms layer with mapserver and pmapper as: CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto'. If I add the &layer parameter, it still works, but no selection of the choosen layers is done (while in Qgis it is possible): CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt' Can someone give me any clue please? how can I choose just the layers that I need? this is the complete code of the layer: LAYER NAME 'Catasto-Toscana' GROUP "Catasto" TYPE RASTER DUMP true TEMPLATE "map.html" CONNECTIONTYPE WMS CONNECTION 'http://web.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&layer=rt_cat.idcatpart.rt,rt_cat.idcatacque.rt,rt_cat.idcatstrade.rt,rt_cat.idcatfabbr.rt,rt_cat.idcatbdfog.rt' MAXSCALEDENOM 10000 METADATA "DESCRIPTION" "Catastale terreni (test)" 'ows_name' 'rt_cat' 'wms_server_version' '1.1.1' # con 1.3.0 come da metadati si blocca 'ows_srs' 'EPSG:32632' 'wms_format' 'image/png' 'wms_style' 'default' END STATUS OFF TRANSPARENCY 100 PROJECTION "init=epsg:32632" END END Peter -- View this message in context: http://osgeo-org.1560.x6.nabble.com/selecting-a-wms-layer-tp5259459.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.icking at bentley.com Mon Apr 4 03:28:52 2016 From: martin.icking at bentley.com (Martin Icking) Date: Mon, 4 Apr 2016 03:28:52 -0700 (PDT) Subject: [mapserver-users] Oracle SYSDATE in EXPRESSION In-Reply-To: References: Message-ID: <1459765732396-5259480.post@n6.nabble.com> Or you could create a calculated column in the data statement, call it e.g. "AGE" being the result of the difference of your original date column and the oracle sysdate. Then you can easily use that "AGE" column to do your styling. HTH Martin -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-SYSDATE-in-EXPRESSION-tp5258709p5259480.html Sent from the Mapserver - User mailing list archive at Nabble.com. From p.laranci at terrasystem.it Mon Apr 4 04:40:30 2016 From: p.laranci at terrasystem.it (pippi) Date: Mon, 4 Apr 2016 04:40:30 -0700 (PDT) Subject: [mapserver-users] selecting a wms layer In-Reply-To: References: <1459760170390-5259459.post@n6.nabble.com> Message-ID: <1459770030373-5259493.post@n6.nabble.com> Thank you very much Rahkonen and Thomas, it works fine Peter -- View this message in context: http://osgeo-org.1560.x6.nabble.com/selecting-a-wms-layer-tp5259459p5259493.html Sent from the Mapserver - User mailing list archive at Nabble.com. From bob.basques at ci.stpaul.mn.us Mon Apr 4 07:19:04 2016 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 4 Apr 2016 14:19:04 +0000 Subject: [mapserver-users] Oracle SYSDATE in EXPRESSION In-Reply-To: <1459765732396-5259480.post@n6.nabble.com> References: <1459765732396-5259480.post@n6.nabble.com> Message-ID: <49B8B96F-3712-4D9A-AFD2-880D5CC9E528@ci.stpaul.mn.us> I went the view route for the time being, to get one of the class types (layer) up and running. I was basing my questions on the fact that I?ve successfully passed in all sorts of SQL into the Postgres connector with MapServer, but the Oracle connector seems to be some limited in what it can send in successfully, or there are some escaping sequences I don?t know about. I tried a few things for making it work the fly, but nothing was working. I ended up creating a view as Dan Little suggested. I could probably get by with doing the FOLDERTYPE filtering (Last line below) in the MapFile as a quick way of making all the Permit class types work. create view PW_SK_Permits as select P.DEPARTMENT, P.INDATE, CASE WHEN P.INDATE < SYSDATE - 365 * 5 THEN 'older' ELSE 'newer' END as age, P.FOLDERTYPE, P.FOLDERDESC, P.FOLDERRSN, P.FOLDERID, A.PIN, A.GEOMETRY, A.OGR_FID from STAMP.PW_Permits P, ADDRESS_ACTIVE_OGR_VIEW A where P.PIN is not NULL and P.PIN = A.PIN and P.FOLDERTYPE IN ('SK') -- PW Sidewalks I needed to get this SideWalk Permit layer up and running either way. Something similar to the inner select above works just fine via MapServer/Postgres though. Now how to figure things out for the other 119 permit types. :c) bobb On Apr 4, 2016, at 5:28 AM, Martin Icking > wrote: Or you could create a calculated column in the data statement, call it e.g. "AGE" being the result of the difference of your original date column and the oracle sysdate. Then you can easily use that "AGE" column to do your styling. HTH Martin -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-SYSDATE-in-EXPRESSION-tp5258709p5259480.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Apr 4 09:05:28 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 4 Apr 2016 13:05:28 -0300 Subject: [mapserver-users] Shapefile features = 0 (zero integer value) are empty and ignored? [SEC=UNCLASSIFIED] In-Reply-To: References: Message-ID: <570290C8.6080201@gatewaygeomatics.com> On 2016-04-04 12:33 AM, Inna Nogeste wrote: > Hi Thomas, > > After many attempts using the same expression syntax it finally worked. > Is there any reason as to why the following expression syntax didn?t > work the first time? You could be hitting a weird issue in your DBF file, where your attributes are stored. As I mentioned earlier to you, you could test further by using the ogrinfo commandline tool to return the column types, and also step through the values, such as: ogrinfo myfile.shp myfile |more That should allow you to step through each value, and note how your zero integer values appear to the GDAL/OGR library. You can also pass your expression directly to the ogrinfo tool, and check the response for the correct "feature count" value, such as: ogrinfo -where "INT_TEST = 0" myfile.shp myfile -summary Then you could also change your mapfile layer such as: LAYER ... CONNECTIONTYPE OGR CONNECTION "myfile.shp" ... CLASSITEM "INT_TEST" CLASS EXPRESSION "0" ... END #class END #layer You can also do some more testing, by creating a new integer column in you DBF, setting a few zero values in it, and then re-testing in MapServer through the shp2img command. Likely you will find an odd problem with the old integer column. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From jmckenna at gatewaygeomatics.com Mon Apr 4 09:08:11 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 4 Apr 2016 13:08:11 -0300 Subject: [mapserver-users] Shapefile features = 0 (zero integer value) are empty and ignored? [SEC=UNCLASSIFIED] In-Reply-To: References: Message-ID: <5702916B.6000203@gatewaygeomatics.com> By the way, I have seen odd problems with column types happen after exporting or importing from other formats. So be careful, and always use ogr2ogr for converting :) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-04 12:33 AM, Inna Nogeste wrote: > Hi Thomas, > > After many attempts using the same expression syntax it finally worked. > Is there any reason as to why the following expression syntax didn?t > work the first time? > > .layer.part > > CLASSITEM "class" > > .style.part > > CLASS > > EXPRESSION "0" > > I also needed to map the following attributes which all displayed the > first time with no problems > > EXPRESSION "-1" > > EXPRESSION "1" > > EXPRESSION "2" > > Regards, > > *Inna Nogeste *| Spatial Information Specialist > *Geospatial Data and Services* > > *Information Systems and Services Division* > > Bureau of Meteorology > > *From:*thomas bonfort [mailto:thomas.bonfort at gmail.com] > *Sent:* Friday, 1 April 2016 8:26 PM > *To:* Inna Nogeste > *Cc:* mapserver-users at lists.osgeo.org > *Subject:* Re: [mapserver-users] Shapefile features = 0 (zero integer > value) are empty and ignored? [SEC=UNCLASSIFIED] > > What expression syntax are you using in your mapfile to select/filter > these features? > > -- > > Thomas > > On 1 April 2016 at 02:40, Inna Nogeste > wrote: > > I'm using MapServer 6.4 and have a shapefile where features have an > attribute = 0 (zero integer value). I want to display these features = 0 > but they seem to be regarded as null/empty features in MapServer so are > ignored and won?t display on the map. > > Other integer values in the same field can be displayed on the map, > including the value of -1, but not 0. > I can select these records = 0 in ArcGIS and QGIS 2.8.2 > > Can anyone tell me how, or if, shapefile features with attribute = 0 > integer value can be used in a MapServer expression, or how to enter > values = 0 in to a shapefile for MapServer Expressions? > > Regards, > Inna Nogeste | Spatial Information Specialist > Geospatial Data and Services > Information Systems and Services Division > Bureau of Meteorology > www.bom.gov.au From martin.icking at bentley.com Mon Apr 4 23:36:59 2016 From: martin.icking at bentley.com (Martin Icking) Date: Mon, 4 Apr 2016 23:36:59 -0700 (PDT) Subject: [mapserver-users] Oracle SYSDATE in EXPRESSION In-Reply-To: <49B8B96F-3712-4D9A-AFD2-880D5CC9E528@ci.stpaul.mn.us> References: <1459765732396-5259480.post@n6.nabble.com> <49B8B96F-3712-4D9A-AFD2-880D5CC9E528@ci.stpaul.mn.us> Message-ID: <1459838219730-5259649.post@n6.nabble.com> I tried this DATA statement successfully with Oracle: DATA "GEOLOC FROM (SELECT GEOLOC,OBJECTID,START_DATE, (SYSDATE-START_DATE)/365 as age FROM SPATIAL_TABLE) USING UNIQUE OBJECTID SRID 27700" [AGE] can then be used in any styling. Martin -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-SYSDATE-in-EXPRESSION-tp5258709p5259649.html Sent from the Mapserver - User mailing list archive at Nabble.com. From karsten at terragis.net Mon Apr 4 23:50:34 2016 From: karsten at terragis.net (karsten) Date: Mon, 4 Apr 2016 23:50:34 -0700 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? Message-ID: <77ADB4CDB12A4CBB95F24935543A854F@terragis2> Hi All, I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can getv the follwoing output from the executable: /usr/lib/cgi-bin# ./mapserv -v MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Howvere when I try to get a get aresponse to a request e.g. 136.243.250.62/cgi-bin/mapserv or aslo when I try a getcapabiliteis request like http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map &VERSION=1.1.1&REQUEST=getCapabilities&SERVICE=wms I always get a 'binary file back' output like below the line . Would anybody know what could have gone wrong or where to start figuring this out ? Cheers Karsten Karsten Vennemann Terra GIS LTD .----------------binary output below? ----------------- ELF  >  ?@ @ P" @ 8 @    @ @ @ @ @ ? ?    8 8@ 8@    @ @     ? ? ` ? `  (     `  ` ? ?    T T@ T@ D D  P?td ? ?@ ?@ < <  Q?td  R?td ? ? ` ? `    /lib64/ld-linux-x86-64.so.2    GNU       GNU O ~a?; ?k*BU??~6?   ??! ? @ " * j C????|( ? CE??j?|2b???qX 8?? ??????? :? ?K????? ?? ??? ?   ?  ?  e  ?  m  / ?    ?  Y  l  ?  ?  > `  9  ?  ?  ?  ?    R t  /  ?  y  ?  b   ? ` ?   !` ?   !`  ?   ? ` ?  $@  h  ?@ ?   ? ` ?   !`  o  @@ e y   @ d  ? ` ?   ?@  \   ?@ R  ?@    ?@ G libmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ _Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers msFreeMapServObj msDebug loadParams msCGIWriteError msIO_fprintf msGetVersion msCGIWriteLog msSetup msGetGlobalDebugLevel msCGIDispatchRequest msCGILoadMap msAllocMapServObj msCleanup msIO_setHeaderEnabled libc.so.6 fflush exit strncmp signal puts putchar putenv stdout stderr gettimeofday strcmp __libc_start_main _edata __bss_start _end /src/ms/mapserver-7.0.1/build:/usr/local/lib::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: __libc_csu_fini __data_start __libc_csu_init msCleanupOnSignal _IO_stdin_used GLIBC_2.2.5                            O  ui   ?`   !`  !`  %  `   `   ( `   0 `   8 `   @ `   H `   P `  X `  ` `  h `  p `  x `   ? `   ? `   ? `   ? `   `   ? `   ? `   ? `   ? `   ? `   ? `   ? `  ? `  H??H?? H??t?? H??? ?5? ?%? @ ?%? h ??????%? h ??????%? h ??????%? h ??????%? h ? ????%? h ??????%? h ??????%? h ?p????%? h ?`????%z h ?P????%r h ?@????%j h ?0????%b h ? ????%Z h ?????%R h ? ????%J h ??????%B h ??????%: h ??????%2 h ??????%* h ??????%" h ? ????% h ??????% h ??????%  h ?p????% h ?`????%? h ?P???1?I??^H??H???PTI???@ H??@@ H??$@ ?g????fD ?? ` UH-? ` H??H??w]?? H??t?]?? ` ??? ?? ` UH-? ` H??H??H??H???H?H??u]?? H??t?]H???? ` ??? ?=y uUH???~???]?f ??@ H?=H t ? H??tU? ` H????]?{??? ?s???UH??H???}?? ? ? ????H? ??@ H??? ?;????????? ? ???UH??SH??h?}?H?u??E? H?E? ?(?????tH?E?H????????S???? ????????????vH?E?? H???^????E  ?? ?E H?H?? H?E?H?H? ??@ H?????????u&????H???????H?6 H??? ???? ?T????E H?H?? H?E?H?H? ??@ H???`?????u?E? ? ?+????? ?E H?H?? H?E?H?H? ? ??@ H???=?????u.??@ ?o????E H?H?? H?E?H?H? H???P???? ?E H?H?? H?E?H?H? ?@ H?????????t(?E H?H?? H?E?H?H? ? @ H?????????uP?@ ?????? ??????P@ ??????`@ ???????@ ???????@ ??????@ ?????? ?????E ?E ;E??i?????@ ? ?l?????@ ? ?]????H???H?E?H?E??U??PH?E?H?XH?E?H?@A? ? ? ? H????????CH?E?H?@?@???uH?E?H???n????pH?E?H??? ???H?U?H?BH?E?H?@H??uH?E?H????????AH?E?H?@??H ??~H?E?? H???????H?E?H???M?????t H?E?H????????H?E?H?@H??t{H?E?H?@??H ??~hH?E?? H???????H?E??H*?H?E??H*??a ?^??X?H?E??H*?H?E??H*?? ? ?^??X??\??X@ ? ?D???H?E?? H???????H?E?H????????b?????vhH?E?? H??? ???H?E??H*?H?E??H*??? ?^??X?H?E??H*?H?E??H*?? ? ?^??X??\???@ ? ??????????? ?????fD AWA??AVI??AUI??ATL?%? UH?-? SL)?1?H??H???????H??t ? L??L??D??A??H??H9?u?H??[]A\A]A^A_?ff.? ?? H??H???   In msCleanupOnSignal. -v -nh QUERY_STRING= REQUEST_METHOD=GET --h --help Usage: mapserv [--help] [-v] [-nh] [QUERY_STRING=value] Options : -h, --help Display this help message. -v Display version and exit. -nh Suppress HTTP headers in CGI mode. QUERY_STRING=value Set the QUERY_STRING in GET request mode. mapserv request processing time (msLoadMap not incl.): %.3fs mapserv total execution time: %.3fs ??.A;<  x???? (???X ???? \???? x???? ????8  zR x ? ????*  zR x ? $ ????? FJ w? ?;*3$" D ]???G A?C  d ???? A?C E? D ? ????e B?E?E ?E(?H0?H8?M@l8A0A(B BBB  ? ???? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Tue Apr 5 00:19:13 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Tue, 5 Apr 2016 07:19:13 +0000 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? Message-ID: <2875685618174cd3a8248ff473b36edb@C119S212VM022.msvyvi.vaha.local> Hi, I believe that there is something wrong with the configuration of your http server. It does not seem to know that you do not want to download the mapserv binary but make the binary to work for you. If you run Apache I would have a look at ?ScriptAlias? in the httpd.conf file and check that the directory where you have placed the mapserv binary is configured to contain applications. This example is from Windows. # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "/ms4w/Apache/cgi-bin/" ScriptAlias /fcgi-bin/ "/ms4w/Apache/cgi-bin/" -Jukka Rahkonen- karsten wrote: Hi All, I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can getv the follwoing output from the executable: /usr/lib/cgi-bin# ./mapserv -v MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Howvere when I try to get a get aresponse to a request e.g. 136.243.250.62/cgi-bin/mapserv or aslo when I try a getcapabiliteis request like http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map&VERSION=1.1.1&REQUEST=getCapabilities&SERVICE=wms I always get a 'binary file back' output like below the line . Would anybody know what could have gone wrong or where to start figuring this out ? Cheers Karsten Karsten Vennemann Terra GIS LTD -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Tue Apr 5 00:20:50 2016 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Tue, 5 Apr 2016 09:20:50 +0200 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? In-Reply-To: <77ADB4CDB12A4CBB95F24935543A854F@terragis2> References: <77ADB4CDB12A4CBB95F24935543A854F@terragis2> Message-ID: <57036752.1070509@wheregroup.com> Hello Karsten, looks like your Webserver-CGI-Config isn't correct. Is the directory configured as executable? J?rg Am 05.04.2016 um 08:50 schrieb karsten: > Hi All, > > I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 > and can getv the follwoing output from the executable: > /usr/lib/cgi-bin# ./mapserv -v > MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV > SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER > SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > Howvere when I try to get a get aresponse to a request e.g. > 136.243.250.62/cgi-bin/mapserv > or aslo when I try a getcapabiliteis request like > http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map&VERSION=1.1.1&REQUEST=getCapabilities&SERVICE=wms > I always get a 'binary file back' output like below the line . Would > anybody know what could have gone wrong or where to start figuring this > out ? > > Cheers > Karsten > > > Karsten Vennemann > Terra GIS LTD > > .----------------binary output below? ----------------- > > ELF  >  ?@ @ P" @ 8 @    > @ @ @ @ @ ? ?    8 > 8@ 8@    @ > @     ? ? ` ? `  > (     `  ` ? ? >    T T@ T@ D D  > P?td ? ?@ ?@ < <  > Q?td  R?td > ? ? ` ? `    > /lib64/ld-linux-x86-64.so.2    GNU     >   GNU O ~a?; ?k*BU??~6?   ??! > ? @ " * > j C????|( ? CE??j?|2b???qX 8?? ??????? :? ?K????? ?? ??? > ?   ? >  ?  e  > ?  m  > / ?   >  ?  Y  > l  ?  ?  >> `  9 >  ?  ?  > ?  ?    > R t  / >  ?  y  > ?  b   ? ` ?   > !` ?   !`  ?   ? ` ?  > $@  h  > ?@ ?   ? ` ?   !`  o  > @@ e y   > @ d  ? ` ?   ?@  \   > ?@ R  > ?@    > ?@ G libmapserver.so.2 _ITM_deregisterTMCloneTable > __gmon_start__ _Jv_RegisterClasses _ITM_registerTMCloneTable > msIO_installHandlers msFreeMapServObj msDebug loadParams msCGIWriteError > msIO_fprintf msGetVersion msCGIWriteLog msSetup msGetGlobalDebugLevel > msCGIDispatchRequest msCGILoadMap msAllocMapServObj msCleanup > msIO_setHeaderEnabled libc.so.6 fflush exit strncmp signal puts putchar > putenv stdout stderr gettimeofday strcmp __libc_start_main _edata > __bss_start _end > /src/ms/mapserver-7.0.1/build:/usr/local/lib::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: > __libc_csu_fini __data_start __libc_csu_init msCleanupOnSignal > _IO_stdin_used GLIBC_2.2.5       >                      O  > ui   ?`   !`  > !`  %  `   `   > ( `   0 `   8 `   > @ `   H `   P `  > X `  > ` `  h `  p `  > x `   ? `   ? `  >  ? `   ? `   ` >   ? `   ? `   ? > `   ? `   ? `   ? > `   ? `  ? `  > H??H?? H??t?? H??? ?5? ?%? @ > ?%? h ??????%? h ??????%? h ??????%? h > ??????%? h ? ????%? h ??????%? h ??????%? h > ?p????%? h ?`????%z h ?P????%r h > ?@????%j  h ?0????%b h ? ????%Z h > ?????%R h ? ????%J h ??????%B h ??????%: h > ??????%2 h ??????%* h ??????%" h ? ????% h > ??????% h ??????% >  h ?p????% h ?`????%? h ?P???1?I??^H??H???PTI???@ > H??@@ H??$@ ?g????fD ?? ` UH-? ` H??H??w]?? H??t?]?? ` > ??? ?? ` UH-? ` H??H??H??H???H?H??u]?? H??t?]H???? ` > ??? ?=y uUH???~???]?f ??@ H?=H t ? H??tU? ` > H????]?{??? ?s???UH??H???}?? ? ? ????H? ??@ H??? > ?;????????? ? ???UH??SH??h?}?H?u??E? H?E? > ?(?????tH?E?H????????S???? ????????????vH?E?? > H???^????E  ?? ?E H?H?? H?E?H?H? ??@ > H?????????u&????H???????H?6 H??? ???? ?T????E H?H?? > H?E?H?H? ??@ H???`?????u?E? ? ?+????? ?E H?H?? H?E?H?H? ? > ??@ H???=?????u.??@ ?o????E H?H?? H?E?H?H? H???P???? > ?E H?H?? H?E?H?H? ?@ H?????????t(?E H?H?? H?E?H?H? ? @ > H?????????uP?@ ?????? > ??????P@ ??????`@ ???????@ ???????@ ??????@ ?????? > ?????E ?E ;E??i?????@ ? > ?l?????@ ? ?]????H???H?E?H?E??U??PH?E?H?XH?E?H?@A? ? > ? ? H????????CH?E?H?@?@???uH?E?H???n????pH?E?H??? > ???H?U?H?BH?E?H?@H??uH?E?H????????AH?E?H?@??H ??~H?E?? > H???????H?E?H???M?????t > H?E?H????????H?E?H?@H??t{H?E?H?@??H > > ??~hH?E?? H???????H?E??H*?H?E??H*??a > ?^??X?H?E??H*?H?E??H*?? ? ?^??X??\??X@ ? > ?D???H?E?? H???????H?E?H????????b?????vhH?E?? > H??? ???H?E??H*?H?E??H*??? > ?^??X?H?E??H*?H?E??H*?? ? ?^??X??\???@ ? > ??????????? ?????fD AWA??AVI??AUI??ATL?%? UH?-? > SL)?1?H??H???????H??t ? > L??L??D??A??H??H9?u?H??[]A\A]A^A_?ff.? ?? H??H???   > In msCleanupOnSignal. > -v -nh QUERY_STRING= REQUEST_METHOD=GET --h --help Usage: mapserv > [--help] [-v] [-nh] [QUERY_STRING=value] Options : -h, > --help Display this help message. > -v Display version and exit. > -nh Suppress HTTP headers in CGI mode. > QUERY_STRING=value Set the QUERY_STRING in GET request mode. > mapserv request processing time (msLoadMap not incl.): %.3fs > mapserv total execution time: %.3fs > ??.A;<  x???? (???X ???? \???? x???? > ????8  zR x ? > ????*  zR x ? $ ????? FJ w? > ?;*3$" D ]???G A?C >  d ???? A?C > E? D ? > ????e B?E?E ?E(?H0?H8?M@l8A0A(B BBB  > ? ???? > > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > Viele Gr??e, J?rg Thomsen -- ----------------------------------- Aufwind durch Wissen! Qualifizierte OpenSource-Schulungen bei der www.foss-academy.eu ----------------------------------- ------------------------------- J?rg Thomsen WhereGroup GmbH & Co. KG Gillweg 3 14193 Berlin Germany Fon: +49 (0)30 / 91 70 39 74 Fax: +49 (0)30 / 89 09 53 21 joerg.thomsen at wheregroup.com www.wheregroup.com Amtsgericht Bonn, HRA 6788 ------------------------------- Komplement?rin: WhereGroup Verwaltungs GmbH vertreten durch: Olaf Knopp, Peter Stamm ------------------------------- Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com From jmckenna at gatewaygeomatics.com Tue Apr 5 06:54:14 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 5 Apr 2016 10:54:14 -0300 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? In-Reply-To: <5703C304.60504@gatewaygeomatics.com> References: <77ADB4CDB12A4CBB95F24935543A854F@terragis2> <5703C304.60504@gatewaygeomatics.com> Message-ID: <5703C386.2070109@gatewaygeomatics.com> oops, here is the correct Apache syntax: ScriptAlias /cgi-bin/ /var/www/public_html/cgi-bin/ Options ExecCGI SetHandler cgi-script -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-05 10:52 AM, Jeff McKenna wrote: > Hi Karsten, > > With Ubuntu, your problem is a combination of what Jukka and J?rg said. > Here is what I would do in your situation, with Ubuntu: > > - make sure the mapserv executable has the correct permissions, with a > command (inside cgi-bin directory) such as: > > sudo chmod 755 mapserv > > - make sure that you have configured the appropriate permissions through > Apache for the cgi-bin directory, such as: > > ScriptAlias /cgi-bin/ /var/www/public_html/cgi-bin/ > /var/www/demo.gatewaygeomatics.com/public_html/cgi-bin/> > Options ExecCGI > SetHandler cgi-script > > > - restart Apache > > sudo /etc/init.d/apache2 restart > > > -jeff > From jmckenna at gatewaygeomatics.com Tue Apr 5 06:52:04 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 5 Apr 2016 10:52:04 -0300 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? In-Reply-To: <77ADB4CDB12A4CBB95F24935543A854F@terragis2> References: <77ADB4CDB12A4CBB95F24935543A854F@terragis2> Message-ID: <5703C304.60504@gatewaygeomatics.com> Hi Karsten, With Ubuntu, your problem is a combination of what Jukka and J?rg said. Here is what I would do in your situation, with Ubuntu: - make sure the mapserv executable has the correct permissions, with a command (inside cgi-bin directory) such as: sudo chmod 755 mapserv - make sure that you have configured the appropriate permissions through Apache for the cgi-bin directory, such as: ScriptAlias /cgi-bin/ /var/www/public_html/cgi-bin/ Options ExecCGI SetHandler cgi-script - restart Apache sudo /etc/init.d/apache2 restart -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-05 3:50 AM, karsten wrote: > Hi All, > I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 > and can getv the follwoing output from the executable: > /usr/lib/cgi-bin# ./mapserv -v > MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV > SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER > SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > Howvere when I try to get a get aresponse to a request e.g. > 136.243.250.62/cgi-bin/mapserv > or aslo when I try a getcapabiliteis request like > http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map&VERSION=1.1.1&REQUEST=getCapabilities&SERVICE=wms > I always get a 'binary file back' output like below the line . Would > anybody know what could have gone wrong or where to start figuring this > out ? > Cheers > Karsten > > Karsten Vennemann > Terra GIS LTD > From bob.basques at ci.stpaul.mn.us Tue Apr 5 08:45:04 2016 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Tue, 5 Apr 2016 15:45:04 +0000 Subject: [mapserver-users] Oracle SYSDATE in EXPRESSION In-Reply-To: <1459838219730-5259649.post@n6.nabble.com> References: <1459765732396-5259480.post@n6.nabble.com> <49B8B96F-3712-4D9A-AFD2-880D5CC9E528@ci.stpaul.mn.us> <1459838219730-5259649.post@n6.nabble.com> Message-ID: <8650D9AE-5433-41F4-B60F-01DFED9FEEEA@ci.stpaul.mn.us> Thanks Martin, I'll take a look at it again. I thought I had tried all possible combinations of brackets/quoting, etc. though . . . bobb > On Apr 5, 2016, at 1:36 AM, Martin Icking wrote: > > I tried this DATA statement successfully with Oracle: > > DATA "GEOLOC FROM (SELECT GEOLOC,OBJECTID,START_DATE, > (SYSDATE-START_DATE)/365 as age FROM SPATIAL_TABLE) USING UNIQUE OBJECTID > SRID 27700" > > [AGE] can then be used in any styling. > > Martin > > > > -- > View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-SYSDATE-in-EXPRESSION-tp5258709p5259649.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 jmckenna at gatewaygeomatics.com Tue Apr 5 09:53:54 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 5 Apr 2016 13:53:54 -0300 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? In-Reply-To: <5703ED49.2010000@gatewaygeomatics.com> References: <5703ED49.2010000@gatewaygeomatics.com> Message-ID: <5703EDA2.4050205@gatewaygeomatics.com> On 2016-04-05 1:45 PM, karsten wrote: > Hi All, > thanksto all the responses. It was neither one of ( cgi-bin permissions > for Apache nor the Script alias) - both where in line with what everyone > said/ listed. The issue was that I did not have the cgi module for > Apache enabled :( > I enabled it with > a2enmod cgi > service apache2 restart > and then everything worked for mapserver, perl script etc. > I did only find out because I places a simple Perl script in cgi-bin > that also was downloaded instead of executed... > Thanksfor the answers they brought me on the right track ! > Cheers > Karsten > Ah yes, that is here in my notes as well, an important step! :) Sorry for not mentioning that. It always bites me too when I setup a new virtualhost in Apache. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From emperor_stef at yahoo.gr Tue Apr 5 15:37:49 2016 From: emperor_stef at yahoo.gr (Stefanos Anastasiou) Date: Tue, 5 Apr 2016 22:37:49 +0000 (UTC) Subject: [mapserver-users] Problem with CGI results References: <1090919370.5725027.1459895869300.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1090919370.5725027.1459895869300.JavaMail.yahoo@mail.yahoo.com> ????Hello list. I'm having a problem I can't understand where it's coming from. I'm using [mapx] and [mapy] parameters to get the coordinates of a simple click. When I click anywhere on the image, the resulting x,y is at least 1 kilometer North-West from where it should. The image coordinates look correct but the x,y are really wrong. I'm copying and pasting my form variables below:? ??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? When I first load the map with the following URLhttp://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map x, y are set automatically in -1,000000 -1,000000. Any idea? Regards,Stefanos -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.icking at bentley.com Wed Apr 6 03:55:20 2016 From: martin.icking at bentley.com (Martin Icking) Date: Wed, 6 Apr 2016 03:55:20 -0700 (PDT) Subject: [mapserver-users] MS SQL server - OGR 5 times slower compared to Mapserver plugin? Message-ID: <1459940120337-5259922.post@n6.nabble.com> We noticed that typical WMS response times using the OGR layer type for MS SQL server are 5 times slower compared to the MapServer MS SQL plugin. Maybe the OGR driver does not properly use the spatial index and always let's MapServer filter the relevant geometries? Do other users have a similar experience? At least that would make the OGR layer type unusable for us in this case. We understand that OGR layers have an extra level of abstraction but that should not create such a big performance penalty. Any hints to make the OGR layer faster? The reason that we switched from Plugin to OGR was that the Plugin does not properly support the "gml_types" "auto" clause and always reports the column types as string. Tx Martin -- View this message in context: http://osgeo-org.1560.x6.nabble.com/MS-SQL-server-OGR-5-times-slower-compared-to-Mapserver-plugin-tp5259922.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jukka.rahkonen at maanmittauslaitos.fi Wed Apr 6 04:39:13 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 6 Apr 2016 11:39:13 +0000 Subject: [mapserver-users] MS SQL server - OGR 5 times slower compared to Mapserver plugin? Message-ID: <54c7ef5013df49fba37baee8c5c65f54@C119S212VM022.msvyvi.vaha.local> Hi, Is it so that spatial index in MSSQL must be activated by a hint? From http://osgeo-org.1560.x6.nabble.com/Spatial-Index-not-being-Used-in-SQL-Server-Layer-td5011400.html which is an old post. Tere is nowadays a control in Geoserver for configuring that hint. SELECT myID ,GEOM.STAsBinary() as GEOM FROM dbo.Current_MGRS_SRID_3857 WITH(INDEX=IDX_GEOM) WHERE GEOM.STIntersects(geometry::STGeomFromText('POLYGON ((16824688.06064964 -4008988.3687579953, 16824688.06064964 -4007727.157791289, 16825949.27161635 -4007727.157791289, 16825949.27161635 -4008988.3687579953, 16824688.06064964 -4008988.3687579953))', 3857)) = 1 I don't know but wondering that perhaps you can include the WITH(INDEX= into the DATA of your layer and make OGR to utilize index that way. -Jukka Rahkonen- Martin Icking wrote: > We noticed that typical WMS response times using the OGR layer type for MS SQL server are 5 times slower compared to the MapServer MS SQL plugin. Maybe the OGR driver does not properly use the spatial index and always let's MapServer filter the relevant geometries? Do other users have a similar experience? At least that would make the OGR layer type unusable for us in this case. We understand that OGR layers have an extra level of abstraction but that should not create such a big performance penalty. Any hints to make the OGR layer faster? The reason that we switched from Plugin to OGR was that the Plugin does not properly support the "gml_types" "auto" clause and always reports the column types as string. Tx Martin -- View this message in context: http://osgeo-org.1560.x6.nabble.com/MS-SQL-server-OGR-5-times-slower-compared-to-Mapserver-plugin-tp5259922.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 jmckenna at gatewaygeomatics.com Wed Apr 6 05:36:11 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 6 Apr 2016 09:36:11 -0300 Subject: [mapserver-users] Problem with CGI results In-Reply-To: <1090919370.5725027.1459895869300.JavaMail.yahoo@mail.yahoo.com> References: <1090919370.5725027.1459895869300.JavaMail.yahoo.ref@mail.yahoo.com> <1090919370.5725027.1459895869300.JavaMail.yahoo@mail.yahoo.com> Message-ID: <570502BB.2010404@gatewaygeomatics.com> Hi Stefanos, When I try this locally with CGI, I also get the same value on first load for [mapx] and [mapy] of -1.0000,-1.0000 likely because there is no point click yet. But when I do click, the values for [mapx] and [mapy] returned look valid. You might also want to check the returned values for [maplat] [maplon] as well. If it is related to a projection issue, you might want to check the mailing list archives for relevant discussions, such as http://osgeo-org.1560.x6.nabble.com/retrieve-map-coordinates-with-different-EPSG-td5000369.html I am testing with MS4W 3.1.3 (MapServer 7.0.1). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-05 7:37 PM, Stefanos Anastasiou wrote: > Hello list. > > I'm having a problem I can't understand where it's coming from. I'm > using [mapx] and [mapy] parameters to get the coordinates of a simple > click. When I click anywhere on the image, the resulting x,y is at least > 1 kilometer North-West from where it should. The image coordinates look > correct but the x,y are really wrong. I'm copying and pasting my form > variables below: > > > value="[mapext]"> > > width="700" height="500"> > > > > When I first load the map with the following URL > http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map > > > x, y are set automatically in -1,000000 -1,000000. > > Any idea? > > > > Regards, > Stefanos > From miladnidal2604 at gmail.com Wed Apr 6 09:30:53 2016 From: miladnidal2604 at gmail.com (milad nidal) Date: Wed, 6 Apr 2016 12:30:53 -0400 Subject: [mapserver-users] Mapcache: How I can limit the area where mapcache should generate tiles on the fly Message-ID: hi, I?m using mapcache on linux to generate tiles from orthophotos (without mapserver). My question: How I can limit the area where mapcache should not generate further tiles on the fly (ex. I have generated the tiles for 0-18 levels and I?d like to generate tiles on the fly for the levels 19 and 20 for some areas and not for all areas) and how I can get message that there is no information available. thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From aperi2007 at gmail.com Thu Apr 7 05:03:53 2016 From: aperi2007 at gmail.com (Andrea Peri) Date: Thu, 7 Apr 2016 14:03:53 +0200 Subject: [mapserver-users] What molteplicity for wms_metadataurl_href info Message-ID: Hi, I try to set the mapserver to return two or more values for "wms_metadataurl_format" "text/html" "wms_metadataurl_href" "http://.....url to html page" "wms_metadataurl_type" "TC211" "wms_metadataurl_format" "text/xml" "wms_metadataurl_href" "http://.....url to xml page" "wms_metadataurl_type" "TC211" "wms_metadataurl_format" "text/pdf" "wms_metadataurl_href" "http://.....url to pdf page" "wms_metadataurl_type" "TC211" But the getcapablites return always one only value. text/html AFAIK the ogc specs will allow to return more than one value. I'm wrong on specs or this is an issue of mapserver ? Thx. -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From emperor_stef at yahoo.gr Thu Apr 7 05:33:57 2016 From: emperor_stef at yahoo.gr (Stefanos Anastasiou) Date: Thu, 7 Apr 2016 12:33:57 +0000 (UTC) Subject: [mapserver-users] =?utf-8?b?zqPPh861z4Q6ICBQcm9ibGVtIHdpdGggQ0dJ?= =?utf-8?q?_results?= In-Reply-To: <570502BB.2010404@gatewaygeomatics.com> References: <570502BB.2010404@gatewaygeomatics.com> Message-ID: <1262258411.1558020.1460032437739.JavaMail.yahoo@mail.yahoo.com> Hello Jeff, ?Thank you for the reply.??I'm pretty sure there's something I'm missing out here. In my map object I set my extent to: ?(retrieved from ogrinfo -al -so )? ? ? ?EXTENT 300000.000 4377000.000 304000.000 4380000.000? ? ? ?UNITS meters If I click on the lower left corner of the image for the first time, [mapx], [mapy] will give: 300000.000, 4377500.000A click in the upper right corner gives me: 303500.000, 4380000.000 This doesn't seem pretty right. I've set three projection objects, one in the map level and one on each layer with "init=epsg:2100". [maplat], [maplon] also gives me wrong values with the same epsg, but 300 meters south than the [mapx], [mapx] A first though would be that this should be a dataset problem? ? ? ???? 4:03 ?.?. ???????, 6 ???????? 2016, ?/? Jeff McKenna ??????: Hi Stefanos, When I try this locally with CGI, I also get the same value on first load for [mapx] and [mapy] of -1.0000,-1.0000 likely because there is no point click yet.? But when I do click, the values for [mapx] and [mapy] returned look valid. You might also want to check the returned values for [maplat] [maplon] as well. If it is related to a projection issue, you might want to check the mailing list archives for relevant discussions, such as http://osgeo-org.1560.x6.nabble.com/retrieve-map-coordinates-with-different-EPSG-td5000369.html I am testing with MS4W 3.1.3 (MapServer 7.0.1). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-05 7:37 PM, Stefanos Anastasiou wrote: >? ? ? Hello list. > > I'm having a problem I can't understand where it's coming from. I'm > using [mapx] and [mapy] parameters to get the coordinates of a simple > click. When I click anywhere on the image, the resulting x,y is at least > 1 kilometer North-West from where it should. The image coordinates look > correct but the x,y are really wrong. I'm copying and pasting my form > variables below: > >? >? ? ? ? ? ? ? ? ? ? ? ? ? value="[mapext]"> >? ? ? ? ? ? ? ? ? ? ? ? ? >? ? ? ? ? ? ? ? ? ? ? ? ? width="700" height="500"> >? ? ? ? ? ? ? ? ? ? ? ? ? > > > When I first load the map with the following URL > http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map > > > x, y are set automatically in -1,000000 -1,000000. > > Any idea? > > > > Regards, > Stefanos > _______________________________________________ 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 emperor_stef at yahoo.gr Thu Apr 7 05:55:35 2016 From: emperor_stef at yahoo.gr (Stefanos Anastasiou) Date: Thu, 7 Apr 2016 12:55:35 +0000 (UTC) Subject: [mapserver-users] =?utf-8?b?zqPPh861z4Q6ICBQcm9ibGVtIHdpdGggQ0dJ?= =?utf-8?q?_results?= In-Reply-To: <570502BB.2010404@gatewaygeomatics.com> References: <570502BB.2010404@gatewaygeomatics.com> Message-ID: <1507444556.1526849.1460033735905.JavaMail.yahoo@mail.yahoo.com> OK I got it.... My IMAGESIZE is set to 800 600 in the mapfile In my template the CGI parameters in the form are set to?. It seems that the width and height values have to be the same on both the mapfile and the template...or not set in the template at all. ???? 4:03 ?.?. ???????, 6 ???????? 2016, ?/? Jeff McKenna ??????: Hi Stefanos, When I try this locally with CGI, I also get the same value on first load for [mapx] and [mapy] of -1.0000,-1.0000 likely because there is no point click yet.? But when I do click, the values for [mapx] and [mapy] returned look valid. You might also want to check the returned values for [maplat] [maplon] as well. If it is related to a projection issue, you might want to check the mailing list archives for relevant discussions, such as http://osgeo-org.1560.x6.nabble.com/retrieve-map-coordinates-with-different-EPSG-td5000369.html I am testing with MS4W 3.1.3 (MapServer 7.0.1). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-05 7:37 PM, Stefanos Anastasiou wrote: >? ? ? Hello list. > > I'm having a problem I can't understand where it's coming from. I'm > using [mapx] and [mapy] parameters to get the coordinates of a simple > click. When I click anywhere on the image, the resulting x,y is at least > 1 kilometer North-West from where it should. The image coordinates look > correct but the x,y are really wrong. I'm copying and pasting my form > variables below: > >? >? ? ? ? ? ? ? ? ? ? ? ? ? value="[mapext]"> >? ? ? ? ? ? ? ? ? ? ? ? ? >? ? ? ? ? ? ? ? ? ? ? ? ? width="700" height="500"> >? ? ? ? ? ? ? ? ? ? ? ? ? > > > When I first load the map with the following URL > http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map > > > x, y are set automatically in -1,000000 -1,000000. > > Any idea? > > > > Regards, > Stefanos > _______________________________________________ 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 geographika at gmail.com Fri Apr 8 01:02:20 2016 From: geographika at gmail.com (Seth G) Date: Fri, 8 Apr 2016 10:02:20 +0200 Subject: [mapserver-users] MS SQL server - OGR 5 times slower compared to Mapserver plugin? In-Reply-To: <1459940120337-5259922.post@n6.nabble.com> References: <1459940120337-5259922.post@n6.nabble.com> Message-ID: <5707658C.8020805@gmail.com> Hi, I'd be interested in your experience with this, as I'm considering migrating to a Linux server from Windows, but could then no longer use the MapServer SQLServer driver. What does your connection string look like? There are options for GeometryFormat - and using wkt has a significant overhead - http://www.gdal.org/drv_mssqlspatial.html However the default is "native" so should not be an issue unless you overrode it. Did you run the SQL Server profiler to see if the generated SQL looks any different using the OGR driver from the MapServer one? Seth On 06/04/2016 12:55, Martin Icking wrote: > We noticed that typical WMS response times using the OGR layer type for MS > SQL server are 5 times slower compared to the MapServer MS SQL plugin. > Maybe the OGR driver does not properly use the spatial index and always > let's MapServer filter the relevant geometries? Do other users have a > similar experience? > At least that would make the OGR layer type unusable for us in this case. We > understand that OGR layers have an extra level of abstraction but that > should not create such a big performance penalty. Any hints to make the OGR > layer faster? > > The reason that we switched from Plugin to OGR was that the Plugin does not > properly support the "gml_types" "auto" clause and always reports the column > types as string. > Tx > Martin > > > > -- > View this message in context: http://osgeo-org.1560.x6.nabble.com/MS-SQL-server-OGR-5-times-slower-compared-to-Mapserver-plugin-tp5259922.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 martin.icking at bentley.com Fri Apr 8 03:10:54 2016 From: martin.icking at bentley.com (Martin Icking) Date: Fri, 8 Apr 2016 03:10:54 -0700 (PDT) Subject: [mapserver-users] MS SQL server - OGR 5 times slower compared to Mapserver plugin? In-Reply-To: <5707658C.8020805@gmail.com> References: <1459940120337-5259922.post@n6.nabble.com> <5707658C.8020805@gmail.com> Message-ID: <1460110254689-5260311.post@n6.nabble.com> Hi Seth, here the relevant (anonymized) sections in the mapfile: CONNECTION "MSSQL:Server=myserver;uid=user;pwd=password;Database=mydatabase;Integrated Security=false" CONNECTIONTYPE OGR DATA "SELECT * FROM ASSETS.Parcels" As a consequence of the slow OGR performance we didn't do lot of SQL Server profiling (do you have a link for a good description on this?) but we switched back to the MS plugin. Fixing the code to correctly support the "gml_types" "auto" clause was not too difficult. (Will create a pull request about this fix soon). Tx Martin -- View this message in context: http://osgeo-org.1560.x6.nabble.com/MS-SQL-server-OGR-5-times-slower-compared-to-Mapserver-plugin-tp5259922p5260311.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jukka.rahkonen at maanmittauslaitos.fi Fri Apr 8 04:10:28 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 8 Apr 2016 11:10:28 +0000 Subject: [mapserver-users] MS SQL server - OGR 5 times slower compared to Mapserver plugin? Message-ID: <5bb2f46e59ac44719fc850444c50940d@C119S212VM022.msvyvi.vaha.local> Hi, Have you ever tried to add a hint with OGR connection for forcing the use of spatial index https://msdn.microsoft.com/en-us/library/ms187373.aspx? The syntax might be DATA "SELECT * FROM ASSETS.Parcels WITH (INDEX(your_spatial_idx))" Sorry if the syntax is not right, I have never used MS SQL myself. -Jukka Rahkonen- Martin Icking wrote: Hi Seth, here the relevant (anonymized) sections in the mapfile: CONNECTION "MSSQL:Server=myserver;uid=user;pwd=password;Database=mydatabase;Integrated Security=false" CONNECTIONTYPE OGR DATA "SELECT * FROM ASSETS.Parcels" As a consequence of the slow OGR performance we didn't do lot of SQL Server profiling (do you have a link for a good description on this?) but we switched back to the MS plugin. Fixing the code to correctly support the "gml_types" "auto" clause was not too difficult. (Will create a pull request about this fix soon). Tx Martin -- View this message in context: http://osgeo-org.1560.x6.nabble.com/MS-SQL-server-OGR-5-times-slower-compared-to-Mapserver-plugin-tp5259922p5260311.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 emperor_stef at yahoo.gr Fri Apr 8 14:27:40 2016 From: emperor_stef at yahoo.gr (Stefanos Anastasiou) Date: Fri, 8 Apr 2016 21:27:40 +0000 (UTC) Subject: [mapserver-users] Error: End of script output before headers References: <768996499.3108574.1460150860074.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <768996499.3108574.1460150860074.JavaMail.yahoo@mail.yahoo.com> Hi all, I'm running mapserver locally in query mode with only two layers, a TYPE line layer and a polygon, both are simple shapefiles. When first loading my map with: http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map and querying the line layer I get results just fine. But when trying to query the polygon layer, on the same zoomsize, I get the following error: Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator at webmaster at localhost to inform them of the time this error occurred, and the actions you performed just before this error.More information about this error may be available in the server error log.? However, if zoom in close enough, and query the polygon layer I get the proper results. So it seems to me that it has to do something with the zoomdir parameter ?? The apache error log says:??End of script output before headers: mapserv, referer: http://127.0.0.1/cgi-bin/mapserv?map=/home/stefanos/mapdata/mymap.map The same thing happens with nquery mode, but it affects the line layer too in full extent.? This is my map file: ################## LINE LAYER #########? LAYER?? ? ? NAME "Urban"? ? ? DATA "outskirts"?? ? ? TYPE polygon? ? ? STATUS default? ? ? LABELITEM "Name"? ? ? LABELCACHE on? ? ? TOLERANCE 200? ? ? TOLERANCEUNITS meters? ? ? ?PROJECTION? ? ? ? ? ?"init=epsg:2100"? ? ? ?END? ? ? HEADER "/var/www/html/final/urban_header.html"? ? ? FOOTER "/var/www/html/final/urban_footer.html"? ? ? CLASS ? ? ??? ? ? ? ? TEMPLATE "/var/www/html/final/urban_query.html"? ? ? ? ? STYLE? ? ? ? ? ? ? ?COLOR 210 180 140? ? ? ? ? ? ? ?OUTLINECOLOR 255 255 255? ? ? ? ? END? ? ? ? ? LABEL?? ? ? ? ? ? ? ? COLOR 0 0 0?? ? ? ? ? ? ? ? POSITION cc? ? ? ? ? ? ? ? ANGLE auto? ? ? ? ? END? ? ? END? END #layer############################# LINE LAYER ###############? LAYER? ? ? NAME "Roads"? ? ? TYPE line? ? ? STATUS default? ? ? DATA "Rnetwork"? ? ? LABELITEM "Street"? ? ? LABELCACHE on? ? ? TOLERANCE 200? ? ? TOLERANCEUNITS meters? ? ? ?PROJECTION? ? ? ? ? ?"init=epsg:2100"? ? ? ?END? ? ? HEADER "/var/www/html/final/road_header.html"? ? ? FOOTER "/var/www/html/final/road_footer.html"? ? ? CLASS? ? ? ? ?TEMPLATE "/var/www/html/final/road_query.html"? ? ? ? ?STYLE? ? ? ? ? ? ?COLOR 0 0 255? ? ? ? ?END? ? ? ? ?LABEL?? ? ? ? ? ? ?COLOR 0 0 0?? ? ? ? ? ? ?ANGLE auto? ? ? ? ? ? ?POSITION cc? ? ? ? ?END #label? ? ? END #class? END #layer apachectl -v is:Server version: Apache/2.4.7 (Ubuntu) My apache cgi configuration: ? ? ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? AllowOverride None? ? ? ? ? ? ? ? ? ? ? ? Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch? ? ? ? ? ? ? ? ? ? ? ? Require all granted? ? ? ? ? ? ? ? Any idea ? ?? -Stefanos -------------- next part -------------- An HTML attachment was scrubbed... URL: From reuven at levitt.net Mon Apr 11 11:56:32 2016 From: reuven at levitt.net (reuven at levitt.net) Date: Mon, 11 Apr 2016 21:56:32 +0300 Subject: [mapserver-users] Fw: new important message Message-ID: <0000d577e0d8$1eadb725$edc3180d$@levitt.net> Hello! New message, please read reuven at levitt.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From vini.vineetsingh at gmail.com Wed Apr 13 00:06:35 2016 From: vini.vineetsingh at gmail.com (vineet singh) Date: Wed, 13 Apr 2016 12:36:35 +0530 Subject: [mapserver-users] tinyows does not show vector layer Message-ID: Hi Everyone, I'm using tinyows server configured with config.xml file. I'm adding vector layer to config file and for the first time it does not show newly added layer, but once i have restarted the tinyows server than it will show the layer. So i have to restart tinyows after adding new layer. Anyone know how can I fix this so that it will work without restarting. I'm runing TinyOWS as fast-cgi. Here is config.xml : Thanks, Vineet Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Apr 13 00:12:31 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 13 Apr 2016 07:12:31 +0000 Subject: [mapserver-users] tinyows does not show vector layer Message-ID: <9f59e7f1e6724b938af0cb032dd1d07d@C119S212VM022.msvyvi.vaha.local> Hi , You could have mentioned that you have asked the same question in gis.stackexchange http://gis.stackexchange.com/questions/189102/tinyows-does-not-show-vector-layer . Reading the comments may help Mapserver users to give you a better answer and faster. -Jukka Rahkonen- vineet singh wrote: Hi Everyone, I'm using tinyows server configured with config.xml file. I'm adding vector layer to config file and for the first time it does not show newly added layer, but once i have restarted the tinyows server than it will show the layer. So i have to restart tinyows after adding new layer. Anyone know how can I fix this so that it will work without restarting. I'm runing TinyOWS as fast-cgi. Here is config.xml : Thanks, Vineet Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Wed Apr 13 04:53:35 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 13 Apr 2016 08:53:35 -0300 Subject: [mapserver-users] tinyows does not show vector layer In-Reply-To: <9f59e7f1e6724b938af0cb032dd1d07d@C119S212VM022.msvyvi.vaha.local> References: <9f59e7f1e6724b938af0cb032dd1d07d@C119S212VM022.msvyvi.vaha.local> Message-ID: <570E333F.3040501@gatewaygeomatics.com> To followup on the other comments and Jukka's recommendation: you can set specific parameters for your FastCGI use - in the case of MS4W, we use the Apache module named 'mod_fcgi', and you can set its parameters in Apache's 'httpd.conf' file: for a list of these parameters see http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html An example setting to limit the maximum time a process is running/alive to 10 seconds: FcgidProcessLifeTime 10 -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-13 4:12 AM, Rahkonen Jukka (MML) wrote: > Hi , > > You could have mentioned that you have asked the same question in > gis.stackexchange > http://gis.stackexchange.com/questions/189102/tinyows-does-not-show-vector-layer > . Reading the comments may help Mapserver users to give you a better > answer and faster. > > -Jukka Rahkonen- > > vineet singh wrote: > > Hi Everyone, > > I'm using tinyows server configured with config.xml file. I'm adding > vector layer to config file and for the first time it does not show > newly added layer, but once i have restarted the tinyows server than it > will show the layer. > > So i have to restart tinyows after adding new layer. Anyone know how can > I fix this so that it will work without restarting. > > I'm runing TinyOWS as fast-cgi. > > Here is config.xml : > > log_level="15" online_resource="http://192.168.0.35:19090/maps" > schema_dir="/home/vineet/Project/mygis/data/schema"> > > user="mygis"/> > > > > > > retrievable="1" writable="1" ns_prefix="tows" ns_uri="http://www.vizexperts.com/" > name="world_boundaries" > > title="World Borders" /> > > > > Thanks, > > Vineet Singh > > From michal.seidl at gmail.com Thu Apr 14 01:17:36 2016 From: michal.seidl at gmail.com (Michal Seidl) Date: Thu, 14 Apr 2016 01:17:36 -0700 (PDT) Subject: [mapserver-users] Symbol size in meters, width in pixels units In-Reply-To: References: Message-ID: <1460621856925-5261186.post@n6.nabble.com> Hi, I can see the same behaviour with Mapserver 6.4 driver AGG. I am affraid it is not possible. Unfortunaltely. I din not find any workaround. Michal -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Symbol-size-in-meters-width-in-pixels-units-tp4228865p5261186.html Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at gmail.com Thu Apr 14 01:37:01 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 14 Apr 2016 10:37:01 +0200 Subject: [mapserver-users] Symbol size in meters, width in pixels units In-Reply-To: <1460621856925-5261186.post@n6.nabble.com> References: <1460621856925-5261186.post@n6.nabble.com> Message-ID: For lines, you have the OUTLINEWIDTH keyword which is always in pixels. -- thomas On 14 April 2016 at 10:17, Michal Seidl wrote: > Hi, > I can see the same behaviour with Mapserver 6.4 driver AGG. I am affraid it > is not possible. Unfortunaltely. I din not find any workaround. > > Michal > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Symbol-size-in-meters-width-in-pixels-units-tp4228865p5261186.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal.seidl at gmail.com Thu Apr 14 04:52:09 2016 From: michal.seidl at gmail.com (Michal Seidl) Date: Thu, 14 Apr 2016 13:52:09 +0200 Subject: [mapserver-users] Symbol size in meters, width in pixels units In-Reply-To: References: <1460621856925-5261186.post@n6.nabble.com> Message-ID: <570F8469.5020802@gmail.com> Thanks for replay. Actually I am triyng to size circle vector symbol in map/meters/units. It works perfectly till you use only COLOR and not OUTLINECOLOR. All is needed is SIZEUNITS meters at LAYER level and then STYLE SIZE is then computed not in pixeles but map meters. Unfortunatelly the OUTLINECOLOR strip is also sized so the result symbol size is not correct. Mapserver 6.4 Michal From woodbri at swoodbridge.com Thu Apr 14 06:00:03 2016 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Thu, 14 Apr 2016 09:00:03 -0400 Subject: [mapserver-users] Symbol size in meters, width in pixels units In-Reply-To: References: <1460621856925-5261186.post@n6.nabble.com> Message-ID: <570F9453.4080607@swoodbridge.com> Thomas, Please take a moment to review this library: http://www.angusj.com/delphi/clipper.php I've used the JavaScript version to do offsets in the browser. It could be used to offset and linestring or polygon object like a circle and IIRC, it also does one sided offsets. It also does lots of other cool things like polygon clipping intersection, union, difference, etc. This might be a handy set of tools for geoprocessing and offsets in geometry space. -Steve W On 4/14/2016 4:37 AM, thomas bonfort wrote: > For lines, you have the OUTLINEWIDTH keyword which is always in pixels. > > -- > thomas > > On 14 April 2016 at 10:17, Michal Seidl > wrote: > > Hi, > I can see the same behaviour with Mapserver 6.4 driver AGG. I am > affraid it > is not possible. Unfortunaltely. I din not find any workaround. > > Michal > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Symbol-size-in-meters-width-in-pixels-units-tp4228865p5261186.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From thomas.bonfort at gmail.com Thu Apr 14 06:03:41 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 14 Apr 2016 15:03:41 +0200 Subject: [mapserver-users] Symbol size in meters, width in pixels units In-Reply-To: <570F9453.4080607@swoodbridge.com> References: <1460621856925-5261186.post@n6.nabble.com> <570F9453.4080607@swoodbridge.com> Message-ID: we use it already: https://github.com/mapserver/mapserver/blob/branch-7-0/renderers/agg/src/clipper.cpp -- thomas On 14 April 2016 at 15:00, Stephen Woodbridge wrote: > Thomas, > > Please take a moment to review this library: > > http://www.angusj.com/delphi/clipper.php > > I've used the JavaScript version to do offsets in the browser. It could be > used to offset and linestring or polygon object like a circle and IIRC, it > also does one sided offsets. It also does lots of other cool things like > polygon clipping intersection, union, difference, etc. > > This might be a handy set of tools for geoprocessing and offsets in > geometry space. > > -Steve W > > On 4/14/2016 4:37 AM, thomas bonfort wrote: > >> For lines, you have the OUTLINEWIDTH keyword which is always in pixels. >> >> -- >> thomas >> >> On 14 April 2016 at 10:17, Michal Seidl > > wrote: >> >> Hi, >> I can see the same behaviour with Mapserver 6.4 driver AGG. I am >> affraid it >> is not possible. Unfortunaltely. I din not find any workaround. >> >> Michal >> >> >> >> -- >> View this message in context: >> >> http://osgeo-org.1560.x6.nabble.com/Symbol-size-in-meters-width-in-pixels-units-tp4228865p5261186.html >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org > mapserver-users at lists.osgeo.org> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Thu Apr 14 09:22:52 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Thu, 14 Apr 2016 16:22:52 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars Message-ID: Folks, Can mapserver produce XML or JSON safe characters for WFS served data or do we need to ensure the source data has the escaped values. We got tripped up today as there were some ?&? in our names which we had not considered. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Thu Apr 14 15:10:25 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 14 Apr 2016 22:10:25 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars Message-ID: Hi, You can?t have & in feature type names or attribute names in WFS because they are defined in the XML schema to be ?QName?. The prefix and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName and from http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ian Walberg L?hetetty: 14. huhtikuuta 2016 19:23 Vastaanottaja: MapserverList OSGEO Aihe: [mapserver-users] WFS layer - XML/JSON safe chars Folks, Can mapserver produce XML or JSON safe characters for WFS served data or do we need to ensure the source data has the escaped values. We got tripped up today as there were some ?&? in our names which we had not considered. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Thu Apr 14 17:45:45 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Fri, 15 Apr 2016 00:45:45 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: References: Message-ID: <8051a45821b04a2fab912f038522799d@airborne.aero> Jukka, Our question was for the data/text read from the database and then published as XML by the WFS service. So a pub with the name ?Dog & bone? created illegal xml as the & is not converted to & Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 3:10 PM To: Ian Walberg ; MapserverList OSGEO Subject: Re: WFS layer - XML/JSON safe chars Hi, You can?t have & in feature type names or attribute names in WFS because they are defined in the XML schema to be ?QName?. The prefix and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName and from http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ian Walberg L?hetetty: 14. huhtikuuta 2016 19:23 Vastaanottaja: MapserverList OSGEO Aihe: [mapserver-users] WFS layer - XML/JSON safe chars Folks, Can mapserver produce XML or JSON safe characters for WFS served data or do we need to ensure the source data has the escaped values. We got tripped up today as there were some ?&? in our names which we had not considered. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Thu Apr 14 22:19:25 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 15 Apr 2016 05:19:25 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars Message-ID: <46b816c3544748e194d10eb94eb4a6e1@C119S212VM022.msvyvi.vaha.local> Hi Ian, Thanks for the clarification. I made a simple test by adding an abstract into layer metadata. This shows ?test ?? as an abstract "wfs_abstract" "test ?? This one shows an empty abstract "wfs_abstract" "test ? &" So it looks like Mapserver doesn?t know to convert ?&? into ?&? for XML. -Jukka Rahkonen- Ian Walberg wrote: Jukka, Our question was for the data/text read from the database and then published as XML by the WFS service. So a pub with the name ?Dog & bone? created illegal xml as the & is not converted to & Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 3:10 PM To: Ian Walberg >; MapserverList OSGEO > Subject: Re: WFS layer - XML/JSON safe chars Hi, You can?t have & in feature type names or attribute names in WFS because they are defined in the XML schema to be ?QName?. The prefix and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName and from http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ian Walberg L?hetetty: 14. huhtikuuta 2016 19:23 Vastaanottaja: MapserverList OSGEO Aihe: [mapserver-users] WFS layer - XML/JSON safe chars Folks, Can mapserver produce XML or JSON safe characters for WFS served data or do we need to ensure the source data has the escaped values. We got tripped up today as there were some ?&? in our names which we had not considered. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Fri Apr 15 06:54:20 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Fri, 15 Apr 2016 13:54:20 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: <46b816c3544748e194d10eb94eb4a6e1@C119S212VM022.msvyvi.vaha.local> References: <46b816c3544748e194d10eb94eb4a6e1@C119S212VM022.msvyvi.vaha.local> Message-ID: <685a9b47b5b14852a5746d278c290bff@airborne.aero> Jukka, I am not sure I understand the test you did. The data we are referring to is from the database field for the individual features name. Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 10:19 PM To: Ian Walberg ; MapserverList OSGEO Subject: Re: WFS layer - XML/JSON safe chars Hi Ian, Thanks for the clarification. I made a simple test by adding an abstract into layer metadata. This shows ?test ?? as an abstract "wfs_abstract" "test ?? This one shows an empty abstract "wfs_abstract" "test ? &" So it looks like Mapserver doesn?t know to convert ?&? into ?&? for XML. -Jukka Rahkonen- Ian Walberg wrote: Jukka, Our question was for the data/text read from the database and then published as XML by the WFS service. So a pub with the name ?Dog & bone? created illegal xml as the & is not converted to & Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 3:10 PM To: Ian Walberg >; MapserverList OSGEO > Subject: Re: WFS layer - XML/JSON safe chars Hi, You can?t have & in feature type names or attribute names in WFS because they are defined in the XML schema to be ?QName?. The prefix and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName and from http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ian Walberg L?hetetty: 14. huhtikuuta 2016 19:23 Vastaanottaja: MapserverList OSGEO Aihe: [mapserver-users] WFS layer - XML/JSON safe chars Folks, Can mapserver produce XML or JSON safe characters for WFS served data or do we need to ensure the source data has the escaped values. We got tripped up today as there were some ?&? in our names which we had not considered. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Fri Apr 15 07:10:48 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Fri, 15 Apr 2016 16:10:48 +0200 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: <685a9b47b5b14852a5746d278c290bff@airborne.aero> References: <46b816c3544748e194d10eb94eb4a6e1@C119S212VM022.msvyvi.vaha.local> <685a9b47b5b14852a5746d278c290bff@airborne.aero> Message-ID: Ian, data coming from the datasource should be encoded by mapserver, *unless* their field has been added to the layer via the "gml_xml_items" metadata entry (instead of the usual "gml_include_items") -- thomas On 15 April 2016 at 15:54, Ian Walberg wrote: > Jukka, > > > > I am not sure I understand the test you did. > > > > The data we are referring to is from the database field for the individual > features name. > > > > Regards > > > > Ian > > > > *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] > *Sent:* Thursday, April 14, 2016 10:19 PM > > *To:* Ian Walberg ; MapserverList OSGEO < > mapserver-users at lists.osgeo.org> > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > Hi Ian, > > > > Thanks for the clarification. > > I made a simple test by adding an abstract into layer metadata. This shows > ?test ?? as an abstract > > "wfs_abstract" "test ?? > > > > This one shows an empty abstract > > "wfs_abstract" "test ? &" > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? for > XML. > > > > -Jukka Rahkonen- > > > > Ian Walberg wrote: > > > > Jukka, > > > > Our question was for the data/text read from the database and then > published as XML by the WFS service. > > > > So a pub with the name ?Dog & bone? created illegal xml as the & is not > converted to & > > > > Regards > > > > Ian > > > > *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi > ] > *Sent:* Thursday, April 14, 2016 3:10 PM > *To:* Ian Walberg ; MapserverList OSGEO < > mapserver-users at lists.osgeo.org> > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > Hi, > > > > You can?t have & in feature type names or attribute names in WFS because > they are defined in the XML schema to be ?QName?. The prefix and LocalPart > are of type NCName https://en.wikipedia.org/wiki/QName and from > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used > > > > The practical restrictions of NCName are that it cannot contain several > symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters > or different parenthesis. Furthermore an NCName cannot begin with a number, > dot or minus character although they can appear later in an NCName. > > > > -Jukka Rahkonen- > > > > *L?hett?j?:* mapserver-users [ > mailto:mapserver-users-bounces at lists.osgeo.org > ] *Puolesta *Ian Walberg > *L?hetetty:* 14. huhtikuuta 2016 19:23 > *Vastaanottaja:* MapserverList OSGEO > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > Folks, > > > > Can mapserver produce XML or JSON safe characters for WFS served data or > do we need to ensure the source data has the escaped values. > > > > We got tripped up today as there were some ?&? in our names which we had > not considered. > > > > Thanks > > > > Ian > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Fri Apr 15 07:16:17 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Fri, 15 Apr 2016 16:16:17 +0200 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: References: <46b816c3544748e194d10eb94eb4a6e1@C119S212VM022.msvyvi.vaha.local> <685a9b47b5b14852a5746d278c290bff@airborne.aero> Message-ID: To be clearer, fields that are output are added via *_include_items, and those that need to *not* be encoded should be added to *_xml_items. e.g "gml_include_items" "attr1,attr2" "gml_xml_items" "attr1" -- thomas On 15 April 2016 at 16:10, thomas bonfort wrote: > Ian, > data coming from the datasource should be encoded by mapserver, *unless* > their field has been added to the layer via the "gml_xml_items" metadata > entry (instead of the usual "gml_include_items") > > -- > thomas > > On 15 April 2016 at 15:54, Ian Walberg wrote: > >> Jukka, >> >> >> >> I am not sure I understand the test you did. >> >> >> >> The data we are referring to is from the database field for the >> individual features name. >> >> >> >> Regards >> >> >> >> Ian >> >> >> >> *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] >> >> *Sent:* Thursday, April 14, 2016 10:19 PM >> >> *To:* Ian Walberg ; MapserverList OSGEO < >> mapserver-users at lists.osgeo.org> >> *Subject:* Re: WFS layer - XML/JSON safe chars >> >> >> >> Hi Ian, >> >> >> >> Thanks for the clarification. >> >> I made a simple test by adding an abstract into layer metadata. This >> shows ?test ?? as an abstract >> >> "wfs_abstract" "test ?? >> >> >> >> This one shows an empty abstract >> >> "wfs_abstract" "test ? &" >> >> >> >> So it looks like Mapserver doesn?t know to convert ?&? into ?&? for >> XML. >> >> >> >> -Jukka Rahkonen- >> >> >> >> Ian Walberg wrote: >> >> >> >> Jukka, >> >> >> >> Our question was for the data/text read from the database and then >> published as XML by the WFS service. >> >> >> >> So a pub with the name ?Dog & bone? created illegal xml as the & is not >> converted to & >> >> >> >> Regards >> >> >> >> Ian >> >> >> >> *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi >> ] >> *Sent:* Thursday, April 14, 2016 3:10 PM >> *To:* Ian Walberg ; MapserverList OSGEO < >> mapserver-users at lists.osgeo.org> >> *Subject:* Re: WFS layer - XML/JSON safe chars >> >> >> >> Hi, >> >> >> >> You can?t have & in feature type names or attribute names in WFS because >> they are defined in the XML schema to be ?QName?. The prefix and LocalPart >> are of type NCName https://en.wikipedia.org/wiki/QName and from >> http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used >> >> >> >> The practical restrictions of NCName are that it cannot contain several >> symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters >> or different parenthesis. Furthermore an NCName cannot begin with a number, >> dot or minus character although they can appear later in an NCName. >> >> >> >> -Jukka Rahkonen- >> >> >> >> *L?hett?j?:* mapserver-users [ >> mailto:mapserver-users-bounces at lists.osgeo.org >> ] *Puolesta *Ian Walberg >> *L?hetetty:* 14. huhtikuuta 2016 19:23 >> *Vastaanottaja:* MapserverList OSGEO >> *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars >> >> >> >> Folks, >> >> >> >> Can mapserver produce XML or JSON safe characters for WFS served data or >> do we need to ensure the source data has the escaped values. >> >> >> >> We got tripped up today as there were some ?&? in our names which we had >> not considered. >> >> >> >> Thanks >> >> >> >> Ian >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Fri Apr 15 07:21:31 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 15 Apr 2016 14:21:31 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars Message-ID: Hi, I was thinking that the output of GetCapabilities is XML and & must be escaped in XML. So if I write & into the abstract and Mapserver works correctly it should write my test abstract ?test ? &? escaped perhaps as test ä & That is the output from the online tool at http://www.freeformatter.com/xml-escape.html#ad-output So my conclusion was that because Mapserver does not do it right here it won?t do it right elsewhere. But now I made another test by editing the Geoserver test file ?states.shp? in Spatialite as UPDATE states set STATE_NAME=?Colo&rado? WHERE STATE_NAME=?Colorado?; Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes Colo&rado So my current conclusion is that my Mapserver does not escape ?&? correctly when it is used inside a mapfile and when I do GetCapabilities request. However, when data come from Spatialite database and they are consumed by GetFeature then escaping happens correctly. We are still comparing different things because you have PostGIS and I have Spatialite. -Jukka Rahkonen- Ian Walberg wrote: Jukka, I am not sure I understand the test you did. The data we are referring to is from the database field for the individual features name. Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 10:19 PM To: Ian Walberg >; MapserverList OSGEO > Subject: Re: WFS layer - XML/JSON safe chars Hi Ian, Thanks for the clarification. I made a simple test by adding an abstract into layer metadata. This shows ?test ?? as an abstract "wfs_abstract" "test ?? This one shows an empty abstract "wfs_abstract" "test ? &" So it looks like Mapserver doesn?t know to convert ?&? into ?&? for XML. -Jukka Rahkonen- Ian Walberg wrote: Jukka, Our question was for the data/text read from the database and then published as XML by the WFS service. So a pub with the name ?Dog & bone? created illegal xml as the & is not converted to & Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 3:10 PM To: Ian Walberg >; MapserverList OSGEO > Subject: Re: WFS layer - XML/JSON safe chars Hi, You can?t have & in feature type names or attribute names in WFS because they are defined in the XML schema to be ?QName?. The prefix and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName and from http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ian Walberg L?hetetty: 14. huhtikuuta 2016 19:23 Vastaanottaja: MapserverList OSGEO Aihe: [mapserver-users] WFS layer - XML/JSON safe chars Folks, Can mapserver produce XML or JSON safe characters for WFS served data or do we need to ensure the source data has the escaped values. We got tripped up today as there were some ?&? in our names which we had not considered. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From trailway at gmail.com Fri Apr 15 07:41:28 2016 From: trailway at gmail.com (Richard Watson) Date: Fri, 15 Apr 2016 09:41:28 -0500 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: References: Message-ID: I am using Map Server 6.4.1. I have a map project file which has the following title: WEB METADATA [ text omitted] "wms_title" "(*#(@#*$_)@#&\\\///" END # METADATA END # WEB When a GetCapabilties is done on the project then this is the source XML which is returned: WMS (*#(@#*$_)@#&\\/// It seems to be escaping as required. On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > I was thinking that the output of GetCapabilities is XML and & must be > escaped in XML. So if I write & into the abstract and Mapserver works > correctly it should write my test abstract ?test ? &? escaped perhaps as > > test ä & > > That is the output from the online tool at > http://www.freeformatter.com/xml-escape.html#ad-output > > > > So my conclusion was that because Mapserver does not do it right here it > won?t do it right elsewhere. > > > > But now I made another test by editing the Geoserver test file > ?states.shp? in Spatialite as > > UPDATE states set STATE_NAME=?Colo&rado? WHERE STATE_NAME=?Colorado?; > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > Colo&rado > > > > So my current conclusion is that my Mapserver does not escape ?&? > correctly when it is used inside a mapfile and when I do GetCapabilities > request. However, when data come from Spatialite database and they are > consumed by GetFeature then escaping happens correctly. > > > > We are still comparing different things because you have PostGIS and I > have Spatialite. > > > > -Jukka Rahkonen- > > > > > > Ian Walberg wrote: > > > > Jukka, > > > > I am not sure I understand the test you did. > > > > The data we are referring to is from the database field for the individual > features name. > > > > Regards > > > > Ian > > > > *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi > ] > *Sent:* Thursday, April 14, 2016 10:19 PM > *To:* Ian Walberg ; MapserverList OSGEO < > mapserver-users at lists.osgeo.org> > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > Hi Ian, > > > > Thanks for the clarification. > > I made a simple test by adding an abstract into layer metadata. This shows > ?test ?? as an abstract > > "wfs_abstract" "test ?? > > > > This one shows an empty abstract > > "wfs_abstract" "test ? &" > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? for > XML. > > > > -Jukka Rahkonen- > > > > Ian Walberg wrote: > > > > Jukka, > > > > Our question was for the data/text read from the database and then > published as XML by the WFS service. > > > > So a pub with the name ?Dog & bone? created illegal xml as the & is not > converted to & > > > > Regards > > > > Ian > > > > *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi > ] > *Sent:* Thursday, April 14, 2016 3:10 PM > *To:* Ian Walberg ; MapserverList OSGEO < > mapserver-users at lists.osgeo.org> > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > Hi, > > > > You can?t have & in feature type names or attribute names in WFS because > they are defined in the XML schema to be ?QName?. The prefix and LocalPart > are of type NCName https://en.wikipedia.org/wiki/QName and from > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used > > > > The practical restrictions of NCName are that it cannot contain several > symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters > or different parenthesis. Furthermore an NCName cannot begin with a number, > dot or minus character although they can appear later in an NCName. > > > > -Jukka Rahkonen- > > > > *L?hett?j?:* mapserver-users [ > mailto:mapserver-users-bounces at lists.osgeo.org > ] *Puolesta *Ian Walberg > *L?hetetty:* 14. huhtikuuta 2016 19:23 > *Vastaanottaja:* MapserverList OSGEO > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > Folks, > > > > Can mapserver produce XML or JSON safe characters for WFS served data or > do we need to ensure the source data has the escaped values. > > > > We got tripped up today as there were some ?&? in our names which we had > not considered. > > > > Thanks > > > > Ian > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Fri Apr 15 07:41:28 2016 From: even.rouault at spatialys.com (Even Rouault) Date: Fri, 15 Apr 2016 16:41:28 +0200 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: References: Message-ID: <201604151641.29412.even.rouault@spatialys.com> Le vendredi 15 avril 2016 16:21:31, Rahkonen Jukka (MML) a ?crit : > Hi, > > I was thinking that the output of GetCapabilities is XML and & must be > escaped in XML. So if I write & into the abstract and Mapserver works > correctly it should write my test abstract ?test ? &? escaped perhaps as > test ä & > That is the output from the online tool at > http://www.freeformatter.com/xml-escape.html#ad-output > > So my conclusion was that because Mapserver does not do it right here it > won?t do it right elsewhere. > > But now I made another test by editing the Geoserver test file ?states.shp? > in Spatialite as UPDATE states set STATE_NAME=?Colo&rado? WHERE > STATE_NAME=?Colorado?; > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > Colo&rado > > So my current conclusion is that my Mapserver does not escape ?&? correctly > when it is used inside a mapfile and when I do GetCapabilities request. > However, when data come from Spatialite database and they are consumed by > GetFeature then escaping happens correctly. > > We are still comparing different things because you have PostGIS and I have > Spatialite. > > -Jukka Rahkonen- > > > Ian Walberg wrote: > > Jukka, > > I am not sure I understand the test you did. > > The data we are referring to is from the database field for the individual > features name. > > Regards > > Ian > > From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] > Sent: Thursday, April 14, 2016 10:19 PM > To: Ian Walberg > >; > MapserverList OSGEO > > > Subject: Re: WFS layer - XML/JSON safe chars > > Hi Ian, > > Thanks for the clarification. > I made a simple test by adding an abstract into layer metadata. This shows > ?test ?? as an abstract "wfs_abstract" "test ?? > > This one shows an empty abstract > "wfs_abstract" "test ? &" > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? for > XML. Actually it works for WFS 1.0, but not for 1.1 & 2.0. The reason is that the later use xmlNewChild() that expect values to be already XML-encoded, instead of xmlNextTextChild(). Working on a fix > > -Jukka Rahkonen- > > Ian Walberg wrote: > > Jukka, > > Our question was for the data/text read from the database and then > published as XML by the WFS service. > > So a pub with the name ?Dog & bone? created illegal xml as the & is not > converted to & > > Regards > > Ian > > From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] > Sent: Thursday, April 14, 2016 3:10 PM > To: Ian Walberg > >; > MapserverList OSGEO > > > Subject: Re: WFS layer - XML/JSON safe chars > > Hi, > > You can?t have & in feature type names or attribute names in WFS because > they are defined in the XML schema to be ?QName?. The prefix and LocalPart > are of type NCName https://en.wikipedia.org/wiki/QName and from > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-wh > en-should-it-be-used > > The practical restrictions of NCName are that it cannot contain several > symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or > different parenthesis. Furthermore an NCName cannot begin with a number, > dot or minus character although they can appear later in an NCName. > > -Jukka Rahkonen- > > L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > Puolesta Ian Walberg L?hetetty: 14. huhtikuuta 2016 19:23 > Vastaanottaja: MapserverList OSGEO > Aihe: [mapserver-users] WFS layer - XML/JSON safe chars > > Folks, > > Can mapserver produce XML or JSON safe characters for WFS served data or do > we need to ensure the source data has the escaped values. > > We got tripped up today as there were some ?&? in our names which we had > not considered. > > Thanks > > Ian -- Spatialys - Geospatial professional services http://www.spatialys.com From even.rouault at spatialys.com Fri Apr 15 07:49:49 2016 From: even.rouault at spatialys.com (Even Rouault) Date: Fri, 15 Apr 2016 16:49:49 +0200 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: References: Message-ID: <201604151649.49696.even.rouault@spatialys.com> Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > I am using Map Server 6.4.1. I have a map project file which has the > following title: > > WEB > METADATA > [ text omitted] > "wms_title" "(*#(@#*$_)@#&\\\///" > END # METADATA > END # WEB > > When a GetCapabilties is done on the project then this is the source XML > which is returned: > > > WMS > (*#(@#*$_)@#&\\/// > It seems to be escaping as required. WMS and WFS 1.0 use MapServer manual XML composition with its own XML escaping routines. Some other services (such as WFS 1.1 & 2.0) use libxml (sometimes not in an appropriate way). > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > Hi, > > > > > > > > I was thinking that the output of GetCapabilities is XML and & must be > > escaped in XML. So if I write & into the abstract and Mapserver works > > correctly it should write my test abstract ?test ? &? escaped perhaps as > > > > test ä & > > > > That is the output from the online tool at > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > So my conclusion was that because Mapserver does not do it right here it > > won?t do it right elsewhere. > > > > > > > > But now I made another test by editing the Geoserver test file > > ?states.shp? in Spatialite as > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE STATE_NAME=?Colorado?; > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > Colo&rado > > > > So my current conclusion is that my Mapserver does not escape ?&? > > correctly when it is used inside a mapfile and when I do GetCapabilities > > request. However, when data come from Spatialite database and they are > > consumed by GetFeature then escaping happens correctly. > > > > > > > > We are still comparing different things because you have PostGIS and I > > have Spatialite. > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > Jukka, > > > > > > > > I am not sure I understand the test you did. > > > > > > > > The data we are referring to is from the database field for the > > individual features name. > > > > > > > > Regards > > > > > > > > Ian > > > > > > > > *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi > > ] > > *Sent:* Thursday, April 14, 2016 10:19 PM > > *To:* Ian Walberg ; MapserverList OSGEO < > > mapserver-users at lists.osgeo.org> > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > Hi Ian, > > > > > > > > Thanks for the clarification. > > > > I made a simple test by adding an abstract into layer metadata. This > > shows ?test ?? as an abstract > > > > "wfs_abstract" "test ?? > > > > > > > > This one shows an empty abstract > > > > "wfs_abstract" "test ? &" > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? for > > XML. > > > > > > > > -Jukka Rahkonen- > > > > > > > > Ian Walberg wrote: > > > > > > > > Jukka, > > > > > > > > Our question was for the data/text read from the database and then > > published as XML by the WFS service. > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & is not > > converted to & > > > > > > > > Regards > > > > > > > > Ian > > > > > > > > *From:* Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi > > ] > > *Sent:* Thursday, April 14, 2016 3:10 PM > > *To:* Ian Walberg ; MapserverList OSGEO < > > mapserver-users at lists.osgeo.org> > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > Hi, > > > > > > > > You can?t have & in feature type names or attribute names in WFS because > > they are defined in the XML schema to be ?QName?. The prefix and > > LocalPart are of type NCName https://en.wikipedia.org/wiki/QName and > > from > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-w > > hen-should-it-be-used > > > > > > > > The practical restrictions of NCName are that it cannot contain several > > symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters > > or different parenthesis. Furthermore an NCName cannot begin with a > > number, dot or minus character although they can appear later in an > > NCName. > > > > > > > > -Jukka Rahkonen- > > > > > > > > *L?hett?j?:* mapserver-users [ > > mailto:mapserver-users-bounces at lists.osgeo.org > > ] *Puolesta *Ian Walberg > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > *Vastaanottaja:* MapserverList OSGEO > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > Folks, > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served data or > > do we need to ensure the source data has the escaped values. > > > > > > > > We got tripped up today as there were some ?&? in our names which we had > > not considered. > > > > > > > > Thanks > > > > > > > > Ian > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com From ian.walberg at airborne.aero Fri Apr 15 07:49:59 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Fri, 15 Apr 2016 14:49:59 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: References: Message-ID: <5b3ba94b8d9a4aa99a48b1c95a6249fc@airborne.aero> Jukka, Let us test again today, we are also using a spatialite DB. Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Friday, April 15, 2016 7:22 AM To: Ian Walberg ; MapserverList OSGEO Subject: Re: WFS layer - XML/JSON safe chars Hi, I was thinking that the output of GetCapabilities is XML and & must be escaped in XML. So if I write & into the abstract and Mapserver works correctly it should write my test abstract ?test ? &? escaped perhaps as test ä & That is the output from the online tool at http://www.freeformatter.com/xml-escape.html#ad-output So my conclusion was that because Mapserver does not do it right here it won?t do it right elsewhere. But now I made another test by editing the Geoserver test file ?states.shp? in Spatialite as UPDATE states set STATE_NAME=?Colo&rado? WHERE STATE_NAME=?Colorado?; Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes Colo&rado So my current conclusion is that my Mapserver does not escape ?&? correctly when it is used inside a mapfile and when I do GetCapabilities request. However, when data come from Spatialite database and they are consumed by GetFeature then escaping happens correctly. We are still comparing different things because you have PostGIS and I have Spatialite. -Jukka Rahkonen- Ian Walberg wrote: Jukka, I am not sure I understand the test you did. The data we are referring to is from the database field for the individual features name. Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 10:19 PM To: Ian Walberg >; MapserverList OSGEO > Subject: Re: WFS layer - XML/JSON safe chars Hi Ian, Thanks for the clarification. I made a simple test by adding an abstract into layer metadata. This shows ?test ?? as an abstract "wfs_abstract" "test ?? This one shows an empty abstract "wfs_abstract" "test ? &" So it looks like Mapserver doesn?t know to convert ?&? into ?&? for XML. -Jukka Rahkonen- Ian Walberg wrote: Jukka, Our question was for the data/text read from the database and then published as XML by the WFS service. So a pub with the name ?Dog & bone? created illegal xml as the & is not converted to & Regards Ian From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Thursday, April 14, 2016 3:10 PM To: Ian Walberg >; MapserverList OSGEO > Subject: Re: WFS layer - XML/JSON safe chars Hi, You can?t have & in feature type names or attribute names in WFS because they are defined in the XML schema to be ?QName?. The prefix and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName and from http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName. -Jukka Rahkonen- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ian Walberg L?hetetty: 14. huhtikuuta 2016 19:23 Vastaanottaja: MapserverList OSGEO Aihe: [mapserver-users] WFS layer - XML/JSON safe chars Folks, Can mapserver produce XML or JSON safe characters for WFS served data or do we need to ensure the source data has the escaped values. We got tripped up today as there were some ?&? in our names which we had not considered. Thanks Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Fri Apr 15 08:32:36 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Fri, 15 Apr 2016 15:32:36 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: <201604151649.49696.even.rouault@spatialys.com> References: <201604151649.49696.even.rouault@spatialys.com> Message-ID: <7d3e54f59c57466f888e4bae702a0706@airborne.aero> If I understand this we would not get the issue if we use a WFS version 1.0.0 request. We have just tested that and it appears that changing the version does not change the behavior. This is with mapserver version 7.0.1. Thanks Ian -----Original Message----- From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > I am using Map Server 6.4.1. I have a map project file which has the > following title: > > WEB > METADATA > [ text omitted] > "wms_title" "(*#(@#*$_)@#&\\\///" > END # METADATA > END # WEB > > When a GetCapabilties is done on the project then this is the source > XML which is returned: > > > WMS > (*#(@#*$_)@#&\\/// > It seems to be escaping as required. WMS and WFS 1.0 use MapServer manual XML composition with its own XML escaping routines. Some other services (such as WFS 1.1 & 2.0) use libxml (sometimes not in an appropriate way). > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > Hi, > > > > > > > > I was thinking that the output of GetCapabilities is XML and & must > > be escaped in XML. So if I write & into the abstract and Mapserver > > works correctly it should write my test abstract ?test ? &? escaped > > perhaps as > > > > test ä & > > > > That is the output from the online tool at > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > So my conclusion was that because Mapserver does not do it right > > here it won?t do it right elsewhere. > > > > > > > > But now I made another test by editing the Geoserver test file > > ?states.shp? in Spatialite as > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > STATE_NAME=?Colorado?; > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > Colo&rado > > > > So my current conclusion is that my Mapserver does not escape ?&? > > correctly when it is used inside a mapfile and when I do > > GetCapabilities request. However, when data come from Spatialite > > database and they are consumed by GetFeature then escaping happens correctly. > > > > > > > > We are still comparing different things because you have PostGIS and > > I have Spatialite. > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > Jukka, > > > > > > > > I am not sure I understand the test you did. > > > > > > > > The data we are referring to is from the database field for the > > individual features name. > > > > > > > > Regards > > > > > > > > Ian > > > > > > > > *From:* Rahkonen Jukka (MML) > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > ] > > *Sent:* Thursday, April 14, 2016 10:19 PM > > *To:* Ian Walberg ; MapserverList OSGEO < > > mapserver-users at lists.osgeo.org> > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > Hi Ian, > > > > > > > > Thanks for the clarification. > > > > I made a simple test by adding an abstract into layer metadata. This > > shows ?test ?? as an abstract > > > > "wfs_abstract" "test ?? > > > > > > > > This one shows an empty abstract > > > > "wfs_abstract" "test ? &" > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > for XML. > > > > > > > > -Jukka Rahkonen- > > > > > > > > Ian Walberg wrote: > > > > > > > > Jukka, > > > > > > > > Our question was for the data/text read from the database and then > > published as XML by the WFS service. > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & is > > not converted to & > > > > > > > > Regards > > > > > > > > Ian > > > > > > > > *From:* Rahkonen Jukka (MML) > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > ] > > *Sent:* Thursday, April 14, 2016 3:10 PM > > *To:* Ian Walberg ; MapserverList OSGEO < > > mapserver-users at lists.osgeo.org> > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > Hi, > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > because they are defined in the XML schema to be ?QName?. The prefix > > and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName > > and from > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type- > > and-w > > hen-should-it-be-used > > > > > > > > The practical restrictions of NCName are that it cannot contain > > several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace > > characters or different parenthesis. Furthermore an NCName cannot > > begin with a number, dot or minus character although they can appear > > later in an NCName. > > > > > > > > -Jukka Rahkonen- > > > > > > > > *L?hett?j?:* mapserver-users [ > > mailto:mapserver-users-bounces at lists.osgeo.org > > ] *Puolesta *Ian Walberg > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > *Vastaanottaja:* MapserverList OSGEO > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > Folks, > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > data or do we need to ensure the source data has the escaped values. > > > > > > > > We got tripped up today as there were some ?&? in our names which we > > had not considered. > > > > > > > > Thanks > > > > > > > > Ian > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From even.rouault at spatialys.com Fri Apr 15 09:14:41 2016 From: even.rouault at spatialys.com (Even Rouault) Date: Fri, 15 Apr 2016 18:14:41 +0200 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: <7d3e54f59c57466f888e4bae702a0706@airborne.aero> References: <201604151649.49696.even.rouault@spatialys.com> <7d3e54f59c57466f888e4bae702a0706@airborne.aero> Message-ID: <201604151814.42011.even.rouault@spatialys.com> Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > If I understand this we would not get the issue if we use a WFS version > 1.0.0 request. > > We have just tested that and it appears that changing the version does not > change the behavior. > > This is with mapserver version 7.0.1. We are probably talking about different things. In https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac13d7645b77d0 , I have just fixed issues in GetCapabilities response generation, but your issues might be different. I've also just tested reading from a CSV (the input datastore type shouldn't matter) file a field with & and it is properly escaped as & in the GML output of WFS 1.0, 1.1 and 2.0 Without a mapfile + data + request you issue, it is difficult to be sure we're talking about the same thing. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On > Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > I am using Map Server 6.4.1. I have a map project file which has the > > > > following title: > > WEB > > > > METADATA > > > > [ text omitted] > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > END # METADATA > > > > END # WEB > > > > When a GetCapabilties is done on the project then this is the source > > XML which is returned: > > > > > > WMS > > (*#(@#*$_)@#&\\/// > > It seems to be escaping as required. > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > escaping routines. Some other services (such as WFS 1.1 & 2.0) use libxml > (sometimes not in an appropriate way). > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > Hi, > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & must > > > be escaped in XML. So if I write & into the abstract and Mapserver > > > works correctly it should write my test abstract ?test ? &? escaped > > > perhaps as > > > > > > test ä & > > > > > > That is the output from the online tool at > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > here it won?t do it right elsewhere. > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > ?states.shp? in Spatialite as > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > Colo&rado > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > correctly when it is used inside a mapfile and when I do > > > GetCapabilities request. However, when data come from Spatialite > > > database and they are consumed by GetFeature then escaping happens > > > correctly. > > > > > > > > > > > > We are still comparing different things because you have PostGIS and > > > I have Spatialite. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > The data we are referring to is from the database field for the > > > individual features name. > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > *To:* Ian Walberg ; MapserverList OSGEO < > > > mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks for the clarification. > > > > > > I made a simple test by adding an abstract into layer metadata. This > > > shows ?test ?? as an abstract > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > This one shows an empty abstract > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > for XML. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > published as XML by the WFS service. > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & is > > > not converted to & > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > *To:* Ian Walberg ; MapserverList OSGEO < > > > mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi, > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > because they are defined in the XML schema to be ?QName?. The prefix > > > and LocalPart are of type NCName https://en.wikipedia.org/wiki/QName > > > and from > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type- > > > and-w > > > hen-should-it-be-used > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace > > > characters or different parenthesis. Furthermore an NCName cannot > > > begin with a number, dot or minus character although they can appear > > > later in an NCName. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > ] *Puolesta *Ian Walberg > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > *Vastaanottaja:* MapserverList OSGEO > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > Folks, > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which we > > > had not considered. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Ian > > > > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.com > _______________________________________________ mapserver-users mailing > list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com From marcandre_trottier at hotmail.com Fri Apr 15 11:54:05 2016 From: marcandre_trottier at hotmail.com (=?UTF-8?Q?Marc=2DAndr=C3=A9_Trottier?=) Date: Fri, 15 Apr 2016 14:54:05 -0400 Subject: [mapserver-users] error 500 with pg_raster and where clause Message-ID: Ubuntu 14.04 Mapserver 6.4.2 PostgreSQL 9.3.11 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit Postgis 2.1 We have a mapfile like that : LAYER NAME "ApportVertObs0" GROUP "vigilance/apport_vert" STATUS ON TYPE RASTER DATA "PG:host=serveurpg port=5432 dbname='pgsyst' user=''XXX' password='XXX' schema='XXX' table='msp_cehq_raster' mode='2' where='filename=\\'ApportsVerticauxObserves20160413.tiff\\''" PROCESSING "DITHER=YES" PROCESSING "NODATA=0" PROCESSING "SCALE=AUTO" DUMP TRUE OFFSITE 0 0 0 TRANSPARENCY 75 ... blablabl when the query return no tile, the request (getcapabilities, getmap) give a error 500. should not return a blank image ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowie at gmail.com Tue Apr 19 03:07:20 2016 From: acowie at gmail.com (AndyC79) Date: Tue, 19 Apr 2016 03:07:20 -0700 (PDT) Subject: [mapserver-users] Mapserver 7 - CLUSTER layer getfeatureinfo / php mapscript queryByPoint broken? Message-ID: <1461060440869-5261838.post@n6.nabble.com> Hi, Upgraded to MS 7 from 6.4.1 recently - getfeatinfo requests that used to work against clustered layers, now return 500s with Apache logs detailing: End of script output before headers: mapserv Which as far as I understand means the mapserv process crashed? request e.g: http:///cgi-bin/mapserv?map=/path/to/mapfile.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=png8&TRANSPARENT=true&QUERY_LAYERS=TEST&LAYERS=TEST&TILED=true&INFO_FORMAT=application%2Fjson&X=50&Y=50&SRS=EPSG%3A3031&STYLES=&WIDTH=101&HEIGHT=101&BBOX=-925990.5180299012%2C195459.73995354102%2C-432454.67464720976%2C688995.5833362325 I tried also using PHP mapscript to assemble a point query against the cluster layer, however that also does not seem to work in MS 7. It fails at the layerObj->queryByPoint method. Makes me think there's either something fundamentally problematic with querying CLUSTER layers in MS 7. Or perhaps the way I've had my mapfile configured is now causing an issue. ** Can anyone confirm that getfeatureinfo / php mapscript queryByPoint is working against CLUSTER layers in MS 7 ? ** The CLUSTERs draw fine. Just the querying that seems an issue. Below extract from mapfile. I can provide further details if necessary. LAYER NAME 'rsr_sites' TEMPLATE "../templates/rsr_sites_info_template.js" TYPE POINT INCLUDE "includes/connection.inc" DATA "the_geom FROM (SELECT gid, the_geom, id AS site_id, url, lon, lat FROM data.rsr_sites) AS query USING UNIQUE gid USING srid=3031" INCLUDE 'includes/proj_3031.inc' METADATA "ows_name" "rsr_sites" "ows_title" "RSR" INCLUDE 'includes/default_layer_metadata.inc' END TOLERANCE 8 CLUSTER MAXDISTANCE 22 REGION "ellipse" END PROCESSING 'ITEMS=site_id,url,lon,lat' PROCESSING "CLUSTER_GET_ALL_SHAPES=ON" LABELITEM "Cluster_FeatureCount" CLASSITEM "Cluster_FeatureCount" CLASS NAME "Multiple Sites - proportional symbol" EXPRESSION ("[Cluster_FeatureCount]" != "1") STYLE MINSIZE 25 MAXSIZE 50 SIZE [Cluster_FeatureCount] SYMBOL "Circle" COLOR '#885e49' END LABEL FONT ATTriumMou-Cond TYPE TRUETYPE SIZE 7 MAXSIZE 8 MINSIZE 7 COLOR 255 255 255 ALIGN CENTER PRIORITY 10 PARTIALS TRUE FORCE TRUE POSITION cc END END CLASS NAME 'Single Site' EXPRESSION '1' STYLE SYMBOL 'Square' SIZE 8 MINSIZE 8 MAXSIZE 8 COLOR '#953d38' END END END Cheers Andrew -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapserver-7-CLUSTER-layer-getfeatureinfo-php-mapscript-queryByPoint-broken-tp5261838.html Sent from the Mapserver - User mailing list archive at Nabble.com. From thomas.bonfort at gmail.com Tue Apr 19 03:27:36 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Tue, 19 Apr 2016 12:27:36 +0200 Subject: [mapserver-users] Mapserver 7 - CLUSTER layer getfeatureinfo / php mapscript queryByPoint broken? In-Reply-To: <1461060440869-5261838.post@n6.nabble.com> References: <1461060440869-5261838.post@n6.nabble.com> Message-ID: Andy: It's a known issue: https://github.com/mapserver/mapserver/issues/5205, that requires some non trivial amount of work to fix. Funding may help to get this fixed faster, you could contact Tamas if you wanted to go in that direction. Regards, Thomas On 19 April 2016 at 12:07, AndyC79 wrote: > Hi, > > Upgraded to MS 7 from 6.4.1 recently - getfeatinfo requests that used to > work against clustered layers, now return 500s with Apache logs detailing: > > End of script output before headers: mapserv > > Which as far as I understand means the mapserv process crashed? > > request e.g: > > http:// > /cgi-bin/mapserv?map=/path/to/mapfile.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=png8&TRANSPARENT=true&QUERY_LAYERS=TEST&LAYERS=TEST&TILED=true&INFO_FORMAT=application%2Fjson&X=50&Y=50&SRS=EPSG%3A3031&STYLES=&WIDTH=101&HEIGHT=101&BBOX=-925990.5180299012%2C195459.73995354102%2C-432454.67464720976%2C688995.5833362325 > > I tried also using PHP mapscript to assemble a point query against the > cluster layer, however that also does not seem to work in MS 7. It fails at > the layerObj->queryByPoint method. > > Makes me think there's either something fundamentally problematic with > querying CLUSTER layers in MS 7. Or perhaps the way I've had my mapfile > configured is now causing an issue. > > ** Can anyone confirm that getfeatureinfo / php mapscript queryByPoint is > working against CLUSTER layers in MS 7 ? ** > > The CLUSTERs draw fine. Just the querying that seems an issue. > > Below extract from mapfile. I can provide further details if necessary. > > > LAYER > NAME 'rsr_sites' > TEMPLATE "../templates/rsr_sites_info_template.js" > TYPE POINT > INCLUDE "includes/connection.inc" > DATA "the_geom FROM (SELECT gid, the_geom, id AS site_id, > url, lon, lat > FROM data.rsr_sites) AS query USING UNIQUE gid USING srid=3031" > INCLUDE 'includes/proj_3031.inc' > METADATA > "ows_name" "rsr_sites" > "ows_title" "RSR" > INCLUDE 'includes/default_layer_metadata.inc' > END > TOLERANCE 8 > CLUSTER > MAXDISTANCE 22 > REGION "ellipse" > END > PROCESSING 'ITEMS=site_id,url,lon,lat' > PROCESSING "CLUSTER_GET_ALL_SHAPES=ON" > LABELITEM "Cluster_FeatureCount" > CLASSITEM "Cluster_FeatureCount" > CLASS > NAME "Multiple Sites - proportional symbol" > EXPRESSION ("[Cluster_FeatureCount]" != "1") > STYLE > MINSIZE 25 > MAXSIZE 50 > SIZE [Cluster_FeatureCount] > SYMBOL "Circle" > COLOR '#885e49' > END > LABEL > FONT ATTriumMou-Cond > TYPE TRUETYPE > SIZE 7 > MAXSIZE 8 > MINSIZE 7 > COLOR 255 255 255 > ALIGN CENTER > PRIORITY 10 > PARTIALS TRUE > FORCE TRUE > POSITION cc > END > END > CLASS > NAME 'Single Site' > EXPRESSION '1' > STYLE > SYMBOL 'Square' > SIZE 8 > MINSIZE 8 > MAXSIZE 8 > COLOR '#953d38' > END > END > END > > Cheers > > Andrew > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Mapserver-7-CLUSTER-layer-getfeatureinfo-php-mapscript-queryByPoint-broken-tp5261838.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowie at gmail.com Tue Apr 19 03:56:12 2016 From: acowie at gmail.com (AndyC79) Date: Tue, 19 Apr 2016 03:56:12 -0700 (PDT) Subject: [mapserver-users] Mapserver 7 - CLUSTER layer getfeatureinfo / php mapscript queryByPoint broken? In-Reply-To: References: <1461060440869-5261838.post@n6.nabble.com> Message-ID: Hi Thomas, Thanks for the swift response! Ok cool, I shall find out if funding may be available for fix, will contact Tamas if there is. Cheers Andrew On 19 April 2016 at 11:13, tbonfort [via OSGeo.org] < ml-node+s1560n5261840h24 at n6.nabble.com> wrote: > Andy: It's a known issue: > https://github.com/mapserver/mapserver/issues/5205, that requires some > non trivial amount of work to fix. Funding may help to get this fixed > faster, you could contact Tamas if you wanted to go in that direction. > Regards, > Thomas > > > On 19 April 2016 at 12:07, AndyC79 <[hidden email] > > wrote: > >> Hi, >> >> Upgraded to MS 7 from 6.4.1 recently - getfeatinfo requests that used to >> work against clustered layers, now return 500s with Apache logs detailing: >> >> End of script output before headers: mapserv >> >> Which as far as I understand means the mapserv process crashed? >> >> request e.g: >> >> http:// >> /cgi-bin/mapserv?map=/path/to/mapfile.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=png8&TRANSPARENT=true&QUERY_LAYERS=TEST&LAYERS=TEST&TILED=true&INFO_FORMAT=application%2Fjson&X=50&Y=50&SRS=EPSG%3A3031&STYLES=&WIDTH=101&HEIGHT=101&BBOX=-925990.5180299012%2C195459.73995354102%2C-432454.67464720976%2C688995.5833362325 >> >> I tried also using PHP mapscript to assemble a point query against the >> cluster layer, however that also does not seem to work in MS 7. It fails >> at >> the layerObj->queryByPoint method. >> >> Makes me think there's either something fundamentally problematic with >> querying CLUSTER layers in MS 7. Or perhaps the way I've had my mapfile >> configured is now causing an issue. >> >> ** Can anyone confirm that getfeatureinfo / php mapscript queryByPoint is >> working against CLUSTER layers in MS 7 ? ** >> >> The CLUSTERs draw fine. Just the querying that seems an issue. >> >> Below extract from mapfile. I can provide further details if necessary. >> >> >> LAYER >> NAME 'rsr_sites' >> TEMPLATE "../templates/rsr_sites_info_template.js" >> TYPE POINT >> INCLUDE "includes/connection.inc" >> DATA "the_geom FROM (SELECT gid, the_geom, id AS site_id, >> url, lon, lat >> FROM data.rsr_sites) AS query USING UNIQUE gid USING srid=3031" >> INCLUDE 'includes/proj_3031.inc' >> METADATA >> "ows_name" "rsr_sites" >> "ows_title" "RSR" >> INCLUDE 'includes/default_layer_metadata.inc' >> END >> TOLERANCE 8 >> CLUSTER >> MAXDISTANCE 22 >> REGION "ellipse" >> END >> PROCESSING 'ITEMS=site_id,url,lon,lat' >> PROCESSING "CLUSTER_GET_ALL_SHAPES=ON" >> LABELITEM "Cluster_FeatureCount" >> CLASSITEM "Cluster_FeatureCount" >> CLASS >> NAME "Multiple Sites - proportional symbol" >> EXPRESSION ("[Cluster_FeatureCount]" != "1") >> STYLE >> MINSIZE 25 >> MAXSIZE 50 >> SIZE [Cluster_FeatureCount] >> SYMBOL "Circle" >> COLOR '#885e49' >> END >> LABEL >> FONT ATTriumMou-Cond >> TYPE TRUETYPE >> SIZE 7 >> MAXSIZE 8 >> MINSIZE 7 >> COLOR 255 255 255 >> ALIGN CENTER >> PRIORITY 10 >> PARTIALS TRUE >> FORCE TRUE >> POSITION cc >> END >> END >> CLASS >> NAME 'Single Site' >> EXPRESSION '1' >> STYLE >> SYMBOL 'Square' >> SIZE 8 >> MINSIZE 8 >> MAXSIZE 8 >> COLOR '#953d38' >> END >> END >> END >> >> Cheers >> >> Andrew >> >> >> >> -- >> View this message in context: >> http://osgeo-org.1560.x6.nabble.com/Mapserver-7-CLUSTER-layer-getfeatureinfo-php-mapscript-queryByPoint-broken-tp5261838.html >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> _______________________________________________ >> mapserver-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > _______________________________________________ > mapserver-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://osgeo-org.1560.x6.nabble.com/Mapserver-7-CLUSTER-layer-getfeatureinfo-php-mapscript-queryByPoint-broken-tp5261838p5261840.html > To unsubscribe from Mapserver 7 - CLUSTER layer getfeatureinfo / php > mapscript queryByPoint broken?, click here > > . > NAML > > -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapserver-7-CLUSTER-layer-getfeatureinfo-php-mapscript-queryByPoint-broken-tp5261838p5261850.html Sent from the Mapserver - User mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Tue Apr 19 10:01:30 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 19 Apr 2016 14:01:30 -0300 Subject: [mapserver-users] MapFile Generator In-Reply-To: <002f01d0ebbd$473d9970$d5b8cc50$@geo6.be> References: <005701d07cf7$fd7c9130$f875b390$@geo6.be> <002f01d0ebbd$473d9970$d5b8cc50$@geo6.be> Message-ID: <5716646A.4070009@gatewaygeomatics.com> Hi Jonathan, I dug up this old message, ha. I feel that PHP + MapServer is back onto the forefront, with PHP 7 released and many many organizations & admins looking to leverage its improvements. Since PHP 7 was released in December I believe that it is the most needed enhancement in MapServer. How does your tools handle PHP 7? If anything, this is a great way to share more here about your great work :) Thanks, -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2015-09-10 8:38 AM, Geo-6 wrote: > Hi everyone, > > I just did a full redesign of my ? MapFile Generator ? PHP application. > > The new design should be more user friendly and is more stable. > > You can download it here : https://github.com/jbelien/MapFile-Generator > > I developed a PHP library to be used if MapScript is not > available/enabled. The PHP library was previously part of the ? MapFile > Generator ? application but is now a independant project : > https://github.com/jbelien/MapFile-PHP-Library > > The library can now easily be included in any of your project and can be > included in ? MapFile Generator ? application (see documentation). > > The library documentation can be found here : > http://jbelien.github.io/MapFile-PHP-Library/docs/namespaces/MapFile.html > > Hope you like it and find it useful. > > Have a great day. > > Jonathan Beli?n > > GEO-6 > > *De :*Geo-6 [mailto:support at geo6.be] > *Envoy? :* mercredi 22 avril 2015 14:30 > *? :* mapserver-users at lists.osgeo.org > *Objet :* MapFile Generator > > Hi everyone, > > I?m developing a web application (PHP) to read, edit, write and preview > MapServer mapfiles. > > This application uses ?PHP MapScript? > (http://www.mapserver.org/mapscript/php/) but if ?PHP MapScript? is not > available or enable, it uses an internal library to read/write mapfiles. > > You can find the application on GitHub : > https://github.com/jbelien/MapFile-Generator > > Use with caution, it?s still an alpha release. > > Feel free to test it, criticize it, suggest any idea or improvement, or > contribute J > > I hope you?ll like it and find it useful. > > Do not hesitate to contact me if you have any question/suggestion > (preferably using GitHub issues : > https://github.com/jbelien/MapFile-Generator/issues) > > Have a great day. > > Jonathan Beli?n > > Geo-6 > > > From jeremiah.surd.max at gmail.com Wed Apr 20 22:01:01 2016 From: jeremiah.surd.max at gmail.com (Jeremiah Surd) Date: Thu, 21 Apr 2016 10:31:01 +0530 Subject: [mapserver-users] Need info about MapServer Message-ID: Hi, I have been working in GIS for quite sometime and would like to use map server too. I had following questions in mind, would be thankful if someone can answer these. 1. What is the licensing policy followed by MapServer ? Can I use it inside my application ? 2. What are the applications that are using Mapserver currently ? Can I get some list of these applications ? 3. Are there any performance numbers on mapserver interms of how many users it can support and the recommended hardware requirements for certain type of deployment ? I would be thankful if someone can answer these. Thanks, Prakhar -------------- next part -------------- An HTML attachment was scrubbed... URL: From vini.vineetsingh at gmail.com Wed Apr 20 22:17:10 2016 From: vini.vineetsingh at gmail.com (vineet singh) Date: Thu, 21 Apr 2016 10:47:10 +0530 Subject: [mapserver-users] Test : wfs:wfs-1.1.0-Basic-GetFeature-tc5 (WFS does not provide the data) Message-ID: Hi, I'm test WFS 1.1.0 using ogc compliance tests, all test cases are getting passed except one. I'm using tinyows to serve wfs requests. I have posted this issue on opengeospatial /*ets-wfs11 ** : * *https://github.com/opengeospatial/ets-wfs11/issues/54 * For get feature service, filter is also working fine. I'm not able to understand whether this the problem with tinyows or data i'm providing or something wrong with test case. Any help would be greatly appreciated. Thanks, Vineet Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremiah.surd.max at gmail.com Wed Apr 20 22:32:31 2016 From: jeremiah.surd.max at gmail.com (Jeremiah Surd) Date: Thu, 21 Apr 2016 11:02:31 +0530 Subject: [mapserver-users] Need info about MapServer Message-ID: Hi, I have been working in GIS for quite sometime and would like to use map server too. I had following questions in mind, would be thankful if someone can answer these. 1. What is the licensing policy followed by MapServer ? Can I use it inside my application ? 2. What are the applications that are using Mapserver currently ? Can I get some list of these applications ? 3. Are there any performance numbers on mapserver interms of how many users it can support and the recommended hardware requirements for certain type of deployment ? I would be thankful if someone can answer these. Thanks, Jeremiah -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Apr 20 23:14:43 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 21 Apr 2016 06:14:43 +0000 Subject: [mapserver-users] Test : wfs:wfs-1.1.0-Basic-GetFeature-tc5 (WFS does not provide the data) Message-ID: <667aed7c0a644e998fda0e80e15712d6@C119S212VM022.msvyvi.vaha.local> Hi, Just by thinking I guess that the test is checking the schema of the featuretype first by making a DescribeFeatureType and is not happy with the result: FAILURE: WFS does not provide data to use in this test (a feature type with a simple property (string, integer, double, decimal) Please add the result from DescribeFeatureType. -Jukka Rahkonen- vineet singh wrote: Hi, I'm test WFS 1.1.0 using ogc compliance tests, all test cases are getting passed except one. I'm using tinyows to serve wfs requests. I have posted this issue on opengeospatial/ets-wfs11 : https://github.com/opengeospatial/ets-wfs11/issues/54 For get feature service, filter is also working fine. I'm not able to understand whether this the problem with tinyows or data i'm providing or something wrong with test case. Any help would be greatly appreciated. Thanks, Vineet Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From vini.vineetsingh at gmail.com Thu Apr 21 01:09:49 2016 From: vini.vineetsingh at gmail.com (vineet singh) Date: Thu, 21 Apr 2016 13:39:49 +0530 Subject: [mapserver-users] Test : wfs:wfs-1.1.0-Basic-GetFeature-tc5 (WFS does not provide the data) In-Reply-To: <667aed7c0a644e998fda0e80e15712d6@C119S212VM022.msvyvi.vaha.local> References: <667aed7c0a644e998fda0e80e15712d6@C119S212VM022.msvyvi.vaha.local> Message-ID: Thanks for quick reply. Result from DescribeFeatureType : http://localhost:19090/WFS?Service=WFS&Version=1.1.0&request=DescribeFeatureType On Thu, Apr 21, 2016 at 11:44 AM, Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > Just by thinking I guess that the test is checking the schema of the > featuretype first by making a DescribeFeatureType and is not happy with the > result: > > FAILURE: WFS does not provide data to use in this test > > (a feature type with a simple property (string, integer, double, decimal) > > > > Please add the result from DescribeFeatureType. > > > > -Jukka Rahkonen- > > > > vineet singh wrote: > > > > Hi, > > > > I'm test WFS 1.1.0 using ogc compliance tests, all test cases are getting > passed except one. I'm using tinyows to serve wfs requests. > > I have posted this issue on opengeospatial > /*ets-wfs11 > ** : * > > *https://github.com/opengeospatial/ets-wfs11/issues/54 > * > > For get feature service, filter is also working fine. > > I'm not able to understand whether this the problem with tinyows or data > i'm providing or something wrong with test case. > > Any help would be greatly appreciated. > > > > Thanks, > > Vineet Singh > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Thu Apr 21 05:19:23 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 21 Apr 2016 09:19:23 -0300 Subject: [mapserver-users] Need info about MapServer In-Reply-To: References: Message-ID: <5718C54B.1090702@gatewaygeomatics.com> Hi Jeremiah, Welcome to you from the MapServer community. I'm sure that you'll find this community very responsive to your questions, and you'll fall in love with MapServer like the rest of us :) Also, be sure to search the mailing list archives as you travel down this path, as some of your questions that you have could have been answered before: http://osgeo-org.1560.x6.nabble.com/MapServer-f4226623.html My thoughts on your questions are inline below: > > 1. What is the licensing policy followed by MapServer ? Can I use it > inside my application ? MapServer has a very open license, often referred to as an "MIT" license, which means that you can do whatever you need to with the software (modify, add, re-sell, etc.). Basically there are no limitations on your use. The full license text lives at http://mapserver.org/copyright.html#license > 2. What are the applications that are using Mapserver currently ? Can I > get some list of these applications ? This is difficult to answer, as MapServer has been around for so long (Open Sourced around 1999). It would be great to point you to an accurate list of applications, we've sure tried to start that list over the years, but the community didn't really caught on to that. Here are some old attempts anyway: - site gallery, on Github: https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery - old site gallery on Trac: https://trac.osgeo.org/mapserver/wiki/MapServerSites Maybe your question will spawn some readers to add their own sites onto the Github page, I hope so. I think I can answer your question a different way. We develop and maintain MapServer for Windows "MS4W" (http://www.ms4w.com), and I myself track downloads and installations as close as possible. The numbers are huge, and increasing: averaging over 5,000 downloads a month, and over 10,000 visitors a month to its pages. So when you realize that each of those downloads has a license, and then realize this is only one platform (Windows), you get a sense of how many MapServer deployments are out there. > 3. Are there any performance numbers on mapserver interms of how many > users it can support and the recommended hardware requirements for > certain type of deployment ? > In terms of performance, MapServer participated in many benchmarking exercises as part of past FOSS4G events, where development teams from GeoServer, MapServer, QGIS Server, Esri, etc. compared performance on a common architecture. Do some googling for "WMS Benchmarking" and you will find access to the raw numbers. You can also find the presentation online, here is an example from 2011: http://www.slideshare.net/gatewaygeomatics.com/wms-performance-shootout-2011 There you will discover why MapServer is often referred to as the "cheetah" of the mapping world: extremely fast, and fully customizable. Also, just for your own information, in case you are wondering how the MapServer project is managed: MapServer has a Project Steering Committee (PSC) that manages changes to the software. Read more about how that works here: http://mapserver.org/development/rfc/ms-rfc-23.html Again, welcome to you from the big and fun MapServer community! :) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From emperor_stef at yahoo.gr Thu Apr 21 09:23:11 2016 From: emperor_stef at yahoo.gr (Stefanos Anastasiou) Date: Thu, 21 Apr 2016 16:23:11 +0000 (UTC) Subject: [mapserver-users] OSM base map selection References: <1260970892.7541830.1461255791819.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1260970892.7541830.1461255791819.JavaMail.yahoo@mail.yahoo.com> Hi all. I want to use OpenStreet Map as a base layer and my own polygons that Mapserver will pull from PostGIS tables. ?I'm a bit confused about the OSM concept and I was thinking of just using openlayers to render the OSM and... that's it..! ?But then I came across this article?https://github.com/mapserver/mapserver/wiki/Rendering-OSM-data-on-Ubuntu-12.04? so.... what is a good approach? ?and what is the difference between these two approaches? Regards,Stefanos.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Fri Apr 22 07:09:30 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Fri, 22 Apr 2016 14:09:30 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: <201604151814.42011.even.rouault@spatialys.com> References: <201604151649.49696.even.rouault@spatialys.com> <7d3e54f59c57466f888e4bae702a0706@airborne.aero> <201604151814.42011.even.rouault@spatialys.com> Message-ID: <4fcb187e80344bbb8cd01bc33102f07b@airborne.aero> Folks, I think we may be taking about different things, the wfs requests below show the problem we are seeing. There are 2 cities in each of the sqlite databases and the only difference is on has the text 'and' and the other has the symbol '&' Layer DATA_TEST - INSERT INTO "test" VALUES('-14.235004','-51.92528','Rio and Paulo'); http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=DATA_TEST Layer DATA_TEST2 - INSERT INTO "test" VALUES('-14.235004','-51.92528','Rio & Paulo'); http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=DATA_TEST2 So our question is do the strings in database need to be xml safe or does mapserver check that the strings are safe before serving. Thanks Ian -----Original Message----- From: Even Rouault [mailto:even.rouault at spatialys.com] Sent: Friday, April 15, 2016 9:15 AM To: Ian Walberg Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > If I understand this we would not get the issue if we use a WFS > version > 1.0.0 request. > > We have just tested that and it appears that changing the version does > not change the behavior. > > This is with mapserver version 7.0.1. We are probably talking about different things. In https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac13d7645b77d0 , I have just fixed issues in GetCapabilities response generation, but your issues might be different. I've also just tested reading from a CSV (the input datastore type shouldn't matter) file a field with & and it is properly escaped as & in the GML output of WFS 1.0, 1.1 and 2.0 Without a mapfile + data + request you issue, it is difficult to be sure we're talking about the same thing. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > I am using Map Server 6.4.1. I have a map project file which has > > the > > > > following title: > > WEB > > > > METADATA > > > > [ text omitted] > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > END # METADATA > > > > END # WEB > > > > When a GetCapabilties is done on the project then this is the source > > XML which is returned: > > > > > > WMS > > (*#(@#*$_)@#&\\/// > > It seems to be escaping as required. > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > escaping routines. Some other services (such as WFS 1.1 & 2.0) use > libxml (sometimes not in an appropriate way). > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > Hi, > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & > > > must be escaped in XML. So if I write & into the abstract and > > > Mapserver works correctly it should write my test abstract ?test ? > > > &? escaped perhaps as > > > > > > test ä & > > > > > > That is the output from the online tool at > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > here it won?t do it right elsewhere. > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > ?states.shp? in Spatialite as > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > Colo&rado > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > correctly when it is used inside a mapfile and when I do > > > GetCapabilities request. However, when data come from Spatialite > > > database and they are consumed by GetFeature then escaping happens > > > correctly. > > > > > > > > > > > > We are still comparing different things because you have PostGIS > > > and I have Spatialite. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > The data we are referring to is from the database field for the > > > individual features name. > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks for the clarification. > > > > > > I made a simple test by adding an abstract into layer metadata. > > > This shows ?test ?? as an abstract > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > This one shows an empty abstract > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > for XML. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > published as XML by the WFS service. > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & > > > is not converted to & > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi, > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > because they are defined in the XML schema to be ?QName?. The > > > prefix and LocalPart are of type NCName > > > https://en.wikipedia.org/wiki/QName > > > and from > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-typ > > > e- > > > and-w > > > hen-should-it-be-used > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, > > > whitespace characters or different parenthesis. Furthermore an > > > NCName cannot begin with a number, dot or minus character although > > > they can appear later in an NCName. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > ] *Puolesta *Ian Walberg > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > *Vastaanottaja:* MapserverList OSGEO > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > Folks, > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which > > > we had not considered. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Ian > > > > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.com > _______________________________________________ mapserver-users > mailing list mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com From jukka.rahkonen at maanmittauslaitos.fi Fri Apr 22 08:14:11 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 22 Apr 2016 15:14:11 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars Message-ID: <4d4f2f5b81ca49308db56ec65487cfd3@C119S212VM022.msvyvi.vaha.local> Hi Ian, I can see that those names are used as a part of gml:id: Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > If I understand this we would not get the issue if we use a WFS > version > 1.0.0 request. > > We have just tested that and it appears that changing the version does > not change the behavior. > > This is with mapserver version 7.0.1. We are probably talking about different things. In https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac13d7645b77d0 , I have just fixed issues in GetCapabilities response generation, but your issues might be different. I've also just tested reading from a CSV (the input datastore type shouldn't matter) file a field with & and it is properly escaped as & in the GML output of WFS 1.0, 1.1 and 2.0 Without a mapfile + data + request you issue, it is difficult to be sure we're talking about the same thing. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > I am using Map Server 6.4.1. I have a map project file which has > > the > > > > following title: > > WEB > > > > METADATA > > > > [ text omitted] > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > END # METADATA > > > > END # WEB > > > > When a GetCapabilties is done on the project then this is the source > > XML which is returned: > > > > > > WMS > > (*#(@#*$_)@#&\\/// > > It seems to be escaping as required. > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > escaping routines. Some other services (such as WFS 1.1 & 2.0) use > libxml (sometimes not in an appropriate way). > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > Hi, > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & > > > must be escaped in XML. So if I write & into the abstract and > > > Mapserver works correctly it should write my test abstract ?test ? > > > &? escaped perhaps as > > > > > > test ä & > > > > > > That is the output from the online tool at > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > here it won?t do it right elsewhere. > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > ?states.shp? in Spatialite as > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > Colo&rado > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > correctly when it is used inside a mapfile and when I do > > > GetCapabilities request. However, when data come from Spatialite > > > database and they are consumed by GetFeature then escaping happens > > > correctly. > > > > > > > > > > > > We are still comparing different things because you have PostGIS > > > and I have Spatialite. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > The data we are referring to is from the database field for the > > > individual features name. > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks for the clarification. > > > > > > I made a simple test by adding an abstract into layer metadata. > > > This shows ?test ?? as an abstract > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > This one shows an empty abstract > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > for XML. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > published as XML by the WFS service. > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & > > > is not converted to & > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi, > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > because they are defined in the XML schema to be ?QName?. The > > > prefix and LocalPart are of type NCName > > > https://en.wikipedia.org/wiki/QName > > > and from > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-typ > > > e- > > > and-w > > > hen-should-it-be-used > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, > > > whitespace characters or different parenthesis. Furthermore an > > > NCName cannot begin with a number, dot or minus character although > > > they can appear later in an NCName. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > ] *Puolesta *Ian Walberg > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > *Vastaanottaja:* MapserverList OSGEO > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > Folks, > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which > > > we had not considered. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Ian > > > > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.com > _______________________________________________ mapserver-users > mailing list mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From ian.walberg at airborne.aero Fri Apr 22 08:18:36 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Fri, 22 Apr 2016 15:18:36 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: <4d4f2f5b81ca49308db56ec65487cfd3@C119S212VM022.msvyvi.vaha.local> References: <4d4f2f5b81ca49308db56ec65487cfd3@C119S212VM022.msvyvi.vaha.local> Message-ID: Jukka, Thanks for replying and what I would hope to get is "Rio&Paulo" as you say. However I do not understand your explanation. Regards Ian -----Original Message----- From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Friday, April 22, 2016 8:14 AM To: Ian Walberg ; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Hi Ian, I can see that those names are used as a part of gml:id: Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > If I understand this we would not get the issue if we use a WFS > version > 1.0.0 request. > > We have just tested that and it appears that changing the version does > not change the behavior. > > This is with mapserver version 7.0.1. We are probably talking about different things. In https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac13d7645b77d0 , I have just fixed issues in GetCapabilities response generation, but your issues might be different. I've also just tested reading from a CSV (the input datastore type shouldn't matter) file a field with & and it is properly escaped as & in the GML output of WFS 1.0, 1.1 and 2.0 Without a mapfile + data + request you issue, it is difficult to be sure we're talking about the same thing. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > I am using Map Server 6.4.1. I have a map project file which has > > the > > > > following title: > > WEB > > > > METADATA > > > > [ text omitted] > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > END # METADATA > > > > END # WEB > > > > When a GetCapabilties is done on the project then this is the source > > XML which is returned: > > > > > > WMS > > (*#(@#*$_)@#&\\/// > > It seems to be escaping as required. > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > escaping routines. Some other services (such as WFS 1.1 & 2.0) use > libxml (sometimes not in an appropriate way). > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > Hi, > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & > > > must be escaped in XML. So if I write & into the abstract and > > > Mapserver works correctly it should write my test abstract ?test ? > > > &? escaped perhaps as > > > > > > test ä & > > > > > > That is the output from the online tool at > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > here it won?t do it right elsewhere. > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > ?states.shp? in Spatialite as > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > Colo&rado > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > correctly when it is used inside a mapfile and when I do > > > GetCapabilities request. However, when data come from Spatialite > > > database and they are consumed by GetFeature then escaping happens > > > correctly. > > > > > > > > > > > > We are still comparing different things because you have PostGIS > > > and I have Spatialite. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > The data we are referring to is from the database field for the > > > individual features name. > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks for the clarification. > > > > > > I made a simple test by adding an abstract into layer metadata. > > > This shows ?test ?? as an abstract > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > This one shows an empty abstract > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > for XML. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > published as XML by the WFS service. > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & > > > is not converted to & > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi, > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > because they are defined in the XML schema to be ?QName?. The > > > prefix and LocalPart are of type NCName > > > https://en.wikipedia.org/wiki/QName > > > and from > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-typ > > > e- > > > and-w > > > hen-should-it-be-used > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, > > > whitespace characters or different parenthesis. Furthermore an > > > NCName cannot begin with a number, dot or minus character although > > > they can appear later in an NCName. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > ] *Puolesta *Ian Walberg > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > *Vastaanottaja:* MapserverList OSGEO > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > Folks, > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which > > > we had not considered. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Ian > > > > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.com > _______________________________________________ mapserver-users > mailing list mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Thomas.Kloss at list.smwa.sachsen.de Fri Apr 22 08:12:31 2016 From: Thomas.Kloss at list.smwa.sachsen.de (=?iso-8859-1?Q?Klo=DF=2C_Thomas_-_LISt?=) Date: Fri, 22 Apr 2016 15:12:31 +0000 Subject: [mapserver-users] Different positions of feature points in MapServer 6.4 and 7.0.1 Message-ID: Dear MapServer users, we are using two different mapserver version in our organization: 6.4 and 7.0.1. In each mapfile there is a so called "copyright layer" with some origin information: LAYER NAME Watersign GROUP "Orthofotos" STATUS ON TRANSFORM ll TYPE POINT MINSCALEDENOM 60 MAXSCALEDENOM 2000000 FEATURE POINTS 340 -20 END TEXT 'Copyright by XYZ' END CLASS LABEL TYPE TRUETYPE FONT "Sans-Bold" SIZE 7 ANTIALIAS FALSE COLOR 200 200 200 END END UNITS PIXELS METADATA WMS_TITLE 'Watersign' WMS_SRS 'EPSG:25833' wms_enable_request "!GetCapabilities" END END The position of this text layer however differs between the two mapserver versions. Although they have the same code in the mapfile, the text layer is not shown at the same place but is slightly shifted. Do we have to update to 7.0.1 for the text to be at the right place or is there an alternative solution? Many thanks and kind regards Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Fri Apr 22 08:28:39 2016 From: even.rouault at spatialys.com (Even Rouault) Date: Fri, 22 Apr 2016 17:28:39 +0200 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: References: <4d4f2f5b81ca49308db56ec65487cfd3@C119S212VM022.msvyvi.vaha.local> Message-ID: <201604221728.39698.even.rouault@spatialys.com> Le vendredi 22 avril 2016 17:18:36, Ian Walberg a ?crit : > Jukka, > > Thanks for replying and what I would hope to get is "Rio&Paulo" as you > say. > > However I do not understand your explanation. Jukka meant that per the GML specification, it is illegal to have "funky" characters like &, XML encoded or not, as the gml:id. You should use a integer primary key for the feature_id. MapServer GML output indeed doesn't do any attempt of XML encoding the content of the feature_id field, and it has no real strong reason of attempting to do that. Except perhaps making well formed XML output, but even when doing so, that wouldn't validate the GML schemas. > > Regards > > Ian > > -----Original Message----- > From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] > Sent: Friday, April 22, 2016 8:14 AM > To: Ian Walberg ; > mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - > XML/JSON safe chars > > Hi Ian, > > I can see that those names are used as a part of gml:id: > > and I suppose that you would like to see something like gml:id="DATA_TEST.Rio&Paulo" > > but I believe that it will never happen because gml:id > http://www.datypic.com/sc/niem20/a-gml_id.html is of type xsd:ID > http://www.datypic.com/sc/xsd/t-xsd_ID.html which must be NCName, which in > turn means that "it must start with a letter or underscore, and can only > contain letters, digits, underscores, hyphens, and periods." Et-character > is denied there both as raw as escaped. > > I am not sure how you can control how Mapserver is building the gml:id. > However, I guess that if you use an integer field as primary key in your > Spatialite database then it would be utilized and gml:id would look like > > -Jukka Rahkonen- > > > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > Puolesta Ian Walberg L?hetetty: 22. huhtikuuta 2016 17:10 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Folks, > > I think we may be taking about different things, the wfs requests below > show the problem we are seeing. > > There are 2 cities in each of the sqlite databases and the only difference > is on has the text 'and' and the other has the symbol '&' > > Layer DATA_TEST - INSERT INTO "test" VALUES('-14.235004','-51.92528','Rio > and Paulo'); > > http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SER > VICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=DATA_TEST > > > Layer DATA_TEST2 - INSERT INTO "test" VALUES('-14.235004','-51.92528','Rio > & Paulo'); > > http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SER > VICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=DATA_TEST2 > > > So our question is do the strings in database need to be xml safe or does > mapserver check that the strings are safe before serving. > > Thanks > > Ian > > > > -----Original Message----- > From: Even Rouault [mailto:even.rouault at spatialys.com] > Sent: Friday, April 15, 2016 9:15 AM > To: Ian Walberg > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > > If I understand this we would not get the issue if we use a WFS > > version > > 1.0.0 request. > > > > We have just tested that and it appears that changing the version does > > not change the behavior. > > > > This is with mapserver version 7.0.1. > > We are probably talking about different things. > > In > https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac1 > 3d7645b77d0 , I have just fixed issues in GetCapabilities response > generation, but your issues might be different. > > I've also just tested reading from a CSV (the input datastore type > shouldn't matter) file a field with & and it is properly escaped as & > in the GML output of WFS 1.0, 1.1 and 2.0 > > Without a mapfile + data + request you issue, it is difficult to be sure > we're talking about the same thing. > > > Thanks > > > > Ian > > > > -----Original Message----- > > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > > On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > > To: mapserver-users at lists.osgeo.org > > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > > I am using Map Server 6.4.1. I have a map project file which has > > > the > > > > > > following title: > > > WEB > > > > > > METADATA > > > > > > [ text omitted] > > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > > > END # METADATA > > > > > > END # WEB > > > > > > When a GetCapabilties is done on the project then this is the source > > > XML which is returned: > > > > > > > > > WMS > > > (*#(@#*$_)@#&\\/// > > > It seems to be escaping as required. > > > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > > escaping routines. Some other services (such as WFS 1.1 & 2.0) use > > libxml (sometimes not in an appropriate way). > > > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > > Hi, > > > > > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & > > > > must be escaped in XML. So if I write & into the abstract and > > > > Mapserver works correctly it should write my test abstract ?test ? > > > > &? escaped perhaps as > > > > > > > > test ä & > > > > > > > > That is the output from the online tool at > > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > > here it won?t do it right elsewhere. > > > > > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > > ?states.shp? in Spatialite as > > > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > > > Colo&rado > > > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > > correctly when it is used inside a mapfile and when I do > > > > GetCapabilities request. However, when data come from Spatialite > > > > database and they are consumed by GetFeature then escaping happens > > > > correctly. > > > > > > > > > > > > > > > > We are still comparing different things because you have PostGIS > > > > and I have Spatialite. > > > > > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > > > > > Jukka, > > > > > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > > > > > The data we are referring to is from the database field for the > > > > individual features name. > > > > > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > Ian > > > > > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > > ] > > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > > *To:* Ian Walberg ; MapserverList OSGEO > > > > < mapserver-users at lists.osgeo.org> > > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > > > > > Thanks for the clarification. > > > > > > > > I made a simple test by adding an abstract into layer metadata. > > > > This shows ?test ?? as an abstract > > > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > > > > > This one shows an empty abstract > > > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > > for XML. > > > > > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > > > > > Jukka, > > > > > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > > published as XML by the WFS service. > > > > > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & > > > > is not converted to & > > > > > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > Ian > > > > > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > > ] > > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > > *To:* Ian Walberg ; MapserverList OSGEO > > > > < mapserver-users at lists.osgeo.org> > > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > > because they are defined in the XML schema to be ?QName?. The > > > > prefix and LocalPart are of type NCName > > > > https://en.wikipedia.org/wiki/QName > > > > and from > > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-typ > > > > e- > > > > and-w > > > > hen-should-it-be-used > > > > > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, > > > > whitespace characters or different parenthesis. Furthermore an > > > > NCName cannot begin with a number, dot or minus character although > > > > they can appear later in an NCName. > > > > > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > > ] *Puolesta *Ian Walberg > > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > > *Vastaanottaja:* MapserverList OSGEO > > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > > > > > Folks, > > > > > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which > > > > we had not considered. > > > > > > > > > > > > > > > > Thanks > > > > > > > > > > > > > > > > Ian > > > > > > > > _______________________________________________ > > > > mapserver-users mailing list > > > > mapserver-users at lists.osgeo.org > > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > -- > > Spatialys - Geospatial professional services http://www.spatialys.com > > _______________________________________________ mapserver-users > > mailing list mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.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 -- Spatialys - Geospatial professional services http://www.spatialys.com From jukka.rahkonen at maanmittauslaitos.fi Fri Apr 22 08:32:29 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 22 Apr 2016 15:32:29 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars Message-ID: <2ae780a2adac49ddb0da46560650a77b@C119S212VM022.msvyvi.vaha.local> Hi, You do not need to understand GML or WFS, we must just get the configuration right. How have you created your table? Spatialite-gui has a tool in the right click menu "Show CREATE statement" or you can use SQL command PRAGMA table_info('name_of_your_table'). Send the output or check at least what you have as Primary Key (pk). I believe that if you creat the table to have primary key column like PK_UID here your problem with gml:id disappears. CREATE TABLE "states" ( "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT, "STATE_NAME" TEXT, "STATE_FIPS" TEXT, Ogr2ogr makes such PK by default and so does the import tools of Spatialite-gui. -Jukka- -----Alkuper?inen viesti----- L?hett?j?: Ian Walberg [mailto:ian.walberg at airborne.aero] L?hetetty: 22. huhtikuuta 2016 18:19 Vastaanottaja: Rahkonen Jukka (MML); mapserver-users at lists.osgeo.org Aihe: RE: [mapserver-users] WFS layer - XML/JSON safe chars Jukka, Thanks for replying and what I would hope to get is "Rio&Paulo" as you say. However I do not understand your explanation. Regards Ian -----Original Message----- From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Friday, April 22, 2016 8:14 AM To: Ian Walberg ; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Hi Ian, I can see that those names are used as a part of gml:id: Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > If I understand this we would not get the issue if we use a WFS > version > 1.0.0 request. > > We have just tested that and it appears that changing the version does > not change the behavior. > > This is with mapserver version 7.0.1. We are probably talking about different things. In https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac13d7645b77d0 , I have just fixed issues in GetCapabilities response generation, but your issues might be different. I've also just tested reading from a CSV (the input datastore type shouldn't matter) file a field with & and it is properly escaped as & in the GML output of WFS 1.0, 1.1 and 2.0 Without a mapfile + data + request you issue, it is difficult to be sure we're talking about the same thing. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > I am using Map Server 6.4.1. I have a map project file which has > > the > > > > following title: > > WEB > > > > METADATA > > > > [ text omitted] > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > END # METADATA > > > > END # WEB > > > > When a GetCapabilties is done on the project then this is the source > > XML which is returned: > > > > > > WMS > > (*#(@#*$_)@#&\\/// > > It seems to be escaping as required. > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > escaping routines. Some other services (such as WFS 1.1 & 2.0) use > libxml (sometimes not in an appropriate way). > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > Hi, > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & > > > must be escaped in XML. So if I write & into the abstract and > > > Mapserver works correctly it should write my test abstract ?test ? > > > &? escaped perhaps as > > > > > > test ä & > > > > > > That is the output from the online tool at > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > here it won?t do it right elsewhere. > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > ?states.shp? in Spatialite as > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > Colo&rado > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > correctly when it is used inside a mapfile and when I do > > > GetCapabilities request. However, when data come from Spatialite > > > database and they are consumed by GetFeature then escaping happens > > > correctly. > > > > > > > > > > > > We are still comparing different things because you have PostGIS > > > and I have Spatialite. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > The data we are referring to is from the database field for the > > > individual features name. > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks for the clarification. > > > > > > I made a simple test by adding an abstract into layer metadata. > > > This shows ?test ?? as an abstract > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > This one shows an empty abstract > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > for XML. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > published as XML by the WFS service. > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & > > > is not converted to & > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi, > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > because they are defined in the XML schema to be ?QName?. The > > > prefix and LocalPart are of type NCName > > > https://en.wikipedia.org/wiki/QName > > > and from > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-typ > > > e- > > > and-w > > > hen-should-it-be-used > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, > > > whitespace characters or different parenthesis. Furthermore an > > > NCName cannot begin with a number, dot or minus character although > > > they can appear later in an NCName. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > ] *Puolesta *Ian Walberg > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > *Vastaanottaja:* MapserverList OSGEO > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > Folks, > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which > > > we had not considered. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Ian > > > > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.com > _______________________________________________ mapserver-users > mailing list mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ 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 Apr 22 08:47:37 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 22 Apr 2016 15:47:37 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars Message-ID: <686dd0000f6d43928fec5aa371edc144@C119S212VM022.msvyvi.vaha.local> Found a way for controlling gml:id, it is in the documentation http://mapserver.org/ogc/wfs_server.html wfs_featureid (Required for MapServer 4.10) Field to be used for the ID of the feature in the output GML. gml_featureid or ows_featureid can be specified instead. The default behavior is not documented but I guess that if wfs_featureid or ows_featureid are not defined then primary key is used instead, and if there is no primary key then heaven knows which field. I think that we should somehow emphasize the importance of wfs_featureid and recommend strongly to use an unique integer field. What you need to do is to make sure that you have an integer field with unique values in your table and add this to your LAYER METADATA. WFS probably works even if field is not unique but for example GetFeatureById needs unique id:s. "wfs_featureid" "my_unique_integer_column" -Jukka- -----Alkuper?inen viesti----- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Rahkonen Jukka (MML) L?hetetty: 22. huhtikuuta 2016 18:32 Vastaanottaja: Ian Walberg; mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] WFS layer - XML/JSON safe chars Hi, You do not need to understand GML or WFS, we must just get the configuration right. How have you created your table? Spatialite-gui has a tool in the right click menu "Show CREATE statement" or you can use SQL command PRAGMA table_info('name_of_your_table'). Send the output or check at least what you have as Primary Key (pk). I believe that if you creat the table to have primary key column like PK_UID here your problem with gml:id disappears. CREATE TABLE "states" ( "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT, "STATE_NAME" TEXT, "STATE_FIPS" TEXT, Ogr2ogr makes such PK by default and so does the import tools of Spatialite-gui. -Jukka- -----Alkuper?inen viesti----- L?hett?j?: Ian Walberg [mailto:ian.walberg at airborne.aero] L?hetetty: 22. huhtikuuta 2016 18:19 Vastaanottaja: Rahkonen Jukka (MML); mapserver-users at lists.osgeo.org Aihe: RE: [mapserver-users] WFS layer - XML/JSON safe chars Jukka, Thanks for replying and what I would hope to get is "Rio&Paulo" as you say. However I do not understand your explanation. Regards Ian -----Original Message----- From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Friday, April 22, 2016 8:14 AM To: Ian Walberg ; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Hi Ian, I can see that those names are used as a part of gml:id: Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > If I understand this we would not get the issue if we use a WFS > version > 1.0.0 request. > > We have just tested that and it appears that changing the version does > not change the behavior. > > This is with mapserver version 7.0.1. We are probably talking about different things. In https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac13d7645b77d0 , I have just fixed issues in GetCapabilities response generation, but your issues might be different. I've also just tested reading from a CSV (the input datastore type shouldn't matter) file a field with & and it is properly escaped as & in the GML output of WFS 1.0, 1.1 and 2.0 Without a mapfile + data + request you issue, it is difficult to be sure we're talking about the same thing. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > I am using Map Server 6.4.1. I have a map project file which has > > the > > > > following title: > > WEB > > > > METADATA > > > > [ text omitted] > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > END # METADATA > > > > END # WEB > > > > When a GetCapabilties is done on the project then this is the source > > XML which is returned: > > > > > > WMS > > (*#(@#*$_)@#&\\/// > > It seems to be escaping as required. > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > escaping routines. Some other services (such as WFS 1.1 & 2.0) use > libxml (sometimes not in an appropriate way). > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > Hi, > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & > > > must be escaped in XML. So if I write & into the abstract and > > > Mapserver works correctly it should write my test abstract ?test ? > > > &? escaped perhaps as > > > > > > test ä & > > > > > > That is the output from the online tool at > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > here it won?t do it right elsewhere. > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > ?states.shp? in Spatialite as > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > Colo&rado > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > correctly when it is used inside a mapfile and when I do > > > GetCapabilities request. However, when data come from Spatialite > > > database and they are consumed by GetFeature then escaping happens > > > correctly. > > > > > > > > > > > > We are still comparing different things because you have PostGIS > > > and I have Spatialite. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > The data we are referring to is from the database field for the > > > individual features name. > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks for the clarification. > > > > > > I made a simple test by adding an abstract into layer metadata. > > > This shows ?test ?? as an abstract > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > This one shows an empty abstract > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > for XML. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > published as XML by the WFS service. > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & > > > is not converted to & > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi, > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > because they are defined in the XML schema to be ?QName?. The > > > prefix and LocalPart are of type NCName > > > https://en.wikipedia.org/wiki/QName > > > and from > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-typ > > > e- > > > and-w > > > hen-should-it-be-used > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, > > > whitespace characters or different parenthesis. Furthermore an > > > NCName cannot begin with a number, dot or minus character although > > > they can appear later in an NCName. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > ] *Puolesta *Ian Walberg > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > *Vastaanottaja:* MapserverList OSGEO > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > Folks, > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which > > > we had not considered. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Ian > > > > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.com > _______________________________________________ mapserver-users > mailing list mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From thomas.bonfort at gmail.com Fri Apr 22 08:56:52 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Fri, 22 Apr 2016 17:56:52 +0200 Subject: [mapserver-users] Different positions of feature points in MapServer 6.4 and 7.0.1 In-Reply-To: References: Message-ID: Thomas, Unless you provide a zero-effort patch, bribe a maintainer to do it for you, or persuade a maintainer that the bug is critical, I would say that there is very little chance the text handling behavior you are seeing with 7.0 will be backported to the 6.4 branch. Regards, Thomas On 22 April 2016 at 17:12, Klo?, Thomas - LISt < Thomas.Kloss at list.smwa.sachsen.de> wrote: > Dear MapServer users, > > > > we are using two different mapserver version in our organization: 6.4 and > 7.0.1. In each mapfile there is a so called ?copyright layer? with some > origin information: > > > > LAYER > > NAME Watersign > > GROUP "Orthofotos" > > STATUS ON > > TRANSFORM ll > > TYPE POINT > > MINSCALEDENOM 60 > > MAXSCALEDENOM 2000000 > > FEATURE > > POINTS 340 -20 END > > TEXT 'Copyright by XYZ' > > END > > CLASS > > LABEL > > TYPE TRUETYPE > > FONT "Sans-Bold" > > SIZE 7 > > ANTIALIAS FALSE > > COLOR 200 200 200 > > END > > END > > UNITS PIXELS > > METADATA > > WMS_TITLE 'Watersign' > > WMS_SRS 'EPSG:25833' > > wms_enable_request "!GetCapabilities" > > END > > END > > > > The position of this text layer however differs between the two mapserver > versions. Although they have the same code in the mapfile, the text layer > is not shown at the same place but is slightly shifted. > > > > Do we have to update to 7.0.1 for the text to be at the right place or is > there an alternative solution? > > > > Many thanks and kind regards > > > > Thomas > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Fri Apr 22 12:50:49 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Fri, 22 Apr 2016 19:50:49 +0000 Subject: [mapserver-users] WFS layer - XML/JSON safe chars In-Reply-To: <686dd0000f6d43928fec5aa371edc144@C119S212VM022.msvyvi.vaha.local> References: <686dd0000f6d43928fec5aa371edc144@C119S212VM022.msvyvi.vaha.local> Message-ID: <403b8257450c4e9a9c03304a7e1c8edf@airborne.aero> Jukka, If I understand the problem correctly I have changed the "gml_featureid" field to use the "id' field in the database. This now displays correctly in the browser and the text field with the '&' displays correctly. http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=DATA_TEST http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=DATA_TEST2 We now need to check this with our application to make sure the data fields is good. Thanks for the help and ideas. Regards Ian -----Original Message----- From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Friday, April 22, 2016 8:48 AM To: Ian Walberg ; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Found a way for controlling gml:id, it is in the documentation http://mapserver.org/ogc/wfs_server.html wfs_featureid (Required for MapServer 4.10) Field to be used for the ID of the feature in the output GML. gml_featureid or ows_featureid can be specified instead. The default behavior is not documented but I guess that if wfs_featureid or ows_featureid are not defined then primary key is used instead, and if there is no primary key then heaven knows which field. I think that we should somehow emphasize the importance of wfs_featureid and recommend strongly to use an unique integer field. What you need to do is to make sure that you have an integer field with unique values in your table and add this to your LAYER METADATA. WFS probably works even if field is not unique but for example GetFeatureById needs unique id:s. "wfs_featureid" "my_unique_integer_column" -Jukka- -----Alkuper?inen viesti----- L?hett?j?: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Rahkonen Jukka (MML) L?hetetty: 22. huhtikuuta 2016 18:32 Vastaanottaja: Ian Walberg; mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] WFS layer - XML/JSON safe chars Hi, You do not need to understand GML or WFS, we must just get the configuration right. How have you created your table? Spatialite-gui has a tool in the right click menu "Show CREATE statement" or you can use SQL command PRAGMA table_info('name_of_your_table'). Send the output or check at least what you have as Primary Key (pk). I believe that if you creat the table to have primary key column like PK_UID here your problem with gml:id disappears. CREATE TABLE "states" ( "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT, "STATE_NAME" TEXT, "STATE_FIPS" TEXT, Ogr2ogr makes such PK by default and so does the import tools of Spatialite-gui. -Jukka- -----Alkuper?inen viesti----- L?hett?j?: Ian Walberg [mailto:ian.walberg at airborne.aero] L?hetetty: 22. huhtikuuta 2016 18:19 Vastaanottaja: Rahkonen Jukka (MML); mapserver-users at lists.osgeo.org Aihe: RE: [mapserver-users] WFS layer - XML/JSON safe chars Jukka, Thanks for replying and what I would hope to get is "Rio&Paulo" as you say. However I do not understand your explanation. Regards Ian -----Original Message----- From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Friday, April 22, 2016 8:14 AM To: Ian Walberg ; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Hi Ian, I can see that those names are used as a part of gml:id: Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars Le vendredi 15 avril 2016 17:32:36, Ian Walberg a ?crit : > If I understand this we would not get the issue if we use a WFS > version > 1.0.0 request. > > We have just tested that and it appears that changing the version does > not change the behavior. > > This is with mapserver version 7.0.1. We are probably talking about different things. In https://github.com/mapserver/mapserver/commit/105877468590e99401d234e1bbac13d7645b77d0 , I have just fixed issues in GetCapabilities response generation, but your issues might be different. I've also just tested reading from a CSV (the input datastore type shouldn't matter) file a field with & and it is properly escaped as & in the GML output of WFS 1.0, 1.1 and 2.0 Without a mapfile + data + request you issue, it is difficult to be sure we're talking about the same thing. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Even Rouault Sent: Friday, April 15, 2016 7:50 AM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS layer - XML/JSON safe chars > > Le vendredi 15 avril 2016 16:41:28, Richard Watson a ?crit : > > I am using Map Server 6.4.1. I have a map project file which has > > the > > > > following title: > > WEB > > > > METADATA > > > > [ text omitted] > > "wms_title" "(*#(@#*$_)@#&\\\///" > > > > END # METADATA > > > > END # WEB > > > > When a GetCapabilties is done on the project then this is the source > > XML which is returned: > > > > > > WMS > > (*#(@#*$_)@#&\\/// > > It seems to be escaping as required. > > WMS and WFS 1.0 use MapServer manual XML composition with its own XML > escaping routines. Some other services (such as WFS 1.1 & 2.0) use > libxml (sometimes not in an appropriate way). > > > On Fri, Apr 15, 2016 at 9:21 AM, Rahkonen Jukka (MML) < > > > > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > Hi, > > > > > > > > > > > > I was thinking that the output of GetCapabilities is XML and & > > > must be escaped in XML. So if I write & into the abstract and > > > Mapserver works correctly it should write my test abstract ?test ? > > > &? escaped perhaps as > > > > > > test ä & > > > > > > That is the output from the online tool at > > > http://www.freeformatter.com/xml-escape.html#ad-output > > > > > > > > > > > > So my conclusion was that because Mapserver does not do it right > > > here it won?t do it right elsewhere. > > > > > > > > > > > > But now I made another test by editing the Geoserver test file > > > ?states.shp? in Spatialite as > > > > > > UPDATE states set STATE_NAME=?Colo&rado? WHERE > > > STATE_NAME=?Colorado?; > > > > > > > > > > > > Output of GetFeature from WFS 1.1.0 from Mapserver 7.0.0 includes > > > > > > Colo&rado > > > > > > So my current conclusion is that my Mapserver does not escape ?&? > > > correctly when it is used inside a mapfile and when I do > > > GetCapabilities request. However, when data come from Spatialite > > > database and they are consumed by GetFeature then escaping happens > > > correctly. > > > > > > > > > > > > We are still comparing different things because you have PostGIS > > > and I have Spatialite. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > I am not sure I understand the test you did. > > > > > > > > > > > > The data we are referring to is from the database field for the > > > individual features name. > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 10:19 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks for the clarification. > > > > > > I made a simple test by adding an abstract into layer metadata. > > > This shows ?test ?? as an abstract > > > > > > "wfs_abstract" "test ?? > > > > > > > > > > > > This one shows an empty abstract > > > > > > "wfs_abstract" "test ? &" > > > > > > > > > > > > So it looks like Mapserver doesn?t know to convert ?&? into ?&? > > > for XML. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > Ian Walberg wrote: > > > > > > > > > > > > Jukka, > > > > > > > > > > > > Our question was for the data/text read from the database and then > > > published as XML by the WFS service. > > > > > > > > > > > > So a pub with the name ?Dog & bone? created illegal xml as the & > > > is not converted to & > > > > > > > > > > > > Regards > > > > > > > > > > > > Ian > > > > > > > > > > > > *From:* Rahkonen Jukka (MML) > > > [mailto:jukka.rahkonen at maanmittauslaitos.fi > > > ] > > > *Sent:* Thursday, April 14, 2016 3:10 PM > > > *To:* Ian Walberg ; MapserverList OSGEO > > > < mapserver-users at lists.osgeo.org> > > > *Subject:* Re: WFS layer - XML/JSON safe chars > > > > > > > > > > > > Hi, > > > > > > > > > > > > You can?t have & in feature type names or attribute names in WFS > > > because they are defined in the XML schema to be ?QName?. The > > > prefix and LocalPart are of type NCName > > > https://en.wikipedia.org/wiki/QName > > > and from > > > http://stackoverflow.com/questions/1631396/what-is-an-xsncname-typ > > > e- > > > and-w > > > hen-should-it-be-used > > > > > > > > > > > > The practical restrictions of NCName are that it cannot contain > > > several symbol characters like :, @, $, %, &, /, +, ,, ;, > > > whitespace characters or different parenthesis. Furthermore an > > > NCName cannot begin with a number, dot or minus character although > > > they can appear later in an NCName. > > > > > > > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > *L?hett?j?:* mapserver-users [ > > > mailto:mapserver-users-bounces at lists.osgeo.org > > > ] *Puolesta *Ian Walberg > > > *L?hetetty:* 14. huhtikuuta 2016 19:23 > > > *Vastaanottaja:* MapserverList OSGEO > > > *Aihe:* [mapserver-users] WFS layer - XML/JSON safe chars > > > > > > > > > > > > Folks, > > > > > > > > > > > > Can mapserver produce XML or JSON safe characters for WFS served > > > data or do we need to ensure the source data has the escaped values. > > > > > > > > > > > > We got tripped up today as there were some ?&? in our names which > > > we had not considered. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Ian > > > > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > Spatialys - Geospatial professional services http://www.spatialys.com > _______________________________________________ mapserver-users > mailing list mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From ian.walberg at airborne.aero Sat Apr 23 19:50:05 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Sun, 24 Apr 2016 02:50:05 +0000 Subject: [mapserver-users] OGR csv - no field names Message-ID: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> Folks, Can a csv file with no field names as the first row be used as an OGR source? GDAL creates dummy field names, are these passed to mapserver? OGRFeature(USA-Hilton):652 field_1 (String) = -74.16958 field_2 (String) = 40.73526 field_3 (String) = Penn Station What do we need in the layer to make this work? LABELITEM 'name' - this throws an error, 'field_3' does not seem to work either. CONNECTIONTYPE OGR CONNECTION 'Stations.csv' Thanks Ian From Steve.Toutant at inspq.qc.ca Mon Apr 25 05:01:26 2016 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Mon, 25 Apr 2016 08:01:26 -0400 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> Message-ID: I don't know why LABELITEM 'filed_3' would not work in your case You can try to specify column names by using a .csvt file http://www.gdal.org/drv_csv.html Example: https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/ Ian Walberg @lists.osgeo.org Envoy? par : "mapserver-users" 2016-04-23 22:50 A "mapserver-users at lists.osgeo.org" cc Objet [mapserver-users] OGR csv - no field names Folks, Can a csv file with no field names as the first row be used as an OGR source? GDAL creates dummy field names, are these passed to mapserver? OGRFeature(USA-Hilton):652 field_1 (String) = -74.16958 field_2 (String) = 40.73526 field_3 (String) = Penn Station What do we need in the layer to make this work? LABELITEM 'name' - this throws an error, 'field_3' does not seem to work either. CONNECTIONTYPE OGR CONNECTION 'Stations.csv' Thanks Ian _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From smercier at mapgears.com Mon Apr 25 10:31:17 2016 From: smercier at mapgears.com (Simon Mercier) Date: Mon, 25 Apr 2016 13:31:17 -0400 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> Message-ID: <571E5465.2060706@mapgears.com> why not use a vrt file instead! http://www.gdal.org/drv_vrt.html precipitation.csv wkbPoint EPSG:4326 On 16-04-25 08:01 AM, Steve.Toutant at inspq.qc.ca wrote: > I don't know why LABELITEM 'filed_3' would not work in your case > > You can try to specify column names by using a .csvt file > http://www.gdal.org/drv_csv.html > > Example: > https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/ > > > > > > > *Ian Walberg @lists.osgeo.org* > Envoy? par : "mapserver-users" > > 2016-04-23 22:50 > > > A > "mapserver-users at lists.osgeo.org" > cc > > Objet > [mapserver-users] OGR csv - no field names > > > > > > > > > > > > Folks, > > Can a csv file with no field names as the first row be used as an OGR > source? > > GDAL creates dummy field names, are these passed to mapserver? > > OGRFeature(USA-Hilton):652 > field_1 (String) = -74.16958 > field_2 (String) = 40.73526 > field_3 (String) = Penn Station > > What do we need in the layer to make this work? > > LABELITEM 'name' - this throws an error, 'field_3' does not seem to > work either. > CONNECTIONTYPE OGR > CONNECTION 'Stations.csv' > > Thanks > > Ian > _______________________________________________ > 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 -- simon mercier mapgears +1.418.476.7139 p101 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.walberg at airborne.aero Mon Apr 25 13:32:59 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Mon, 25 Apr 2016 20:32:59 +0000 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: <571E5465.2060706@mapgears.com> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> Message-ID: Thanks for the ideas. I think the vrt file needs the csv fields to have names unless I misunderstand. CSVT file ? does this specify the column/field data type? Can the name be specified as well? Regards Ian From: Simon Mercier [mailto:smercier at mapgears.com] Sent: Monday, April 25, 2016 10:31 AM To: Steve.Toutant at inspq.qc.ca; Ian Walberg Cc: mapserver-users at lists.osgeo.org; mapserver-users Subject: Re: [mapserver-users] RE OGR csv - no field names why not use a vrt file instead! http://www.gdal.org/drv_vrt.html precipitation.csv wkbPoint EPSG:4326 On 16-04-25 08:01 AM, Steve.Toutant at inspq.qc.ca wrote: I don't know why LABELITEM 'filed_3' would not work in your case You can try to specify column names by using a .csvt file http://www.gdal.org/drv_csv.html Example: https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/ Ian Walberg @lists.osgeo.org Envoy? par : "mapserver-users" 2016-04-23 22:50 A "mapserver-users at lists.osgeo.org" cc Objet [mapserver-users] OGR csv - no field names Folks, Can a csv file with no field names as the first row be used as an OGR source? GDAL creates dummy field names, are these passed to mapserver? OGRFeature(USA-Hilton):652 field_1 (String) = -74.16958 field_2 (String) = 40.73526 field_3 (String) = Penn Station What do we need in the layer to make this work? LABELITEM 'name' - this throws an error, 'field_3' does not seem to work either. CONNECTIONTYPE OGR CONNECTION 'Stations.csv' Thanks Ian _______________________________________________ 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 -- simon mercier mapgears +1.418.476.7139 p101 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Apr 25 14:39:23 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 25 Apr 2016 18:39:23 -0300 Subject: [mapserver-users] OGR csv - no field names In-Reply-To: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> Message-ID: <571E8E8B.2000904@gatewaygeomatics.com> Note that when you execute 'ogrinfo myfile.csv myfile -summary' OGR will not find any geometry (you will get a response of 'Geometry: None') which makes it impossible to view in MapServer; that is why you use a .vrt, where you specify the x and y source columns by name. I'm not aware of a workaround for no field names for a CSV. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-23 11:50 PM, Ian Walberg wrote: > Folks, > > Can a csv file with no field names as the first row be used as an OGR source? > > GDAL creates dummy field names, are these passed to mapserver? > > OGRFeature(USA-Hilton):652 > field_1 (String) = -74.16958 > field_2 (String) = 40.73526 > field_3 (String) = Penn Station > > What do we need in the layer to make this work? > > LABELITEM 'name' - this throws an error, 'field_3' does not seem to work either. > CONNECTIONTYPE OGR > CONNECTION 'Stations.csv' > > Thanks > > Ian From smercier at mapgears.com Mon Apr 25 14:49:24 2016 From: smercier at mapgears.com (Simon Mercier) Date: Mon, 25 Apr 2016 17:49:24 -0400 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> Message-ID: <571E90E4.1050309@mapgears.com> really not sure CSVT file is supported by ogr, but you can easily define field type in VRT On 16-04-25 04:32 PM, Ian Walberg wrote: > > Thanks for the ideas. > > I think the vrt file needs the csv fields to have names unless I > misunderstand. > > CSVT file ? does this specify the column/field data type? Can the name > be specified as well? > > Regards > > Ian > > *From:*Simon Mercier [mailto:smercier at mapgears.com] > *Sent:* Monday, April 25, 2016 10:31 AM > *To:* Steve.Toutant at inspq.qc.ca; Ian Walberg > *Cc:* mapserver-users at lists.osgeo.org; mapserver-users > > *Subject:* Re: [mapserver-users] RE OGR csv - no field names > > why not use a vrt file instead! http://www.gdal.org/drv_vrt.html > > > > precipitation.csv > wkbPoint > EPSG:4326 > > > > > > > On 16-04-25 08:01 AM, Steve.Toutant at inspq.qc.ca > wrote: > > I don't know why LABELITEM 'filed_3' would not work in your case > > You can try to specify column names by using a .csvt file > http://www.gdal.org/drv_csv.html > > Example: > https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/ > > > > > *Ian Walberg > @lists.osgeo.org* > Envoy? par : "mapserver-users" > > > > 2016-04-23 22:50 > > > > A > > > > "mapserver-users at lists.osgeo.org" > > > > > cc > > > > Objet > > > > [mapserver-users] OGR csv - no field names > > > > > > > > > > Folks, > > Can a csv file with no field names as the first row be used as an > OGR source? > > GDAL creates dummy field names, are these passed to mapserver? > > OGRFeature(USA-Hilton):652 > field_1 (String) = -74.16958 > field_2 (String) = 40.73526 > field_3 (String) = Penn Station > > What do we need in the layer to make this work? > > LABELITEM 'name' - this throws an error, 'field_3' does not seem > to work either. > CONNECTIONTYPE OGR > CONNECTION 'Stations.csv' > > Thanks > > Ian > _______________________________________________ > 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 > > > > -- > simon mercier > mapgears > +1.418.476.7139 p101 > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- simon mercier mapgears +1.418.476.7139 p101 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Apr 25 14:51:33 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 25 Apr 2016 18:51:33 -0300 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> Message-ID: <571E9165.8080301@gatewaygeomatics.com> Actually I am able to use a .vrt with no field names: CSV:occurrence.txt wkbPoint WGS84 and ogrinfo does find the geometry with that vrt: INFO: Open of `occurrence.vrt' using driver `OGR_VRT' successful. Layer name: occurrence Geometry: Point Feature Count: 75 Extent: (45.726390, -64.603440) - (45.726860, -64.575430) Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563 As for using those fields in a CLASSITEM etc in the mapfile layer, I am unable. I am testing with MS4W 3.1.3 (MapServer 7.0.1). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-25 5:32 PM, Ian Walberg wrote: > Thanks for the ideas. > > I think the vrt file needs the csv fields to have names unless I > misunderstand. > > CSVT file ? does this specify the column/field data type? Can the name > be specified as well? > > Regards > > Ian > > *From:*Simon Mercier [mailto:smercier at mapgears.com] > *Sent:* Monday, April 25, 2016 10:31 AM > *To:* Steve.Toutant at inspq.qc.ca; Ian Walberg > *Cc:* mapserver-users at lists.osgeo.org; mapserver-users > > *Subject:* Re: [mapserver-users] RE OGR csv - no field names > > why not use a vrt file instead! http://www.gdal.org/drv_vrt.html > > > > precipitation.csv > wkbPoint > EPSG:4326 > > > > > > > On 16-04-25 08:01 AM, Steve.Toutant at inspq.qc.ca > wrote: > > I don't know why LABELITEM 'filed_3' would not work in your case > > You can try to specify column names by using a .csvt file > http://www.gdal.org/drv_csv.html > > Example: > https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/ > > > > > *Ian Walberg > @lists.osgeo.org* > Envoy? par : "mapserver-users" > > > > 2016-04-23 22:50 > > > > A > > > > "mapserver-users at lists.osgeo.org" > > > > > cc > > > > Objet > > > > [mapserver-users] OGR csv - no field names > > > > > > > > > Folks, > > Can a csv file with no field names as the first row be used as an > OGR source? > > GDAL creates dummy field names, are these passed to mapserver? > > OGRFeature(USA-Hilton):652 > field_1 (String) = -74.16958 > field_2 (String) = 40.73526 > field_3 (String) = Penn Station > > What do we need in the layer to make this work? > > LABELITEM 'name' - this throws an error, 'field_3' does not seem to > work either. > CONNECTIONTYPE OGR > CONNECTION 'Stations.csv' > > Thanks > > Ian > _______________________________________________ > 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 > > > > -- > > simon mercier > > mapgears > > +1.418.476.7139 p101 > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From jmckenna at gatewaygeomatics.com Mon Apr 25 15:03:12 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 25 Apr 2016 19:03:12 -0300 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: <571E90E4.1050309@mapgears.com> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> <571E90E4.1050309@mapgears.com> Message-ID: <571E9420.70908@gatewaygeomatics.com> On 2016-04-25 6:49 PM, Simon Mercier wrote: > really not sure CSVT file is supported by ogr, but you can easily define > field type in VRT > > > > Simon is right, very nice, specifying the field name to classify in the vrt works, for a csv without field names: CSV:occurrence.txt wkbPoint WGS84 LAYER NAME "occurrence" TYPE POINT STATUS ON CONNECTIONTYPE OGR CONNECTION "../occurrence.vrt" CLASSITEM "name" CLASS NAME "Occurrences" EXPRESSION "ttt" STYLE SYMBOL 7 SIZE 10 COLOR 0 0 0 END END END # Layer -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From ian.walberg at airborne.aero Mon Apr 25 16:11:33 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Mon, 25 Apr 2016 23:11:33 +0000 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: <571E9420.70908@gatewaygeomatics.com> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> <571E90E4.1050309@mapgears.com> <571E9420.70908@gatewaygeomatics.com> Message-ID: Jeff, Many thanks that worked great. Next is there any way of getting the row ID as part of the data passed to mapserver? We are planning to serve this data as a WFS layer. Thanks Ian -----Original Message----- From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna Sent: Monday, April 25, 2016 3:03 PM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] RE OGR csv - no field names On 2016-04-25 6:49 PM, Simon Mercier wrote: > really not sure CSVT file is supported by ogr, but you can easily > define field type in VRT > > > /> > Simon is right, very nice, specifying the field name to classify in the vrt works, for a csv without field names: CSV:occurrence.txt wkbPoint WGS84 LAYER NAME "occurrence" TYPE POINT STATUS ON CONNECTIONTYPE OGR CONNECTION "../occurrence.vrt" CLASSITEM "name" CLASS NAME "Occurrences" EXPRESSION "ttt" STYLE SYMBOL 7 SIZE 10 COLOR 0 0 0 END END END # Layer -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Robert.Sanson at asurequality.com Mon Apr 25 19:31:42 2016 From: Robert.Sanson at asurequality.com (Robert Sanson) Date: Tue, 26 Apr 2016 02:31:42 +0000 Subject: [mapserver-users] Upgrading GDAL Message-ID: Hi Is it fine to upgrade GDAL separately from Mapserver? I have Mapserver 6.4 and GDAL v 1.10 on a Ubuntu server. I wish to take advantage of some GDAL v 2 improvements - specifically . Will anything break? Many thanks, Robert L. Sanson From schepers at rvr-online.de Mon Apr 25 21:58:36 2016 From: schepers at rvr-online.de (Schepers, Benjamin) Date: Tue, 26 Apr 2016 04:58:36 +0000 Subject: [mapserver-users] OGR csv - no field names In-Reply-To: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> Message-ID: <7088A26751CB34409B159B4237D510A832FA1F39@W2K8-EXDB01.VERBAND.LOCAL> Hi Ian, maybe creating a .vrt-File helps? This works as a preprocessor/transformer - the impact on performance for that kind of modification shouldn't be noticeable. Mapserver can read those vrt-Files, so this could be a solution for you. There is an example at the gdal-csv-driver documentation: http://www.gdal.org/drv_csv.html Regards Benjamin Benjamin Schepers Luftbild und Geoinformationssysteme luftbilder.geoportal.ruhr schepers at rvr-online.de Kronprinzenstra?e 35 45128 Essen Germany www.metropoleruhr.de -----Urspr?ngliche Nachricht----- Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Ian Walberg Gesendet: Sonntag, 24. April 2016 04:50 An: mapserver-users at lists.osgeo.org Betreff: [mapserver-users] OGR csv - no field names Folks, Can a csv file with no field names as the first row be used as an OGR source? GDAL creates dummy field names, are these passed to mapserver? OGRFeature(USA-Hilton):652 field_1 (String) = -74.16958 field_2 (String) = 40.73526 field_3 (String) = Penn Station What do we need in the layer to make this work? LABELITEM 'name' - this throws an error, 'field_3' does not seem to work either. CONNECTIONTYPE OGR CONNECTION 'Stations.csv' Thanks Ian _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From schepers at rvr-online.de Mon Apr 25 22:10:00 2016 From: schepers at rvr-online.de (Schepers, Benjamin) Date: Tue, 26 Apr 2016 05:10:00 +0000 Subject: [mapserver-users] Upgrading GDAL In-Reply-To: References: Message-ID: <7088A26751CB34409B159B4237D510A832FA1F73@W2K8-EXDB01.VERBAND.LOCAL> Hi Robert, imho this should work, if you build the binaries by your own - first build GDAL, then Mapserver from the sources. I assume, that there aren't any ready packages for your scenario, but I'm not using ubuntu, please correct me, if I'm wrong. I did it vice versa (debian), first raised Mapserver to V7, then after some bugfix-releases GDAL to V2 - finally worked fine. Regards Benjamin Mit freundlichen Gr??en Im Auftrag Benjamin Schepers Luftbild und Geoinformationssysteme Kronprinzenstra?e 35 45128 Essen Fon: +49 201 2069-232 Fax: +49 201 2069-400 schepers at rvr-online.de Die Regionaldirektorin Kronprinzenstra?e 35 45128 Essen Zentrale: +49 (0) 201 2069-0 Fax: +49 (0) 201 2069-500 www.metropoleruhr.de Postfach 10 32 64 45032 Essen Steuernummer: RVR 112/5797/0116 USt.-ldNr.: DE 173867500 Diese E-Mail koennte vertrauliche und/oder rechtlich geschuetzte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail sind nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -----Urspr?ngliche Nachricht----- Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Robert Sanson Gesendet: Dienstag, 26. April 2016 04:32 An: mapserver-users at lists.osgeo.org Betreff: [mapserver-users] Upgrading GDAL Hi Is it fine to upgrade GDAL separately from Mapserver? I have Mapserver 6.4 and GDAL v 1.10 on a Ubuntu server. I wish to take advantage of some GDAL v 2 improvements - specifically . Will anything break? Many thanks, Robert L. Sanson _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From schepers at rvr-online.de Mon Apr 25 22:17:09 2016 From: schepers at rvr-online.de (Schepers, Benjamin) Date: Tue, 26 Apr 2016 05:17:09 +0000 Subject: [mapserver-users] OGR csv - no field names In-Reply-To: <7088A26751CB34409B159B4237D510A832FA1F39@W2K8-EXDB01.VERBAND.LOCAL> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <7088A26751CB34409B159B4237D510A832FA1F39@W2K8-EXDB01.VERBAND.LOCAL> Message-ID: <7088A26751CB34409B159B4237D510A832FA1FA9@W2K8-EXDB01.VERBAND.LOCAL> Sorry list, the mail sleeped in my drafts-folder, I see, that you have been further ;-) Regards Benjamin Benjamin Schepers Luftbild und Geoinformationssysteme luftbilder.geoportal.ruhr schepers at rvr-online.de Kronprinzenstra?e 35 45128 Essen Germany www.metropoleruhr.de From thomas.bonfort at gmail.com Tue Apr 26 00:18:51 2016 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Tue, 26 Apr 2016 09:18:51 +0200 Subject: [mapserver-users] Upgrading GDAL In-Reply-To: References: Message-ID: Yes, it will break. You MUST recompile mapserver against the the new gdal library, unless you keep your new gdal2 installation out of the default library path. -- thomas On 26 April 2016 at 04:31, Robert Sanson wrote: > Hi > > Is it fine to upgrade GDAL separately from Mapserver? I have Mapserver 6.4 > and GDAL v 1.10 on a Ubuntu server. I wish to take advantage of some GDAL v > 2 improvements - specifically . Will anything break? > > Many thanks, > > Robert L. Sanson > _______________________________________________ > 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 smercier at mapgears.com Tue Apr 26 08:00:46 2016 From: smercier at mapgears.com (Simon Mercier) Date: Tue, 26 Apr 2016 11:00:46 -0400 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> <571E90E4.1050309@mapgears.com> <571E9420.70908@gatewaygeomatics.com> Message-ID: <571F829E.6030404@mapgears.com> Ian Try with FID field, OGR generate this ID for you. But you should try use your own ID field for consistency between version of your data (if needed). I tested with my demo data and I can select FID even if it doesn't exist in source file. /home/smercier/data/vrt/Inventory.csv wkbPoint EPSG:4326 smercier at optimus: $ ogrinfo Inventory.vrt -sql "select fid from Inventory" INFO: Open of `Inventory.vrt' using driver `VRT' successful. Layer name: Inventory Geometry: Point Feature Count: 117 Extent: (-80.977043, 0.000000) - (0.000000, 43.978620) Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]] fid: Integer (0.0) OGRFeature(Inventory):1 fid (Integer) = 1 POINT (-80.2171407 43.4970847) OGRFeature(Inventory):2 fid (Integer) = 2 POINT (-80.5357573 43.8367679) OGRFeature(Inventory):3 fid (Integer) = 3 POINT (0 0) .... On 16-04-25 07:11 PM, Ian Walberg wrote: > Jeff, > > Many thanks that worked great. > > Next is there any way of getting the row ID as part of the data passed to mapserver? > > We are planning to serve this data as a WFS layer. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna > Sent: Monday, April 25, 2016 3:03 PM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] RE OGR csv - no field names > > On 2016-04-25 6:49 PM, Simon Mercier wrote: >> really not sure CSVT file is supported by ogr, but you can easily >> define field type in VRT >> >> >> > /> >> > Simon is right, very nice, specifying the field name to classify in the vrt works, for a csv without field names: > > > > CSV:occurrence.txt > wkbPoint > WGS84 > y="field_38"/> > > > > > > > LAYER > NAME "occurrence" > TYPE POINT > STATUS ON > CONNECTIONTYPE OGR > CONNECTION "../occurrence.vrt" > CLASSITEM "name" > CLASS > NAME "Occurrences" > EXPRESSION "ttt" > STYLE > SYMBOL 7 > SIZE 10 > COLOR 0 0 0 > END > END > END # Layer > > > -jeff > > > > > > -- > Jeff McKenna > MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- simon mercier mapgears +1.418.476.7139 p101 From ian.walberg at airborne.aero Tue Apr 26 08:05:22 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Tue, 26 Apr 2016 15:05:22 +0000 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: <571F829E.6030404@mapgears.com> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> <571E90E4.1050309@mapgears.com> <571E9420.70908@gatewaygeomatics.com> <571F829E.6030404@mapgears.com> Message-ID: <0b2028761fde410681aa9f168c8595d8@airborne.aero> Simon, We tried this yesterday but could not see how to include the sql statement in the vrt file so that mapserver got an fid for each record. Thanks Ian -----Original Message----- From: Simon Mercier [mailto:smercier at mapgears.com] Sent: Tuesday, April 26, 2016 8:01 AM To: Ian Walberg ; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] RE OGR csv - no field names Ian Try with FID field, OGR generate this ID for you. But you should try use your own ID field for consistency between version of your data (if needed). I tested with my demo data and I can select FID even if it doesn't exist in source file. /home/smercier/data/vrt/Inventory.csv wkbPoint EPSG:4326 smercier at optimus: $ ogrinfo Inventory.vrt -sql "select fid from Inventory" INFO: Open of `Inventory.vrt' using driver `VRT' successful. Layer name: Inventory Geometry: Point Feature Count: 117 Extent: (-80.977043, 0.000000) - (0.000000, 43.978620) Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]] fid: Integer (0.0) OGRFeature(Inventory):1 fid (Integer) = 1 POINT (-80.2171407 43.4970847) OGRFeature(Inventory):2 fid (Integer) = 2 POINT (-80.5357573 43.8367679) OGRFeature(Inventory):3 fid (Integer) = 3 POINT (0 0) .... On 16-04-25 07:11 PM, Ian Walberg wrote: > Jeff, > > Many thanks that worked great. > > Next is there any way of getting the row ID as part of the data passed to mapserver? > > We are planning to serve this data as a WFS layer. > > Thanks > > Ian > > -----Original Message----- > From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] > On Behalf Of Jeff McKenna > Sent: Monday, April 25, 2016 3:03 PM > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] RE OGR csv - no field names > > On 2016-04-25 6:49 PM, Simon Mercier wrote: >> really not sure CSVT file is supported by ogr, but you can easily >> define field type in VRT >> >> >> > /> >> > Simon is right, very nice, specifying the field name to classify in the vrt works, for a csv without field names: > > > > CSV:occurrence.txt > wkbPoint > WGS84 > y="field_38"/> > > > > > > > LAYER > NAME "occurrence" > TYPE POINT > STATUS ON > CONNECTIONTYPE OGR > CONNECTION "../occurrence.vrt" > CLASSITEM "name" > CLASS > NAME "Occurrences" > EXPRESSION "ttt" > STYLE > SYMBOL 7 > SIZE 10 > COLOR 0 0 0 > END > END > END # Layer > > > -jeff > > > > > > -- > Jeff McKenna > MapServer Consulting and Training Services > http://www.gatewaygeomatics.com/ > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- simon mercier mapgears +1.418.476.7139 p101 From smercier at mapgears.com Tue Apr 26 08:52:44 2016 From: smercier at mapgears.com (Simon Mercier) Date: Tue, 26 Apr 2016 11:52:44 -0400 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: <0b2028761fde410681aa9f168c8595d8@airborne.aero> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> <571E90E4.1050309@mapgears.com> <571E9420.70908@gatewaygeomatics.com> <571F829E.6030404@mapgears.com> <0b2028761fde410681aa9f168c8595d8@airborne.aero> Message-ID: <571F8ECC.1050208@mapgears.com> try to get it through your mapfile! base on what I read here http://mapserver.org/input/vector/ogr.html#using-ogr-data-sources-in-the-map-file, you'll supposed to be able to add an SQL in DATA tag for any OGR data source, and there you should be able to select fid... I guess LAYER ... CONNECTIONTYPE OGR CONNECTION "" DATA "select fid, field_1, field_2, field_3 from " ... END On 16-04-26 11:05 AM, Ian Walberg wrote: > Simon, > > We tried this yesterday but could not see how to include the sql statement in the vrt file so that mapserver got an fid for each record. > > Thanks > > Ian > > -----Original Message----- > From: Simon Mercier [mailto:smercier at mapgears.com] > Sent: Tuesday, April 26, 2016 8:01 AM > To: Ian Walberg ; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] RE OGR csv - no field names > > Ian > > Try with FID field, OGR generate this ID for you. But you should try use your own ID field for consistency between version of your data (if needed). I tested with my demo data and I can select FID even if it doesn't exist in source file. > > > > /home/smercier/data/vrt/Inventory.csv > wkbPoint > EPSG:4326 > y="latitude"/> > > > > > > > > > smercier at optimus: $ ogrinfo Inventory.vrt -sql "select fid from Inventory" > INFO: Open of `Inventory.vrt' > using driver `VRT' successful. > > Layer name: Inventory > Geometry: Point > Feature Count: 117 > Extent: (-80.977043, 0.000000) - (0.000000, 43.978620) Layer SRS WKT: > GEOGCS["WGS 84", > DATUM["WGS_1984", > SPHEROID["WGS 84",6378137,298.257223563, > AUTHORITY["EPSG","7030"]], > AUTHORITY["EPSG","6326"]], > PRIMEM["Greenwich",0, > AUTHORITY["EPSG","8901"]], > UNIT["degree",0.0174532925199433, > AUTHORITY["EPSG","9122"]], > AUTHORITY["EPSG","4326"]] > fid: Integer (0.0) > OGRFeature(Inventory):1 > fid (Integer) = 1 > POINT (-80.2171407 43.4970847) > > OGRFeature(Inventory):2 > fid (Integer) = 2 > POINT (-80.5357573 43.8367679) > > OGRFeature(Inventory):3 > fid (Integer) = 3 > POINT (0 0) > .... > > > On 16-04-25 07:11 PM, Ian Walberg wrote: >> Jeff, >> >> Many thanks that worked great. >> >> Next is there any way of getting the row ID as part of the data passed to mapserver? >> >> We are planning to serve this data as a WFS layer. >> >> Thanks >> >> Ian >> >> -----Original Message----- >> From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] >> On Behalf Of Jeff McKenna >> Sent: Monday, April 25, 2016 3:03 PM >> To: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] RE OGR csv - no field names >> >> On 2016-04-25 6:49 PM, Simon Mercier wrote: >>> really not sure CSVT file is supported by ogr, but you can easily >>> define field type in VRT >>> >>> >>> >> /> >>> >> Simon is right, very nice, specifying the field name to classify in the vrt works, for a csv without field names: >> >> >> >> CSV:occurrence.txt >> wkbPoint >> WGS84 >> > y="field_38"/> >> >> >> >> >> >> >> LAYER >> NAME "occurrence" >> TYPE POINT >> STATUS ON >> CONNECTIONTYPE OGR >> CONNECTION "../occurrence.vrt" >> CLASSITEM "name" >> CLASS >> NAME "Occurrences" >> EXPRESSION "ttt" >> STYLE >> SYMBOL 7 >> SIZE 10 >> COLOR 0 0 0 >> END >> END >> END # Layer >> >> >> -jeff >> >> >> >> >> >> -- >> Jeff McKenna >> MapServer Consulting and Training Services >> http://www.gatewaygeomatics.com/ >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- > simon mercier > mapgears > +1.418.476.7139 p101 > -- simon mercier mapgears +1.418.476.7139 p101 From ian.walberg at airborne.aero Tue Apr 26 09:26:41 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Tue, 26 Apr 2016 16:26:41 +0000 Subject: [mapserver-users] RE OGR csv - no field names In-Reply-To: <571F8ECC.1050208@mapgears.com> References: <757fe1ac0cf54d85ae0226ce191bf669@airborne.aero> <571E5465.2060706@mapgears.com> <571E90E4.1050309@mapgears.com> <571E9420.70908@gatewaygeomatics.com> <571F829E.6030404@mapgears.com> <0b2028761fde410681aa9f168c8595d8@airborne.aero> <571F8ECC.1050208@mapgears.com> Message-ID: Simon, This worked in the map file. DATA "select *,fid from " Thanks for everyone's help. Ian -----Original Message----- From: Simon Mercier [mailto:smercier at mapgears.com] Sent: Tuesday, April 26, 2016 8:53 AM To: Ian Walberg ; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] RE OGR csv - no field names try to get it through your mapfile! base on what I read here http://mapserver.org/input/vector/ogr.html#using-ogr-data-sources-in-the-map-file, you'll supposed to be able to add an SQL in DATA tag for any OGR data source, and there you should be able to select fid... I guess LAYER ... CONNECTIONTYPE OGR CONNECTION "" DATA "select fid, field_1, field_2, field_3 from " ... END On 16-04-26 11:05 AM, Ian Walberg wrote: > Simon, > > We tried this yesterday but could not see how to include the sql statement in the vrt file so that mapserver got an fid for each record. > > Thanks > > Ian > > -----Original Message----- > From: Simon Mercier [mailto:smercier at mapgears.com] > Sent: Tuesday, April 26, 2016 8:01 AM > To: Ian Walberg ; > mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] RE OGR csv - no field names > > Ian > > Try with FID field, OGR generate this ID for you. But you should try use your own ID field for consistency between version of your data (if needed). I tested with my demo data and I can select FID even if it doesn't exist in source file. > > > > /home/smercier/data/vrt/Inventory.csv > wkbPoint > EPSG:4326 > y="latitude"/> > > > > > > > > > smercier at optimus: $ ogrinfo Inventory.vrt -sql "select fid from Inventory" > INFO: Open of `Inventory.vrt' > using driver `VRT' successful. > > Layer name: Inventory > Geometry: Point > Feature Count: 117 > Extent: (-80.977043, 0.000000) - (0.000000, 43.978620) Layer SRS WKT: > GEOGCS["WGS 84", > DATUM["WGS_1984", > SPHEROID["WGS 84",6378137,298.257223563, > AUTHORITY["EPSG","7030"]], > AUTHORITY["EPSG","6326"]], > PRIMEM["Greenwich",0, > AUTHORITY["EPSG","8901"]], > UNIT["degree",0.0174532925199433, > AUTHORITY["EPSG","9122"]], > AUTHORITY["EPSG","4326"]] > fid: Integer (0.0) > OGRFeature(Inventory):1 > fid (Integer) = 1 > POINT (-80.2171407 43.4970847) > > OGRFeature(Inventory):2 > fid (Integer) = 2 > POINT (-80.5357573 43.8367679) > > OGRFeature(Inventory):3 > fid (Integer) = 3 > POINT (0 0) > .... > > > On 16-04-25 07:11 PM, Ian Walberg wrote: >> Jeff, >> >> Many thanks that worked great. >> >> Next is there any way of getting the row ID as part of the data passed to mapserver? >> >> We are planning to serve this data as a WFS layer. >> >> Thanks >> >> Ian >> >> -----Original Message----- >> From: mapserver-users >> [mailto:mapserver-users-bounces at lists.osgeo.org] >> On Behalf Of Jeff McKenna >> Sent: Monday, April 25, 2016 3:03 PM >> To: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] RE OGR csv - no field names >> >> On 2016-04-25 6:49 PM, Simon Mercier wrote: >>> really not sure CSVT file is supported by ogr, but you can easily >>> define field type in VRT >>> >>> >>> >> /> >>> >> Simon is right, very nice, specifying the field name to classify in the vrt works, for a csv without field names: >> >> >> >> CSV:occurrence.txt >> wkbPoint >> WGS84 >> > y="field_38"/> >> >> >> >> >> >> >> LAYER >> NAME "occurrence" >> TYPE POINT >> STATUS ON >> CONNECTIONTYPE OGR >> CONNECTION "../occurrence.vrt" >> CLASSITEM "name" >> CLASS >> NAME "Occurrences" >> EXPRESSION "ttt" >> STYLE >> SYMBOL 7 >> SIZE 10 >> COLOR 0 0 0 >> END >> END >> END # Layer >> >> >> -jeff >> >> >> >> >> >> -- >> Jeff McKenna >> MapServer Consulting and Training Services >> http://www.gatewaygeomatics.com/ >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- > simon mercier > mapgears > +1.418.476.7139 p101 > -- simon mercier mapgears +1.418.476.7139 p101 From bob.basques at ci.stpaul.mn.us Tue Apr 26 10:42:42 2016 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Tue, 26 Apr 2016 17:42:42 +0000 Subject: [mapserver-users] File name substitution in TILEINDEX file name? Message-ID: All, I good one for you all. I have a current TILEINDEX that has a file naming scheme like so: ?544000_144000_4000_01_2016_SAINT_PAUL.PNG? I was wondering if I can do something like this instead for the file name: ?544000_144000_4000_??_????_SAINT_PAUL.PNG? or ?544000_144000_4000_*_SAINT_PAUL.PNG? Will these names be interpreted correctly? is there some sort of escaping needed? Thanks bobb ?There is nothing quite so useless as doing with great efficiency something that should not be done at all.? - Peter Drucker -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Tue Apr 26 10:57:10 2016 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Tue, 26 Apr 2016 17:57:10 +0000 Subject: [mapserver-users] File name substitution in TILEINDEX file name? In-Reply-To: References: Message-ID: <8D8CC527-2560-432B-B3DF-5F0D24E41F19@ci.stpaul.mn.us> I did a quick test with _??_????_, but no luck. Thinking on it some more. this is probably the desired behavior, since interpreting the ?? chars correctly could lead to multiple files being selected. I?m trying to maintain an archive of the tile set based on date, but use only the non-date formatted file name for MapServer. Looks like the easiest is to use a generic naming scheme instead. Hmm, I wonder, can a URL be used in the TILEINDEX as NAME instead of a filename? bobb ?There is nothing quite so useless as doing with great efficiency something that should not be done at all.? - Peter Drucker On Apr 26, 2016, at 12:42 PM, Basques, Bob (CI-StPaul) > wrote: All, I good one for you all. I have a current TILEINDEX that has a file naming scheme like so: ?544000_144000_4000_01_2016_SAINT_PAUL.PNG? I was wondering if I can do something like this instead for the file name: ?544000_144000_4000_??_????_SAINT_PAUL.PNG? or ?544000_144000_4000_*_SAINT_PAUL.PNG? Will these names be interpreted correctly? is there some sort of escaping needed? Thanks bobb ?There is nothing quite so useless as doing with great efficiency something that should not be done at all.? - Peter Drucker _______________________________________________ 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 Steve.Lime at state.mn.us Tue Apr 26 10:53:52 2016 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 26 Apr 2016 17:53:52 +0000 Subject: [mapserver-users] File name substitution in TILEINDEX file name? In-Reply-To: References: Message-ID: MapServer does not support shell-like filenames so while ?544000_144000_4000_*_SAINT_PAUL.PNG? is a legal string in MapServer it will be interpreted literally. From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Basques, Bob (CI-StPaul) Sent: Tuesday, April 26, 2016 12:43 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] File name substitution in TILEINDEX file name? All, I good one for you all. I have a current TILEINDEX that has a file naming scheme like so: ?544000_144000_4000_01_2016_SAINT_PAUL.PNG? I was wondering if I can do something like this instead for the file name: ?544000_144000_4000_??_????_SAINT_PAUL.PNG? or ?544000_144000_4000_*_SAINT_PAUL.PNG? Will these names be interpreted correctly? is there some sort of escaping needed? Thanks bobb ?There is nothing quite so useless as doing with great efficiency something that should not be done at all.? - Peter Drucker -------------- next part -------------- An HTML attachment was scrubbed... URL: From klassen.js at gmail.com Tue Apr 26 12:00:42 2016 From: klassen.js at gmail.com (Jim Klassen) Date: Tue, 26 Apr 2016 14:00:42 -0500 Subject: [mapserver-users] File name substitution in TILEINDEX file name? In-Reply-To: <8D8CC527-2560-432B-B3DF-5F0D24E41F19@ci.stpaul.mn.us> References: <8D8CC527-2560-432B-B3DF-5F0D24E41F19@ci.stpaul.mn.us> Message-ID: <571FBADA.6060404@gmail.com> URLs: Yes (because GDAL is involved and /vsicurl/ is probably available), but it is going to be a lot slower than pointing to the file directly. Using consistent names (and potentially letting version control handle history), creating consistent names via hard or symbolic links (or saving twice as the consistent name and the dated name), or rebuilding the tileindex are all probably better solutions if possible. On 04/26/2016 12:57 PM, Basques, Bob (CI-StPaul) wrote: > I did a quick test with _??_????_, but no luck. Thinking on it some > more. this is probably the desired behavior, since interpreting the > ?? chars correctly could lead to multiple files being selected. > > I?m trying to maintain an archive of the tile set based on date, but > use only the non-date formatted file name for MapServer. > > Looks like the easiest is to use a generic naming scheme instead. > Hmm, I wonder, can a URL be used in the TILEINDEX as NAME instead of a > filename? > > bobb > > > > > ?There is nothing quite so useless as doing with great efficiency > something that should not be done at all.? > - Peter Drucker > > > > > >> On Apr 26, 2016, at 12:42 PM, Basques, Bob (CI-StPaul) >> > wrote: >> >> All, >> >> I good one for you all. I have a current TILEINDEX that has a file >> naming scheme like so: >> >> ?544000_144000_4000_01_2016_SAINT_PAUL.PNG? >> >> I was wondering if I can do something like this instead for the file >> name: >> >> ?544000_144000_4000_??_????_SAINT_PAUL.PNG? >> or >> ?544000_144000_4000_*_SAINT_PAUL.PNG? >> >> Will these names be interpreted correctly? is there some sort of >> escaping needed? >> >> Thanks >> >> bobb >> >> >> >> >> ?There is nothing quite so useless as doing with great efficiency >> something that should not be done at all.? >> - Peter Drucker >> >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Sanson at asurequality.com Tue Apr 26 16:16:20 2016 From: Robert.Sanson at asurequality.com (Robert Sanson) Date: Tue, 26 Apr 2016 23:16:20 +0000 Subject: [mapserver-users] Mapserver - cascading a remote ESRI REST service Message-ID: <0c396e0ffd0447cb8591ec5cca13c075@OPASAKLPMBX01.nz01a.opaas.net.nz> Hi I am trying to cascade a remote ESRI REST image service via my Mapserver mapfile. Here is my XML file: http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/MapServer xyXY 3857 image/jpeg 1.53E7 -2950000.0 1.781E7 -5070000.0 256256 Here is my mapfile layer: LAYER NAME sixmaps GROUP 'highres' TYPE RASTER STATUS ON DATA "/mnt/gisdata/data/aus/sixmaps.xml" PROCESSING "OVERSAMPLE_RATIO=1.0" PROJECTION "init=epsg:3857" END METADATA "wms_title" "sixmaps" "wms_name" "sixmaps" "wms_srs" "EPSG:3857" END END When I try and request a map using a WMS GetMap request, this is the error message I get: msDrawMap(): Image handling error. Failed to draw layer named 'sixmaps'. drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: GetBlockRef failed at X block offset 0, Y block offset 0 Can anyone point out where the problem is? Many thanks, Robert L. Sanson -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Apr 27 00:32:36 2016 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 27 Apr 2016 07:32:36 +0000 Subject: [mapserver-users] Mapserver - cascading a remote ESRI REST service Message-ID: <2d4b930794384e56ac9321db03297371@C119S212VM022.msvyvi.vaha.local> Hi, I copied your XML definition file and made a test with GDAL. My command was: gdal_translate -outsize 400 400 rest.xml out.tif --debug o Result is an error: 0ERROR 1: GDALWMS: Unable to download block 0, 0. URL: http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/ MapServer /export?f=image&bbox=15300000.00000000,-5070000.00000000,17810000.00000000,- 2950000.00000000&size=256,256&dpi=&imageSR=3857&bboxSR=3857&format=image/jpeg&la yerdefs=&layers=&transparent=false&time=&layerTimeOptions=&dynamicLayers= HTTP status code: 400, error: (null). Add the HTTP status code to to ignore that error (see http: //www.gdal.org/frmt_wms.html). ERROR 1: rest.xml, band 1: IReadBlock failed at X offset 0, Y offset 0 With another proxy I get similar error but different code HTTP status code: 0, error: (null). The request is OK and shows a map when sent through a browser. Fiddler proxy gives a short explanation about what goes wrong and it says that the request headers can?t be parsed. I do not understand what it means but it looks obvious that the issue is in GDAL, not in Mapserver. Even R. may be reading but you can also send mail to gdal-dev list. Include your XML file and ask why gdal_translate -outsize 400 400 rest.xml out.tif --debug o gives an error. -Jukka Rahkonen- Robert Sanson wrote: Hi I am trying to cascade a remote ESRI REST image service via my Mapserver mapfile. Here is my XML file: http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/MapServer xyXY 3857 image/jpeg 1.53E7 -2950000.0 1.781E7 -5070000.0 256256 Here is my mapfile layer: LAYER NAME sixmaps GROUP 'highres' TYPE RASTER STATUS ON DATA "/mnt/gisdata/data/aus/sixmaps.xml" PROCESSING "OVERSAMPLE_RATIO=1.0" PROJECTION "init=epsg:3857" END METADATA "wms_title" "sixmaps" "wms_name" "sixmaps" "wms_srs" "EPSG:3857" END END When I try and request a map using a WMS GetMap request, this is the error message I get: msDrawMap(): Image handling error. Failed to draw layer named 'sixmaps'. drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: GetBlockRef failed at X block offset 0, Y block offset 0 Can anyone point out where the problem is? Many thanks, Robert L. Sanson -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Wed Apr 27 01:48:22 2016 From: even.rouault at spatialys.com (Even Rouault) Date: Wed, 27 Apr 2016 10:48:22 +0200 Subject: [mapserver-users] Mapserver - cascading a remote ESRI REST service In-Reply-To: <2d4b930794384e56ac9321db03297371@C119S212VM022.msvyvi.vaha.local> References: <2d4b930794384e56ac9321db03297371@C119S212VM022.msvyvi.vaha.local> Message-ID: <201604271048.22625.even.rouault@spatialys.com> Le mercredi 27 avril 2016 09:32:36, Rahkonen Jukka (MML) a ?crit : > Hi, > > I copied your XML definition file and made a test with GDAL. My command > was: gdal_translate -outsize 400 400 rest.xml out.tif --debug o > > Result is an error: > > 0ERROR 1: GDALWMS: Unable to download block 0, 0. > URL: > http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/ > MapServer > > /export?f=image&bbox=15300000.00000000,-5070000.00000000,17810000.00000000 > ,- > 2950000.00000000&size=256,256&dpi=&imageSR=3857&bboxSR=3857&format=image/j > peg&la > yerdefs=&layers=&transparent=false&time=&layerTimeOptions=&dynamicLayers= > HTTP status code: 400, error: (null). > Add the HTTP status code to to ignore that error (see > http: //www.gdal.org/frmt_wms.html). > ERROR 1: rest.xml, band 1: IReadBlock failed at X offset 0, Y offset 0 > > With another proxy I get similar error but different code > HTTP status code: 0, error: (null). > > The request is OK and shows a map when sent through a browser. > > Fiddler proxy gives a short explanation about what goes wrong and it says > that the request headers can?t be parsed. I do not understand what it > means but it looks obvious that the issue is in GDAL, not in Mapserver. > > Even R. may be reading but you can also send mail to gdal-dev list. Include > your XML file and ask why gdal_translate -outsize 400 400 rest.xml out.tif > --debug o gives an error. > > > -Jukka Rahkonen- > > Robert Sanson wrote: > > > Hi > > I am trying to cascade a remote ESRI REST image service via my Mapserver > mapfile. > > Here is my XML file: > > > > > > http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/M > apServer --> white spaces and newline matter inside a XML element (at least for the XML parser used by GDAL). If you remove them, like the following, it will work http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/MapServer > xyXY > 3857 > image/jpeg > > > 1.53E7 > -2950000.0 > 1.781E7 > -5070000.0 > 256256 > > > > Here is my mapfile layer: > > LAYER > NAME sixmaps > GROUP 'highres' > TYPE RASTER > STATUS ON > DATA "/mnt/gisdata/data/aus/sixmaps.xml" > PROCESSING "OVERSAMPLE_RATIO=1.0" > PROJECTION > "init=epsg:3857" > END > METADATA > "wms_title" "sixmaps" > "wms_name" "sixmaps" > "wms_srs" "EPSG:3857" > END > END > > When I try and request a map using a WMS GetMap request, this is the error > message I get: > > > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"> > > > msDrawMap(): Image handling error. Failed to draw layer named > 'sixmaps'. drawGDAL(): Unable to access file. > GDALDatasetRasterIO() failed: GetBlockRef failed at X block offset 0, Y > block offset 0 > > > Can anyone point out where the problem is? > > Many thanks, > > Robert L. Sanson -- Spatialys - Geospatial professional services http://www.spatialys.com From bob.basques at ci.stpaul.mn.us Wed Apr 27 09:01:08 2016 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Wed, 27 Apr 2016 16:01:08 +0000 Subject: [mapserver-users] Ping a WMS service. Message-ID: <6D67BCA5-3D12-48CD-93B2-577B0D606F2C@ci.stpaul.mn.us> All, Not really MapServer specific, but possibly related, does anyone have an idea of how to best ?ping? a WMS (and maybe also a WFS) to see if it?s active, only want to know that the service is active and able to take requests. I?m thinking about building a Dashboard for our layers for checking their health. I don?t want to use GetCapabilities if I can get away with it. We already have some similar tools for actually requesting the Image tiles, or other resources from MapServer WMSs. Also, there may be some future additions for adding in Offsite WMS services being imported. I want to start with our own services though. The majority of our layers pass through MapServer, so maybe there is some trick for MapServer that would work. Each of our layers has it?s own mapfile. There is a consolidated WMS for all the layers as well, if there is a WMS specific way of doing this. The intent is to run something that is really fast, or as fast as possible on a periodic basis. Thoughts? bobb ?There is nothing quite so useless as doing with great efficiency something that should not be done at all.? - Peter Drucker -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmorissette at mapgears.com Wed Apr 27 09:06:58 2016 From: dmorissette at mapgears.com (Daniel Morissette) Date: Wed, 27 Apr 2016 12:06:58 -0400 Subject: [mapserver-users] Ping a WMS service. In-Reply-To: <6D67BCA5-3D12-48CD-93B2-577B0D606F2C@ci.stpaul.mn.us> References: <6D67BCA5-3D12-48CD-93B2-577B0D606F2C@ci.stpaul.mn.us> Message-ID: <5720E3A2.4000107@mapgears.com> You may want to check out Tom's http://geohealthcheck.osgeo.org/ Source code is on github, linked from the help page. On 2016-04-27 12:01 PM, Basques, Bob (CI-StPaul) wrote: > > All, > > Not really MapServer specific, but possibly related, does anyone have an > idea of how to best ?ping? a WMS (and maybe also a WFS) to see if it?s > active, only want to know that the service is active and able to take > requests. > > I?m thinking about building a Dashboard for our layers for checking > their health. I don?t want to use GetCapabilities if I can get away > with it. We already have some similar tools for actually requesting the > Image tiles, or other resources from MapServer WMSs. Also, there may be > some future additions for adding in Offsite WMS services being imported. > I want to start with our own services though. > > The majority of our layers pass through MapServer, so maybe there is > some trick for MapServer that would work. Each of our layers has it?s > own mapfile. There is a consolidated WMS for all the layers as well, if > there is a WMS specific way of doing this. > > The intent is to run something that is really fast, or as fast as > possible on a periodic basis. > > Thoughts? > > bobb > > > > > > > ?There is nothing quite so useless as doing with great efficiency > something that should not be done at all.? > - Peter Drucker > > > > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Daniel Morissette http://www.mapgears.com/ T: +1 418-696-5056 #201 http://evouala.com/ - Location Intelligence Made Easy From reuven at levitt.net Wed Apr 27 11:29:30 2016 From: reuven at levitt.net (reuven at levitt.net) Date: Wed, 27 Apr 2016 21:29:30 +0300 Subject: [mapserver-users] Fw: new message Message-ID: <0000ac3c9781$8a9a52dc$62877924$@levitt.net> Hello! You have a new message, please read reuven at levitt.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Sanson at asurequality.com Wed Apr 27 15:12:59 2016 From: Robert.Sanson at asurequality.com (Robert Sanson) Date: Wed, 27 Apr 2016 22:12:59 +0000 Subject: [mapserver-users] Mapserver - cascading a remote ESRI REST service In-Reply-To: <201604271048.22625.even.rouault@spatialys.com> References: <2d4b930794384e56ac9321db03297371@C119S212VM022.msvyvi.vaha.local> <201604271048.22625.even.rouault@spatialys.com> Message-ID: Thanks for that. What values should I use for and in the DataWindow section when the service is a tiled cache made up of many different images with differing pixel resolutions? Thanks, Robert -----Original Message----- From: Even Rouault [mailto:even.rouault at spatialys.com] Sent: Wednesday, 27 April 2016 8:48 p.m. To: mapserver-users at lists.osgeo.org Cc: Rahkonen Jukka (MML) ; Robert Sanson Subject: Re: [mapserver-users] Mapserver - cascading a remote ESRI REST service Le mercredi 27 avril 2016 09:32:36, Rahkonen Jukka (MML) a ?crit : > Hi, > > I copied your XML definition file and made a test with GDAL. My > command > was: gdal_translate -outsize 400 400 rest.xml out.tif --debug o > > Result is an error: > > 0ERROR 1: GDALWMS: Unable to download block 0, 0. > URL: > http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Be > st/ > MapServer > > /export?f=image&bbox=15300000.00000000,-5070000.00000000,17810000.0000 > 0000 > ,- > 2950000.00000000&size=256,256&dpi=&imageSR=3857&bboxSR=3857&format=ima > ge/j > peg&la > yerdefs=&layers=&transparent=false&time=&layerTimeOptions=&dynamicLaye > rs= > HTTP status code: 400, error: (null). > Add the HTTP status code to to ignore that error > (see > http: //www.gdal.org/frmt_wms.html). > ERROR 1: rest.xml, band 1: IReadBlock failed at X offset 0, Y offset 0 > > With another proxy I get similar error but different code HTTP status > code: 0, error: (null). > > The request is OK and shows a map when sent through a browser. > > Fiddler proxy gives a short explanation about what goes wrong and it > says that the request headers can?t be parsed. I do not understand > what it means but it looks obvious that the issue is in GDAL, not in Mapserver. > > Even R. may be reading but you can also send mail to gdal-dev list. > Include your XML file and ask why gdal_translate -outsize 400 400 > rest.xml out.tif --debug o gives an error. > > > -Jukka Rahkonen- > > Robert Sanson wrote: > > > Hi > > I am trying to cascade a remote ESRI REST image service via my > Mapserver mapfile. > > Here is my XML file: > > > > > > http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Be > st/M > apServer --> white spaces and newline matter inside a XML element (at least for --> the XML parser used by GDAL). If you remove them, like the following, it will work http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/MapServer > xyXY > 3857 > image/jpeg > > > 1.53E7 > -2950000.0 > 1.781E7 > -5070000.0 > 256256 > > > > Here is my mapfile layer: > > LAYER > NAME sixmaps > GROUP 'highres' > TYPE RASTER > STATUS ON > DATA "/mnt/gisdata/data/aus/sixmaps.xml" > PROCESSING "OVERSAMPLE_RATIO=1.0" > PROJECTION > "init=epsg:3857" > END > METADATA > "wms_title" "sixmaps" > "wms_name" "sixmaps" > "wms_srs" "EPSG:3857" > END > END > > When I try and request a map using a WMS GetMap request, this is the > error message I get: > > ServiceExceptionReport SYSTEM > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"> > > msDrawMap(): Image handling error. Failed to draw layer named > 'sixmaps'. drawGDAL(): Unable to access file. > GDALDatasetRasterIO() failed: GetBlockRef failed at X block offset 0, > Y block offset 0 > > Can anyone point out where the problem is? > > Many thanks, > > Robert L. Sanson -- Spatialys - Geospatial professional services http://www.spatialys.com From ian.walberg at airborne.aero Wed Apr 27 18:52:56 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Thu, 28 Apr 2016 01:52:56 +0000 Subject: [mapserver-users] MAP file INCLUDE with wildcard Message-ID: Folks, We would like to include multiple map files using a wildcard filename. Can this be done today? If not can we add this to the feature enhancement wish list? Thanks Ian From schepers at rvr-online.de Wed Apr 27 23:12:18 2016 From: schepers at rvr-online.de (Schepers, Benjamin) Date: Thu, 28 Apr 2016 06:12:18 +0000 Subject: [mapserver-users] MAP file INCLUDE with wildcard In-Reply-To: References: Message-ID: <7088A26751CB34409B159B4237D510A832FA25FE@W2K8-EXDB01.VERBAND.LOCAL> Hi, it doesn't work out of the box with typical wildcards as *?. Maybe this could be done with some naming-conventions and a wrapper-script [http://mapserver.org/cgi/wrapper.html] adding something like "cat" with wildcards on "include-files" before mapserver execution. i.e cat ways_*.layer > all_ways.include "all_ways.include" would be referenced in your mapfile. With this method you could also realize user specific mapfiles or other kinds of differentiation. but as stated on the above link, using a wrapper script is inefficient because of process-spawning... and I'm sure, sooner or later exhaustive use of this method will also lead to mapfile-chaos ;-) Benjamin Schepers Luftbild und Geoinformationssysteme luftbilder.geoportal.ruhr schepers at rvr-online.de Kronprinzenstra?e 35 45128 Essen Germany www.metropoleruhr.de From jmckenna at gatewaygeomatics.com Thu Apr 28 07:29:15 2016 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 28 Apr 2016 11:29:15 -0300 Subject: [mapserver-users] MAP file INCLUDE with wildcard In-Reply-To: References: Message-ID: <57221E3B.4010908@gatewaygeomatics.com> Hi Ian, This would be a very useful enhancement, to help managing mapfile layers. Would you file a ticket for this? (just so the idea is not lost in email archives) Once the ticket is filed, we can apply the "Enhancement" label: here is a list of the open enhancements https://github.com/mapserver/mapserver/labels/Enhancement -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-27 10:52 PM, Ian Walberg wrote: > Folks, > > We would like to include multiple map files using a wildcard filename. > > Can this be done today? > > If not can we add this to the feature enhancement wish list? > > Thanks > > Ian From ian.walberg at airborne.aero Thu Apr 28 07:54:02 2016 From: ian.walberg at airborne.aero (Ian Walberg) Date: Thu, 28 Apr 2016 14:54:02 +0000 Subject: [mapserver-users] MAP file INCLUDE with wildcard In-Reply-To: <57221E3B.4010908@gatewaygeomatics.com> References: <57221E3B.4010908@gatewaygeomatics.com> Message-ID: Folks, Just added. https://github.com/mapserver/mapserver/issues/5276 Ian -----Original Message----- From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna Sent: Thursday, April 28, 2016 7:29 AM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] MAP file INCLUDE with wildcard Hi Ian, This would be a very useful enhancement, to help managing mapfile layers. Would you file a ticket for this? (just so the idea is not lost in email archives) Once the ticket is filed, we can apply the "Enhancement" label: here is a list of the open enhancements https://github.com/mapserver/mapserver/labels/Enhancement -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2016-04-27 10:52 PM, Ian Walberg wrote: > Folks, > > We would like to include multiple map files using a wildcard filename. > > Can this be done today? > > If not can we add this to the feature enhancement wish list? > > Thanks > > Ian _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From support at satshot.com Thu Apr 28 16:15:04 2016 From: support at satshot.com (support at satshot.com) Date: Fri, 29 Apr 2016 02:15:04 +0300 Subject: [mapserver-users] Fw: new message Message-ID: <00004007f545$829e4865$3e51bc53$@satshot.com> Hello! You have a new message, please read support at satshot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From karsten at terragis.net Tue Apr 5 00:44:37 2016 From: karsten at terragis.net (karsten) Date: Tue, 05 Apr 2016 07:44:37 -0000 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? In-Reply-To: <4fe6ad2984d34792ad8ec67d60f20e5c@C119S212VM022.msvyvi.vaha.local> References: <4fe6ad2984d34792ad8ec67d60f20e5c@C119S212VM022.msvyvi.vaha.local> Message-ID: <068FA9BADF624577B8CDAB54A4EBA474@terragis2> Hi, Thanks for our response. I don't think that is the issue because the apparent 'download' of the mapserv executable is only because browsers in this case do not 'understand' the mine type of the response . Regularly the response is just a text file but apparently a 'download' of mapserv... I fact you can usually rename the downloaded mapserv and rename as a text file then read the error message. I have in any Apache configuration ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted Cheers Karsten _____ From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Tuesday, April 05, 2016 0:17 To: karsten at terragis.net; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? Hi, I believe that there is something wrong with the configuration of your http server. It does not seem to know that you do not want to download the mapserv binary but make the binary to work for you. If you run Apache I would have a look at ?ScriptAlias? in the httpd.conf file and check that the directory where you have placed the mapserv binary is configured to contain applications. This example is from Windows. # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "/ms4w/Apache/cgi-bin/" ScriptAlias /fcgi-bin/ "/ms4w/Apache/cgi-bin/" -Jukka Rahkonen- karsten wrote: Hi All, I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can getv the follwoing output from the executable: /usr/lib/cgi-bin# ./mapserv -v MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Howvere when I try to get a get aresponse to a request e.g. 136.243.250.62/cgi-bin/mapserv or aslo when I try a getcapabiliteis request like http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map &VERSION=1.1.1&REQUEST=getCapabilities&SERVICE=wms I always get a 'binary file back' output like below the line . Would anybody know what could have gone wrong or where to start figuring this out ? Cheers Karsten Karsten Vennemann Terra GIS LTD .----------------binary output below? ----------------- ELF > ? @ @ P" @ 8 @ ? @ @ @ @ @ ? ? 8 8@ 8@ @ @ ? ?` ?` ( ? ?` ?` ? ? T T@ T@ D D P?td ? ?@ ?@ < < Q?td R?td ? ?` ?` /lib64/ld-linux-x86-64.so.2 GNU  GNU O ~a?; ?k*BU??~6? ? ??! ? @? " * j C????|(? CE??j?|2b???qX 8?? ??????? :? ?K????? ?? ??? ?   ?  ?  e  ?  m  / ?   ?  Y  l  ?  ?  > `  9  ?  ?  ?  ?   R t  /  ?  y  ?  b ? ` ? !` ?  !` ? ? ` ?  $@ h  ? @ ? ? ` ?  !` o  @@ e y  @ d ? ` ?  ?@ \  ?@ R  ?@   ?@ G libmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ _Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers msFreeMapServObj msDebug loadParams msCGIWriteError msIO_fprintf msGetVersion msCGIWriteLog msSetup msGetGlobalDebugLevel msCGIDispatchRequest msCGILoadMap msAllocMapServObj msCleanup msIO_setHeaderEnabled libc.so.6 fflush exit strncmp signal puts putchar putenv stdout stderr gettimeofday strcmp __libc_start_main _edata __bss_start _end /src/ms/mapserver-7.0.1/build:/usr/local/lib::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: __libc_csu_fini __data_start __libc_csu_init msCleanupOnSignal _IO_stdin_used GLIBC_2.2.5 O ui ??` !` !` % ` ` ( ` 0 ` 8 ` @ ` H ` P ` X ` ` ` h ` p ` x ` ? ` ? `  ? `  ? `  `  ? `  ? ` ? ` ? ` ? ` ? ` ? ` ? ` H??H?? H??t?? H??? ?5? ?%? ?@ ?%? h ??????%? h ??????%? h ??????%? h ??????%? h ? ????%? h ??????%? h ??????%? h ?p????%? h ?`????%z h ?P????%r h ?@????%j  h ?0????%b h ? ????%Z h ?????%R h ? ????%J h ??????%B h ??????%: h ??????%2 h ??????%* h ??????%" h ? ????% h ??????% h ??????%  h ?p????% h ?`????%? h ?P???1?I??^H??H???PTI???@ H??@@ H??$@ ?g????f?D ?? ` UH-? ` H?? H??w]?? H??t?]?? ` ???? ?? ` UH-? ` H??H??H??H???H?H??u]?? H??t?]H???? ` ???? ?=y uUH???~???]?f ???@ H?=H t?? H??tU? ?` H????]?{???? ?s???UH??H???}?? ? ? ????H? ??@ H??? ?;????????? ? ???UH??SH??h?}?H?u??E? H?E? ?(?????tH?E?H????????S???? ????????????vH?E?? H???^????E ?? ?E H?H?? H?E?H?H? ??@ H?????????u&????H???????H?6 H???????? ?T????E H?H?? H?E?H?H? ??@ H???`?????u?E? ? ?+????? ?E H?H?? H?E?H?H? ? ??@ H???=?????u.??@ ?o????E H?H?? H?E?H?H? H???P???? ?E H?H?? H?E?H?H? ?@ H?????????t(?E H?H?? H?E?H?H? ? @ H?????????uP?@ ?????? ??????P@ ??????`@ ???????@ ???????@ ??????@ ?????? ?????E ?E ;E??i?????@ ? ?l?????@ ? ?]????H???H?E?H?E??U??PH?E?H?XH?E?H?@A? ? ? ? H????????CH?E?H?@?@???u H?E?H???n????pH?E?H??? ???H?U?H?BH?E?H?@H??u H?E?H????????AH?E?H?@??H? ??~H?E?? H???????H?E?H???M?????t H?E?H????????H?E?H?@H??t{H?E?H?@??H ? ??~hH?E?? H???????H?E??H*?H?E??H*??a ?^??X?H?E??H*?H?E??H*??? ?^??X??\??X@ ? ?D???H?E?? H???????H?E?H????????b?????vhH?E?? H??? ???H?E??H*?H?E??H*??? ?^??X?H?E??H*?H?E??H*??? ?^??X??\???@ ? ??????????? ?????f?D AWA??AVI??AUI??ATL?%? UH?-? SL)?1?H??H???????H??t??? L??L??D??A??H??H9?u?H??[]A\A]A^A_?ff.?? ?? H??H??? In msCleanupOnSignal. -v -nh QUERY_STRING= REQUEST_METHOD=GET --h --help Usage: mapserv [--help] [-v] [-nh] [QUERY_STRING=value] Options : -h, --help Display this help message. -v Display version and exit. -nh Suppress HTTP headers in CGI mode. QUERY_STRING=value Set the QUERY_STRING in GET request mode. mapserv request processing time (msLoadMap not incl.): %.3fs mapserv total execution time: %.3fs ??.A;< x???? (???X ???? \???? x???? ????8  zR x? ????*  zR x? $ ????? F J w? ?;*3$" D ]???G A ?C d ???? A ?C E? D ? ????e B ?E ?E ?E (?H 0?H 8?M @l 8A 0A (B B B B  ? ???? -------------- next part -------------- An HTML attachment was scrubbed... URL: From karsten at terragis.net Tue Apr 5 09:35:45 2016 From: karsten at terragis.net (karsten) Date: Tue, 05 Apr 2016 16:35:45 -0000 Subject: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? In-Reply-To: <4fe6ad2984d34792ad8ec67d60f20e5c@C119S212VM022.msvyvi.vaha.local> References: <4fe6ad2984d34792ad8ec67d60f20e5c@C119S212VM022.msvyvi.vaha.local> Message-ID: <9B956EF8D52B49E69121B36724A86389@terragis2> Hi All, thanks to all the responses. It was neither one of ( cgi-bin permissions for Apache nor the Script alias) Both where in line with what everyone said/ listed. The issue was that I did not have the cgi module for Apache enabled :( I enabled it with a2enmod cgi service apache2 restart and then everything worked for mapserver, perl script etc. I did only find out because I places a simple Perl script in cgi-bin that also was downloaded instead of executed . Thanks for the answers they brought me on the right track ! Cheers Karsten _____ From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: Tuesday, April 05, 2016 0:17 To: karsten at terragis.net; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ? Hi, I believe that there is something wrong with the configuration of your http server. It does not seem to know that you do not want to download the mapserv binary but make the binary to work for you. If you run Apache I would have a look at ?ScriptAlias? in the httpd.conf file and check that the directory where you have placed the mapserv binary is configured to contain applications. This example is from Windows. # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "/ms4w/Apache/cgi-bin/" ScriptAlias /fcgi-bin/ "/ms4w/Apache/cgi-bin/" -Jukka Rahkonen- karsten wrote: Hi All, I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can getv the follwoing output from the executable: /usr/lib/cgi-bin# ./mapserv -v MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Howvere when I try to get a get aresponse to a request e.g. 136.243.250.62/cgi-bin/mapserv or aslo when I try a getcapabiliteis request like http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map &VERSION=1.1.1&REQUEST=getCapabilities&SERVICE=wms I always get a 'binary file back' output like below the line . Would anybody know what could have gone wrong or where to start figuring this out ? Cheers Karsten Karsten Vennemann Terra GIS LTD .----------------binary output below? ----------------- ELF > ? @ @ P" @ 8 @ ? @ @ @ @ @ ? ? 8 8@ 8@ @ @ ? ?` ?` ( ? ?` ?` ? ? T T@ T@ D D P?td ? ?@ ?@ < < Q?td R?td ? ?` ?` /lib64/ld-linux-x86-64.so.2 GNU  GNU O ~a?; ?k*BU??~6? ? ??! ? @? " * j C????|(? CE??j?|2b???qX 8?? ??????? :? ?K????? ?? ??? ?   ?  ?  e  ?  m  / ?   ?  Y  l  ?  ?  > `  9  ?  ?  ?  ?   R t  /  ?  y  ?  b ? ` ? !` ?  !` ? ? ` ?  $@ h  ? @ ? ? ` ?  !` o  @@ e y  @ d ? ` ?  ?@ \  ?@ R  ?@   ?@ G libmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ _Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers msFreeMapServObj msDebug loadParams msCGIWriteError msIO_fprintf msGetVersion msCGIWriteLog msSetup msGetGlobalDebugLevel msCGIDispatchRequest msCGILoadMap msAllocMapServObj msCleanup msIO_setHeaderEnabled libc.so.6 fflush exit strncmp signal puts putchar putenv stdout stderr gettimeofday strcmp __libc_start_main _edata __bss_start _end /src/ms/mapserver-7.0.1/build:/usr/local/lib::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: __libc_csu_fini __data_start __libc_csu_init msCleanupOnSignal _IO_stdin_used GLIBC_2.2.5 O ui ??` !` !` % ` ` ( ` 0 ` 8 ` @ ` H ` P ` X ` ` ` h ` p ` x ` ? ` ? `  ? `  ? `  `  ? `  ? ` ? ` ? ` ? ` ? ` ? ` ? ` H??H?? H??t?? H??? ?5? ?%? ?@ ?%? h ??????%? h ??????%? h ??????%? h ??????%? h ? ????%? h ??????%? h ??????%? h ?p????%? h ?`????%z h ?P????%r h ?@????%j  h ?0????%b h ? ????%Z h ?????%R h ? ????%J h ??????%B h ??????%: h ??????%2 h ??????%* h ??????%" h ? ????% h ??????% h ??????%  h ?p????% h ?`????%? h ?P???1?I??^H??H???PTI???@ H??@@ H??$@ ?g????f?D ?? ` UH-? ` H?? H??w]?? H??t?]?? ` ???? ?? ` UH-? ` H??H??H??H???H?H??u]?? H??t?]H???? ` ???? ?=y uUH???~???]?f ???@ H?=H t?? H??tU? ?` H????]?{???? ?s???UH??H???}?? ? ? ????H? ??@ H??? ?;????????? ? ???UH??SH??h?}?H?u??E? H?E? ?(?????tH?E?H????????S???? ????????????vH?E?? H???^????E ?? ?E H?H?? H?E?H?H? ??@ H?????????u&????H???????H?6 H???????? ?T????E H?H?? H?E?H?H? ??@ H???`?????u?E? ? ?+????? ?E H?H?? H?E?H?H? ? ??@ H???=?????u.??@ ?o????E H?H?? H?E?H?H? H???P???? ?E H?H?? H?E?H?H? ?@ H?????????t(?E H?H?? H?E?H?H? ? @ H?????????uP?@ ?????? ??????P@ ??????`@ ???????@ ???????@ ??????@ ?????? ?????E ?E ;E??i?????@ ? ?l?????@ ? ?]????H???H?E?H?E??U??PH?E?H?XH?E?H?@A? ? ? ? H????????CH?E?H?@?@???u H?E?H???n????pH?E?H??? ???H?U?H?BH?E?H?@H??u H?E?H????????AH?E?H?@??H? ??~H?E?? H???????H?E?H???M?????t H?E?H????????H?E?H?@H??t{H?E?H?@??H ? ??~hH?E?? H???????H?E??H*?H?E??H*??a ?^??X?H?E??H*?H?E??H*??? ?^??X??\??X@ ? ?D???H?E?? H???????H?E?H????????b?????vhH?E?? H??? ???H?E??H*?H?E??H*??? ?^??X?H?E??H*?H?E??H*??? ?^??X??\???@ ? ??????????? ?????f?D AWA??AVI??AUI??ATL?%? UH?-? SL)?1?H??H???????H??t??? L??L??D??A??H??H9?u?H??[]A\A]A^A_?ff.?? ?? H??H??? In msCleanupOnSignal. -v -nh QUERY_STRING= REQUEST_METHOD=GET --h --help Usage: mapserv [--help] [-v] [-nh] [QUERY_STRING=value] Options : -h, --help Display this help message. -v Display version and exit. -nh Suppress HTTP headers in CGI mode. QUERY_STRING=value Set the QUERY_STRING in GET request mode. mapserv request processing time (msLoadMap not incl.): %.3fs mapserv total execution time: %.3fs ??.A;< x???? (???X ???? \???? x???? ????8  zR x? ????*  zR x? $ ????? F J w? ?;*3$" D ]???G A ?C d ???? A ?C E? D ? ????e B ?E ?E ?E (?H 0?H 8?M @l 8A 0A (B B B B  ? ???? -------------- next part -------------- An HTML attachment was scrubbed... URL: