From aperi2007 at gmail.com Sun Mar 1 01:17:34 2015 From: aperi2007 at gmail.com (Andrea Peri) Date: Sun, 1 Mar 2015 10:17:34 +0100 Subject: [mapserver-users] How reproduce a false color NDVI. Message-ID: Hi, we have a set of tiffs georef with 4th bands of color RGB and Infrared. We need to activate a wms with the color from the NDVI index NDVI = Normalized Difference Vegetation Index NIR - RED NDVI = ------------- NIR + RED Where NIR is the 4th band, RED s the 1th band. We prefer dont' do a physical float raster, but retrieve this realtime from the original tiffs. I try to reproduce this index NDVI using to a LUT table in MapServer, but without any success. There is some other solution to obtain this on mapserver. Thx to everyone. -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From even.rouault at spatialys.com Sun Mar 1 01:35:47 2015 From: even.rouault at spatialys.com (Even Rouault) Date: Sun, 1 Mar 2015 10:35:47 +0100 Subject: [mapserver-users] How reproduce a false color NDVI. In-Reply-To: References: Message-ID: <201503011035.48068.even.rouault@spatialys.com> Le dimanche 01 mars 2015 10:17:34, Andrea Peri a ?crit : > Hi, > we have a set of tiffs georef with 4th bands of color RGB and Infrared. > We need to activate a wms with the color from the NDVI index > > NDVI = Normalized Difference Vegetation Index > > NIR - RED > NDVI = ------------- > NIR + RED > > > Where NIR is the 4th band, > RED s the 1th band. > > We prefer dont' do a physical float raster, but retrieve this realtime from > the original tiffs. > > I try to reproduce this index NDVI using to a LUT table in MapServer, > but without any success. > There is some other solution to obtain this on mapserver. Andrea, It turns out that the same question was asked more than 10 years ago : http://lists.osgeo.org/pipermail/mapserver-users/2004-July/053754.html Since them, GDAL has the VRT format. With derived bands (described near the end of http://gdal.org/gdal_vrttut.html), you could do that but that requires writing a custom function in C, which isn't very convenient for integration with MapServer. It would be nice to add the capability of writing pixel functions in Python. Even -- Spatialys - Geospatial professional services http://www.spatialys.com From Steve.Toutant at inspq.qc.ca Sun Mar 1 17:28:50 2015 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Sun, 1 Mar 2015 20:28:50 -0500 Subject: [mapserver-users] WFS filter creates a query using a number instead of text In-Reply-To: <75E5EC7D-128B-4DA2-A74A-4F3CCA3E6C8F@hbaspecto.com> References: <1425014912697-5190393.post@n6.nabble.com> <1425020122084.11966@maanmittauslaitos.fi> <75E5EC7D-128B-4DA2-A74A-4F3CCA3E6C8F@hbaspecto.com> Message-ID: Mapserver 7 beta solved this issue.At least for my use cases...... with and without using gml_[item name]_type John Abraham @lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2015-02-27 09:05 A "Rahkonen Jukka (MML)" cc "mapserver-users at lists.osgeo.org" , "bteluk at gmail.com" Objet Re: [mapserver-users] WFS filter creates a query using a number instead of text On Feb 26, 2015, at 11:55 PM, Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: You can also try to add gml_[item name]_type into the layer metadata I have to add gml_[item name]_type in all my map files, to make them work as wfs in my context. -- John Abraham Sent from my iPhone, please excuse any typos. _______________________________________________ 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 bteluk at gmail.com Sun Mar 1 17:56:20 2015 From: bteluk at gmail.com (bteluk at gmail.com) Date: Sun, 1 Mar 2015 17:56:20 -0800 (PST) Subject: [mapserver-users] WFS filter creates a query using a number instead of text In-Reply-To: <1425020122084.11966@maanmittauslaitos.fi> References: <1425014912697-5190393.post@n6.nabble.com> <1425020122084.11966@maanmittauslaitos.fi> Message-ID: <1425261380810-5190806.post@n6.nabble.com> Thanks Jukka - I'll try your suggestion for OGR connection-type first, since that's easy for me to test on our existing platform. I have tried the "PropertyIsLike" and that definitely works. It'll take me a little bit longer to "spin up" a more recent version of the software packages... Regards, Bill. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WFS-filter-creates-a-query-using-a-number-instead-of-text-tp5130361p5190806.html Sent from the Mapserver - User mailing list archive at Nabble.com. From bteluk at gmail.com Sun Mar 1 19:32:17 2015 From: bteluk at gmail.com (bteluk at gmail.com) Date: Sun, 1 Mar 2015 19:32:17 -0800 (PST) Subject: [mapserver-users] WFS filter creates a query using a number instead of text In-Reply-To: <1425261380810-5190806.post@n6.nabble.com> References: <1425014912697-5190393.post@n6.nabble.com> <1425020122084.11966@maanmittauslaitos.fi> <1425261380810-5190806.post@n6.nabble.com> Message-ID: <1425267137225-5190809.post@n6.nabble.com> Hi Jukka - I've tried testing your other suggestion: OK - I've tried using the OGR CONNECTIONTYPE - it no longer generates an error message, but comes back with a null result set. Checking the logs reveals that the error is now apparently being pushed further back up the stack - eg the Postgres logs are clear (strangely) but the MapServer debug log reports an error as follows: I guess effectively the same error as before - there's no quoting in the string literal (not sure why the Postgres log shouldn't still report this error...?) Testing the OGR config with WFS operator "PropertyIsLike", works (as did the PostGIS driver.) I think I'll use this method for the moment as it will work with our production system. Thanks again! Steve - good to know that v7 works. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WFS-filter-creates-a-query-using-a-number-instead-of-text-tp5130361p5190809.html Sent from the Mapserver - User mailing list archive at Nabble.com. From A.Abhayasinghe at bom.gov.au Sun Mar 1 19:40:39 2015 From: A.Abhayasinghe at bom.gov.au (aabhayas) Date: Sun, 1 Mar 2015 19:40:39 -0800 (PST) Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: References: <1424670657919-5189325.post@n6.nabble.com> <1424671042304.5557@maanmittauslaitos.fi> <1424823711617-5189823.post@n6.nabble.com> Message-ID: <1425267639636-5190810.post@n6.nabble.com> After profiling version 6.0.4 and 6.2.2 MapServer we were able to isolate the issue. It seems that the issues is related to ?OWS_LAYER_GROUP? under LAYER>METADATA in our map files. When ?OWS_LAYER_GROUP? is not used in the map file, GetCapabilities request on version 6.2.2 is significantly faster (was comparable with the timing on version 6.0.2) Profiling showed us that version 6.2.2 is taking significantly more time on ?msWMSPrepareNestedGroups? function in mapwms.c file. Especially ?strcasecmp? function in side ?msWMSPrepareNestedGroups? is taking significant time. When we compare the source of mapwms.c, we noticed that there are some additional processing happening in the ?else? block ? /* split into subgroups. Start at address + 1 because the first '/' would cause an extra empty group */? . ?else? block in Version 6.0.4 looks like following ( line 1900 in mapwms.c) ////////////////////////// else { /* split into subgroups. Start at adres + 1 because the first '/' would cause an extra emtpy group */ nestedGroups[i] = msStringSplit(groups + 1, '/', &numNestedGroups[i]); } //////////////////////////// But the ?else? block in version 6.2.2 looks like following with the additional processing ( line 371 in mapwms.c) ///////////////////////////////////////////////////// else { /* split into subgroups. Start at address + 1 because the first '/' would cause an extra empty group */ nestedGroups[i] = msStringSplit(groups + 1, '/', &numNestedGroups[i]); /* */ for (j = 0; j < map->numlayers; j++) { if (isUsedInNestedGroup[j]) continue; for (k=0; kname && strcasecmp(GET_LAYER(map, j)->name, nestedGroups[i][k]) == 0 ) { isUsedInNestedGroup[j] = 1; break; } } } ////////////////////////////////////////////////////// -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5190810.html Sent from the Mapserver - User mailing list archive at Nabble.com. From aperi2007 at gmail.com Mon Mar 2 15:34:49 2015 From: aperi2007 at gmail.com (aperi2007) Date: Tue, 03 Mar 2015 00:34:49 +0100 Subject: [mapserver-users] How reproduce a false color NDVI. In-Reply-To: <201503011035.48068.even.rouault@spatialys.com> References: <201503011035.48068.even.rouault@spatialys.com> Message-ID: <54F4F399.1030809@gmail.com> Hi Even, I'll try to test the usage of the VRT format (I never use it before). Thx, Andrea. Il 01/03/2015 10:35, Even Rouault ha scritto: > Le dimanche 01 mars 2015 10:17:34, Andrea Peri a ?crit : >> Hi, >> we have a set of tiffs georef with 4th bands of color RGB and Infrared. >> We need to activate a wms with the color from the NDVI index >> >> NDVI = Normalized Difference Vegetation Index >> >> NIR - RED >> NDVI = ------------- >> NIR + RED >> >> >> Where NIR is the 4th band, >> RED s the 1th band. >> >> We prefer dont' do a physical float raster, but retrieve this realtime from >> the original tiffs. >> >> I try to reproduce this index NDVI using to a LUT table in MapServer, >> but without any success. >> There is some other solution to obtain this on mapserver. > Andrea, > > It turns out that the same question was asked more than 10 years ago : > http://lists.osgeo.org/pipermail/mapserver-users/2004-July/053754.html > > Since them, GDAL has the VRT format. With derived bands (described near the > end of http://gdal.org/gdal_vrttut.html), you could do that but that requires > writing a custom function in C, which isn't very convenient for integration > with MapServer. It would be nice to add the capability of writing pixel > functions in Python. > > Even > From even.rouault at spatialys.com Mon Mar 2 21:44:36 2015 From: even.rouault at spatialys.com (Even Rouault) Date: Tue, 3 Mar 2015 06:44:36 +0100 Subject: [mapserver-users] How reproduce a false color NDVI. In-Reply-To: <54F4F399.1030809@gmail.com> References: <201503011035.48068.even.rouault@spatialys.com> <54F4F399.1030809@gmail.com> Message-ID: <201503030644.36377.even.rouault@spatialys.com> Le mardi 03 mars 2015 00:34:49, aperi2007 a ?crit : > Hi Even, > > I'll try to test the usage of the VRT format (I never use it before). Andrea, My point was that wile it could be potentially an interesting way of doing it, in the current state of things, you need to write a C function, link it with GDAL or MapServer, and call a register function, which likely makes it impractical for most people. Even > > Thx, > Andrea. > > Il 01/03/2015 10:35, Even Rouault ha scritto: > > Le dimanche 01 mars 2015 10:17:34, Andrea Peri a ?crit : > >> Hi, > >> we have a set of tiffs georef with 4th bands of color RGB and Infrared. > >> We need to activate a wms with the color from the NDVI index > >> > >> NDVI = Normalized Difference Vegetation Index > >> > >> NIR - RED > >> > >> NDVI = ------------- > >> > >> NIR + RED > >> > >> Where NIR is the 4th band, > >> RED s the 1th band. > >> > >> We prefer dont' do a physical float raster, but retrieve this realtime > >> from the original tiffs. > >> > >> I try to reproduce this index NDVI using to a LUT table in MapServer, > >> but without any success. > >> There is some other solution to obtain this on mapserver. > > > > Andrea, > > > > It turns out that the same question was asked more than 10 years ago : > > http://lists.osgeo.org/pipermail/mapserver-users/2004-July/053754.html > > > > Since them, GDAL has the VRT format. With derived bands (described near > > the end of http://gdal.org/gdal_vrttut.html), you could do that but that > > requires writing a custom function in C, which isn't very convenient for > > integration with MapServer. It would be nice to add the capability of > > writing pixel functions in Python. > > > > Even -- Spatialys - Geospatial professional services http://www.spatialys.com From A.Abhayasinghe at bom.gov.au Tue Mar 3 15:06:52 2015 From: A.Abhayasinghe at bom.gov.au (aabhayas) Date: Tue, 3 Mar 2015 15:06:52 -0800 (PST) Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: <1425267639636-5190810.post@n6.nabble.com> References: <1424670657919-5189325.post@n6.nabble.com> <1424671042304.5557@maanmittauslaitos.fi> <1424823711617-5189823.post@n6.nabble.com> <1425267639636-5190810.post@n6.nabble.com> Message-ID: <1425424012464-5191328.post@n6.nabble.com> Hi Following up on my previous post we still want to use ?OWS_LAYER_GROUP? in our map files. We have large number of layers in our map file ( nearly 800). Currently we are in the process of migrating our MapServer 5.4.2 environment in to MapServer 6.4.1. In MapServer 6.4.1 GetCapabilities request takes more than 1 minute compared 5 second in version 5.4.2. This makes the new environment unusable by our clients. Is there a possibility where someone in the MapServer development team looks in to this and fix this issue. Thanks -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5191328.html Sent from the Mapserver - User mailing list archive at Nabble.com. From bteluk at gmail.com Tue Mar 3 21:11:42 2015 From: bteluk at gmail.com (bteluk at gmail.com) Date: Tue, 3 Mar 2015 21:11:42 -0800 (PST) Subject: [mapserver-users] POST for WMS - supported Message-ID: <1425445902901-5191349.post@n6.nabble.com> Hi all, Are HTTP POST requests supported for WMS GetMap requests? I realise that requests including an SLD are supported... but what about for requests not using an SLD? I'm using MapServer v6.0.3. I've tried to code up the layer name, format, bounds etc as a POSTED request and can't get it to work. I realise it's just as easy to use the GET request, but I'm writing a short library to enable other apps/developers to interact with the MapServer and because some requests will need SLD and some won't, I thought I'd minimise the number of functions by just having a POST version for GetMap rather than a GET version as well. Regards, Bill My URL looks like: http://pucu-gap-02.networks.in.telstra.com.au/cgi-bin/mapserv?map=/volumes/data/mapconfig/globaleye/geinfrastructuredata.map& My request body looks like below: The error reported back: MapServer logs the following error: Note: the equivalent HTTP GET request works fine - URL: http://pucu-gap-02.networks.in.telstra.com.au/cgi-bin/mapserv?map=/volumes/data/mapconfig/globaleye/geinfrastructuredata.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ExchSrvAreaBnd&CRS=EPSG:4283&BBOX=-38.015224,144.9277075,-37.69606,145.2468715&WIDTH=800&HEIGHT=600&FORMAT=image/png&TRANSPARENT=FALSE -- View this message in context: http://osgeo-org.1560.x6.nabble.com/POST-for-WMS-supported-tp5191349.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jukka.rahkonen at maanmittauslaitos.fi Wed Mar 4 00:34:20 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 4 Mar 2015 08:34:20 +0000 Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 Message-ID: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> Hi, I have been wondering also why GetCapabilities response is so slow for us nowadays and I have indeed added lots of groups to some services. +1 from me for having a look at this issue. We just installed 7.0-beta on our test server and GetCapabilities comes slowly from that too. There are about 40 layers in the test service and response time is about 8 seconds. Sometimes I have been wondering if GetCapabilities could be cached and controlled by some new CONFIG key. Cached GetCapabilities could be set to be refreshed for example once per week/day/hour if there is a need to react on changes in the data, and each time after the mapfile has been edited and saved with a new timestamp. -Jukka Rahkonen- aabhayas wrote: > Hi > Following up on my previous post we still want to use ?OWS_LAYER_GROUP? in our map files. We have large number of layers in our map file ( nearly 800). > Currently we are in the process of migrating our MapServer 5.4.2 environment in to MapServer 6.4.1. > In MapServer 6.4.1 GetCapabilities request takes more than 1 minute compared 5 second in version 5.4.2. This makes the new environment unusable by our clients. > Is there a possibility where someone in the MapServer development team looks in to this and fix this issue. > Thanks -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5191328.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 woodbri at swoodbridge.com Wed Mar 4 06:19:07 2015 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 04 Mar 2015 09:19:07 -0500 Subject: [mapserver-users] Arabic text on roads Message-ID: <54F7145B.5000507@swoodbridge.com> Hi all, I'm trying to fix a mapserver install that is displaying Arabic text but it is rendering it backwards ltr instead of rtl. I'm using mapserver 6.2.2 and it is built with fribidi support. Point labels are rendered correctly. On the road labels I changed it from ANGLE FOLLOW to ANGLE AUTO because RFC 98 clearly states ANGLE FOLLOW does not support rtl text until 7.0 Should ANGLE AUTO work with rtl labeling? Thanks, -Steve W From bteluk at gmail.com Wed Mar 4 16:01:10 2015 From: bteluk at gmail.com (bteluk at gmail.com) Date: Wed, 4 Mar 2015 16:01:10 -0800 (PST) Subject: [mapserver-users] POST for WMS - supported In-Reply-To: <1425445902901-5191349.post@n6.nabble.com> References: <1425445902901-5191349.post@n6.nabble.com> Message-ID: <1425513670491-5191552.post@n6.nabble.com> In Section 9.2.4 of the MapServer v6.0 Manual, under "OGC Support and Configuration / WMS Server / WMS 1.3.0 Support / Some Missing features" it lists "WMS 1.3.0 Post request should be an XML document containing the different operations and parameters." (Also appears in the current version documentation v7 beta, although page hasn't been updated since 2013.) - is this suggesting that POST is not supported? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/POST-for-WMS-supported-tp5191349p5191552.html Sent from the Mapserver - User mailing list archive at Nabble.com. From ben at ausvet.com.au Wed Mar 4 21:53:54 2015 From: ben at ausvet.com.au (Ben Madin) Date: Thu, 5 Mar 2015 13:53:54 +0800 Subject: [mapserver-users] WMTS tiles not at correct Latitude (and moving) Message-ID: G?day all, we have set up a map cache wmts layer to produce boundaries for our mapping system. In isolation, it was looking OK, however when we layer the boundaries with any known background (OSM etc) they appear to be offset by a few degrees S (it is all in EPSG:3857) To confuse things more, as we zoom in a couple of layers, this seems to be moving north (which is good), but not enough to converge with our background or data layers - so still bad. I?ve put an image to illustrate this at : https://s3-ap-southeast-2.amazonaws.com/uploads.ausvet.com.au/Misaligned-WMTS.png My guess is I have done something wrong at some level of configuration (postgis data, mapfile, wms config, mapcache.xml or OpenLayers), but it might be that it is common enough that most people can figure it out (which is why I couldn?t find a good reason!) Any advice would be gratefully accepted. I can put up further details as required (or if it isn?t as simple as I thought) cheers Ben From fricke at gisberater.com Wed Mar 4 22:58:36 2015 From: fricke at gisberater.com (Lars Fricke) Date: Thu, 05 Mar 2015 07:58:36 +0100 Subject: [mapserver-users] WMTS tiles not at correct Latitude (and moving) In-Reply-To: References: Message-ID: <54F7FE9C.8000203@gisberater.com> Hello Ben, looking at your screenshot this does not look right at all. What I would do is, connect myself to the database, the wms (directly and via mapcache), and to OSM at the same time with QGIS (open source) and see what happens there. I was able to figure out most of my CRS issues that way. I QGIS you can set the layer CRS and reproject on the fly, seeing what happens if you change one or the other. The project CRS however needs to be set to EPSG:3857 indeed if you work with open layers. Reprojection activated. You could then of course post your mapfile and configurations if you can't narrow it down that way. Best Lars Am 05.03.2015 um 06:53 schrieb Ben Madin: > G?day all, > > we have set up a map cache wmts layer to produce boundaries for our mapping system. > > In isolation, it was looking OK, however when we layer the boundaries with any known background (OSM etc) they appear to be offset by a few degrees S (it is all in EPSG:3857) > > To confuse things more, as we zoom in a couple of layers, this seems to be moving north (which is good), but not enough to converge with our background or data layers - so still bad. > > I?ve put an image to illustrate this at : > > https://s3-ap-southeast-2.amazonaws.com/uploads.ausvet.com.au/Misaligned-WMTS.png > > My guess is I have done something wrong at some level of configuration (postgis data, mapfile, wms config, mapcache.xml or OpenLayers), but it might be that it is common enough that most people can figure it out (which is why I couldn?t find a good reason!) > > Any advice would be gratefully accepted. I can put up further details as required (or if it isn?t as simple as I thought) > > cheers > > Ben > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From thomas.bonfort at gmail.com Wed Mar 4 23:04:22 2015 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 5 Mar 2015 08:04:22 +0100 Subject: [mapserver-users] WMTS tiles not at correct Latitude (and moving) In-Reply-To: References: Message-ID: Have a look at this thread if this is happening on a custom grid (i.e. notre google-mercator or wgs84): http://lists.osgeo.org/pipermail/mapserver-users/2014-October/077033.html On Mar 5, 2015 6:54 AM, "Ben Madin" wrote: > G?day all, > > we have set up a map cache wmts layer to produce boundaries for our > mapping system. > > In isolation, it was looking OK, however when we layer the boundaries with > any known background (OSM etc) they appear to be offset by a few degrees S > (it is all in EPSG:3857) > > To confuse things more, as we zoom in a couple of layers, this seems to be > moving north (which is good), but not enough to converge with our > background or data layers - so still bad. > > I?ve put an image to illustrate this at : > > > https://s3-ap-southeast-2.amazonaws.com/uploads.ausvet.com.au/Misaligned-WMTS.png > > My guess is I have done something wrong at some level of configuration > (postgis data, mapfile, wms config, mapcache.xml or OpenLayers), but it > might be that it is common enough that most people can figure it out (which > is why I couldn?t find a good reason!) > > Any advice would be gratefully accepted. I can put up further details as > required (or if it isn?t as simple as I thought) > > cheers > > Ben > > > _______________________________________________ > 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 Andreas.Eichner at sid.sachsen.de Thu Mar 5 01:22:45 2015 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Thu, 5 Mar 2015 09:22:45 +0000 Subject: [mapserver-users] POST for WMS - supported In-Reply-To: <1425513670491-5191552.post@n6.nabble.com> References: <1425445902901-5191349.post@n6.nabble.com> <1425513670491-5191552.post@n6.nabble.com> Message-ID: <6F331135492B944D90731CE93743D5681CF7F7@FS-EX-DB101.fs.sachsen.de> > In Section 9.2.4 of the MapServer v6.0 Manual, under "OGC Support and > Configuration / WMS Server / WMS 1.3.0 Support / Some Missing features" it > lists "WMS 1.3.0 Post request should be an XML document containing the > different operations and parameters." (Also appears in the current > version > documentation v7 beta, although page hasn't been updated since 2013.) > > - is this suggesting that POST is not supported? > Nope. Sending the KVP request with mimetype "application/x-www-form-urlencoded" via POST is fully supported. Simple example: # wget -d -O- --post-data="service=WMS&request=GetCapabilities" http://host/cgi-bin/mapserv?map=/path/to/mapfile.map From Andreas.Eichner at sid.sachsen.de Thu Mar 5 02:44:48 2015 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Thu, 5 Mar 2015 10:44:48 +0000 Subject: [mapserver-users] transparecy for colored polygons In-Reply-To: References: Message-ID: <6F331135492B944D90731CE93743D5681CF822@FS-EX-DB101.fs.sachsen.de> > i want to set transparency for colored polygons iam displaying a polygon > layer on the google image and i want to set transparency so that > background image has to visible in the colored polygons You should apply OPACITY at STYLE or LAYER. http://mapserver.org/mapfile/style.html#index-37 http://mapserver.org/mapfile/layer.html#opacity From mathuralok.88 at gmail.com Mon Mar 2 09:05:09 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Mon, 2 Mar 2015 22:35:09 +0530 Subject: [mapserver-users] kml style Message-ID: Hi, I am new to mapserver and kml. I want to create a .map file and the datasource will be the kml file. How could i use the kml style tags or i have to provide my own style tag in .map file. Please help me out to write the config file. PFA the sample kml file -- *Alok Mathur* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: KML_Samples.kml Type: application/vnd.google-earth.kml+xml Size: 35920 bytes Desc: not available URL: From mathuralok.88 at gmail.com Mon Mar 2 22:20:56 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Tue, 3 Mar 2015 11:50:56 +0530 Subject: [mapserver-users] Fwd: kml style In-Reply-To: References: Message-ID: Please its urgent, if some one could help me out to write the .map file. ---------- Forwarded message ---------- From: alok mathur Date: Mon, Mar 2, 2015 at 10:35 PM Subject: kml style To: mapserver-users at lists.osgeo.org Hi, I am new to mapserver and kml. I want to create a .map file and the datasource will be the kml file. How could i use the kml style tags or i have to provide my own style tag in .map file. Please help me out to write the config file. PFA the sample kml file -- *Alok Mathur* -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: KML_Samples.kml Type: application/vnd.google-earth.kml+xml Size: 35920 bytes Desc: not available URL: From rishe28 at gmail.com Wed Mar 4 22:37:53 2015 From: rishe28 at gmail.com (rishi) Date: Thu, 5 Mar 2015 12:07:53 +0530 Subject: [mapserver-users] mapserver mapfile for transparancy Message-ID: hi all i want to set transparency for colored polygons iam displaying a polygon layer on the google image and i want to set transparency so that background image has to visible in the colored polygons i have attached my map also my mapfile is MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 IMAGETYPE png size 150 500 TRANSPARENT on LEGEND STATUS EMBED POSITION LR TRANSPARENT TRUE END web metadata wms_srs "EPSG:4326 EPSG:900913" end end LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=****** dbname=mpdb host=localhost port=5432" DATA "geom FROM view_villagevidyut using unique village_code_c11" STATUS Default TYPE polygon labelitem "villname" CLASSITEM "process" CLASS NAME "completed" EXPRESSION "completed" STYLE COLOR 0 255 0 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END CLASS NAME "uncompleted" EXPRESSION "uncompleted" STYLE COLOR 135 206 235 outlinecolor 121 188 255 END END CLASS NAME "plan not covered" EXPRESSION "" STYLE COLOR 240 128 128 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END PROJECTION "init=epsg:900913" END end END -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.jpg Type: image/jpeg Size: 29145 bytes Desc: not available URL: From rishe28 at gmail.com Thu Mar 5 01:49:24 2015 From: rishe28 at gmail.com (rishi) Date: Thu, 5 Mar 2015 15:19:24 +0530 Subject: [mapserver-users] transparecy for colored polygons Message-ID: hi all i want to set transparency for colored polygons iam displaying a polygon layer on the google image and i want to set transparency so that background image has to visible in the colored polygons i have attached my map also my mapfile is MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 IMAGETYPE png size 150 500 TRANSPARENT on LEGEND STATUS EMBED POSITION LR TRANSPARENT TRUE END web metadata wms_srs "EPSG:4326 EPSG:900913" end end LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=****** dbname=mpdb host=localhost port=5432" DATA "geom FROM view_villagevidyut using unique village_code_c11" STATUS Default TYPE polygon labelitem "villname" CLASSITEM "process" CLASS NAME "completed" EXPRESSION "completed" STYLE COLOR 0 255 0 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END CLASS NAME "uncompleted" EXPRESSION "uncompleted" STYLE COLOR 135 206 235 outlinecolor 121 188 255 END END CLASS NAME "plan not covered" EXPRESSION "" STYLE COLOR 240 128 128 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END PROJECTION "init=epsg:900913" END end END On Thu, Mar 5, 2015 at 2:52 PM, Eichner, Andreas - SID < Andreas.Eichner at sid.sachsen.de> wrote: > > In Section 9.2.4 of the MapServer v6.0 Manual, under "OGC Support and > > Configuration / WMS Server / WMS 1.3.0 Support / Some Missing features" > it > > lists "WMS 1.3.0 Post request should be an XML document containing the > > different operations and parameters." (Also appears in the current > > version > > documentation v7 beta, although page hasn't been updated since 2013.) > > > > - is this suggesting that POST is not supported? > > > > Nope. Sending the KVP request with mimetype > "application/x-www-form-urlencoded" via POST is fully supported. Simple > example: > > # wget -d -O- --post-data="service=WMS&request=GetCapabilities" > http://host/cgi-bin/mapserv?map=/path/to/mapfile.map > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.jpg Type: image/jpeg Size: 29145 bytes Desc: not available URL: From rishe28 at gmail.com Thu Mar 5 01:58:17 2015 From: rishe28 at gmail.com (rishi) Date: Thu, 5 Mar 2015 15:28:17 +0530 Subject: [mapserver-users] transparency for colored polygons Message-ID: hi all i want to set transparency for colored polygons iam displaying a polygon layer on the google image and i want to set transparency so that background image has to visible in the colored polygons i have attached my map also my mapfile is MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 IMAGETYPE png size 150 500 TRANSPARENT on LEGEND STATUS EMBED POSITION LR TRANSPARENT TRUE END web metadata wms_srs "EPSG:4326 EPSG:900913" end end LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=****** dbname=mpdb host=localhost port=5432" DATA "geom FROM view_villagevidyut using unique village_code_c11" STATUS Default TYPE polygon labelitem "villname" CLASSITEM "process" CLASS NAME "completed" EXPRESSION "completed" STYLE COLOR 0 255 0 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END CLASS NAME "uncompleted" EXPRESSION "uncompleted" STYLE COLOR 135 206 235 outlinecolor 121 188 255 END END CLASS NAME "plan not covered" EXPRESSION "" STYLE COLOR 240 128 128 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END PROJECTION "init=epsg:900913" END end END -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.jpg Type: image/jpeg Size: 29145 bytes Desc: not available URL: From David.Fawcett at state.mn.us Thu Mar 5 08:12:37 2015 From: David.Fawcett at state.mn.us (Fawcett, David (MNIT)) Date: Thu, 5 Mar 2015 16:12:37 +0000 Subject: [mapserver-users] mapserver mapfile for transparancy In-Reply-To: References: Message-ID: You can set Opacity at the layer level. Here is the relevant part of the documentation: http://mapserver.org/mapfile/layer.html#opacity From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of rishi Sent: Thursday, March 05, 2015 12:38 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] mapserver mapfile for transparancy hi all i want to set transparency for colored polygons iam displaying a polygon layer on the google image and i want to set transparency so that background image has to visible in the colored polygons i have attached my map also my mapfile is MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 IMAGETYPE png size 150 500 TRANSPARENT on LEGEND STATUS EMBED POSITION LR TRANSPARENT TRUE END web metadata wms_srs "EPSG:4326 EPSG:900913" end end LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=****** dbname=mpdb host=localhost port=5432" DATA "geom FROM view_villagevidyut using unique village_code_c11" STATUS Default TYPE polygon labelitem "villname" CLASSITEM "process" CLASS NAME "completed" EXPRESSION "completed" STYLE COLOR 0 255 0 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END CLASS NAME "uncompleted" EXPRESSION "uncompleted" STYLE COLOR 135 206 235 outlinecolor 121 188 255 END END CLASS NAME "plan not covered" EXPRESSION "" STYLE COLOR 240 128 128 outlinecolor 121 188 255 END LABEL SIZE 2 color 121 188 255 END END PROJECTION "init=epsg:900913" END end END -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Thu Mar 5 10:00:13 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Thu, 5 Mar 2015 18:00:13 +0000 Subject: [mapserver-users] Symbolscaledenom In-Reply-To: <54D8DED7.5030700@neogeo-online.net> References: <54D8DED7.5030700@neogeo-online.net> Message-ID: Doesn't look like it... We'd need additional configuration controls - MINOFFSET/MAXOFFSET, etc... I think those would be good additions (and relatively easy to add) although I wonder if there would be a better way to define limits without introducing new parameters. Thoughts? Steve -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Guillaume Sueur Sent: Monday, February 09, 2015 10:23 AM To: Mapserver-users Subject: [mapserver-users] Symbolscaledenom Hi List, It looks like label OUTLINEWIDTH and OFFSET are dependant of SYMBOLSCALE which leads to strange behaviours and looks on large scale range (see image included -> huge halo and distance between point and its label). Is there a way to detach these parameters from the SYMBOLSCALE settings ? Thanks Guillaume From Steve.Lime at state.mn.us Thu Mar 5 09:53:58 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Thu, 5 Mar 2015 17:53:58 +0000 Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> References: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> Message-ID: This is something I?d really like to see fixed. Any chance a test mapfile could be developed and attached to a new ticket on github? Ideally I'd start against 7.0 and then back-port if possible. Steve -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) Sent: Wednesday, March 04, 2015 2:34 AM To: aabhayas; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 Hi, I have been wondering also why GetCapabilities response is so slow for us nowadays and I have indeed added lots of groups to some services. +1 from me for having a look at this issue. We just installed 7.0-beta on our test server and GetCapabilities comes slowly from that too. There are about 40 layers in the test service and response time is about 8 seconds. Sometimes I have been wondering if GetCapabilities could be cached and controlled by some new CONFIG key. Cached GetCapabilities could be set to be refreshed for example once per week/day/hour if there is a need to react on changes in the data, and each time after the mapfile has been edited and saved with a new timestamp. -Jukka Rahkonen- aabhayas wrote: > Hi > Following up on my previous post we still want to use ?OWS_LAYER_GROUP? in our map files. We have large number of layers in our map file ( nearly 800). > Currently we are in the process of migrating our MapServer 5.4.2 environment in to MapServer 6.4.1. > In MapServer 6.4.1 GetCapabilities request takes more than 1 minute compared 5 second in version 5.4.2. This makes the new environment unusable by our clients. > Is there a possibility where someone in the MapServer development team looks in to this and fix this issue. > Thanks -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5191328.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From jmckenna at gatewaygeomatics.com Thu Mar 5 10:31:05 2015 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 05 Mar 2015 14:31:05 -0400 Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: References: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> Message-ID: <54F8A0E9.5040609@gatewaygeomatics.com> I too was wondering if this occurs with a simple mapfile of layers with groups, even with just inline features (no actual data). (I haven't hit this grouped-issue yet though in my travels, but I have hit the slow getcapabilities solved by adding extents to all layers) -jeff On 2015-03-05 1:53 PM, Lime, Steve D (MNIT) wrote: > This is something I?d really like to see fixed. Any chance a test mapfile could be developed and attached to a new ticket on github? Ideally I'd start against 7.0 and then back-port if possible. > > Steve > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) > Sent: Wednesday, March 04, 2015 2:34 AM > To: aabhayas; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 > > Hi, > > I have been wondering also why GetCapabilities response is so slow for us nowadays and I have indeed added lots of groups to some services. > +1 from me for having a look at this issue. > > We just installed 7.0-beta on our test server and GetCapabilities comes slowly from that too. There are about 40 layers in the test service and response time is about 8 seconds. > > Sometimes I have been wondering if GetCapabilities could be cached and controlled by some new CONFIG key. Cached GetCapabilities could be set to be refreshed for example once per week/day/hour if there is a need to react on changes in the data, and each time after the mapfile has been edited and saved with a new timestamp. > > -Jukka Rahkonen- > > aabhayas wrote: > >> Hi > >> Following up on my previous post we still want to use ?OWS_LAYER_GROUP? in our map files. We have large number of layers in our map file ( nearly 800). > >> Currently we are in the process of migrating our MapServer 5.4.2 environment in to MapServer 6.4.1. > >> In MapServer 6.4.1 GetCapabilities request takes more than 1 minute compared > 5 second in version 5.4.2. This makes the new environment unusable by our clients. > >> Is there a possibility where someone in the MapServer development team looks in to this and fix this issue. > >> Thanks > > > > > -- > View this message in context: http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5191328.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From thomas.bonfort at gmail.com Thu Mar 5 10:33:44 2015 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 5 Mar 2015 19:33:44 +0100 Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: References: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> Message-ID: IIRC, this happened when we introduced advanced layer groupings along with inspire support in 6.2, and has to do with multiple passes through layers to determine which ones to activate or not. I'd suspect the cost is proportional to nlayers? which is why it comes up for folks with many layers in their mapfiles. Thomas. On Mar 5, 2015 7:26 PM, "Lime, Steve D (MNIT)" wrote: > This is something I?d really like to see fixed. Any chance a test mapfile > could be developed and attached to a new ticket on github? Ideally I'd > start against 7.0 and then back-port if possible. > > Steve > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) > Sent: Wednesday, March 04, 2015 2:34 AM > To: aabhayas; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Getcapabilities extremely slow in version > 6.4.1 > > Hi, > > I have been wondering also why GetCapabilities response is so slow for us > nowadays and I have indeed added lots of groups to some services. > +1 from me for having a look at this issue. > > We just installed 7.0-beta on our test server and GetCapabilities comes > slowly from that too. There are about 40 layers in the test service and > response time is about 8 seconds. > > Sometimes I have been wondering if GetCapabilities could be cached and > controlled by some new CONFIG key. Cached GetCapabilities could be set to > be refreshed for example once per week/day/hour if there is a need to react > on changes in the data, and each time after the mapfile has been edited and > saved with a new timestamp. > > -Jukka Rahkonen- > > aabhayas wrote: > > > Hi > > > Following up on my previous post we still want to use ?OWS_LAYER_GROUP? > in our map files. We have large number of layers in our map file ( nearly > 800). > > > Currently we are in the process of migrating our MapServer 5.4.2 > environment in to MapServer 6.4.1. > > > In MapServer 6.4.1 GetCapabilities request takes more than 1 minute > compared > 5 second in version 5.4.2. This makes the new environment unusable by our > clients. > > > Is there a possibility where someone in the MapServer development team > looks in to this and fix this issue. > > > Thanks > > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5191328.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From klassen.js at gmail.com Thu Mar 5 13:58:13 2015 From: klassen.js at gmail.com (Jim Klassen) Date: Thu, 05 Mar 2015 15:58:13 -0600 Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: References: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> Message-ID: <54F8D175.7010001@gmail.com> I work with a mapfile designed to be a WMS proxy to organize all our WMS sources (typically other mapfiles) into one point of access. It has many layers makes extensive use of groups. In general testing with curl and use with QGIS, I have not noticed the GetCapabilites (or any other aspect of the configuration) to be slow. I am away from the machine at the moment, but will run benchmarks tomorrow. The upstream sources and the proxy mapfile run under MapServer 6.4.1 (with some minimal patching). On 03/05/2015 12:33 PM, thomas bonfort wrote: > IIRC, this happened when we introduced advanced layer groupings along with > inspire support in 6.2, and has to do with multiple passes through layers > to determine which ones to activate or not. I'd suspect the cost is > proportional to nlayers? which is why it comes up for folks with many > layers in their mapfiles. > > Thomas. > On Mar 5, 2015 7:26 PM, "Lime, Steve D (MNIT)" > wrote: > >> This is something I?d really like to see fixed. Any chance a test mapfile >> could be developed and attached to a new ticket on github? Ideally I'd >> start against 7.0 and then back-port if possible. >> >> Steve >> >> -----Original Message----- >> From: mapserver-users-bounces at lists.osgeo.org [mailto: >> mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) >> Sent: Wednesday, March 04, 2015 2:34 AM >> To: aabhayas; mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Getcapabilities extremely slow in version >> 6.4.1 >> >> Hi, >> >> I have been wondering also why GetCapabilities response is so slow for us >> nowadays and I have indeed added lots of groups to some services. >> +1 from me for having a look at this issue. >> >> We just installed 7.0-beta on our test server and GetCapabilities comes >> slowly from that too. There are about 40 layers in the test service and >> response time is about 8 seconds. >> >> Sometimes I have been wondering if GetCapabilities could be cached and >> controlled by some new CONFIG key. Cached GetCapabilities could be set to >> be refreshed for example once per week/day/hour if there is a need to react >> on changes in the data, and each time after the mapfile has been edited and >> saved with a new timestamp. >> >> -Jukka Rahkonen- >> >> aabhayas wrote: >> >>> Hi >>> Following up on my previous post we still want to use ?OWS_LAYER_GROUP? >> in our map files. We have large number of layers in our map file ( nearly >> 800). >> >>> Currently we are in the process of migrating our MapServer 5.4.2 >> environment in to MapServer 6.4.1. >> >>> In MapServer 6.4.1 GetCapabilities request takes more than 1 minute >> compared >> 5 second in version 5.4.2. This makes the new environment unusable by our >> clients. >> >>> Is there a possibility where someone in the MapServer development team >> looks in to this and fix this issue. >> >>> Thanks >> >> >> >> -- >> View this message in context: >> http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5191328.html >> Sent from the Mapserver - User mailing list archive at Nabble.com. >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > _______________________________________________ > 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 Mar 6 07:30:53 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 6 Mar 2015 15:30:53 +0000 Subject: [mapserver-users] Speed of getting layer extents does matter Message-ID: <209556c519ae4706a98a5b668ffc65cf@C119S212VM022.msvyvi.vaha.local> Hi, I tried to repeat the issue with slow GetCapabilities and my hypothesis was that the reason was in the new nested layer groups which I had added lately. However, now it seems that the real issue was in the way I had added new Spatialite layers. That I were using those layers in groups was not important in my case. I separated 7 layers from a production service for the speed tests. Three of the data tables have less than 10000 rows, three between 10000and 60000, and one 205000 rows so they are not big tables at all. Initially the time to read GetCapabilities with curl was 4.1 seconds. By rewriting the DATA lines as described below the time went down to 0.45 seconds. I had followed the examples from http://www.mapserver.org/input/vector/ogr.html without thinking too much about what I was doing: CONNECTIONTYPE OGR CONNECTION "db.sqlite" DATA "select * from my_table" With this definition the layer extents are computed by aggregating the extents of all the geometries of the table. However, GetCapabilities is much faster if I define the layer as CONNECTIONTYPE OGR CONNECTION "db.sqlite" DATA "my_table" I have up-to-date statistics in my Spatialite DB and the boost in speed must mean that OGR is clever enough for making a query to the layer_statistics table for getting the layer extents. Now afterwards this feels trivial but I would suggest to improve the documentation in http://www.mapserver.org/input/vector/ogr.html and http://mapserver.org/mapfile/layer.html Currently the latter document is putting rather low value on the importance of extents. EXTENT [minx] [miny] [maxx] [maxy] The spatial extent of the data. In most cases you will not need to specify this, but it can be used to avoid the speed cost of having MapServer compute the extents of the data. I am not sure what could be the best place to add some documentation about this speed cost which can easily mean that GetCapabilities gets half a second slower than necessary per ill behaving layer in the mapfile. I sketched this text Performance considerations Layer extents and slow WMS GetCapabilities Computing the extents of an OGR layer can be expensive if the layer is large and extents can't be read directly from metadata. This is the case if: - Data source does not support fast method for accessing the extents (CSV, GML) - The source store does not have layer statistics available or they are not up-to-date and therefore disabled (Spatialite, PostGIS) - Layer data in the mapfile is defined as SQL SELECT For example, if Spatialite database has a valid entry in the layer_statistics table GDAL/OGR is able to read the extents directly from the metadata when the layer is defined as CONNECTIONTYPE OGR CONNECTION "db.sqlite" DATA "my_table" However, if layer is defined as SQL SELECT the extents are computed by running a query that aggregates the extents of selected geometries CONNECTIONTYPE OGR CONNECTION "db.sqlite" DATA "select * from my_table" If computing the layer extents on-the-fly feels too slow consider to use the EXTENT keyword in LAYER http://mapserver.org/mapfile/layer.html. For comparison, with Geoserver the layer extents are stored to configuration files when layers are added to server for the first time which means the same as having LAYER-EXTENT always set for all the layers in mapfiles. -Jukka Rahkonen- -------------- next part -------------- An HTML attachment was scrubbed... URL: From klassen.js at gmail.com Fri Mar 6 07:55:16 2015 From: klassen.js at gmail.com (James Klassen) Date: Fri, 6 Mar 2015 09:55:16 -0600 Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: <54F8D175.7010001@gmail.com> References: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> <54F8D175.7010001@gmail.com> Message-ID: Unofficial benchmark: 255 layers in 58 nested groups (using wms_layer_group) takes less than 200ms on Linux Kernel 3.5.0, Intel(R) Xeon(R) CPU E5-2630 @ 2.30GHz. (It takes the terminal longer to print the 234 kB response XML than it takes MapServer in CGI mode to return the result.) All layers in wms.map are of the form: LAYER NAME 'L119_all' STATUS ON TYPE RASTER CONNECTIONTYPE WMS CONNECTION "http://gis/datasets/ADDRESS/ADDRESS_RANGE/address_range.map ?" PROJECTION "init=epsg:26915" END METADATA # WMS client connection options (input) "wms_name" "all" "wms_srs" "EPSG:26915" "wms_server_version" "1.1.1" "wms_format" "image/png" # WMS Server options (output) "wms_enable_request" "GetCapabilities GetMap GetFeatureInfo GetLegendGraphic" "wms_title" "Address Ranges" "wms_layer_group" "/Address" #"wms_opaque" "0" "wms_formatlist" "image/png, image/jpeg" "wms_extent" "477594.70 4924010.29 497206.99 4941936.31" "gml_include_items" "all" END TEMPLATE "dummy" PROCESSING "RESAMPLE=AVERAGE" END time curl " http://gis/datasets/wms.map?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities" | grep 'queryable="1"' | wc 255 1020 13728 real 0m0.151s user 0m0.000s sys 0m0.008s On Thu, Mar 5, 2015 at 3:58 PM, Jim Klassen wrote: > I work with a mapfile designed to be a WMS proxy to organize all our WMS > sources (typically other mapfiles) into one point of access. It has many > layers makes extensive use of groups. In general testing with curl and use > with QGIS, I have not noticed the GetCapabilites (or any other aspect of > the configuration) to be slow. I am away from the machine at the moment, > but will run benchmarks tomorrow. > > The upstream sources and the proxy mapfile run under MapServer 6.4.1 (with > some minimal patching). > > > On 03/05/2015 12:33 PM, thomas bonfort wrote: > > IIRC, this happened when we introduced advanced layer groupings along with > inspire support in 6.2, and has to do with multiple passes through layers > to determine which ones to activate or not. I'd suspect the cost is > proportional to nlayers? which is why it comes up for folks with many > layers in their mapfiles. > > Thomas. > On Mar 5, 2015 7:26 PM, "Lime, Steve D (MNIT)" > wrote: > > > This is something I?d really like to see fixed. Any chance a test mapfile > could be developed and attached to a new ticket on github? Ideally I'd > start against 7.0 and then back-port if possible. > > Steve > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) > Sent: Wednesday, March 04, 2015 2:34 AM > To: aabhayas; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Getcapabilities extremely slow in version > 6.4.1 > > Hi, > > I have been wondering also why GetCapabilities response is so slow for us > nowadays and I have indeed added lots of groups to some services. > +1 from me for having a look at this issue. > > We just installed 7.0-beta on our test server and GetCapabilities comes > slowly from that too. There are about 40 layers in the test service and > response time is about 8 seconds. > > Sometimes I have been wondering if GetCapabilities could be cached and > controlled by some new CONFIG key. Cached GetCapabilities could be set to > be refreshed for example once per week/day/hour if there is a need to react > on changes in the data, and each time after the mapfile has been edited and > saved with a new timestamp. > > -Jukka Rahkonen- > > aabhayas wrote: > > > Hi > > Following up on my previous post we still want to use ?OWS_LAYER_GROUP? > > in our map files. We have large number of layers in our map file ( nearly > 800). > > > Currently we are in the process of migrating our MapServer 5.4.2 > > environment in to MapServer 6.4.1. > > > In MapServer 6.4.1 GetCapabilities request takes more than 1 minute > > compared > 5 second in version 5.4.2. This makes the new environment unusable by our > clients. > > > Is there a possibility where someone in the MapServer development team > > looks in to this and fix this issue. > > > Thanks > > > > > -- > View this message in context:http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5191328.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing listmapserver-users at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing listmapserver-users at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing listmapserver-users at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > _______________________________________________ > mapserver-users mailing listmapserver-users at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/mapserver-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Mon Mar 9 04:40:22 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Mon, 9 Mar 2015 17:10:22 +0530 Subject: [mapserver-users] Reading KML Message-ID: Hi, I have a kml file in which there is a folder containing both Line and Point geometry placemarks. I want to show both line and point geomerty on map using mapserver. but the issue is that the data source is same. so how can i show the point and line data on map. Please help me. -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Mon Mar 9 04:43:44 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Mon, 9 Mar 2015 17:13:44 +0530 Subject: [mapserver-users] Reading KML In-Reply-To: References: Message-ID: PFB the KML and MAP file. KML file ------------------------ Fibertech solution Westborough MSC - Build #msn_ylw-pushpin4 1 -71.58570500983306,42.28745742866225,0 -71.58563778135751,42.28308954118536,0 -71.58466087108053,42.28307704913402,0 Westborough MSC to Westborugh #msn_ylw-pushpin8 1 -71.62172195712955,42.27186897741407,0 -71.62194000095552,42.27189433043378,0 -71.6225634332947,42.27210480296427,0 -71.62308968672842,42.27236391420707,0 -71.62394597288645,42.27309147863262,0 -71.62737594489003,42.27740640295431,0 -71.62822373584245,42.27893783334968,0 -71.63091971519079,42.28164762788888,0 -71.63207040059587,42.28370221254578,0 -71.62599732629406,42.28418518334991,0 -71.60795611539982,42.28517668969011,0 -71.60267209851122,42.28504601944216,0 -71.60188701357249,42.28516492137062,0 -71.58850360403626,42.28849573666959,0 -71.5858004650346,42.28852197680775,0 -71.58571706491037,42.2874804233345,0 NEW Danbury -73.45375129836707 41.390460041635 419.0806930250601 13.43312150541231 28.58299225276625 -0.685026358787494 relativeToSeaFloor #msn_ylw-stars 1 -73.45404626023216,41.3929335947184,0 ----------------------------------- MAP ============= MAP NAME "QGIS-MAP" # Map image size SIZE 500 400 UNITS meters EXTENT -73.454046 41.392934 -71.584661 42.288522 #FONTSET './fonts/fonts.txt' #SYMBOLSET './symbols/symbols.txt' #PROJECTION # 'proj=longlat' # 'datum=WGS84' # 'no_defs' #END PROJECTION "init=epsg:4326" END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME "png" DRIVER GD/PNG MIMETYPE "image/png" IMAGEMODE RGBA EXTENSION "png" TRANSPARENT ON END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH "/tmp/ms_tmp/" # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL "/ms_tmp/" # WMS server settings METADATA "wms_enable_request" "*" "wms_srs" "EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807 EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801 EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986" "labelcache_map_edge_buffer" "-10" "wms_title" "osm fiber data" "wms_onlineresource" "http://haxv-onecontrol-154/cgi-bin/mapserv?" "ows_sld_enable" "true" END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation #TEMPLATE 'fooOnlyForWMSGetFeatureInfo' END # Start of LAYER DEFINITIONS ----------------------------- LAYER NAME "kml_example_point" TYPE POINT STATUS DEFAULT CONNECTIONTYPE OGR CONNECTION "doc_test.kml" DATA "Fibertech solution" LABELITEM "NAME" CLASS #NAME "Fiber Names" STYLE COLOR 0 0 0 # OUTLINECOLOR 255 255 255 SYMBOL 'pin.png' SIZE 16 END # LABEL # SIZE TINY # COLOR 0 0 0 # OUTLINECOLOR 255 255 255 # POSITION AUTO # END # END END ############# # Start of LAYER DEFINITIONS ----------------------------- LAYER NAME "kml_example" TYPE LINE STATUS ON CONNECTIONTYPE OGR CONNECTION "doc_test.kml" DATA "Fibertech solution" LABELITEM "NAME" CLASS NAME "Fiber Names" STYLE COLOR 250 0 0 OUTLINECOLOR 255 255 255 #SYMBOL 'pin.png' SIZE 6 END LABEL SIZE TINY COLOR 0 0 0 OUTLINECOLOR 255 255 255 POSITION AUTO END END END ############# END On Mon, Mar 9, 2015 at 5:10 PM, alok mathur wrote: > Hi, > > I have a kml file in which there is a folder containing both Line and > Point geometry placemarks. I want to show both line and point geomerty on > map using mapserver. but the issue is that the data source is same. so how > can i show the point and line data on map. > Please help me. > > > > -- > > *Alok Mathur* | Software Engineer 2A | Ciena > Mobile +91 9899413266 > -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gertjan at West.NL Mon Mar 9 04:45:44 2015 From: gertjan at West.NL (Gertjan van Oosten) Date: Mon, 9 Mar 2015 12:45:44 +0100 Subject: [mapserver-users] Errors with LAYER DATA "geom FROM (...huge SELECT...)" Message-ID: <20150309114544.GE4911@West.NL> Hi all, We have some layers in Oracle where the map config specifies: LAYER ... DATA "geom FROM ( SELECT a_very_long_select_statement_with_lots_of_%PARAMS% FROM some_table ) USING FILTER" ... END After a certain length of the SELECT, we get strange errors: an imcomplete SQL statement is being sent to Oracle. Turns out that this is due to the define in maporaclespatial.c: #define TABLE_NAME_SIZE 2000 Since I found no other alternatives, I was only able to fix it by changing this define and recompiling Mapserver. This particular assumption (that "2000 characters ought to be enough for anybody") is still present in the Mapserver 7 source code. Additionally, the buffer to hold the query string is hard-coded as: char query_str[6000]; Shouldn't this be fixed (or made configurable), or at least, clearly documented somewhere? The current situation is, frankly, sub-optimal... Kind regards, -- -- Gertjan van Oosten, Principal Consultant, West Consulting B.V. -- gertjan at West.NL +31 15 2191 600 www.west.nl From Andreas.Eichner at sid.sachsen.de Mon Mar 9 07:45:24 2015 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Mon, 9 Mar 2015 14:45:24 +0000 Subject: [mapserver-users] Reading KML In-Reply-To: References: Message-ID: <6F331135492B944D90731CE93743D5681D0996@FS-EX-DB101.fs.sachsen.de> You need use the special field OGR_GEOMETRY to filter by geometry type. With ogrinfo this can be done as follows: $ ogrinfo -al test.kml -where "OGR_GEOMETRY='LINESTRING'" $ ogrinfo -al test.kml -where "OGR_GEOMETRY='POINT'" Not sure how to translate this into mapfile syntax. May be using LAYER.FILTER, LAYER.DATA or (on MapServer 7.0) PROCESSING_OPTION "NATIVE_FILTER". Using FILTER might not work due to MapServer blocking the "virtual" attribute... LAYER TYPE POINT ... FILTER "('[OGR_GEOMETRY]' == 'POINT')" ... END Or LAYER TYPE POINT ... DATA "SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='POINT'" ... END Or LAYER TYPE POINT ... PROCESSING_OPTION "NATIVE_FILTER=OGR_GEOMETRY='POINT'" ... END HTH From Phil.Anzel at ftc.usda.gov Mon Mar 9 12:12:02 2015 From: Phil.Anzel at ftc.usda.gov (Anzel, Phil - NRCS, Fort Collins, CO) Date: Mon, 9 Mar 2015 19:12:02 +0000 Subject: [mapserver-users] queryByLayer - is it a valid method on layerObj? Message-ID: All, The Mapscript SWIG interface on the layerObj defines a queryByFilter method as public int queryByFilter(mapObj map, string arg1) where arg1 is supposedly the filter to apply when querying the layer, analogous to public int queryByRect(mapObj map, rectObj rect) Where is this method documented? It is not described in either the 6.4 or 7.0 documentation. Based upon the history of the code that I'm attempting to bring back to life the method was probably documented in MapServer 4.x or 5.x. Note that is still visible through SWIG. How should it be used? I tried it with a WFS OGC filter and the log file showed (ignore line wrapping here): [Mon Mar 09 12:18:35 2015].727000 yyparse(): Expression parser error. syntax error [Mon Mar 09 12:18:35 2015].727000 msEvalExpression: Expression parser error. Failed to parse expression: Geometry -88.0865046533,37.5555143852 -88.0860204771,37.5600435404 -88.0782858287,37.5595392364 -88.0787704736,37.5550101113 -88.0865046533,37.5555143852 I tried with a much simpler mapfile filter and got much the same result: [Mon Mar 09 12:53:22 2015].470000 yyparse(): Expression parser error. syntax error [Mon Mar 09 12:53:22 2015].470000 msEvalExpression: Expression parser error. Failed to parse expression: ([mukey] in (713970, 713898)) Do any of you have a working example of its use? Is there a way to use the OGC filter directly within mapscript code? That is ultimately what I'm after. Thanks. - Phil Anzel USDA/NRCS contractor - Team Vistronix This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Mon Mar 9 21:38:23 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Tue, 10 Mar 2015 10:08:23 +0530 Subject: [mapserver-users] KML in mapserver Message-ID: Hi, I have a single folder with multiple Placemarks of different geometries in an input KML file. And I want to create a .map file using KML as input source. As mapserver ignores KML styling so i need to give styling in mapserver for each layer. I want to give styling at each placemark. Could you please help me out how to do the same. KML --------------------------- Fibertech solution Westborough MSC - Build #msn_ylw-pushpin4 1 -71.58570500983306,42.28745742866225,0 -71.58563778135751,42.28308954118536,0 -71.58466087108053,42.28307704913402,0 Westborough MSC to Westborugh #msn_ylw-pushpin8 1 -71.62172195712955,42.27186897741407,0 -71.62194000095552,42.27189433043378,0 -71.6225634332947,42.27210480296427,0 -71.62308968672842,42.27236391420707,0 -71.62394597288645,42.27309147863262,0 -71.62737594489003,42.27740640295431,0 -71.62822373584245,42.27893783334968,0 -71.63091971519079,42.28164762788888,0 -71.63207040059587,42.28370221254578,0 -71.62599732629406,42.28418518334991,0 -71.60795611539982,42.28517668969011,0 -71.60267209851122,42.28504601944216,0 -71.60188701357249,42.28516492137062,0 -71.58850360403626,42.28849573666959,0 -71.5858004650346,42.28852197680775,0 -71.58571706491037,42.2874804233345,0 NEW Danbury -73.45375129836707 41.390460041635 419.0806930250601 13.43312150541231 28.58299225276625 -0.685026358787494 relativeToSeaFloor #msn_ylw-stars 1 -73.45404626023216,41.3929335947184,0 NEW Scotland Amp -72.09703050755105 41.69579944328172 0 -0.790587312931665 19.0106770482321 445.0511788150669 relativeToSeaFloor #msn_ylw-stars 1 -72.09643061038489,41.6960553015771,0 MAP ------------------ MAP NAME "QGIS-MAP" # Map image size SIZE 500 400 UNITS meters EXTENT -73.454046 41.392934 -71.584661 42.288522 #FONTSET './fonts/fonts.txt' SYMBOLSET 'symbols.txt' #PROJECTION # 'proj=longlat' # 'datum=WGS84' # 'no_defs' #END PROJECTION "init=epsg:4326" END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME "png" DRIVER GD/PNG MIMETYPE "image/png" IMAGEMODE RGBA EXTENSION "png" TRANSPARENT ON END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH "/tmp/ms_tmp/" # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL "/ms_tmp/" # WMS server settings METADATA "wms_enable_request" "*" "wms_srs" "EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807 EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801 EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986" "labelcache_map_edge_buffer" "-10" "wms_title" "osm fiber data" "wms_onlineresource" "http://haxv-onecontrol-154/cgi-bin/mapserv?" "ows_sld_enable" "true" END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation #TEMPLATE 'fooOnlyForWMSGetFeatureInfo' END # Start of LAYER DEFINITIONS ----------------------------- LAYER NAME "kml_line" TYPE LINE STATUS ON CONNECTIONTYPE OGR CONNECTION "doc_test.kml" DATA "SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" LABELITEM "NAME" CLASS NAME "Fiber Data" STYLE COLOR 250 0 0 OUTLINECOLOR 255 255 255 SIZE 6 END LABEL SIZE GIANT COLOR 0 0 0 OUTLINECOLOR 255 255 255 POSITION AUTO END END END ############# # Start of LAYER DEFINITIONS ----------------------------- LAYER NAME "kml_point" TYPE POINT STATUS DEFAULT CONNECTIONTYPE OGR CONNECTION "doc_test.kml" DATA "SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='POINT'" LABELITEM "NAME" #FILTER ('[OGR_GEOMETRY]' == 'POINT') #PROCESSING_OPTION "NATIVE_FILTER=OGR_GEOMETRY='POINT'" CLASS NAME "Splice Point" STYLE COLOR 250 0 0 OUTLINECOLOR 255 255 255 SYMBOL 'marker2' SIZE 16 END LABEL SIZE GIANT COLOR 0 0 0 OUTLINECOLOR 255 255 255 POSITION AUTO END END END ############# END -- *Alok Mathur* -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andreas.Eichner at sid.sachsen.de Tue Mar 10 00:22:30 2015 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Tue, 10 Mar 2015 07:22:30 +0000 Subject: [mapserver-users] KML in mapserver In-Reply-To: References: Message-ID: <6F331135492B944D90731CE93743D5681D09D8@FS-EX-DB101.fs.sachsen.de> I would suggest using the "Style" attribute to classify your features. From ogrinfo: $ ogrinfo -al test.kml -where "OGR_GEOMETRY='LINESTRING'" ... OGRFeature(Fibertech solution):1 Name (String) = Westborough MSC - Build ... Style = @msn_ylw-pushpin4 OGRFeature(Fibertech solution):2 Name (String) = Westborough MSC to Westborugh ... Style = @msn_ylw-pushpin8 So using CLASSITEM "Style" to classify your features might work: LAYER ... CLASSITEM "Style" CLASS EXPRESSION "@msn_ylw-pushpin8" ... END CLASS EXPRESSION "@msn_ylw-pushpin4" ... END END > -----Urspr?ngliche Nachricht----- > Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users- > bounces at lists.osgeo.org] Im Auftrag von alok mathur > Gesendet: Dienstag, 10. M?rz 2015 05:38 > An: mapserver-users at lists.osgeo.org > Betreff: [mapserver-users] KML in mapserver > > Hi, > > I have a single folder with multiple Placemarks of different geometries in > an input KML file. > And I want to create a .map file using KML as input source. As mapserver > ignores KML styling so i need to give styling in mapserver for each layer. > I want to give styling at each placemark. Could you please help me out how > to do the same. > > KML > --------------------------- > > > xmlns:gx="http://www.google.com/kml/ext/2.2" > xmlns:kml="http://www.opengis.net/kml/2.2" > xmlns:atom="http://www.w3.org/2005/Atom"> > > > Fibertech solution > > > Westborough MSC - Build > #msn_ylw-pushpin4 > > 1 > > -71.58570500983306,42.28745742866225,0 - > 71.58563778135751,42.28308954118536,0 - > 71.58466087108053,42.28307704913402,0 > > > > > Westborough MSC to Westborugh > #msn_ylw-pushpin8 > > 1 > > -71.62172195712955,42.27186897741407,0 - > 71.62194000095552,42.27189433043378,0 - > 71.6225634332947,42.27210480296427,0 - > 71.62308968672842,42.27236391420707,0 - > 71.62394597288645,42.27309147863262,0 - > 71.62737594489003,42.27740640295431,0 - > 71.62822373584245,42.27893783334968,0 - > 71.63091971519079,42.28164762788888,0 - > 71.63207040059587,42.28370221254578,0 - > 71.62599732629406,42.28418518334991,0 - > 71.60795611539982,42.28517668969011,0 - > 71.60267209851122,42.28504601944216,0 - > 71.60188701357249,42.28516492137062,0 - > 71.58850360403626,42.28849573666959,0 - > 71.5858004650346,42.28852197680775,0 -71.58571706491037,42.2874804233345,0 > > > > > NEW Danbury > > -73.45375129836707 > 41.390460041635 > 419.0806930250601 > 13.43312150541231 > 28.58299225276625 > -0.685026358787494 > relativeToSeaFloor > > #msn_ylw-stars > > 1 > -73.45404626023216,41.3929335947184,0 > > > > NEW Scotland Amp > > -72.09703050755105 > 41.69579944328172 > 0 > -0.790587312931665 > 19.0106770482321 > 445.0511788150669 > relativeToSeaFloor > > #msn_ylw-stars > > 1 > -72.09643061038489,41.6960553015771,0 > > > > > > > > > MAP > ------------------ > MAP > NAME "QGIS-MAP" > # Map image size > SIZE 500 400 > UNITS meters > EXTENT -73.454046 41.392934 -71.584661 42.288522 > #FONTSET './fonts/fonts.txt' > SYMBOLSET 'symbols.txt' > #PROJECTION > # 'proj=longlat' > # 'datum=WGS84' > # 'no_defs' > #END > PROJECTION > "init=epsg:4326" > END > > # Background color for the map canvas -- change as desired > IMAGECOLOR 255 255 255 > IMAGEQUALITY 95 > IMAGETYPE png > > OUTPUTFORMAT > NAME "png" > DRIVER GD/PNG > MIMETYPE "image/png" > IMAGEMODE RGBA > EXTENSION "png" > TRANSPARENT ON > END > > # Legend > LEGEND > IMAGECOLOR 255 255 255 > STATUS ON > KEYSIZE 18 12 > LABEL > TYPE BITMAP > SIZE MEDIUM > COLOR 0 0 89 > END > END > > # Web interface definition. Only the template parameter > # is required to display a map. See MapServer documentation > WEB > # Set IMAGEPATH to the path where MapServer should > # write its output. > IMAGEPATH "/tmp/ms_tmp/" > > # Set IMAGEURL to the url that points to IMAGEPATH > # as defined in your web server configuration > IMAGEURL "/ms_tmp/" > > # WMS server settings > METADATA > "wms_enable_request" "*" > "wms_srs" "EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901 > EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807 > EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801 > EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986" > "labelcache_map_edge_buffer" "-10" > "wms_title" "osm fiber data" > "wms_onlineresource" "http://haxv-onecontrol-154/cgi-bin/mapserv?" > "ows_sld_enable" "true" > END > > > #Scale range at which web interface will operate > # Template and header/footer settings > # Only the template parameter is required to display a map. See > MapServer documentation > #TEMPLATE 'fooOnlyForWMSGetFeatureInfo' > END > > # Start of LAYER DEFINITIONS ----------------------------- > LAYER > NAME "kml_line" > TYPE LINE > STATUS ON > CONNECTIONTYPE OGR > CONNECTION "doc_test.kml" > DATA "SELECT * FROM 'Fibertech solution' WHERE > OGR_GEOMETRY='LINESTRING'" > LABELITEM "NAME" > CLASS > NAME "Fiber Data" > STYLE > COLOR 250 0 0 > OUTLINECOLOR 255 255 255 > SIZE 6 > END > LABEL > SIZE GIANT > COLOR 0 0 0 > OUTLINECOLOR 255 255 255 > POSITION AUTO > END > END > END > ############# > # Start of LAYER DEFINITIONS ----------------------------- > LAYER > NAME "kml_point" > TYPE POINT > STATUS DEFAULT > CONNECTIONTYPE OGR > CONNECTION "doc_test.kml" > DATA "SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='POINT'" > LABELITEM "NAME" > #FILTER ('[OGR_GEOMETRY]' == 'POINT') > #PROCESSING_OPTION "NATIVE_FILTER=OGR_GEOMETRY='POINT'" > CLASS > NAME "Splice Point" > STYLE > COLOR 250 0 0 > OUTLINECOLOR 255 255 255 > SYMBOL 'marker2' > SIZE 16 > END > LABEL > SIZE GIANT > COLOR 0 0 0 > OUTLINECOLOR 255 255 255 > POSITION AUTO > END > END > END > ############# > > END > > -- > > > Alok Mathur From mathuralok.88 at gmail.com Tue Mar 10 04:14:39 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Tue, 10 Mar 2015 16:44:39 +0530 Subject: [mapserver-users] Best Practice Message-ID: Hi , Could any one suggest me to how to create .map file from KML file. Are any tools available. My requirement is to take KML file as input create .map file corresponding to that KML and provide changes on map so that it reflects on the fly. -- *Alok Mathur* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at saabgroup.com Tue Mar 10 07:20:28 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Tue, 10 Mar 2015 14:20:28 +0000 Subject: [mapserver-users] KML in mapserver In-Reply-To: <6F331135492B944D90731CE93743D5681D09D8@FS-EX-DB101.fs.sachsen.de> References: <6F331135492B944D90731CE93743D5681D09D8@FS-EX-DB101.fs.sachsen.de> Message-ID: <16465785f5f740d6bee7d13fe0fff4c8@corpappl843.corp.saab.se> This was a good exercise to handle KML files. To get this to work You have to cast the Style value to a string also. DATA "SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" The Mapfile should something like this: # Start of LAYER DEFINITIONS ----------------------------- LAYER NAME "kml_example" GROUP LINES TYPE LINE STATUS ON CONNECTIONTYPE OGR CONNECTION "doc_test.kml" DATA "SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" CLASSITEM "STYLE" LABELITEM "NAME" CLASS # EXPRESSION ([STYLE] = '@msn_ylw-pushpin4') EXPRESSION "@msn_ylw-pushpin4" NAME "Fiber Names 4" STYLE COLOR 250 0 0 WIDTH 2.5 END LABEL SIZE TINY COLOR 255 100 100 POSITION AUTO END END CLASS # EXPRESSION ([STYLE] = '@msn_ylw-pushpin8') EXPRESSION "@msn_ylw-pushpin8" NAME "Fiber Names 8" STYLE COLOR 0 255 0 WIDTH 3.1 END LABEL SIZE TINY COLOR 100 255 100 POSITION AUTO END END # Class END # Layer LAYER NAME "kml_example_point" GROUP PONITS TYPE POINT STATUS DEFAULT CONNECTIONTYPE OGR CONNECTION "doc_test.kml" DATA "SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='POINT'" LABELITEM "Name" CLASS #NAME "Fiber Names" STYLE COLOR 0 0 255 SYMBOL 'circlef' SIZE 16 END END # Class END # Layer END # Map From lars.schylberg at saabgroup.com Tue Mar 10 07:50:01 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Tue, 10 Mar 2015 14:50:01 +0000 Subject: [mapserver-users] Best Practice In-Reply-To: References: Message-ID: <02caad5a749d4e55bbaa95455ae6ea7a@corpappl843.corp.saab.se> I would write a bash script that starts with using ogrinfo. Extract all relevant information from ogrinfo with sed, awk and similar tools. Print the mapfile content of the fly from the bash script with a lot of printf commands Quick method in my opinion! Here is a small extract from an example I did a couple of weeks ago: #!/bin/sh # # Argument parsing depending on your needs. # # eg. KML_FILE is set from argument 1 # MAPFILE is argument 2 # # Process EXTENT for the mapfile # shopt -s lastpipe ogrinfo -ro $KML_FILE -al \ | grep Extent | egrep -o '[0-9.]+' | readarray BBOX minx=`echo ${BBOX[0]} | tr -d '\n'` miny=`echo ${BBOX[1]} | tr -d '\n'` maxx=`echo ${BBOX[2]} | tr -d '\n'` maxy=`echo ${BBOX[3]} | tr -d '\n'` # # Print header part of mapfile # printf "MAP\n" > ${MAPFILE}.map printf " NAME %s\n" "$MAPFILE" >> ${MAPFILE}.map printf " SIZE 1000 1000\n" >> ${MAPFILE}.map printf " UNITS dd\n" >> ${MAPFILE}.map printf " EXTENT %s %s %s %s\n" "${minx} ${miny} ${maxx} ${maxy}" >> ${MAPFILE}.map ?. ?and the rest of the mapfile in the same manner. /Lars S. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alok mathur Sent: den 10 mars 2015 12:15 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Best Practice Hi , Could any one suggest me to how to create .map file from KML file. Are any tools available. My requirement is to take KML file as input create .map file corresponding to that KML and provide changes on map so that it reflects on the fly. -- Alok Mathur -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andreas.Eichner at sid.sachsen.de Tue Mar 10 08:39:09 2015 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Tue, 10 Mar 2015 15:39:09 +0000 Subject: [mapserver-users] KML in mapserver In-Reply-To: <16465785f5f740d6bee7d13fe0fff4c8@corpappl843.corp.saab.se> References: <6F331135492B944D90731CE93743D5681D09D8@FS-EX-DB101.fs.sachsen.de> <16465785f5f740d6bee7d13fe0fff4c8@corpappl843.corp.saab.se> Message-ID: <6F331135492B944D90731CE93743D5681D0A18@FS-EX-DB101.fs.sachsen.de> > > To get this to work You have to cast the Style value to a string also. > > DATA "SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM > 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" > Good catch, Lars! With this bit of OGR magic classification work as intented. To summarize the relevant parts: LAYER NAME "kml_line" TYPE LINE CONNECTIONTYPE OGR CONNECTION "doc_test.kml" # restrict features to geometry type LINESTRING and make OGR_STYLE accessible as (class)item DATA "SELECT NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" LABELITEM "NAME" CLASSITEM "STYLE" CLASS EXPRESSION "@msn_ylw-pushpin4" ... END CLASS EXPRESSION "@msn_ylw-pushpin8" ... END END > The Mapfile should something like this: > > # Start of LAYER DEFINITIONS ----------------------------- > LAYER > NAME "kml_example" > GROUP LINES > TYPE LINE > STATUS ON > CONNECTIONTYPE OGR > CONNECTION "doc_test.kml" > DATA "SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE > FROM 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" > CLASSITEM "STYLE" > LABELITEM "NAME" > > CLASS > # EXPRESSION ([STYLE] = '@msn_ylw-pushpin4') > EXPRESSION "@msn_ylw-pushpin4" > NAME "Fiber Names 4" > STYLE > COLOR 250 0 0 > WIDTH 2.5 > END > LABEL > SIZE TINY > COLOR 255 100 100 > POSITION AUTO > END > END > > CLASS > # EXPRESSION ([STYLE] = '@msn_ylw-pushpin8') > EXPRESSION "@msn_ylw-pushpin8" > NAME "Fiber Names 8" > STYLE > COLOR 0 255 0 > WIDTH 3.1 > END > LABEL > SIZE TINY > COLOR 100 255 100 > POSITION AUTO > END > END # Class > END # Layer > > LAYER > NAME "kml_example_point" > GROUP PONITS > TYPE POINT > STATUS DEFAULT > CONNECTIONTYPE OGR > CONNECTION "doc_test.kml" > DATA "SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='POINT'" > LABELITEM "Name" > CLASS > #NAME "Fiber Names" > STYLE > COLOR 0 0 255 > SYMBOL 'circlef' > SIZE 16 > END > END # Class > END # Layer > END # Map > From mathuralok.88 at gmail.com Tue Mar 10 21:46:19 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Wed, 11 Mar 2015 10:16:19 +0530 Subject: [mapserver-users] KML reading through OGR Message-ID: Hi, I am unable to get the Styleurl using Ogrinfo. I am trying the command ogrinfo -al doc_test.kml -where "ogr_style='@msn_ylw-pushpin4'" but the result is Layer name: Fibertech solution Geometry: 3D Unknown (any) Feature Count: 0 Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]] Name: String (0.0) Description: String (0.0) Also i want to show the description of placemark on map. Thanks! -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Wed Mar 11 05:59:21 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Wed, 11 Mar 2015 18:29:21 +0530 Subject: [mapserver-users] KML descriptionTag Message-ID: Hi, I want to show the description tag in kml file onto map. On clicking on the point on map the balloon will be opened containing the description tag and name tag of the point. Please suggest me how to do the same. -- *Alok Mathur* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at saabgroup.com Wed Mar 11 06:08:59 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Wed, 11 Mar 2015 13:08:59 +0000 Subject: [mapserver-users] KML reading through OGR In-Reply-To: References: Message-ID: The OGR style is the variable that is returned in the variable that is casted. Please look at the Layer definitions that I sent yesterday in the mapfile example. DATA "SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" CLASSITEM "STYLE" LABELITEM "NAME" CLASS EXPRESSION "@msn_ylw-pushpin4" That is the STYLE value used in the CLASSITEM expression. The description is shown in the label that uses the labelitem. Also shown in the mapfile example yesterday. If You only want to get the features with the style ?@msn_ylw-pushpin4' with ogrinfo you should write it like this: ogrinfo -ro doc_test.kml \ -sql "SELECT *, CAST(OGR_STYLE AS character(255)) AS STYLE FROM 'Fibertech solution' \ WHERE OGR_GEOMETRY='LINESTRING' AND OGR_STYLE='@msn_ylw-pushpin4'" ?al That returns the geometry and variables according to this criteria, i.e. only lines and specific style. But I guess that You most likely would like to do this filtering in the Class section of the mapfile and not in the DATA statement. /Lars From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alok mathur Sent: den 11 mars 2015 05:46 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] KML reading through OGR Hi, I am unable to get the Styleurl using Ogrinfo. I am trying the command ogrinfo -al doc_test.kml -where "ogr_style='@msn_ylw-pushpin4'" but the result is Layer name: Fibertech solution Geometry: 3D Unknown (any) Feature Count: 0 Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]] Name: String (0.0) Description: String (0.0) Also i want to show the description of placemark on map. Thanks! [https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif] -- Alok Mathur | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Wed Mar 11 22:51:01 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Thu, 12 Mar 2015 11:21:01 +0530 Subject: [mapserver-users] Length Calculation Message-ID: Hi, I want to calculate the length of line string in mapserver. Please suggest me how to do the same. Is there any function provided by mapserver?. -- *Alok Mathur* -------------- next part -------------- An HTML attachment was scrubbed... URL: From Michael.Kalbermatten at ne.ch Thu Mar 12 02:11:42 2015 From: Michael.Kalbermatten at ne.ch (=?iso-8859-1?Q?Kalbermatten_Micha=EBl?=) Date: Thu, 12 Mar 2015 09:11:42 +0000 Subject: [mapserver-users] Inverted polygon shapeburst effect Message-ID: Hi, I am looking for a way to create a shapeburst effect (or outer glow) on the outer side of a polygon. This is something which has been added to QGIS (using the inverted polygon option, see http://planet.qgis.org/planet/tag/shapeburst/) I was wondering if something like that was possible in MapServer ? I took a look at the doc but could not find anything relevant (maybe using geotransform, but then, how do I create the glow...). Does anyone have an advice ? Thanks ! Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Thu Mar 12 02:57:20 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Thu, 12 Mar 2015 15:27:20 +0530 Subject: [mapserver-users] KML reading through OGR In-Reply-To: References: Message-ID: Hi Lars, I want to create a styling for each placemark in .map file. Means If i have a KML containing one folder with multiple placemarks as shown below. I want to create a .map file which will contain style for each placemark. What if i have the same names of placemarks. Please help me to get the solution Eg. KML ---------------- NE Third Route Fibertech solution Westborough MSC - Build #msn_ylw-pushpin4 1 -71.58570500983306,42.28745742866225,0 -71.58563778135751,42.28308954118536,0 -71.58466087108053,42.28307704913402,0 Westborough MSC to Westborugh #msn_ylw-pushpin8 1 -71.62172195712955,42.27186897741407,0 -71.62194000095552,42.27189433043378,0 -71.6225634332947,42.27210480296427,0 -71.62308968672842,42.27236391420707,0 -71.62394597288645,42.27309147863262,0 -71.62737594489003,42.27740640295431,0 -71.62822373584245,42.27893783334968,0 -71.63091971519079,42.28164762788888,0 -71.63207040059587,42.28370221254578,0 -71.62599732629406,42.28418518334991,0 -71.60795611539982,42.28517668969011,0 -71.60267209851122,42.28504601944216,0 -71.60188701357249,42.28516492137062,0 -71.58850360403626,42.28849573666959,0 -71.5858004650346,42.28852197680775,0 -71.58571706491037,42.2874804233345,0 NEW Danbury -73.45375129836707 41.390460041635 419.0806930250601 13.43312150541231 28.58299225276625 -0.685026358787494 relativeToSeaFloor #msn_ylw-stars 1 -73.45404626023216,41.3929335947184,0 NEW Scotland Amp -72.09703050755105 41.69579944328172 0 -0.790587312931665 19.0106770482321 445.0511788150669 relativeToSeaFloor #msn_ylw-stars 1 -72.09643061038489,41.6960553015771,0 On Wed, Mar 11, 2015 at 6:38 PM, Schylberg Lars < lars.schylberg at saabgroup.com> wrote: > The OGR style is the variable that is returned in the variable that is > casted. > > Please look at the Layer definitions that I sent yesterday in the mapfile > example. > > > > DATA "SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM > 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'" > > CLASSITEM "STYLE" > > LABELITEM "NAME" > > > > CLASS > > EXPRESSION "@msn_ylw-pushpin4" > > > > > > That is the STYLE value used in the CLASSITEM expression. > > > > The description is shown in the label that uses the labelitem. Also shown > in the mapfile example yesterday. > > > > > > If You only want to get the features with the style ?@msn_ylw-pushpin4' > with ogrinfo you should write it like this: > > > > ogrinfo -ro doc_test.kml \ > -sql "SELECT *, CAST(OGR_STYLE AS character(255)) AS STYLE FROM 'Fibertech > solution' \ > WHERE OGR_GEOMETRY='LINESTRING' AND OGR_STYLE='@msn_ylw-pushpin4'" ?al > > > > That returns the geometry and variables according to this criteria, i.e. > only lines and specific style. > > > > But I guess that You most likely would like to do this filtering in the > Class section of the mapfile and not in the DATA statement. > > > > /Lars > > > > > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *alok mathur > *Sent:* den 11 mars 2015 05:46 > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] KML reading through OGR > > > > Hi, > > > > I am unable to get the Styleurl using Ogrinfo. I am trying the command > > ogrinfo -al doc_test.kml -where "ogr_style='@msn_ylw-pushpin4'" > > > > but the result is > > Layer name: Fibertech solution > > Geometry: 3D Unknown (any) > > Feature Count: 0 > > Layer SRS WKT: > > GEOGCS["WGS 84", > > DATUM["WGS_1984", > > SPHEROID["WGS 84",6378137,298.257223563, > > AUTHORITY["EPSG","7030"]], > > TOWGS84[0,0,0,0,0,0,0], > > AUTHORITY["EPSG","6326"]], > > PRIMEM["Greenwich",0, > > AUTHORITY["EPSG","8901"]], > > UNIT["degree",0.0174532925199433, > > AUTHORITY["EPSG","9108"]], > > AUTHORITY["EPSG","4326"]] > > Name: String (0.0) > > Description: String (0.0) > > > > > > > > Also i want to show the description of placemark on map. > > > > Thanks! > > > > -- > > *Alok Mathur* | Software Engineer 2A | Ciena > Mobile +91 9899413266 > -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From schroeter at netgis.de Thu Mar 12 03:06:19 2015 From: schroeter at netgis.de (Sven Schroeter) Date: Thu, 12 Mar 2015 11:06:19 +0100 Subject: [mapserver-users] getExtent for Postgis Layer Message-ID: <000f01d05cac$2f7436a0$8e5ca3e0$@de> Hi, I try to get the extent of my layers using php mapscript: $map= ms_newMapObj($mapfilepath.'\map.map'); $mylayer = $map->getLayerByName($getlayer); $layerextent = $mylayer->getExtent(); echo $layerextent->minx." ".$layerextent->miny." ".$layerextent->maxx." ".$layerextent->maxy; This works fine for layers with shapefiles, but there comes no result for my postgis layers. Any idea? Sven From Michael.Kalbermatten at ne.ch Thu Mar 12 03:19:55 2015 From: Michael.Kalbermatten at ne.ch (=?iso-8859-1?Q?Kalbermatten_Micha=EBl?=) Date: Thu, 12 Mar 2015 10:19:55 +0000 Subject: [mapserver-users] Inverted polygon shapeburst effect In-Reply-To: References: Message-ID: Just an update... I found some kind of solution... My polygon layer is a postgis layer, thus I just duplicated it in the mapfile, and added a st_translate on the geometry using an attribute of the table. In this new layer, I defined a class having multiple geotransform style tags. Something like the code hereunder. There is still some tuning to do and I don't know if that the best way to do it... but it might help other people Michael CLASS STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-20)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-19)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-18)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-17)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-16)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-15)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-14)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-13)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-12)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-11)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-10)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-9)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-8)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-7)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-6)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-5)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-4)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-3)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-2)) END STYLE OPACITY 5 COLOR 80 80 80 GEOMTRANSFORM (buffer([shape],-1)) END END De : mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] De la part de Kalbermatten Micha?l Envoy? : jeudi, 12 mars 2015 10:12 ? : mapserver-users at lists.osgeo.org Objet : [mapserver-users] Inverted polygon shapeburst effect Hi, I am looking for a way to create a shapeburst effect (or outer glow) on the outer side of a polygon. This is something which has been added to QGIS (using the inverted polygon option, see http://planet.qgis.org/planet/tag/shapeburst/) I was wondering if something like that was possible in MapServer ? I took a look at the doc but could not find anything relevant (maybe using geotransform, but then, how do I create the glow...). Does anyone have an advice ? Thanks ! Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at saabgroup.com Thu Mar 12 04:08:01 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Thu, 12 Mar 2015 11:08:01 +0000 Subject: [mapserver-users] KML reading through OGR In-Reply-To: References: Message-ID: <6a9f2c3cbf6b4c9b8004a97791345d83@corpappl843.corp.saab.se> From: alok mathur [mailto:mathuralok.88 at gmail.com] Sent: den 12 mars 2015 10:57 To: Schylberg Lars Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] KML reading through OGR You have to create symbol definitions to use in the mapfile: Plenty of examples on this page: http://mapserver.org/mapfile/symbology/construction.html#symbols-of-type-pixmap /Lars I want to create a styling for each placemark in .map file. Means If i have a KML containing one folder with multiple placemarks as shown below. I want to create a .map file which will contain style for each placemark. What if i have the same names of placemarks. Please help me to get the solution Eg. 413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpass at bgs.ac.uk Thu Mar 12 05:12:21 2015 From: jpass at bgs.ac.uk (Passmore, James H.) Date: Thu, 12 Mar 2015 12:12:21 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? Message-ID: <434A1C26835F5149BDE720F63902F72208BA78F84B@nerckwmbc.ad.nerc.ac.uk> I have a MapServer version 6.4.1 service set-up and was looking at the WFS GetCapabilities response: http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities& All my FeatureTypes have the following warning: The WFS is working though as far as I can see, for example, I get features when loading in QGIS. Is this a bug or have I got something wrong in the config? MAP.PROJECTION is set as: MAP CONFIG "PROJ_LIB" "C:/.../gisinternals/bin/proj/SHARE" CONFIG "MS_ERRORFILE" "C:/.../OGE2/ms_error.log" CONFIG "PGEO_DRIVER_TEMPLATE" "DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s" CONFIG "OGR_SKIP" "ODBC" EXTENT -8.7 49.8 1.8 60.9 PROJECTION #Default service projection "init=epsg:4326" END LAYER.PROJECTION (for example for GE.GeologicFault.BGS.EN.1M.Surface) is set as: LAYER NAME GE.GeologicFault.BGS.EN.1M.Surface EXTENT -8.01697 49.9678 0.715821 60.8368 PROJECTION "init=epsg:4326" END In addition I have: WEB METADATA "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" and: LAYER METADATA "OWS_EXTENT" "-8.01697 49.9678 0.715821 60.8368" "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" "WFS_OWS" "EPSG:4326" Thanks James Passmore GIS and WWW Specialist ------------------------------- British Geological Survey, Environmental Science Centre, KEYWORTH, United Kingdom, NG12 5GG Linked Data (vCard):http://data.bgs.ac.uk/ref/BritishGeologicalSurvey w3w:http://w3w.co/firmly.legs.craftsmen ------------------------------- Phone:+44 (0)115 936 3125 Fax:+44 (0)115 936 3200 ------------------------------- jpass at bgs.ac.uk http://www.bgs.ac.uk/ ------------------------------- Skype:BGSjames @nmtoken This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. From jmckenna at gatewaygeomatics.com Thu Mar 12 06:08:57 2015 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 12 Mar 2015 10:08:57 -0300 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? In-Reply-To: <434A1C26835F5149BDE720F63902F72208BA78F84B@nerckwmbc.ad.nerc.ac.uk> References: <434A1C26835F5149BDE720F63902F72208BA78F84B@nerckwmbc.ad.nerc.ac.uk> Message-ID: <55018FE9.9060102@gatewaygeomatics.com> On 2015-03-12 9:12 AM, Passmore, James H. wrote: > I have a MapServer version 6.4.1 service set-up and was looking at the WFS GetCapabilities response: > > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities& > > All my FeatureTypes have the following warning: > > > > The WFS is working though as far as I can see, for example, I get features when loading in QGIS. > > Is this a bug or have I got something wrong in the config? > > MAP.PROJECTION is set as: > > MAP > CONFIG "PROJ_LIB" "C:/.../gisinternals/bin/proj/SHARE" > CONFIG "MS_ERRORFILE" "C:/.../OGE2/ms_error.log" > CONFIG "PGEO_DRIVER_TEMPLATE" "DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s" > CONFIG "OGR_SKIP" "ODBC" > EXTENT -8.7 49.8 1.8 60.9 > PROJECTION > #Default service projection > "init=epsg:4326" > END > > LAYER.PROJECTION (for example for GE.GeologicFault.BGS.EN.1M.Surface) is set as: > > LAYER > NAME GE.GeologicFault.BGS.EN.1M.Surface > EXTENT -8.01697 49.9678 0.715821 60.8368 > PROJECTION > "init=epsg:4326" > END > > In addition I have: > > WEB > METADATA > "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" > > and: > > LAYER > METADATA > "OWS_EXTENT" "-8.01697 49.9678 0.715821 60.8368" > "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" > "WFS_OWS" "EPSG:4326" > > Thanks > > James Passmore > GIS and WWW Specialist > ------------------------------- > British Geological Survey, > Environmental Science Centre, > KEYWORTH, > United Kingdom, > NG12 5GG > Linked Data (vCard):http://data.bgs.ac.uk/ref/BritishGeologicalSurvey > w3w:http://w3w.co/firmly.legs.craftsmen You are missing the required parameter VERSION in your request. If I add it to your request I get no warnings: http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&VERSION=1.0.0 (hello from 'across the big pond') -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From jukka.rahkonen at maanmittauslaitos.fi Thu Mar 12 06:41:44 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 12 Mar 2015 13:41:44 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? Message-ID: <9b953dbecc64432e93ca43468bc14ea5@C119S212VM022.msvyvi.vaha.local> Hi Jeff, If you use &version=1.1.0 you'll see the warnings: http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&VERSION=1.1.0 -Jukka- Jeff McKenna wrote: On 2015-03-12 9:12 AM, Passmore, James H. wrote: > I have a MapServer version 6.4.1 service set-up and was looking at the WFS GetCapabilities response: > > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ > ows?service=WFS&request=GetCapabilities& > > All my FeatureTypes have the following warning: > > > > The WFS is working though as far as I can see, for example, I get features when loading in QGIS. > > Is this a bug or have I got something wrong in the config? > > MAP.PROJECTION is set as: > > MAP > CONFIG "PROJ_LIB" "C:/.../gisinternals/bin/proj/SHARE" > CONFIG "MS_ERRORFILE" "C:/.../OGE2/ms_error.log" > CONFIG "PGEO_DRIVER_TEMPLATE" "DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s" > CONFIG "OGR_SKIP" "ODBC" > EXTENT -8.7 49.8 1.8 60.9 > PROJECTION > #Default service projection > "init=epsg:4326" > END > > LAYER.PROJECTION (for example for GE.GeologicFault.BGS.EN.1M.Surface) is set as: > > LAYER > NAME GE.GeologicFault.BGS.EN.1M.Surface > EXTENT -8.01697 49.9678 0.715821 60.8368 > PROJECTION > "init=epsg:4326" > END > > In addition I have: > > WEB > METADATA > "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" > > and: > > LAYER > METADATA > "OWS_EXTENT" "-8.01697 49.9678 0.715821 60.8368" > "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" > "WFS_OWS" "EPSG:4326" > > Thanks > > James Passmore > GIS and WWW Specialist > ------------------------------- > British Geological Survey, > Environmental Science Centre, > KEYWORTH, > United Kingdom, > NG12 5GG > Linked Data (vCard):http://data.bgs.ac.uk/ref/BritishGeologicalSurvey > w3w:http://w3w.co/firmly.legs.craftsmen You are missing the required parameter VERSION in your request. If I add it to your request I get no warnings: http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&VERSION=1.0.0 (hello from 'across the big pond') -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 jmckenna at gatewaygeomatics.com Thu Mar 12 06:56:43 2015 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 12 Mar 2015 10:56:43 -0300 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? In-Reply-To: <9b953dbecc64432e93ca43468bc14ea5@C119S212VM022.msvyvi.vaha.local> References: <9b953dbecc64432e93ca43468bc14ea5@C119S212VM022.msvyvi.vaha.local> Message-ID: <55019B1B.8040705@gatewaygeomatics.com> Hi Jukka, I never do use 1.1.0 :) But please do let the reporter (James) know. Thanks, -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2015-03-12 10:41 AM, Rahkonen Jukka (MML) wrote: > Hi Jeff, > > If you use &version=1.1.0 you'll see the warnings: > > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&VERSION=1.1.0 > > > -Jukka- > > Jeff McKenna wrote: > > On 2015-03-12 9:12 AM, Passmore, James H. wrote: >> I have a MapServer version 6.4.1 service set-up and was looking at the WFS GetCapabilities response: >> >> http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ >> ows?service=WFS&request=GetCapabilities& >> >> All my FeatureTypes have the following warning: >> >> >> >> The WFS is working though as far as I can see, for example, I get features when loading in QGIS. >> >> Is this a bug or have I got something wrong in the config? >> >> MAP.PROJECTION is set as: >> >> MAP >> CONFIG "PROJ_LIB" "C:/.../gisinternals/bin/proj/SHARE" >> CONFIG "MS_ERRORFILE" "C:/.../OGE2/ms_error.log" >> CONFIG "PGEO_DRIVER_TEMPLATE" "DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s" >> CONFIG "OGR_SKIP" "ODBC" >> EXTENT -8.7 49.8 1.8 60.9 >> PROJECTION >> #Default service projection >> "init=epsg:4326" >> END >> >> LAYER.PROJECTION (for example for GE.GeologicFault.BGS.EN.1M.Surface) is set as: >> >> LAYER >> NAME GE.GeologicFault.BGS.EN.1M.Surface >> EXTENT -8.01697 49.9678 0.715821 60.8368 >> PROJECTION >> "init=epsg:4326" >> END >> >> In addition I have: >> >> WEB >> METADATA >> "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" >> >> and: >> >> LAYER >> METADATA >> "OWS_EXTENT" "-8.01697 49.9678 0.715821 60.8368" >> "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" >> "WFS_OWS" "EPSG:4326" >> >> Thanks >> >> James Passmore >> GIS and WWW Specialist >> ------------------------------- >> British Geological Survey, >> Environmental Science Centre, >> KEYWORTH, >> United Kingdom, >> NG12 5GG >> Linked Data (vCard):http://data.bgs.ac.uk/ref/BritishGeologicalSurvey >> w3w:http://w3w.co/firmly.legs.craftsmen > > > You are missing the required parameter VERSION in your request. If I add it to your request I get no warnings: > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&VERSION=1.0.0 > > (hello from 'across the big pond') > > -jeff > > > -- > Jeff McKenna > MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ > > > From Andreas.Eichner at sid.sachsen.de Thu Mar 12 07:30:34 2015 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Thu, 12 Mar 2015 14:30:34 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? In-Reply-To: <9b953dbecc64432e93ca43468bc14ea5@C119S212VM022.msvyvi.vaha.local> References: <9b953dbecc64432e93ca43468bc14ea5@C119S212VM022.msvyvi.vaha.local> Message-ID: <6F331135492B944D90731CE93743D5681D2DB4@FS-EX-DB101.fs.sachsen.de> Behavior might be unstable as msOWSGetEPSGProj() returns a pointer to a character buffer on the local stack frame. While WFS 1.0.0 code uses the result directly the WFS 1.1.0 code uses msOWSGetProjURN() as a wrapper around it which might disrupt the character buffer. I'm wondering how this could ever work at all... > -----Urspr?ngliche Nachricht----- > > If you use &version=1.1.0 you'll see the warnings: > > http://194.66.252.155/cgi- > bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCap > abilities&VERSION=1.1.0 > > You are missing the required parameter VERSION in your request. If I add > it to your request I get no warnings: > http://194.66.252.155/cgi- > bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCap > abilities&VERSION=1.0.0 From jpass at bgs.ac.uk Thu Mar 12 08:06:22 2015 From: jpass at bgs.ac.uk (Passmore, James H.) Date: Thu, 12 Mar 2015 15:06:22 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? In-Reply-To: References: Message-ID: <434A1C26835F5149BDE720F63902F72208BACB3BDC@nerckwmbc.ad.nerc.ac.uk> Thanks to Jeff and Jukka for commenting on this. > You are missing the required parameter VERSION in your request. If I add > it to your request I get no warnings: > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&VERSION=1.0.0 > > -- > Jeff McKenna > MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ > > Hi Jeff, > > If you use &version=1.1.0 you'll see the warnings: > > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&VERSION=1.1.0 > > > -Jukka- > So as I understand it to answer the original question, is there anything wrong with the config, the answer here is no, and the error message is indeed in error! MapServer is expecting a version number in the request, so the error message should perhaps reflect this facet. However both the WFS 1.0.0 and WFS 1.1.0 tell me that the version parameter is optional, so Mapserver shouldn't have this expectation. For example: Web Feature Service Implementation Specification, Version: 1.0.0 OGC 02-058 12.2 Request ... The service attribute is described in section 7.8. The version attribute, unlike the normal case, is not mandatory since a client application may not have apriori knowledge about what versions a server may support. The client and the server will need to apply the rules of version negotiation as described in Section 6.2.4. ... and Web Feature Service Implementation Specification, Version: 1.1.0 OGC 04-094 6.2.4 Version number negotiation An OWS Client may negotiate with a Service Instance to determine a mutually agreeable specification version. Negotiation is performed using the GetCapabilities operation [sec. 13] according to the following rules. All Capabilities XML must include a protocol version number. In response to a GetCapabilities request containing a version number, a web feature service must either respond with output that conforms to that version of the specification, or negotiate a mutually agreeable version if the requested version is not implemented on the server. If no version number is specified in the request, the server must respond with the highest version it understands and label the response accordingly. Cheers James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. From jukka.rahkonen at maanmittauslaitos.fi Thu Mar 12 08:32:41 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 12 Mar 2015 15:32:41 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? Message-ID: <0277e490b4104300ac6bfbe304679ba6@C119S212VM022.msvyvi.vaha.local> Hi James, You are right with the version negotiation but if you want to avoid troubles in real life you should not trust that it works as supposed. But in your case Mapserver behaves as it should. Browser do not know how to negotiate and Mapserver sends WFS 1.1.0 GetCapabilities as an answer to your request which lacks the version. 1.1.0 is the highest version that your Mapserver supports and thus the response is correct. In an attachment is a minimal mapfile for WFS 1.1.0 which emits no warnings into GetCapabilities. It works with the states.shp shapefile which comes with the demo data when you download Geoserver. Compare with your own mapfile and I believe that you will find what breaks it. At least you use a non-existing metadata in "WFS_OWS" "EPSG:4326" Tested with Mapserver 7.0-beta and WFS 1.0.0, 1.1.0, 2.0.0, and without "&version=". -Jukka Rahkonen- -----Alkuper?inen viesti----- L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Passmore, James H. L?hetetty: 12. maaliskuuta 2015 17:06 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? Thanks to Jeff and Jukka for commenting on this. > You are missing the required parameter VERSION in your request. If I > add it to your request I get no warnings: > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ > ows?service=WFS&request=GetCapabilities&VERSION=1.0.0 > > -- > Jeff McKenna > MapServer Consulting and Training Services > http://www.gatewaygeomatics.com/ > > Hi Jeff, > > If you use &version=1.1.0 you'll see the warnings: > > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ > ows?service=WFS&request=GetCapabilities&VERSION=1.1.0 > > > -Jukka- > So as I understand it to answer the original question, is there anything wrong with the config, the answer here is no, and the error message is indeed in error! MapServer is expecting a version number in the request, so the error message should perhaps reflect this facet. However both the WFS 1.0.0 and WFS 1.1.0 tell me that the version parameter is optional, so Mapserver shouldn't have this expectation. For example: Web Feature Service Implementation Specification, Version: 1.0.0 OGC 02-058 12.2 Request ... The service attribute is described in section 7.8. The version attribute, unlike the normal case, is not mandatory since a client application may not have apriori knowledge about what versions a server may support. The client and the server will need to apply the rules of version negotiation as described in Section 6.2.4. ... and Web Feature Service Implementation Specification, Version: 1.1.0 OGC 04-094 6.2.4 Version number negotiation An OWS Client may negotiate with a Service Instance to determine a mutually agreeable specification version. Negotiation is performed using the GetCapabilities operation [sec. 13] according to the following rules. All Capabilities XML must include a protocol version number. In response to a GetCapabilities request containing a version number, a web feature service must either respond with output that conforms to that version of the specification, or negotiate a mutually agreeable version if the requested version is not implemented on the server. If no version number is specified in the request, the server must respond with the highest version it understands and label the response accordingly. Cheers James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: states_wfs.map URL: From jpass at bgs.ac.uk Thu Mar 12 08:54:17 2015 From: jpass at bgs.ac.uk (Passmore, James H.) Date: Thu, 12 Mar 2015 15:54:17 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? In-Reply-To: <0277e490b4104300ac6bfbe304679ba6@C119S212VM022.msvyvi.vaha.local> References: <0277e490b4104300ac6bfbe304679ba6@C119S212VM022.msvyvi.vaha.local> Message-ID: <434A1C26835F5149BDE720F63902F72208BACB3C40@nerckwmbc.ad.nerc.ac.uk> Hi Jukka, Thanks you are correct. I added "WFS_OWS" "EPSG:4326" to the LAYER > METADATA section as a quick hack after getting those errors and it was too quick a hack. So changing the incorrect "WFS_OWS" "EPSG:4326" to the "WFS_SRS" "EPSG:4326" in the LAYER > METADATA makes the error message go away, but not having "WFS_SRS" "EPSG:4326" set in the LAYER > METADATA, but having the MAP > PROJECTION, and LAYER > PROJECTION, and LAYER > METADATA as "OWS_SRS" "list of SRS...", set results in the warning: So as I understand it this is still a bit buggy. The message should really read: thanks again James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. From jukka.rahkonen at maanmittauslaitos.fi Thu Mar 12 09:29:29 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 12 Mar 2015 16:29:29 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? Message-ID: Hi, With my minimal mapfile for the states.shp the behaviour seems to be as documented. Projection given in only one place from the list is enough for making the warning to disappear. Something that you have in a different way must make the difference. Some alternatives: - you do not use shapefiles - you have a longer list in LAYER "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" - some combination of per se correct metadata but appearing in several places; such interactions are usually not tested by developers, they are not good in imaging what all we users can write to our mapfiles. -Jukka- Passmore, James H. wrote: > Hi Jukka, > Thanks you are correct. > I added "WFS_OWS" "EPSG:4326" to the LAYER > METADATA section as a quick hack after getting those errors and it was too quick a hack. > So changing the incorrect "WFS_OWS" "EPSG:4326" to the "WFS_SRS" "EPSG:4326" in the LAYER > METADATA makes the error message go away, but not having "WFS_SRS" "EPSG:4326" set in the LAYER > METADATA, but having the MAP > PROJECTION, and LAYER > PROJECTION, and LAYER > METADATA as "OWS_SRS" "list of SRS...", set results in the warning: So as I understand it this is still a bit buggy. The message should really read: thanks again James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. From doug_newcomb at fws.gov Thu Mar 12 09:59:13 2015 From: doug_newcomb at fws.gov (Newcomb, Doug) Date: Thu, 12 Mar 2015 12:59:13 -0400 Subject: [mapserver-users] 4 band wms Message-ID: Hi Folks, Is there any way of serving up 4 bands of imagery as a wms that the client can switch from rgb to false color on the fly? I'm guessing not, that serving up 2 wms services would be the solution, but I would love to be corrected. Doug -- Doug Newcomb USFWS Raleigh, NC 919-856-4520 ext. 14 doug_newcomb at fws.gov --------------------------------------------------------------------------------------------------------- The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior. Life is too short for undocumented, proprietary data formats. -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug_newcomb at fws.gov Thu Mar 12 11:00:59 2015 From: doug_newcomb at fws.gov (Newcomb, Doug) Date: Thu, 12 Mar 2015 14:00:59 -0400 Subject: [mapserver-users] 4 band wms In-Reply-To: References: Message-ID: Looking over the WMS dimension documentation , http://mapserver.org/id/ogc/wms_dimension.html#processing-dimension-requests. Would that be a possibility? Doug On Thu, Mar 12, 2015 at 12:59 PM, Newcomb, Doug wrote: > Hi Folks, > Is there any way of serving up 4 bands of imagery as a wms that the client > can switch from rgb to false color on the fly? I'm guessing not, that > serving up 2 wms services would be the solution, but I would love to be > corrected. > > Doug > > -- > Doug Newcomb > USFWS > Raleigh, NC > 919-856-4520 ext. 14 doug_newcomb at fws.gov > > --------------------------------------------------------------------------------------------------------- > The opinions I express are my own and are not representative of the > official policy of the U.S.Fish and Wildlife Service or Dept. of the > Interior. Life is too short for undocumented, proprietary data formats. > -- Doug Newcomb USFWS Raleigh, NC 919-856-4520 ext. 14 doug_newcomb at fws.gov --------------------------------------------------------------------------------------------------------- The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior. Life is too short for undocumented, proprietary data formats. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Thu Mar 12 11:14:21 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 12 Mar 2015 18:14:21 +0000 Subject: [mapserver-users] 4 band wms In-Reply-To: References: Message-ID: <1426184062094.68560@maanmittauslaitos.fi> Hi, With PROCESSING - BANDS http://www.mapserver.org/input/raster.html you can make one layer RGB and another for CIR. Once RFC 109 http://mapserver.org/development/rfc/ms-rfc-109.html is implemented it will be possible to use one layer and let users to select the bands by including a variable with the GetMap requests. Read also http://osdir.com/ml/mapserver-development/2015-02/msg00032.html. I am not sure if this works already in Mapserver 7.0-beta. For RGB and CIR the two layer approach could be easier for both the users and administrators but situation will be different if there are more bands to select from, for example Landsat scenes. There may be also need to adjust colors with SCALE or LUT at the same. -Jukka Rahkonen- ________________________________ Newcomb, Doug wrote: > Hi Folks, > Is there any way of serving up 4 bands of imagery as a wms that the client can switch from rgb to false color on the fly? I'm guessing not, that serving up 2 wms services would be the solution, but I would love to be corrected. > Doug -- > Doug Newcomb USFWS Raleigh, NC 919-856-4520 ext. 14 doug_newcomb at fws.gov --------------------------------------------------------------------------------------------------------- The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior. Life is too short for undocumented, proprietary data formats. -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug_newcomb at fws.gov Thu Mar 12 11:22:35 2015 From: doug_newcomb at fws.gov (Newcomb, Doug) Date: Thu, 12 Mar 2015 14:22:35 -0400 Subject: [mapserver-users] 4 band wms In-Reply-To: <1426184062094.68560@maanmittauslaitos.fi> References: <1426184062094.68560@maanmittauslaitos.fi> Message-ID: Thanks! Doug On Thu, Mar 12, 2015 at 2:14 PM, Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > With PROCESSING - BANDS http://www.mapserver.org/input/raster.html you > can make one layer RGB and another for CIR. Once RFC 109 > > http://mapserver.org/development/rfc/ms-rfc-109.html is implemented it > will be possible to use one layer and let users to select the bands by > including a variable with the GetMap requests. Read also > > http://osdir.com/ml/mapserver-development/2015-02/msg00032.html. > I am > not sure if this works already in Mapserver 7.0-beta. > > > For RGB and CIR the two layer approach could be easier for both the > users and administrators but situation will be different if there are more > bands to select from, for example Landsat scenes. There may be also need to > adjust colors with SCALE or LUT at the same. > > > -Jukka Rahkonen- > > > ------------------------------ > Newcomb, Doug wrote: > > > Hi Folks, > > Is there any way of serving up 4 bands of imagery as a wms that the > client can switch from rgb to false color on the fly? I'm guessing not, > that serving up 2 wms services would be the solution, but I would love to > be corrected. > > > Doug > > -- > > Doug Newcomb > USFWS > Raleigh, NC > 919-856-4520 ext. 14 doug_newcomb at fws.gov > > --------------------------------------------------------------------------------------------------------- > The opinions I express are my own and are not representative of the > official policy of the U.S.Fish and Wildlife Service or Dept. of the > Interior. Life is too short for undocumented, proprietary data formats. > -- Doug Newcomb USFWS Raleigh, NC 919-856-4520 ext. 14 doug_newcomb at fws.gov --------------------------------------------------------------------------------------------------------- The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior. Life is too short for undocumented, proprietary data formats. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Weisbend at WAPA.GOV Thu Mar 12 11:57:50 2015 From: Weisbend at WAPA.GOV (Weisbender, Eric) Date: Thu, 12 Mar 2015 18:57:50 +0000 Subject: [mapserver-users] box query point data Message-ID: <9FE7B20682D2EE4CB9F40163E1EB4F08332972F5@afovsml1m.WAPA.INT> Hello List, I have a map file with an output projection of utm13. When I define a point layer that is in wgs84 it will only query one point at a time with a single click. When I try to query multiple points with a box query it returns nothing. I can't find any documentation that even resembles this issue so any help is greatly appreciated. Thanks Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Thu Mar 12 12:26:12 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 12 Mar 2015 19:26:12 +0000 Subject: [mapserver-users] box query point data In-Reply-To: <9FE7B20682D2EE4CB9F40163E1EB4F08332972F5@afovsml1m.WAPA.INT> References: <9FE7B20682D2EE4CB9F40163E1EB4F08332972F5@afovsml1m.WAPA.INT> Message-ID: <1426188372562.37178@maanmittauslaitos.fi> Hi, If you want to stay with OGC services, WMS GetFeatureInfo takes only a point as an input geometry. You can enlarge it to circle by using a bigger TOLERANCE setting in a mapfile (remember also to increase FEATURE_COUNT from the default which is one). For making queries from inside a box you should configure Mapserver to act also as a WFS server when you can do simple BBOX queries or advanced Intersects queries by using all sort of geometries as a reference geometry. Mapserver has also its own query systems which I do not have any experience at all http://www.mapserver.org/mapscript/querying.html -Jukka Rahkonen- ________________________________ Weisbender, Eric wrote: > Hello List, > I have a map file with an output projection of utm13. When I define a point layer that is in wgs84 it will only query one point at a time with a single click. When I try to query multiple points with a box query it returns nothing. I can't find any documentation that even resembles this issue so any help is greatly appreciated. Thanks Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Toutant at inspq.qc.ca Thu Mar 12 13:19:58 2015 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Thu, 12 Mar 2015 16:19:58 -0400 Subject: [mapserver-users] MS7 wfs Message-ID: hello Using mapserver 7 I make this request to get the number of features in a WFS layer. it returns numberOfFeatures="450361" http://localhost/cgi-bin/ms7?version=1.1.0&request=getfeature&service=wfs&typename=feature:aqreseau&resultType=hits this layer is a postgis table on localhost. This request takes 18 seconds to run with mapserver 7 in postgis select count(*) from table takes 61ms to run the same request using a geoserver WFS takes less than 1 second Is there something that can be done with MS7 to improve performance? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Thu Mar 12 13:57:38 2015 From: even.rouault at spatialys.com (Even Rouault) Date: Thu, 12 Mar 2015 21:57:38 +0100 Subject: [mapserver-users] MS7 wfs In-Reply-To: References: Message-ID: <1426193858.5501fdc237be8@imp.free.fr> Selon Steve.Toutant at inspq.qc.ca: > hello > Using mapserver 7 I make this request to get the number of features in a > WFS layer. it returns numberOfFeatures="450361" > http://localhost/cgi-bin/ms7?version=1.1.0&request=getfeature&service=wfs&typename=feature:aqreseau&resultType=hits > > this layer is a postgis table on localhost. > This request takes 18 seconds to run with mapserver 7 > in postgis select count(*) from table takes 61ms to run > the same request using a geoserver WFS takes less than 1 second > > Is there something that can be done with MS7 to improve performance? Not really unfortunately. Efficient count is something that should be implemented. Currently it basically retrieves each individual feature and iterates over them. So it takes nearly as much as time as getting the full features. > thanks > > > -- Spatialys - Geospatial professional services http://www.spatialys.com From Michael.Smith at erdc.dren.mil Thu Mar 12 14:42:50 2015 From: Michael.Smith at erdc.dren.mil (Smith, Michael ERDC-RDE-CRREL-NH) Date: Thu, 12 Mar 2015 21:42:50 +0000 Subject: [mapserver-users] [EXTERNAL] MS7 wfs In-Reply-To: References: Message-ID: One side note, you can set "wfs_compute_number_matched" "false" In the LAYER METADATA section to disable this. See http://mapserver.org/development/rfc/ms-rfc-105.html for details. ---- Michael Smith US Army Corps Remote Sensing GIS/Center michael.smith at usace.army.mil From: "Steve.Toutant at inspq.qc.ca" Date: Thursday, March 12, 2015 at 3:19 PM To: "mapserver-users at lists.osgeo.org" Subject: [EXTERNAL] [mapserver-users] MS7 wfs Resent-From: Michael Smith hello Using mapserver 7 I make this request to get the number of features in a WFS layer. it returns numberOfFeatures="450361" http://localhost/cgi-bin/ms7?version=1.1.0&request=getfeature&service=wfs&t ypename=feature:aqreseau&resultType=hits this layer is a postgis table on localhost. This request takes 18 seconds to run with mapserver 7 in postgis select count(*) from table takes 61ms to run the same request using a geoserver WFS takes less than 1 second Is there something that can be done with MS7 to improve performance? thanks From mathuralok.88 at gmail.com Thu Mar 12 23:01:20 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Fri, 13 Mar 2015 11:31:20 +0530 Subject: [mapserver-users] Calculate length! Message-ID: Hi, I want to calculate the length in mapserver. Is it possible. Means i have a linestring and i want to know the length for it. Also not could be suggest me how to do it. I am using data source to mapserver as KML. Thanks! -- *Alok Mathur* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at saabgroup.com Fri Mar 13 02:41:24 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Fri, 13 Mar 2015 09:41:24 +0000 Subject: [mapserver-users] Calculate length! In-Reply-To: References: Message-ID: <5e455588b1104d10a601e38b1e2ecacb@corpappl843.corp.saab.se> As far as I know there is no length function in Mapserver. The only geometry function to use in Expressions is area(shape). OGR sql doesn?t provide that either as far as I can see in the documentation. So the solutions might be to convert your KML data to sqlite or postgis where such functions are available. The length of a string (number of characters in the string) can be found in OGR sql with the length function, but I am assuming You are looking for the geometric length of the linestring. /Lars From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alok mathur Sent: den 13 mars 2015 07:01 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Calculate length! Hi, I want to calculate the length in mapserver. Is it possible. Means i have a linestring and i want to know the length for it. Also not could be suggest me how to do it. I am using data source to mapserver as KML. Thanks! -- Alok Mathur -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Fri Mar 13 02:46:09 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Fri, 13 Mar 2015 15:16:09 +0530 Subject: [mapserver-users] Calculate length! In-Reply-To: <5e455588b1104d10a601e38b1e2ecacb@corpappl843.corp.saab.se> References: <5e455588b1104d10a601e38b1e2ecacb@corpappl843.corp.saab.se> Message-ID: Thanks Lars. Yes I am looking for geometric length. On Fri, Mar 13, 2015 at 3:11 PM, Schylberg Lars < lars.schylberg at saabgroup.com> wrote: > As far as I know there is no length function in Mapserver. > > The only geometry function to use in Expressions is area(shape). > > OGR sql doesn?t provide that either as far as I can see in the > documentation. > > > > So the solutions might be to convert your KML data to sqlite or postgis > where such functions are available. > > > > The length of a string (number of characters in the string) can be found > in OGR sql with the length function, > but I am assuming You are looking for the geometric length of the > linestring. > > > > /Lars > > > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *alok mathur > *Sent:* den 13 mars 2015 07:01 > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] Calculate length! > > > > Hi, > > > > I want to calculate the length in mapserver. Is it possible. Means i have > a linestring and i want to know the length for it. > > Also not could be suggest me how to do it. > > > > I am using data source to mapserver as KML. > > > > Thanks! > > > > -- > > *Alok Mathur* > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Fri Mar 13 02:58:12 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 13 Mar 2015 09:58:12 +0000 Subject: [mapserver-users] Calculate length! Message-ID: <6a128f0144cf479e883ecdbafb6fbcfe@C119S212VM022.msvyvi.vaha.local> Hi Lars, You should not underestimate GDAL. Read http://www.gdal.org/ogr_sql_sqlite.html and look at this: ogrinfo -dialect sqlite -sql "select st_length(geometry) from line_demo limit 5" line_demo.shp INFO: Open of `line_demo.shp' using driver `ESRI Shapefile' successful. Layer name: SELECT Geometry: None Feature Count: 10 Layer SRS WKT: (unknown) st_length(geometry): Real (0.0) OGRFeature(SELECT):0 st_length(geometry) (Real) = 638.237633730745 OGRFeature(SELECT):1 st_length(geometry) (Real) = 32.7179011265525 OGRFeature(SELECT):2 st_length(geometry) (Real) = 4399.43983906202 OGRFeature(SELECT):3 st_length(geometry) (Real) = 480.395511976145 OGRFeature(SELECT):4 st_length(geometry) (Real) = 311.309421824364 -Jukka Rahkonen- Schylberg Lars wrote: As far as I know there is no length function in Mapserver. The only geometry function to use in Expressions is area(shape). OGR sql doesn?t provide that either as far as I can see in the documentation. So the solutions might be to convert your KML data to sqlite or postgis where such functions are available. The length of a string (number of characters in the string) can be found in OGR sql with the length function, but I am assuming You are looking for the geometric length of the linestring. /Lars From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alok mathur Sent: den 13 mars 2015 07:01 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Calculate length! Hi, I want to calculate the length in mapserver. Is it possible. Means i have a linestring and i want to know the length for it. Also not could be suggest me how to do it. I am using data source to mapserver as KML. Thanks! -- Alok Mathur -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpass at bgs.ac.uk Fri Mar 13 04:40:42 2015 From: jpass at bgs.ac.uk (Passmore, James H.) Date: Fri, 13 Mar 2015 11:40:42 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? In-Reply-To: References: Message-ID: <434A1C26835F5149BDE720F63902F72208BB452121@nerckwmbc.ad.nerc.ac.uk> Hi Jukka, Thanks for persevering with this. OK, so, the issue is not that I'm not using a shapefile (I'm using an OGR connection to an ESRI Geodatabase), or per se that I specified a list of SRS (the documentation shows a WFS_SRS list), but it is to do with the first cited SRS in the list. So this original WEB METADATA "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" fails but his works (that is the error message in the GetCapabilities goes away) WEB METADATA "OWS_SRS" "EPSG:4326 CRS:84 EPSG:27700 EPSG:3034 EPSG:4258" with no need to specify an OWS/WFS LAYER METADATA section. So the error message occurs when an unrecognized SRS is specified first. As I understand it the processing precedence (assuming everything is otherwise correct) is: MAP.WEB.METADATA.WFS_SRS (if this doesn't exist then check next) MAP.WEB.METADATA.OWS_SRS (if this doesn't exist then check next) MAP.PROJECTION (if this doesn't exist then check for the Feature) LAYER.METADATA.WFS_SRS LAYER.METADATA.OWS_SRS LAYER.PROJECTION If none then you get error: There does appear to be a different processing precedence if there is some issue with the SRS, in such a situation you get: MAP.WEB.METADATA.WFS_SRS (if this has error then check next) MAP.WEB.METADATA.OWS_SRS (if this has error then check for the Feature) LAYER.METADATA.WFS_SRS (if this has error then check next) LAYER.METADATA.OWS_SRS If there is still an error/issue you get the same (now misleading) message: I say misleading because MAP.PROJECTION, LAYER.PROJECTION are set here (EPSG:4326) but are ignored. It is further misleading because ows_srs metadata is also set. As I stated the service was working even with the warning in place (I think QGIS must just assume CRS:84 support because it isn't reported) e.g. this request 'works': http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GE.GeologicFault.BGS.EN.1M.Bedrock&SRSNAME=CRS:84 Really I am surprised that MapServer has been able to serve the request at all, but looking closer I see that I haven't got a CRS:84 response at all, what I have is an EPSG:4326 response, in fact I can specify any unrecognized SRSNAME and I get an EPSG:4326 response For example: http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GE.GeologicFault.BGS.EN.1M.Bedrock&SRSNAME=UGH:00. To me it looks like in the background MapServer must look at MAP.PROJECTION or LAYER.PROJECTION despite the error message, or else it must assume EPSG:4326 as a default. Cheers James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. From lars.schylberg at saabgroup.com Fri Mar 13 04:49:03 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Fri, 13 Mar 2015 11:49:03 +0000 Subject: [mapserver-users] Calculate length! In-Reply-To: <6a128f0144cf479e883ecdbafb6fbcfe@C119S212VM022.msvyvi.vaha.local> References: <6a128f0144cf479e883ecdbafb6fbcfe@C119S212VM022.msvyvi.vaha.local> Message-ID: <6493635ba4de4fc99f40013992dc6c9b@corpappl843.corp.saab.se> Hi Jukka, That is right and that is why I wrote about conversion to spatialite. Next questions is when it gets interesting. How can I get Mapserver to understand that it is sqlite dialect in the DATA statement? If this would be the case: CONNECTIONTYPE OGR CONNECTION "doc_test.kml" DATA "select st_length(geometry) from line_demo limit 5" As far as I understand it defaults to regular OGR sql. I was looking for an answer a couple of months ago but didn?t find any solution. Somewhere I have seen that pszDialect can be set to "SQLITE". But can that be done in the mapfile? I have also seen in old message from You about a undocumented workaround with VRT Is that the solution? I have a similar issue myself where I would like work against another OGR format but with sqlite syntax. /Lars From: Rahkonen Jukka (MML) [mailto:jukka.rahkonen at maanmittauslaitos.fi] Sent: den 13 mars 2015 10:58 To: Schylberg Lars; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Calculate length! Hi Lars, You should not underestimate GDAL. Read http://www.gdal.org/ogr_sql_sqlite.html and look at this: ogrinfo -dialect sqlite -sql "select st_length(geometry) from line_demo limit 5" line_demo.shp INFO: Open of `line_demo.shp' using driver `ESRI Shapefile' successful. Layer name: SELECT Geometry: None Feature Count: 10 Layer SRS WKT: (unknown) st_length(geometry): Real (0.0) OGRFeature(SELECT):0 st_length(geometry) (Real) = 638.237633730745 OGRFeature(SELECT):1 st_length(geometry) (Real) = 32.7179011265525 OGRFeature(SELECT):2 st_length(geometry) (Real) = 4399.43983906202 OGRFeature(SELECT):3 st_length(geometry) (Real) = 480.395511976145 OGRFeature(SELECT):4 st_length(geometry) (Real) = 311.309421824364 -Jukka Rahkonen- Schylberg Lars wrote: As far as I know there is no length function in Mapserver. The only geometry function to use in Expressions is area(shape). OGR sql doesn?t provide that either as far as I can see in the documentation. So the solutions might be to convert your KML data to sqlite or postgis where such functions are available. The length of a string (number of characters in the string) can be found in OGR sql with the length function, but I am assuming You are looking for the geometric length of the linestring. /Lars From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alok mathur Sent: den 13 mars 2015 07:01 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Calculate length! Hi, I want to calculate the length in mapserver. Is it possible. Means i have a linestring and i want to know the length for it. Also not could be suggest me how to do it. I am using data source to mapserver as KML. Thanks! -- Alok Mathur -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Fri Mar 13 05:02:56 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 13 Mar 2015 12:02:56 +0000 Subject: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config? Message-ID: <51145dbcf6ef47ba919710fcfc016a92@C119S212VM022.msvyvi.vaha.local> Hi, It looks that at the moment this GetCapabilities is not valid: http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFS&request=GetCapabilities&version=1.1.0 The WFS 1.1.0 schema contains So, there must be either DefaultSRS or then NoSRS advertised, and with DefaultSRS optionally a list of OtherSRS. Standard says that if srsname is not included in the request then the DefaultSRS is used, and that is advertised in the OtherSRS list must be supported. However, it does not say what should happen if request contains an unknown srsname (SRSNAME=UGH:00). Somehow I would like to see an error message but your Mapserver selects to use the default SRS. Here is part of the standard: "The optional srsName attribute of the element is used to specify a specific WFS-supported SRS to be used for returned feature geometries. Its value may be the or any of the values listed for the feature type in WFS capabilities document. If no srsName value is supplied, then the features shall be returned using the advertised value. This attribute has no meaning for feature types with no spatial properties; if an srsName value is specified for a feature with no spatial properties, a web feature service may ignore the parameter and its value. Any valid URI value can be assigned to the srsName attribute. However, in order to enhance interoperability, a web feature service must be able to process srsName attribute values with the following format models..." I suggest to go on with testing and make a bug report if you can confirm with a reproducible way that DefaultSRS is missing. -Jukka Rahkonen- Passmore, James H. wrote: > Hi Jukka, > Thanks for persevering with this. > OK, so, the issue is not that I'm not using a shapefile (I'm using an OGR connection to an ESRI Geodatabase), or per se that I specified a list of SRS (the documentation shows a WFS_SRS list), but it is to do with the first cited SRS in the list. > So this original WEB METADATA "OWS_SRS" "CRS:84 EPSG:27700 EPSG:3034 EPSG:4258 EPSG:4326" fails > but his works (that is the error message in the GetCapabilities goes away) > WEB METADATA "OWS_SRS" "EPSG:4326 CRS:84 EPSG:27700 EPSG:3034 EPSG:4258" > with no need to specify an OWS/WFS LAYER METADATA section. > So the error message occurs when an unrecognized SRS is specified first. > As I understand it the processing precedence (assuming everything is otherwise correct) is: > MAP.WEB.METADATA.WFS_SRS (if this doesn't exist then check next) MAP.WEB.METADATA.OWS_SRS (if this doesn't exist then check next) MAP.PROJECTION (if this doesn't exist then check for the Feature) LAYER.METADATA.WFS_SRS LAYER.METADATA.OWS_SRS LAYER.PROJECTION > If none then you get error: > There does appear to be a different processing precedence if there is some issue with the SRS, in such a situation you get: > MAP.WEB.METADATA.WFS_SRS (if this has error then check next) MAP.WEB.METADATA.OWS_SRS (if this has error then check for the Feature) LAYER.METADATA.WFS_SRS (if this has error then check next) LAYER.METADATA.OWS_SRS > If there is still an error/issue you get the same (now misleading) message: > I say misleading because MAP.PROJECTION, LAYER.PROJECTION are set here (EPSG:4326) but are ignored. It is further misleading because ows_srs metadata is also set. > As I stated the service was working even with the warning in place (I think QGIS must just assume CRS:84 support because it isn't reported) e.g. this request 'works': > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GE.GeologicFault.BGS.EN.1M.Bedrock&SRSNAME=CRS:84 > Really I am surprised that MapServer has been able to serve the request at all, but looking closer I see that I haven't got a CRS:84 response at all, what I have is an EPSG:4326 response, in fact I can specify any unrecognized SRSNAME and I get an EPSG:4326 response > For example: > http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GE.GeologicFault.BGS.EN.1M.Bedrock&SRSNAME=UGH:00. > To me it looks like in the background MapServer must look at MAP.PROJECTION or LAYER.PROJECTION despite the error message, or else it must assume EPSG:4326 as a default. Cheers James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. From aperi2007 at gmail.com Sat Mar 14 08:05:37 2015 From: aperi2007 at gmail.com (Andrea Peri) Date: Sat, 14 Mar 2015 16:05:37 +0100 Subject: [mapserver-users] Using FILTER with OGR and spatialite Message-ID: Hi, I'm try-ing without success to set a filter in a spatialite db I'm not sure my setting are right. I'm using this settings: CONNECTIONTYPE OGR CONNECTION '/path-to-spatialite-db/spatialite.sqlite' DATA 'table1' FILTER "FIELD1 = 'val-1' and (FIELD2 like '%idtpn%' )" FILTERITEM 'FIELD1' VALIDATION 'idtpn' '^[a-zA-Z0-9\-_]+$' 'default_idtpn' '%' END Because I'm see nothing in the map, but no error are reported in debug-log. I guess the setting are wrong. But I dont understand what is wrong. Many thx to everyone . -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From aperi2007 at gmail.com Sat Mar 14 08:29:26 2015 From: aperi2007 at gmail.com (Andrea Peri) Date: Sat, 14 Mar 2015 16:29:26 +0100 Subject: [mapserver-users] Using FILTER with OGR and spatialite In-Reply-To: References: Message-ID: Hi, I resolve the question. The right setting was FILTER "WHERE FIELD1 = 'val-1' and (FIELD2 like '%idtpn%' )" Regards, A. 2015-03-14 16:05 GMT+01:00 Andrea Peri : > Hi, > I'm try-ing without success to set a filter in a spatialite db > I'm not sure my setting are right. > > I'm using this settings: > > CONNECTIONTYPE OGR > CONNECTION '/path-to-spatialite-db/spatialite.sqlite' > DATA 'table1' > FILTER "FIELD1 = 'val-1' and (FIELD2 like '%idtpn%' )" > FILTERITEM 'FIELD1' > VALIDATION > 'idtpn' '^[a-zA-Z0-9\-_]+$' > 'default_idtpn' '%' > END > > Because I'm see nothing in the map, but no error are reported in debug-log. > I guess the setting are wrong. > But I dont understand what is wrong. > > Many thx to everyone . > > > -- > ----------------- > Andrea Peri > . . . . . . . . . > qwerty ????? > ----------------- -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From lars.schylberg at saabgroup.com Sun Mar 15 11:59:52 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Sun, 15 Mar 2015 18:59:52 +0000 Subject: [mapserver-users] Calculate length! In-Reply-To: <6493635ba4de4fc99f40013992dc6c9b@corpappl843.corp.saab.se> References: <6a128f0144cf479e883ecdbafb6fbcfe@C119S212VM022.msvyvi.vaha.local> <6493635ba4de4fc99f40013992dc6c9b@corpappl843.corp.saab.se> Message-ID: <201eb0be19894bd9b67c23433584753b@corpappl843.corp.saab.se> Hi Jukka, You were right about that is possible to calculate length of a line in a KML file in Mapserver via ogr and sqlite. It is possible with a VRT file. I had some weekend fun learning. This will be useful in another project I am doing! The only trouble I found, was that I could not get the relativeToVRT=1 to work when I did an inline specification of the ovf in the mapfile. The only way to get the inline ScrDataSource specification to work was to use a full path description to the kml file location. In most cases I like to use relative location specifications. Shapepath specification in the mapfile didn?t help /Lars Example follows: Make a ovf-file: doc_test.ovf ./doc_test.kml select geometry, Name, cast(OGR_STYLE as chartater(32)) as 'LINE_STYLE', cast(ST_length(geometry, 4857) as integer(12)) as 'DISTANCE' FROM 'Fibertech solution' where ST_GeometryType(geometry) LIKE 'LINESTRING%' The class from the new mapfile. LAYER CONNECTIONTYPE OGR CONNECTION "doc_test.ovf" DATA 'doc_test' NAME "kml_example" GROUP LINES TYPE LINE STATUS ON CLASSITEM "LINE_STYLE" CLASS EXPRESSION "@msn_ylw-pushpin4" STYLE COLOR 250 0 0 WIDTH 2.5 END LABEL TEXT ("Distance: " + '[DISTANCE]' + ' meters ' + '#' + '[Name]') WRAP '#' SIZE MEDIUM COLOR 255 100 100 POSITION AUTO END END ??. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Mon Mar 16 01:53:37 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Mon, 16 Mar 2015 14:23:37 +0530 Subject: [mapserver-users] Calculate length! In-Reply-To: <9fd75c4c3a044a1c894ede725eb844bb@C119S212VM022.msvyvi.vaha.local> References: <9fd75c4c3a044a1c894ede725eb844bb@C119S212VM022.msvyvi.vaha.local> Message-ID: Hi Jukka, When i am trying to run the above ogr command as mentioned by you I am getting an error ogrinfo -dialect sqlite -sql "select st_length(geometry) from 'Fibertech solution'" doc_test.kml INFO: Open of `doc_test.kml' using driver `LIBKML' successful. ERROR 1: In ExecuteSQL(): sqlite3_prepare(select st_length(geometry) from 'Fibertech solution'): no such function: st_length Please let me know what the issue is. I have installed both libsqlite3 and libspatialite. Thanks! Alok On Fri, Mar 13, 2015 at 5:04 PM, Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > You do not need anything else than GDAL which is compiled with libraries > libsqlite3 and libspatialite. > > If you have a suitable GDAL version you should be able to repeat this with > the attached small KML file. > > > > > > ogrinfo -dialect sqlite -sql "select st_length(geometry) from Layer0" > lines.kml > > INFO: Open of `lines.kml' > > using driver `LIBKML' successful. > > > > Layer name: SELECT > > Geometry: None > > Feature Count: 2 > > Layer SRS WKT: > > (unknown) > > st_length(geometry): Real (0.0) > > OGRFeature(SELECT):0 > > st_length(geometry) (Real) = 38.2726390753108 > > > > OGRFeature(SELECT):1 > > st_length(geometry) (Real) = 34.5939953221416 > > > > -Jukka Rahkonen- > > > > > > alok mathur wrote: > > > > Hi Rahkonen, > > > > I have a KML as data source and I am not using sqlite or postgis. > > I am reading the KML from ogrinfo. is there anyway to do the length > calculation without using sqlite or postgis. > > > > Thanks! > > Alok > > > > On Fri, Mar 13, 2015 at 3:28 PM, Rahkonen Jukka (MML) < > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > Hi Lars, > > > > You should not underestimate GDAL. Read > http://www.gdal.org/ogr_sql_sqlite.html and look at this: > > > > ogrinfo -dialect sqlite -sql "select st_length(geometry) from line_demo > limit 5" line_demo.shp > > INFO: Open of `line_demo.shp' > > using driver `ESRI Shapefile' successful. > > > > Layer name: SELECT > > Geometry: None > > Feature Count: 10 > > Layer SRS WKT: > > (unknown) > > st_length(geometry): Real (0.0) > > OGRFeature(SELECT):0 > > st_length(geometry) (Real) = 638.237633730745 > > OGRFeature(SELECT):1 > > st_length(geometry) (Real) = 32.7179011265525 > > OGRFeature(SELECT):2 > > st_length(geometry) (Real) = 4399.43983906202 > > OGRFeature(SELECT):3 > > st_length(geometry) (Real) = 480.395511976145 > > OGRFeature(SELECT):4 > > st_length(geometry) (Real) = 311.309421824364 > > -Jukka Rahkonen- > > > > > > Schylberg Lars wrote: > > > > As far as I know there is no length function in Mapserver. > > The only geometry function to use in Expressions is area(shape). > > OGR sql doesn?t provide that either as far as I can see in the > documentation. > > > > So the solutions might be to convert your KML data to sqlite or postgis > where such functions are available. > > > > The length of a string (number of characters in the string) can be found > in OGR sql with the length function, > but I am assuming You are looking for the geometric length of the > linestring. > > > > /Lars > > > > *From:* mapserver-users-bounces at lists.osgeo.org [ > mailto:mapserver-users-bounces at lists.osgeo.org > ] *On Behalf Of *alok mathur > *Sent:* den 13 mars 2015 07:01 > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] Calculate length! > > > > Hi, > > > > I want to calculate the length in mapserver. Is it possible. Means i have > a linestring and i want to know the length for it. > > Also not could be suggest me how to do it. > > > > I am using data source to mapserver as KML. > > > > Thanks! > > > > -- > > *Alok Mathur* > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > > -- > > *Alok Mathur* | Software Engineer 2A | Ciena > Mobile +91 9899413266 > -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rishe28 at gmail.com Mon Mar 16 02:54:10 2015 From: rishe28 at gmail.com (rishi) Date: Mon, 16 Mar 2015 15:24:10 +0530 Subject: [mapserver-users] polygon fill Message-ID: hi all iam trying to highlight the villages based on query but only one polygon is highlighting the query is based on the area of the villages, when user enters area <=********** ,it is displaying 13 villages in the grid and also same time it has to highlight the villages on the map my code is aspx page protected void btnselect_Click(object sender, EventArgs e) { string query = ""; query = String.Format(" select gid,box(geom),villname,geom,area(geom) from villages where area(geom) " + ddlsymb.SelectedValue + " " + txtarea.Text + " "); dt = MyClass.getData(query); if (dt == null || dt.Rows.Count == 0) { Response.Write("No record found, Try Zoom in and click close to feature."); } else { dr = dt.Rows[0]; //String selectedGID = dr["gid"].ToString(); //gid = selectedGID; var layername = "villages"; for(int i=0;iwindow.parent.highlightnav('{0}','{1}');", gid, layername)); //Locate(query); } if (dt.Columns.Contains("gid")) { dt.Columns.Remove("gid"); } if (dt.Columns.Contains("geom")) { dt.Columns.Remove("geom"); } GridView1.DataSource = dt; GridView1.DataBind(); } } js page function highlightnav(gid,layername) { bPoint.params.gid = gid; bPoint.params.tbl = layername; //bPoint.params.getElementById = geom; bPoint.redraw(); } mapfile bpoint.map MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 TRANSPARENT on IMAGETYPE png SIZE 450 500 SYMBOLSET "symbols.txt" web metadata wms_srs "EPSG:4326 EPSG:900913" end end LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=****** dbname=mpdb port=5432" DATA "geom FROM (select geom,gid from %tbl% where gid=%gid%)as foo using srid=900913 using unique gid" STATUS Default TYPE point PROJECTION "init=epsg:900913" END class style symbol 'line20' color 255 0 0 size 10 end end END END i created for loop, to highlight all the polygons, but it is highlighting only one polygon. plz tell me the code -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at saabgroup.com Mon Mar 16 05:09:49 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Mon, 16 Mar 2015 12:09:49 +0000 Subject: [mapserver-users] Calculate length! In-Reply-To: References: <9fd75c4c3a044a1c894ede725eb844bb@C119S212VM022.msvyvi.vaha.local> Message-ID: <28b13c0d7ac84c2d858fe32f8d851320@corpappl843.corp.saab.se> I guess this must be a version problem. That same command runs fine on my osgeolive8 machine. ogrinfo --version GDAL 1.10.1, released 2013/08/26 /Lars From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alok mathur Sent: den 16 mars 2015 09:54 To: Rahkonen Jukka (MML); mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Calculate length! Hi Jukka, When i am trying to run the above ogr command as mentioned by you I am getting an error ogrinfo -dialect sqlite -sql "select st_length(geometry) from 'Fibertech solution'" doc_test.kml INFO: Open of `doc_test.kml' using driver `LIBKML' successful. ERROR 1: In ExecuteSQL(): sqlite3_prepare(select st_length(geometry) from 'Fibertech solution'): no such function: st_length Please let me know what the issue is. I have installed both libsqlite3 and libspatialite. Thanks! Alok -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathuralok.88 at gmail.com Mon Mar 16 05:28:57 2015 From: mathuralok.88 at gmail.com (alok mathur) Date: Mon, 16 Mar 2015 17:58:57 +0530 Subject: [mapserver-users] Calculate length! In-Reply-To: <28b13c0d7ac84c2d858fe32f8d851320@corpappl843.corp.saab.se> References: <9fd75c4c3a044a1c894ede725eb844bb@C119S212VM022.msvyvi.vaha.local> <28b13c0d7ac84c2d858fe32f8d851320@corpappl843.corp.saab.se> Message-ID: Lars, I have the latest OGR GDAL 1.11.2, released 2015/02/10 Thanks! Alok On Mon, Mar 16, 2015 at 5:39 PM, Schylberg Lars < lars.schylberg at saabgroup.com> wrote: > I guess this must be a version problem. That same command runs fine on > my osgeolive8 machine. > > > > ogrinfo --version > > GDAL 1.10.1, released 2013/08/26 > > > > /Lars > > > > > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *alok mathur > *Sent:* den 16 mars 2015 09:54 > *To:* Rahkonen Jukka (MML); mapserver-users at lists.osgeo.org > *Subject:* Re: [mapserver-users] Calculate length! > > > > Hi Jukka, > > > > When i am trying to run the above ogr command as mentioned by you I am > getting an error > > > > ogrinfo -dialect sqlite -sql "select st_length(geometry) from 'Fibertech > solution'" doc_test.kml > > INFO: Open of `doc_test.kml' > > using driver `LIBKML' successful. > > ERROR 1: In ExecuteSQL(): sqlite3_prepare(select st_length(geometry) from > 'Fibertech solution'): > > no such function: st_length > > > > > > > > Please let me know what the issue is. I have installed both libsqlite3 and > libspatialite. > > > > Thanks! > > Alok > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- *Alok Mathur* | Software Engineer 2A | Ciena Mobile +91 9899413266 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Mon Mar 16 05:33:23 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Mon, 16 Mar 2015 12:33:23 +0000 Subject: [mapserver-users] Calculate length! Message-ID: <3361067ba6b447ef92829cba242a0d8b@C119S212VM022.msvyvi.vaha.local> Hi, The GDAL version is not what is essential but the version of the dependent Spatialite library. GDAL must be compiled with such Spatialite version that has support for ST_Length. The error means either that Spatialite is missing totally or that it is of too old version and in this case it is obvioustly the latter. However, there may be a simple solution. ST-functions are new synonyms but your older Spatialite version may support the native name that Spatialite has used for the function https://www.gaia-gis.it/gaia-sins/xmlBlob/spatialite-sql-latest.html. Try if SELECT glength(geometry) happens to work. Otherwise you must try to find a GDAL version that is compiled with more fresh Spatialite. -Jukka Rahkonen- Schylberg Lars wrote: I guess this must be a version problem. That same command runs fine on my osgeolive8 machine. ogrinfo --version GDAL 1.10.1, released 2013/08/26 /Lars From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alok mathur Sent: den 16 mars 2015 09:54 To: Rahkonen Jukka (MML); mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Calculate length! Hi Jukka, When i am trying to run the above ogr command as mentioned by you I am getting an error ogrinfo -dialect sqlite -sql "select st_length(geometry) from 'Fibertech solution'" doc_test.kml INFO: Open of `doc_test.kml' using driver `LIBKML' successful. ERROR 1: In ExecuteSQL(): sqlite3_prepare(select st_length(geometry) from 'Fibertech solution'): no such function: st_length Please let me know what the issue is. I have installed both libsqlite3 and libspatialite. Thanks! Alok -------------- next part -------------- An HTML attachment was scrubbed... URL: From aperi2007 at gmail.com Mon Mar 16 08:51:59 2015 From: aperi2007 at gmail.com (Andrea Peri) Date: Mon, 16 Mar 2015 16:51:59 +0100 Subject: [mapserver-users] How use a spatialite as tileindex for raster Message-ID: Hi, reading the mapserver docs, I understand that is possible to use every OGR datasource to access a raster catalog using tileindex. So I try to use a spatialite as tileindex. I try this setting but without success. NAME "rt_ofc2k.ofc2k" STATUS OFF EXTENT 555870.99 4677465.00 752890.00 4924883.05 TYPE raster CONNECTIONTYPE OGR CONNECTION "/pth-to-spatialite/db.sqlite" TILEINDEX 'table' TILEITEM 'location' The error reported from log is: [Mon Mar 16 16:49:58 2015].129679 msShapefileOpen(): Unable to access file. (/home/..../table) Perhaps is not true that an OGR spatialite can be used as tileindex source ? Thx, -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- From jukka.rahkonen at maanmittauslaitos.fi Mon Mar 16 09:25:02 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Mon, 16 Mar 2015 16:25:02 +0000 Subject: [mapserver-users] How use a spatialite as tileindex for raster In-Reply-To: References: Message-ID: <1426523101655.76722@maanmittauslaitos.fi> Hi Andrea, I share your feelings, it is odd. Therefore I wrote this mail and now when I am lost I can search for "spatialite ogr tileindex rahkonen" http://osgeo-org.1560.x6.nabble.com/How-to-use-Spatialite-as-a-TILEINDEX-td4228164.html -Jukka Rahkonen- ________________________________________ Andrea Peri wrote: > Hi, reading the mapserver docs, I understand that is possible to use every OGR datasource to access a raster catalog using tileindex. > So I try to use a spatialite as tileindex. > I try this setting but without success. NAME "rt_ofc2k.ofc2k" STATUS OFF EXTENT 555870.99 4677465.00 752890.00 4924883.05 TYPE raster CONNECTIONTYPE OGR CONNECTION "/pth-to-spatialite/db.sqlite" TILEINDEX 'table' TILEITEM 'location' The error reported from log is: [Mon Mar 16 16:49:58 2015].129679 msShapefileOpen(): Unable to access file. (/home/..../table) Perhaps is not true that an OGR spatialite can be used as tileindex source ? Thx, -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From collaborista at gmail.com Mon Mar 16 17:23:39 2015 From: collaborista at gmail.com (Karma Kolabor) Date: Tue, 17 Mar 2015 01:23:39 +0100 Subject: [mapserver-users] Rendering OSM Data on Ubuntu 14.04 ? Message-ID: Hi, I found this [1] wiki page about Rendering OSM data on Ubuntu 12.04 - well, now I would like to ask if these instructions are still valid for Ubuntu 14.04 or if I will run into problems following that guide? Also I would like to ask: does exist some script (or some recipe for any configuration management system) that automates the steps described in the wiki page, what would make it possible to set this up without too many options for errors? Thank you very much for your attention, Karma [1] https://github.com/mapserver/mapserver/wiki/Rendering-OSM-data-on-Ubuntu-12.04 From aboulenein.ahmed at gmail.com Tue Mar 17 07:18:40 2015 From: aboulenein.ahmed at gmail.com (Ahmed Aboulenein) Date: Tue, 17 Mar 2015 16:18:40 +0200 Subject: [mapserver-users] Best integration with dynamic map information Message-ID: Hi ALL, We serve traffic lines that gets updated every 5 minutes from our feeds. We would like to use Map Server to generate transparent tiles showing colored polylines of the traffic. I am newbie to Map Server, I got the server and workshop running and also I think I have some good understanding of the map file and layers concept. I have a question about integrating our traffic information as a data source to the MapServer. Important aspects for us: 1. Performance: since we are updating large areas every 5 minutes. We will need throughput like 10K images per second. Does this sound okay? 2. Threads safety: my concern what happens if while updating the source, the MapServer is actually rendering an image from old data. Any locks? I understand our options are: 1. Data files: such as shape files or KML files. 2. Database: PostGIS for example. 3. Service that pulls data: WMS server - I didn't dig much here. Thanks in advance for your help, some pointers or information to go further. Best regards, Ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Tue Mar 17 11:03:13 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 17 Mar 2015 18:03:13 +0000 Subject: [mapserver-users] Best integration with dynamic map information In-Reply-To: References: Message-ID: I?ll let others weigh in on throughput. Seems like that should be a matter of resources and how much hardware you can throw at the problem. Are you using MapCache to serve tiles? MapServer itself is good for rendering tiles or more likely, metatiles. On thread safety MapServer itself isn?t doing any file locking. Presumably the OS or database is handling contention issues. I?d think the right way to go for data storage depends on your update process itself. If you want to incrementally tweak lines as new information becomes available then a database backend seems more reasonable ? I?d think you could detect change easier and perhaps only retile very specific areas as a result. If instead you?re getting a new copy of your entire dataset every 5 minutes then perhaps a shapefile would work best ? just replace the file and trigger retiling. Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ahmed Aboulenein Sent: Tuesday, March 17, 2015 9:19 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Best integration with dynamic map information Hi ALL, We serve traffic lines that gets updated every 5 minutes from our feeds. We would like to use Map Server to generate transparent tiles showing colored polylines of the traffic. I am newbie to Map Server, I got the server and workshop running and also I think I have some good understanding of the map file and layers concept. I have a question about integrating our traffic information as a data source to the MapServer. Important aspects for us: 1. Performance: since we are updating large areas every 5 minutes. We will need throughput like 10K images per second. Does this sound okay? 2. Threads safety: my concern what happens if while updating the source, the MapServer is actually rendering an image from old data. Any locks? I understand our options are: 1. Data files: such as shape files or KML files. 2. Database: PostGIS for example. 3. Service that pulls data: WMS server - I didn't dig much here. Thanks in advance for your help, some pointers or information to go further. Best regards, Ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: From aboulenein.ahmed at gmail.com Tue Mar 17 12:53:42 2015 From: aboulenein.ahmed at gmail.com (Ahmed Aboulenein) Date: Tue, 17 Mar 2015 21:53:42 +0200 Subject: [mapserver-users] Best integration with dynamic map information In-Reply-To: References: Message-ID: Hi Steve, Thank you so much for the informative reply, much appreciated! It's actually a new dataset copy every 5 minutes, it seems like replacing a shape file would be most efficient. We are not using MapCache, do you think it would be a good option for our use case with this frequent updates? Thanks again, Steve! Best regards, Ahmed On Tue, Mar 17, 2015 at 8:03 PM, Lime, Steve D (MNIT) < Steve.Lime at state.mn.us> wrote: > I?ll let others weigh in on throughput. Seems like that should be a > matter of resources and how much hardware you can throw at the problem. Are > you using MapCache to serve tiles? MapServer itself is good for rendering > tiles or more likely, metatiles. > > > > On thread safety MapServer itself isn?t doing any file locking. Presumably > the OS or database is handling contention issues. I?d think the right way > to go for data storage depends on your update process itself. If you want > to incrementally tweak lines as new information becomes available then a > database backend seems more reasonable ? I?d think you could detect change > easier and perhaps only retile very specific areas as a result. If instead > you?re getting a new copy of your entire dataset every 5 minutes then > perhaps a shapefile would work best ? just replace the file and trigger > retiling. > > > > Steve > > > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Ahmed Aboulenein > *Sent:* Tuesday, March 17, 2015 9:19 AM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] Best integration with dynamic map information > > > > Hi ALL, > > We serve traffic lines that gets updated every 5 minutes from our feeds. > We would like to use Map Server to generate transparent tiles showing > colored polylines of the traffic. > > I am newbie to Map Server, I got the server and workshop running and also > I think I have some good understanding of the map file and layers concept. > I have a question about integrating our traffic information as a data > source to the MapServer. > > Important aspects for us: > > 1. Performance: since we are updating large areas every 5 minutes. We will > need throughput like 10K images per second. Does this sound okay? > > 2. Threads safety: my concern what happens if while updating the source, > the MapServer is actually rendering an image from old data. Any locks? > > I understand our options are: > > 1. Data files: such as shape files or KML files. > > 2. Database: PostGIS for example. > > 3. Service that pulls data: WMS server - I didn't dig much here. > > Thanks in advance for your help, some pointers or information to go > further. > > Best regards, > > Ahmed > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Tue Mar 17 13:41:05 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 17 Mar 2015 20:41:05 +0000 Subject: [mapserver-users] Best integration with dynamic map information In-Reply-To: References: Message-ID: MapCache would be a *much* better option than using MapServer in tile mode. You still need something to render tiles (e.g. MapServer) but MapCache manages the tiles and is the interface between your client application and the tiled data. The brute force method would be replace the data and then blow away the cache and let MapCache (and MapServer) rebuild as users request tiles. The first request will result in MapCache making a call to MapServer to generate the tile/metatile, but subsequent requests for tiles will use the cached tiles. Others on the list may well have more experience and better ideas. Steve From: Ahmed Aboulenein [mailto:aboulenein.ahmed at gmail.com] Sent: Tuesday, March 17, 2015 2:54 PM To: Lime, Steve D (MNIT) Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Best integration with dynamic map information Hi Steve, Thank you so much for the informative reply, much appreciated! It's actually a new dataset copy every 5 minutes, it seems like replacing a shape file would be most efficient. We are not using MapCache, do you think it would be a good option for our use case with this frequent updates? Thanks again, Steve! Best regards, Ahmed On Tue, Mar 17, 2015 at 8:03 PM, Lime, Steve D (MNIT) > wrote: I?ll let others weigh in on throughput. Seems like that should be a matter of resources and how much hardware you can throw at the problem. Are you using MapCache to serve tiles? MapServer itself is good for rendering tiles or more likely, metatiles. On thread safety MapServer itself isn?t doing any file locking. Presumably the OS or database is handling contention issues. I?d think the right way to go for data storage depends on your update process itself. If you want to incrementally tweak lines as new information becomes available then a database backend seems more reasonable ? I?d think you could detect change easier and perhaps only retile very specific areas as a result. If instead you?re getting a new copy of your entire dataset every 5 minutes then perhaps a shapefile would work best ? just replace the file and trigger retiling. Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ahmed Aboulenein Sent: Tuesday, March 17, 2015 9:19 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Best integration with dynamic map information Hi ALL, We serve traffic lines that gets updated every 5 minutes from our feeds. We would like to use Map Server to generate transparent tiles showing colored polylines of the traffic. I am newbie to Map Server, I got the server and workshop running and also I think I have some good understanding of the map file and layers concept. I have a question about integrating our traffic information as a data source to the MapServer. Important aspects for us: 1. Performance: since we are updating large areas every 5 minutes. We will need throughput like 10K images per second. Does this sound okay? 2. Threads safety: my concern what happens if while updating the source, the MapServer is actually rendering an image from old data. Any locks? I understand our options are: 1. Data files: such as shape files or KML files. 2. Database: PostGIS for example. 3. Service that pulls data: WMS server - I didn't dig much here. Thanks in advance for your help, some pointers or information to go further. Best regards, Ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: From aboulenein.ahmed at gmail.com Tue Mar 17 13:46:25 2015 From: aboulenein.ahmed at gmail.com (Ahmed Aboulenein) Date: Tue, 17 Mar 2015 22:46:25 +0200 Subject: [mapserver-users] Best integration with dynamic map information In-Reply-To: References: Message-ID: I got your point, will definitely dig into the MapCache. Thank you so much for being so helpful, all the best! - Ahmed On Tue, Mar 17, 2015 at 10:41 PM, Lime, Steve D (MNIT) < Steve.Lime at state.mn.us> wrote: > MapCache would be a **much** better option than using MapServer in tile > mode. You still need something to render tiles (e.g. MapServer) but > MapCache manages the tiles and is the interface between your client > application and the tiled data. The brute force method would be replace the > data and then blow away the cache and let MapCache (and MapServer) rebuild > as users request tiles. The first request will result in MapCache making a > call to MapServer to generate the tile/metatile, but subsequent requests > for tiles will use the cached tiles. > > > > Others on the list may well have more experience and better ideas. > > > > Steve > > > > *From:* Ahmed Aboulenein [mailto:aboulenein.ahmed at gmail.com] > *Sent:* Tuesday, March 17, 2015 2:54 PM > *To:* Lime, Steve D (MNIT) > *Cc:* mapserver-users at lists.osgeo.org > *Subject:* Re: [mapserver-users] Best integration with dynamic map > information > > > > Hi Steve, > > Thank you so much for the informative reply, much appreciated! > > It's actually a new dataset copy every 5 minutes, it seems like replacing > a shape file would be most efficient. > > We are not using MapCache, do you think it would be a good option for our > use case with this frequent updates? > > Thanks again, Steve! > > Best regards, > > Ahmed > > > > On Tue, Mar 17, 2015 at 8:03 PM, Lime, Steve D (MNIT) < > Steve.Lime at state.mn.us> wrote: > > I?ll let others weigh in on throughput. Seems like that should be a matter > of resources and how much hardware you can throw at the problem. Are you > using MapCache to serve tiles? MapServer itself is good for rendering tiles > or more likely, metatiles. > > > > On thread safety MapServer itself isn?t doing any file locking. Presumably > the OS or database is handling contention issues. I?d think the right way > to go for data storage depends on your update process itself. If you want > to incrementally tweak lines as new information becomes available then a > database backend seems more reasonable ? I?d think you could detect change > easier and perhaps only retile very specific areas as a result. If instead > you?re getting a new copy of your entire dataset every 5 minutes then > perhaps a shapefile would work best ? just replace the file and trigger > retiling. > > > > Steve > > > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Ahmed Aboulenein > *Sent:* Tuesday, March 17, 2015 9:19 AM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] Best integration with dynamic map information > > > > Hi ALL, > > We serve traffic lines that gets updated every 5 minutes from our feeds. > We would like to use Map Server to generate transparent tiles showing > colored polylines of the traffic. > > I am newbie to Map Server, I got the server and workshop running and also > I think I have some good understanding of the map file and layers concept. > I have a question about integrating our traffic information as a data > source to the MapServer. > > Important aspects for us: > > 1. Performance: since we are updating large areas every 5 minutes. We will > need throughput like 10K images per second. Does this sound okay? > > 2. Threads safety: my concern what happens if while updating the source, > the MapServer is actually rendering an image from old data. Any locks? > > I understand our options are: > > 1. Data files: such as shape files or KML files. > > 2. Database: PostGIS for example. > > 3. Service that pulls data: WMS server - I didn't dig much here. > > Thanks in advance for your help, some pointers or information to go > further. > > Best regards, > > Ahmed > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwkorver at gmail.com Tue Mar 17 14:07:23 2015 From: mwkorver at gmail.com (Mark Korver) Date: Tue, 17 Mar 2015 14:07:23 -0700 Subject: [mapserver-users] Best integration with dynamic map information In-Reply-To: References: Message-ID: In order to serve a lot of requests you generally need to cache. That would be true of any query against a db, or against a shapefile. The point is, you don't want to go to db or to disk. In order make this happen for maps the usual pattern is to serve tiles. If your data gets updated every 5 minutes, and in your case it is the whole thing, not just some part. Then you need to make sure no map tile lives longer than 5 minutes, actually less than 5 minutes. One simple way to solve for this is to use a Content Delivery Network. something like this: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html You would point the CDN at your TMS or WMTS server. which would never have to make the same tile more than once every few minutes. Another related point would be to put the tile server behind a load balancer, then point the CDN at the load balancer. on Amazon that would be an ELB. -Mark On Tue, Mar 17, 2015 at 1:41 PM, Lime, Steve D (MNIT) < Steve.Lime at state.mn.us> wrote: > MapCache would be a **much** better option than using MapServer in tile > mode. You still need something to render tiles (e.g. MapServer) but > MapCache manages the tiles and is the interface between your client > application and the tiled data. The brute force method would be replace the > data and then blow away the cache and let MapCache (and MapServer) rebuild > as users request tiles. The first request will result in MapCache making a > call to MapServer to generate the tile/metatile, but subsequent requests > for tiles will use the cached tiles. > > > > Others on the list may well have more experience and better ideas. > > > > Steve > > > > *From:* Ahmed Aboulenein [mailto:aboulenein.ahmed at gmail.com] > *Sent:* Tuesday, March 17, 2015 2:54 PM > *To:* Lime, Steve D (MNIT) > *Cc:* mapserver-users at lists.osgeo.org > *Subject:* Re: [mapserver-users] Best integration with dynamic map > information > > > > Hi Steve, > > Thank you so much for the informative reply, much appreciated! > > It's actually a new dataset copy every 5 minutes, it seems like replacing > a shape file would be most efficient. > > We are not using MapCache, do you think it would be a good option for our > use case with this frequent updates? > > Thanks again, Steve! > > Best regards, > > Ahmed > > > > On Tue, Mar 17, 2015 at 8:03 PM, Lime, Steve D (MNIT) < > Steve.Lime at state.mn.us> wrote: > > I?ll let others weigh in on throughput. Seems like that should be a matter > of resources and how much hardware you can throw at the problem. Are you > using MapCache to serve tiles? MapServer itself is good for rendering tiles > or more likely, metatiles. > > > > On thread safety MapServer itself isn?t doing any file locking. Presumably > the OS or database is handling contention issues. I?d think the right way > to go for data storage depends on your update process itself. If you want > to incrementally tweak lines as new information becomes available then a > database backend seems more reasonable ? I?d think you could detect change > easier and perhaps only retile very specific areas as a result. If instead > you?re getting a new copy of your entire dataset every 5 minutes then > perhaps a shapefile would work best ? just replace the file and trigger > retiling. > > > > Steve > > > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Ahmed Aboulenein > *Sent:* Tuesday, March 17, 2015 9:19 AM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] Best integration with dynamic map information > > > > Hi ALL, > > We serve traffic lines that gets updated every 5 minutes from our feeds. > We would like to use Map Server to generate transparent tiles showing > colored polylines of the traffic. > > I am newbie to Map Server, I got the server and workshop running and also > I think I have some good understanding of the map file and layers concept. > I have a question about integrating our traffic information as a data > source to the MapServer. > > Important aspects for us: > > 1. Performance: since we are updating large areas every 5 minutes. We will > need throughput like 10K images per second. Does this sound okay? > > 2. Threads safety: my concern what happens if while updating the source, > the MapServer is actually rendering an image from old data. Any locks? > > I understand our options are: > > 1. Data files: such as shape files or KML files. > > 2. Database: PostGIS for example. > > 3. Service that pulls data: WMS server - I didn't dig much here. > > Thanks in advance for your help, some pointers or information to go > further. > > Best regards, > > Ahmed > > > > _______________________________________________ > 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 Michael.Kleih at neplan.ch Wed Mar 18 00:47:07 2015 From: Michael.Kleih at neplan.ch (Michael Kleih) Date: Wed, 18 Mar 2015 08:47:07 +0100 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? Message-ID: <55092D7B.4060700@neplan.ch> Hello all, I am using Mapserver since nearly 20 years and like it a lot. QGIS is getting better and better and it would be nice to layout a map in QGIS and then convert it to a ".map"-file to be used with Mapserver. Does anybody know if this is possible? Thanks to all, Michael From jukka.rahkonen at maanmittauslaitos.fi Wed Mar 18 01:15:36 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 18 Mar 2015 08:15:36 +0000 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? Message-ID: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> Hi, There is this plugin http://plugins.qgis.org/plugins/rt_mapserver_exporter/ and old documentation http://docs.qgis.org/1.8/en/docs/user_manual/plugins/plugins_mapserver_export.html Unfortunately the plugin makes mapfiles which were usable as-is with Mapserver 5.x but not since that. It also creates mapfiles which I do not like a lot because it is lazy with PROJECTION blocks etc. but that is at least partly matter of taste. But if you know how to write valid mapfiles for Mapserver v. 6.x and above then that plugin does make usable templates which can save time. It would be nice to get that plugin up-to-date. Other alternatives which do not help with QGIS styles but are worth having a look: http://scribeui.org/ and http://gisinternals.com/mapmanager.html -Jukka Rahkonen- Michael Kleih wrote: > Hello all, > I am using Mapserver since nearly 20 years and like it a lot. > QGIS is getting better and better and it would be nice to layout a map in QGIS and then convert it to a ".map"-file to be used with Mapserver. > Does anybody know if this is possible? > Thanks to all, > Michael _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From lars.schylberg at saabgroup.com Wed Mar 18 04:23:14 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Wed, 18 Mar 2015 11:23:14 +0000 Subject: [mapserver-users] polygon fill In-Reply-To: References: Message-ID: Hi, Without looking at the your details I remember one blog entry that might help. http://linfiniti.com/2011/09/making-the-most-of-umn-mapserver-runtime-variable-substitution/ another relevant link seems to be http://trac.osgeo.org/openlayers/wiki/Highlighting /Lars From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of rishi Sent: den 16 mars 2015 10:54 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] polygon fill hi all iam trying to highlight the villages based on query but only one polygon is highlighting the query is based on the area of the villages, when user enters area <=********** ,it is displaying 13 villages in the grid and also same time it has to highlight the villages on the map my code is aspx page protected void btnselect_Click(object sender, EventArgs e) { string query = ""; query = String.Format(" select gid,box(geom),villname,geom,area(geom) from villages where area(geom) " + ddlsymb.SelectedValue + " " + txtarea.Text + " "); dt = MyClass.getData(query); if (dt == null || dt.Rows.Count == 0) { Response.Write("No record found, Try Zoom in and click close to feature."); } else { dr = dt.Rows[0]; //String selectedGID = dr["gid"].ToString(); //gid = selectedGID; var layername = "villages"; for(int i=0;iwindow.parent.highlightnav('{0}','{1}');", gid, layername)); //Locate(query); } if (dt.Columns.Contains("gid")) { dt.Columns.Remove("gid"); } if (dt.Columns.Contains("geom")) { dt.Columns.Remove("geom"); } GridView1.DataSource = dt; GridView1.DataBind(); } } js page function highlightnav(gid,layername) { bPoint.params.gid = gid; bPoint.params.tbl = layername; //bPoint.params.getElementById = geom; bPoint.redraw(); } mapfile bpoint.map MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 TRANSPARENT on IMAGETYPE png SIZE 450 500 SYMBOLSET "symbols.txt" web metadata wms_srs "EPSG:4326 EPSG:900913" end end LAYER CONNECTIONTYPE postgis CONNECTION "user=postgres password=****** dbname=mpdb port=5432" DATA "geom FROM (select geom,gid from %tbl% where gid=%gid%)as foo using srid=900913 using unique gid" STATUS Default TYPE point PROJECTION "init=epsg:900913" END class style symbol 'line20' color 255 0 0 size 10 end end END END i created for loop, to highlight all the polygons, but it is highlighting only one polygon. plz tell me the code -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at saabgroup.com Wed Mar 18 05:08:03 2015 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Wed, 18 Mar 2015 12:08:03 +0000 Subject: [mapserver-users] How use a spatialite as tileindex for raster In-Reply-To: <1426523101655.76722@maanmittauslaitos.fi> References: <1426523101655.76722@maanmittauslaitos.fi> Message-ID: <363a5e88f7a74960afe162e601f746cc@corpappl843.corp.saab.se> Hi Looking at your old example I became curious. Did You use gdaltindex to create the indexfile in spatialite or did You do in some other way? The -f option in gdaltindex seems like a rather recent addition that I haven't tried. /Lars -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) Sent: den 16 mars 2015 17:25 To: Andrea Peri; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] How use a spatialite as tileindex for raster Hi Andrea, I share your feelings, it is odd. Therefore I wrote this mail and now when I am lost I can search for "spatialite ogr tileindex rahkonen" http://osgeo-org.1560.x6.nabble.com/How-to-use-Spatialite-as-a-TILEINDEX-td4228164.html -Jukka Rahkonen- ________________________________________ Andrea Peri wrote: > Hi, reading the mapserver docs, I understand that is possible to use every OGR datasource to access a raster catalog using tileindex. > So I try to use a spatialite as tileindex. > I try this setting but without success. NAME "rt_ofc2k.ofc2k" STATUS OFF EXTENT 555870.99 4677465.00 752890.00 4924883.05 TYPE raster CONNECTIONTYPE OGR CONNECTION "/pth-to-spatialite/db.sqlite" TILEINDEX 'table' TILEITEM 'location' The error reported from log is: [Mon Mar 16 16:49:58 2015].129679 msShapefileOpen(): Unable to access file. (/home/..../table) Perhaps is not true that an OGR spatialite can be used as tileindex source ? Thx, -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From jmckenna at gatewaygeomatics.com Wed Mar 18 05:20:26 2015 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 18 Mar 2015 09:20:26 -0300 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: <55092D7B.4060700@neplan.ch> References: <55092D7B.4060700@neplan.ch> Message-ID: <55096D8A.8080908@gatewaygeomatics.com> Hi Michael, I am with you on how important QGIS is for our workflow. I am aware of a MapServer plugin that is designed for QGIS 2.x, however I use the standalone QGIS always, so I have yet to be able to test it (it is however available with OSGeo4W apparently). Give it a try: https://plugins.qgis.org/plugins/rt_mapserver_exporter/ The code for it lives on GitHub (https://github.com/faunalia/rt_mapserver_exporter), so maybe some passionate MapServer devs can contribute. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2015-03-18 4:47 AM, Michael Kleih wrote: > > Hello all, > I am using Mapserver since nearly 20 years and like it a lot. > QGIS is getting better and better and it would be nice to layout a map > in QGIS and then convert it to a ".map"-file to be used with Mapserver. > Does anybody know if this is possible? > > Thanks to all, > Michael From jt at mapmedia.de Wed Mar 18 05:34:28 2015 From: jt at mapmedia.de (=?windows-1252?Q?J=F6rg_Thomsen?=) Date: Wed, 18 Mar 2015 13:34:28 +0100 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: <55096D8A.8080908@gatewaygeomatics.com> References: <55092D7B.4060700@neplan.ch> <55096D8A.8080908@gatewaygeomatics.com> Message-ID: <550970D4.7030801@mapmedia.de> Am 18.03.2015 um 13:20 schrieb Jeff McKenna: > Hi Michael, > > I am with you on how important QGIS is for our workflow. > > I am aware of a MapServer plugin that is designed for QGIS 2.x, however > I use the standalone QGIS always, so I have yet to be able to test it > (it is however available with OSGeo4W apparently). Give it a try: > https://plugins.qgis.org/plugins/rt_mapserver_exporter/ it works for file-datasources and there is a wrong definition for postgis-connections ('USING UNIQUE epsg' instead of 'USING SRID epsg'). But you should have to look at the mapfile in any case. For finding and using the extension in qgis you have enable the experimantal plugins. J?rg > > The code for it lives on GitHub > (https://github.com/faunalia/rt_mapserver_exporter), so maybe some > passionate MapServer devs can contribute. > > -jeff > From jukka.rahkonen at maanmittauslaitos.fi Wed Mar 18 05:40:20 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 18 Mar 2015 12:40:20 +0000 Subject: [mapserver-users] How use a spatialite as tileindex for raster Message-ID: Hi, I use a batch file which creates own shapefile tileindex for each orthophoto directory because I need separate shapefiles for another purpose, snippet here: gdaltindex -t_srs epsg:3067 -write_absolute_path -src_srs_name src_srs %1.shp /%1/*.TIF and another batch file that combines them into Spatialite to be used with Mapserver: ogr2ogr -f "SQLite" -dsco spatialite=yes -dsco init_with_epsg=yes -a_srs epsg:3067 ortho.sqlite dir_0.shp -nln orthos ogr2ogr -update -append -a_srs epsg:3067 ortho.sqlite dir_1.shp -nln orthos ogr2ogr -update -append -a_srs epsg:3067 ortho.sqlite dir_2.shp -nln orthos ... Spatialite suits me perfectly because I can add some metadata into it and then make layers by attributes like acquisition year: LAYER NAME "orthos_2011" CONNECTIONTYPE OGR CONNECTION "/ortho.sqlite" DATA "select * from orthos where year=2011" ... -Jukka Rahkonen- Schylberg Lars wrote: > Hi > Looking at your old example I became curious. Did You use gdaltindex to create the indexfile in spatialite or did You do in some other way? The -f option in gdaltindex seems like a rather recent addition that I haven't tried. /Lars -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) Sent: den 16 mars 2015 17:25 To: Andrea Peri; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] How use a spatialite as tileindex for raster Hi Andrea, I share your feelings, it is odd. Therefore I wrote this mail and now when I am lost I can search for "spatialite ogr tileindex rahkonen" http://osgeo-org.1560.x6.nabble.com/How-to-use-Spatialite-as-a-TILEINDEX-td4228164.html -Jukka Rahkonen- ________________________________________ Andrea Peri wrote: > Hi, reading the mapserver docs, I understand that is possible to use every OGR datasource to access a raster catalog using tileindex. > So I try to use a spatialite as tileindex. > I try this setting but without success. NAME "rt_ofc2k.ofc2k" STATUS OFF EXTENT 555870.99 4677465.00 752890.00 4924883.05 TYPE raster CONNECTIONTYPE OGR CONNECTION "/pth-to-spatialite/db.sqlite" TILEINDEX 'table' TILEITEM 'location' The error reported from log is: [Mon Mar 16 16:49:58 2015].129679 msShapefileOpen(): Unable to access file. (/home/..../table) Perhaps is not true that an OGR spatialite can be used as tileindex source ? Thx, -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From aboulenein.ahmed at gmail.com Wed Mar 18 07:30:10 2015 From: aboulenein.ahmed at gmail.com (Ahmed Aboulenein) Date: Wed, 18 Mar 2015 16:30:10 +0200 Subject: [mapserver-users] Best integration with dynamic map information In-Reply-To: References: Message-ID: Thank you so much, Mark! That's a very convenient/effiecient architecture for us since our engine is already in AWS. Thanks again for your help! Best regards, Ahmed On Tue, Mar 17, 2015 at 11:07 PM, Mark Korver wrote: > In order to serve a lot of requests you generally need to cache. That > would be true of any query against a db, or against a shapefile. The point > is, you don't want to go to db or to disk. > In order make this happen for maps the usual pattern is to serve tiles. If > your data gets updated every 5 minutes, and in your case it is the whole > thing, not just some part. Then you need to make sure no map tile lives > longer than 5 minutes, actually less than 5 minutes. > One simple way to solve for this is to use a Content Delivery Network. > something like this: > > http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html > You would point the CDN at your TMS or WMTS server. which would never have > to make the same tile more than once every few minutes. > Another related point would be to put the tile server behind a load > balancer, then point the CDN at the load balancer. > on Amazon that would be an ELB. > -Mark > > On Tue, Mar 17, 2015 at 1:41 PM, Lime, Steve D (MNIT) < > Steve.Lime at state.mn.us> wrote: > >> MapCache would be a **much** better option than using MapServer in tile >> mode. You still need something to render tiles (e.g. MapServer) but >> MapCache manages the tiles and is the interface between your client >> application and the tiled data. The brute force method would be replace the >> data and then blow away the cache and let MapCache (and MapServer) rebuild >> as users request tiles. The first request will result in MapCache making a >> call to MapServer to generate the tile/metatile, but subsequent requests >> for tiles will use the cached tiles. >> >> >> >> Others on the list may well have more experience and better ideas. >> >> >> >> Steve >> >> >> >> *From:* Ahmed Aboulenein [mailto:aboulenein.ahmed at gmail.com] >> *Sent:* Tuesday, March 17, 2015 2:54 PM >> *To:* Lime, Steve D (MNIT) >> *Cc:* mapserver-users at lists.osgeo.org >> *Subject:* Re: [mapserver-users] Best integration with dynamic map >> information >> >> >> >> Hi Steve, >> >> Thank you so much for the informative reply, much appreciated! >> >> It's actually a new dataset copy every 5 minutes, it seems like replacing >> a shape file would be most efficient. >> >> We are not using MapCache, do you think it would be a good option for our >> use case with this frequent updates? >> >> Thanks again, Steve! >> >> Best regards, >> >> Ahmed >> >> >> >> On Tue, Mar 17, 2015 at 8:03 PM, Lime, Steve D (MNIT) < >> Steve.Lime at state.mn.us> wrote: >> >> I?ll let others weigh in on throughput. Seems like that should be a >> matter of resources and how much hardware you can throw at the problem. Are >> you using MapCache to serve tiles? MapServer itself is good for rendering >> tiles or more likely, metatiles. >> >> >> >> On thread safety MapServer itself isn?t doing any file locking. >> Presumably the OS or database is handling contention issues. I?d think the >> right way to go for data storage depends on your update process itself. If >> you want to incrementally tweak lines as new information becomes available >> then a database backend seems more reasonable ? I?d think you could detect >> change easier and perhaps only retile very specific areas as a result. If >> instead you?re getting a new copy of your entire dataset every 5 minutes >> then perhaps a shapefile would work best ? just replace the file and >> trigger retiling. >> >> >> >> Steve >> >> >> >> *From:* mapserver-users-bounces at lists.osgeo.org [mailto: >> mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Ahmed Aboulenein >> *Sent:* Tuesday, March 17, 2015 9:19 AM >> *To:* mapserver-users at lists.osgeo.org >> *Subject:* [mapserver-users] Best integration with dynamic map >> information >> >> >> >> Hi ALL, >> >> We serve traffic lines that gets updated every 5 minutes from our feeds. >> We would like to use Map Server to generate transparent tiles showing >> colored polylines of the traffic. >> >> I am newbie to Map Server, I got the server and workshop running and also >> I think I have some good understanding of the map file and layers concept. >> I have a question about integrating our traffic information as a data >> source to the MapServer. >> >> Important aspects for us: >> >> 1. Performance: since we are updating large areas every 5 minutes. We >> will need throughput like 10K images per second. Does this sound okay? >> >> 2. Threads safety: my concern what happens if while updating the source, >> the MapServer is actually rendering an image from old data. Any locks? >> >> I understand our options are: >> >> 1. Data files: such as shape files or KML files. >> >> 2. Database: PostGIS for example. >> >> 3. Service that pulls data: WMS server - I didn't dig much here. >> >> Thanks in advance for your help, some pointers or information to go >> further. >> >> Best regards, >> >> Ahmed >> >> >> >> _______________________________________________ >> 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 Wed Mar 18 10:50:37 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Wed, 18 Mar 2015 17:50:37 +0000 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> References: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> Message-ID: I've wondered if we could/should pull the plug-in into the MapServer project itself. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) Sent: Wednesday, March 18, 2015 3:16 AM To: Michael Kleih; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? Hi, There is this plugin http://plugins.qgis.org/plugins/rt_mapserver_exporter/ and old documentation http://docs.qgis.org/1.8/en/docs/user_manual/plugins/plugins_mapserver_export.html Unfortunately the plugin makes mapfiles which were usable as-is with Mapserver 5.x but not since that. It also creates mapfiles which I do not like a lot because it is lazy with PROJECTION blocks etc. but that is at least partly matter of taste. But if you know how to write valid mapfiles for Mapserver v. 6.x and above then that plugin does make usable templates which can save time. It would be nice to get that plugin up-to-date. Other alternatives which do not help with QGIS styles but are worth having a look: http://scribeui.org/ and http://gisinternals.com/mapmanager.html -Jukka Rahkonen- Michael Kleih wrote: > Hello all, > I am using Mapserver since nearly 20 years and like it a lot. > QGIS is getting better and better and it would be nice to layout a map in QGIS and then convert it to a ".map"-file to be used with Mapserver. > Does anybody know if this is possible? > Thanks to all, > Michael _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From jmckenna at gatewaygeomatics.com Wed Mar 18 16:10:50 2015 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 18 Mar 2015 20:10:50 -0300 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: References: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> Message-ID: <550A05FA.1030005@gatewaygeomatics.com> I wonder the same, especially seeing that plugin code living on GitHub. Think of how QGIS has become the frontend for GRASS, it could(should!) be the frontend for MapServer. There is definitely huge momentum in the QGIS community (I've even been asked to attend their first QGIS conference, and followup dev meeting, in May). I can imagine/dream of a joint MapServer/QGIS code sprint, totally funded (as a few of the OpenLayers3 sprints were) happening someday. Would be amazing. -jeff On 2015-03-18 2:50 PM, Lime, Steve D (MNIT) wrote: > I've wondered if we could/should pull the plug-in into the MapServer project itself. > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka (MML) > Sent: Wednesday, March 18, 2015 3:16 AM > To: Michael Kleih; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? > > Hi, > > There is this plugin http://plugins.qgis.org/plugins/rt_mapserver_exporter/ > and old documentation http://docs.qgis.org/1.8/en/docs/user_manual/plugins/plugins_mapserver_export.html > > Unfortunately the plugin makes mapfiles which were usable as-is with Mapserver 5.x but not since that. It also creates mapfiles which I do not like a lot because it is lazy with PROJECTION blocks etc. but that is at least partly matter of taste. But if you know how to write valid mapfiles for Mapserver v. 6.x and above then that plugin does make usable templates which can save time. It would be nice to get that plugin up-to-date. > > Other alternatives which do not help with QGIS styles but are worth having a look: http://scribeui.org/ and http://gisinternals.com/mapmanager.html > > -Jukka Rahkonen- > > > > Michael Kleih wrote: > >> Hello all, >> I am using Mapserver since nearly 20 years and like it a lot. >> QGIS is getting better and better and it would be nice to layout a map in QGIS and then convert it to a ".map"-file to be used with Mapserver. >> Does anybody know if this is possible? > >> Thanks to all, >> Michael > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From ben at ausvet.com.au Wed Mar 18 23:29:34 2015 From: ben at ausvet.com.au (Ben Madin) Date: Thu, 19 Mar 2015 14:29:34 +0800 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: References: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> Message-ID: +1 On Thursday, March 19, 2015, Lime, Steve D (MNIT) wrote: > I've wondered if we could/should pull the plug-in into the MapServer > project itself. > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org ] On Behalf Of > Rahkonen Jukka (MML) > Sent: Wednesday, March 18, 2015 3:16 AM > To: Michael Kleih; mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout > into a ".map" file? > > Hi, > > There is this plugin > http://plugins.qgis.org/plugins/rt_mapserver_exporter/ > and old documentation > http://docs.qgis.org/1.8/en/docs/user_manual/plugins/plugins_mapserver_export.html > > Unfortunately the plugin makes mapfiles which were usable as-is with > Mapserver 5.x but not since that. It also creates mapfiles which I do not > like a lot because it is lazy with PROJECTION blocks etc. but that is at > least partly matter of taste. But if you know how to write valid mapfiles > for Mapserver v. 6.x and above then that plugin does make usable templates > which can save time. It would be nice to get that plugin up-to-date. > > Other alternatives which do not help with QGIS styles but are worth having > a look: http://scribeui.org/ and http://gisinternals.com/mapmanager.html > > -Jukka Rahkonen- > > > > Michael Kleih wrote: > > > Hello all, > > I am using Mapserver since nearly 20 years and like it a lot. > > QGIS is getting better and better and it would be nice to layout a map > in QGIS and then convert it to a ".map"-file to be used with Mapserver. > > Does anybody know if this is possible? > > > Thanks to all, > > Michael > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Sent from my iPhone. -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.j.kobben at utwente.nl Thu Mar 19 00:38:17 2015 From: b.j.kobben at utwente.nl (b.j.kobben at utwente.nl) Date: Thu, 19 Mar 2015 07:38:17 +0000 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: <550A05FA.1030005@gatewaygeomatics.com> References: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> <550A05FA.1030005@gatewaygeomatics.com> Message-ID: I am all for QGIS-MapServer integration! As an aside, getting QGIS styling per se into MapServer can of course also be done through SLD: QGIS SLD export is pretty good -- although of course will only give you layer styles, not a full map setup. -- Barend K?bben On 19-03-15 00:10, "Jeff McKenna" wrote: >I wonder the same, especially seeing that plugin code living on GitHub. > Think of how QGIS has become the frontend for GRASS, it could(should!) >be the frontend for MapServer. > >There is definitely huge momentum in the QGIS community (I've even been >asked to attend their first QGIS conference, and followup dev meeting, >in May). I can imagine/dream of a joint MapServer/QGIS code sprint, >totally funded (as a few of the OpenLayers3 sprints were) happening >someday. Would be amazing. > >-jeff > > > > >On 2015-03-18 2:50 PM, Lime, Steve D (MNIT) wrote: >> I've wondered if we could/should pull the plug-in into the MapServer >>project itself. >> >> -----Original Message----- >> From: mapserver-users-bounces at lists.osgeo.org >>[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen >>Jukka (MML) >> Sent: Wednesday, March 18, 2015 3:16 AM >> To: Michael Kleih; mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout >>into a ".map" file? >> >> Hi, >> >> There is this plugin >>http://plugins.qgis.org/plugins/rt_mapserver_exporter/ >> and old documentation >>http://docs.qgis.org/1.8/en/docs/user_manual/plugins/plugins_mapserver_ex >>port.html >> >> Unfortunately the plugin makes mapfiles which were usable as-is with >>Mapserver 5.x but not since that. It also creates mapfiles which I do >>not like a lot because it is lazy with PROJECTION blocks etc. but that >>is at least partly matter of taste. But if you know how to write valid >>mapfiles for Mapserver v. 6.x and above then that plugin does make >>usable templates which can save time. It would be nice to get that >>plugin up-to-date. >> >> Other alternatives which do not help with QGIS styles but are worth >>having a look: http://scribeui.org/ and >>http://gisinternals.com/mapmanager.html >> >> -Jukka Rahkonen- >> >> >> >> Michael Kleih wrote: >> >>> Hello all, >>> I am using Mapserver since nearly 20 years and like it a lot. >>> QGIS is getting better and better and it would be nice to layout a map >>>in QGIS and then convert it to a ".map"-file to be used with Mapserver. >>> Does anybody know if this is possible? >> >>> Thanks to all, >>> Michael >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > > >-- >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 jukka.rahkonen at maanmittauslaitos.fi Thu Mar 19 01:32:34 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 19 Mar 2015 08:32:34 +0000 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? Message-ID: Hi, Hi, The SLD output of QGIS can be good but I am not so sure how good Mapserver is with importing SLD. That could be tested through WMS GetMap and &SLD= or with &SLD_BODY= but there is no tool for converting SLD into layer styles as text which could be saved and used in static mapfiles, or is there? -Jukka Rahkonen- -----Alkuper?inen viesti----- L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta b.j.kobben at utwente.nl L?hetetty: 19. maaliskuuta 2015 9:38 Vastaanottaja: jmckenna at gatewaygeomatics.com; mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? I am all for QGIS-MapServer integration! As an aside, getting QGIS styling per se into MapServer can of course also be done through SLD: QGIS SLD export is pretty good -- although of course will only give you layer styles, not a full map setup. -- Barend K?bben On 19-03-15 00:10, "Jeff McKenna" wrote: >I wonder the same, especially seeing that plugin code living on GitHub. > Think of how QGIS has become the frontend for GRASS, it >could(should!) be the frontend for MapServer. > >There is definitely huge momentum in the QGIS community (I've even been >asked to attend their first QGIS conference, and followup dev meeting, >in May). I can imagine/dream of a joint MapServer/QGIS code sprint, >totally funded (as a few of the OpenLayers3 sprints were) happening >someday. Would be amazing. > >-jeff > > > > >On 2015-03-18 2:50 PM, Lime, Steve D (MNIT) wrote: >> I've wondered if we could/should pull the plug-in into the MapServer >>project itself. >> >> -----Original Message----- >> From: mapserver-users-bounces at lists.osgeo.org >>[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen >>Jukka (MML) >> Sent: Wednesday, March 18, 2015 3:16 AM >> To: Michael Kleih; mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] Is there a way to convert a QGIS >>layout into a ".map" file? >> >> Hi, >> >> There is this plugin >>http://plugins.qgis.org/plugins/rt_mapserver_exporter/ >> and old documentation >>http://docs.qgis.org/1.8/en/docs/user_manual/plugins/plugins_mapserver >>_ex >>port.html >> >> Unfortunately the plugin makes mapfiles which were usable as-is with >>Mapserver 5.x but not since that. It also creates mapfiles which I do >>not like a lot because it is lazy with PROJECTION blocks etc. but that >>is at least partly matter of taste. But if you know how to write valid >>mapfiles for Mapserver v. 6.x and above then that plugin does make >>usable templates which can save time. It would be nice to get that >>plugin up-to-date. >> >> Other alternatives which do not help with QGIS styles but are worth >>having a look: http://scribeui.org/ and >>http://gisinternals.com/mapmanager.html >> >> -Jukka Rahkonen- >> >> >> >> Michael Kleih wrote: >> >>> Hello all, >>> I am using Mapserver since nearly 20 years and like it a lot. >>> QGIS is getting better and better and it would be nice to layout a >>>map in QGIS and then convert it to a ".map"-file to be used with Mapserver. >>> Does anybody know if this is possible? >> >>> Thanks to all, >>> Michael >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > > >-- >Jeff McKenna >MapServer Consulting and Training Services >http://www.gatewaygeomatics.com/ >_______________________________________________ >mapserver-users mailing list >mapserver-users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From christian.braun at list.lu Thu Mar 19 03:44:21 2015 From: christian.braun at list.lu (Christian Braun) Date: Thu, 19 Mar 2015 11:44:21 +0100 Subject: [mapserver-users] WFS 1.1.0 Axis order in returned data for German GK In-Reply-To: References: Message-ID: Dear all, I am facing a serious problem with Mapserver (both 6.2 and 6.4.1) and data retrieval via WFS 1.1.0. We have a client running which is taking the data as GML and importing it into GRASS. The switched order of axis makes it impossible to overlay and thus process data. The following request gets back data in yx axis order: http://mapservices-ludwigsburg.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/ludwigsburg/map_file/LB_MUSIC_OWS.map& SERVICE=WFS& VERSION=1.1.0& REQUEST=GetFeature& TYPENAME=LB_city_boundary& BBOX=48,9,49,10,urn:x-ogc:def:crs:EPSG::4326& SRSNAME=EPSG:31467 I wonder if this is a bug or feature due to the WFS 1.1.0 axis order specification? If I send the same request to a instance of Geoserver, what I get back is xy axis order: http://geoserver.tudor.lu/geoserver/ludwigsburg/ows?SERVICE=wfs& VERSION=1.1.0& REQUEST=GetFeature& TYPENAME=ludwigsburg:lb_city_boundary& BBOX=48,9,49,10,urn:x-ogc:def:crs:EPSG::4326& SRSNAME=EPSG:31467 I also found the master thesis of Weichand [1] where in Section 4.3.5 he is describing this issue as well. But Geoserver has a mechanism to treat EPSG:31467 as xy. The correct order of the CRS (by definition) is yx, but this is not used like that in Germany. Can you give any ideas about the behaviour of Mapserver and how to get around this axis order issue? Thanks, Christian Braun Luxembourg Institute of Science and Technology (LIST) Environmental Research and Innovation (ERIN) Department 41, rue du Brill L-4422 Belvaux Tel: +352 42 59 91 - 6608 Fax : +352 275 885 E-mail : christian.braun at list.lu Web: www.list.lu -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.braun at list.lu Thu Mar 19 03:23:58 2015 From: christian.braun at list.lu (Christian Braun) Date: Thu, 19 Mar 2015 11:23:58 +0100 Subject: [mapserver-users] WFS 1.1.0 Axis order in returned data for German GK Message-ID: Dear all, I am facing a serious problem with Mapserver (both 6.2 and 6.4.1) and data retrieval via WFS 1.1.0. We have a client running which is taking the data as GML and importing it into GRASS. The switched order of axis makes it impossible to overlay and thus process data. The following request gets back data in yx axis order: http://mapservices-ludwigsburg.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/ludwigsburg/map_file/LB_MUSIC_OWS.map& SERVICE=WFS& VERSION=1.1.0& REQUEST=GetFeature& TYPENAME=LB_city_boundary& BBOX=48,9,49,10,urn:x-ogc:def:crs:EPSG::4326& SRSNAME=EPSG:31467 I wonder if this is a bug or feature due to the WFS 1.1.0 axis order specification? If I send the same request to a instance of Geoserver, what I get back is xy axis order: http://geoserver.tudor.lu/geoserver/ludwigsburg/ows?SERVICE=wfs& VERSION=1.1.0& REQUEST=GetFeature& TYPENAME=ludwigsburg:lb_city_boundary& BBOX=48,9,49,10,urn:x-ogc:def:crs:EPSG::4326& SRSNAME=EPSG:31467 I also found the master thesis of Weichand [1] where in Section 4.3.5 he is describing this issue as well. But Geoserver has a mechanism to treat EPSG:31467 as xy. The correct order of the CRS (by definition) is yx, but this is not used like that in Germany. Can you give any ideas about the behaviour of Mapserver and how to get around this axis order issue? Thanks, Christian Braun Luxembourg Institute of Science and Technology (LIST) Environmental Research and Innovation (ERIN) Department 41, rue du Brill L-4422 Belvaux Tel: +352 42 59 91 - 6608 Fax : +352 275 885 E-mail : christian.braun at list.lu Web: www.list.lu -------------- next part -------------- An HTML attachment was scrubbed... URL: From DeDuikertjes at xs4all.nl Thu Mar 19 03:58:43 2015 From: DeDuikertjes at xs4all.nl (deduikertjes) Date: Thu, 19 Mar 2015 03:58:43 -0700 (PDT) Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: References: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> <550A05FA.1030005@gatewaygeomatics.com> Message-ID: <1426762723024-5194413.post@n6.nabble.com> Rahkonen Jukka (MML) wrote > Hi, > > The SLD output of QGIS can be good but I am not so sure how good Mapserver > is with importing SLD. That could be tested through WMS GetMap and &SLD= > or with &SLD_BODY= but there is no tool for converting SLD into layer > styles as text which could be saved and used in static mapfiles, or is > there? > > -Jukka Rahkonen- You can do this conversion by python-mapscript. The rt_mapserver_plugins uses this technique. By the way the SLD export contains a bug on negative values (all ready reported by Maarten Tromp). -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-Is-there-a-way-to-convert-a-QGIS-layout-into-a-map-file-tp5194108p5194413.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jpass at bgs.ac.uk Thu Mar 19 03:59:42 2015 From: jpass at bgs.ac.uk (Passmore, James H.) Date: Thu, 19 Mar 2015 10:59:42 +0000 Subject: [mapserver-users] Is there a way to convert a QGIS layout In-Reply-To: References: Message-ID: <434A1C26835F5149BDE720F63902F72208BCC65CD2@nerckwmbc.ad.nerc.ac.uk> Message: 4 Date: Thu, 19 Mar 2015 08:32:34 +0000 From: "Rahkonen Jukka (MML)" To: "b.j.kobben at utwente.nl" , "mapserver-users at lists.osgeo.org" Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? Message-ID: The SLD output of QGIS can be good but I am not so sure how good Mapserver is with importing SLD. That could be tested through WMS GetMap and &SLD= or with &SLD_BODY= but there is no tool for converting SLD into layer styles as text which could be saved and used in static mapfiles, or is there? MapServer handles application of external SLD just fine. Original styling: http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=49.8639,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&LAYERS=UKCoShelf_BGS_1M_SBS& External SLD styling: http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=49.8639,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&SLD=http%3A%2F%2Fogc.bgs.ac.uk%2Fsld%2FUKCoShelf_BGS_1M_SBS-original-mod3a.sld Not sure if this is what you meant though? James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. From jmckenna at gatewaygeomatics.com Thu Mar 19 04:21:57 2015 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 19 Mar 2015 08:21:57 -0300 Subject: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? In-Reply-To: <1426762723024-5194413.post@n6.nabble.com> References: <6f46c46179494988800d26c67f54e0b1@C119S212VM022.msvyvi.vaha.local> <550A05FA.1030005@gatewaygeomatics.com> <1426762723024-5194413.post@n6.nabble.com> Message-ID: <550AB155.80100@gatewaygeomatics.com> On 2015-03-19 7:58 AM, deduikertjes wrote: > > You can do this conversion by python-mapscript. The rt_mapserver_plugins > uses this technique. > > By the way the SLD export contains a bug on negative values (all ready > reported by Maarten Tromp). > > I noticed the use of Python mapscript by that plugin, very nice. There must be some way we can get these two project teams (QGIS and MapServer) to work together. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From jukka.rahkonen at maanmittauslaitos.fi Thu Mar 19 07:14:09 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 19 Mar 2015 14:14:09 +0000 Subject: [mapserver-users] WFS 1.1.0 Axis order in returned data for German GK Message-ID: <877938d1544340909c37b0f9145cc1c6@C119S212VM022.msvyvi.vaha.local> Hi, As you said, EPSG:31467 is officially a system with northing-easting axis order http://epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::31467&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:31467 The service is behaving as it should according to WFS 1.1.0 standard and as you also said, Mapserver does not have an override to force the longitude-latitude of easting-northing order as Geoserver has if srsname is given with the short format EPSG:31467. However, you can use WFS version 1.0.0 which returns data always in longitude-latitude of easting-northing. Remember to use same order with BBOX http://mapservices-ludwigsburg.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/ludwigsburg/map_file/LB_MUSIC_OWS.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=LB_city_boundary&BBOX=9,48,10,49,EPSG:4326&SRSNAME=EPSG:31467&maxfeatures=1 -Jukka Rahkonen- Christian Braun wrote: Dear all, I am facing a serious problem with Mapserver (both 6.2 and 6.4.1) and data retrieval via WFS 1.1.0. We have a client running which is taking the data as GML and importing it into GRASS. The switched order of axis makes it impossible to overlay and thus process data. The following request gets back data in yx axis order: http://mapservices-ludwigsburg.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/ludwigsburg/map_file/LB_MUSIC_OWS.map& SERVICE=WFS& VERSION=1.1.0& REQUEST=GetFeature& TYPENAME=LB_city_boundary& BBOX=48,9,49,10,urn:x-ogc:def:crs:EPSG::4326& SRSNAME=EPSG:31467 I wonder if this is a bug or feature due to the WFS 1.1.0 axis order specification? If I send the same request to a instance of Geoserver, what I get back is xy axis order: http://geoserver.tudor.lu/geoserver/ludwigsburg/ows?SERVICE=wfs& VERSION=1.1.0& REQUEST=GetFeature& TYPENAME=ludwigsburg:lb_city_boundary& BBOX=48,9,49,10,urn:x-ogc:def:crs:EPSG::4326& SRSNAME=EPSG:31467 I also found the master thesis of Weichand [1] where in Section 4.3.5 he is describing this issue as well. But Geoserver has a mechanism to treat EPSG:31467 as xy. The correct order of the CRS (by definition) is yx, but this is not used like that in Germany. Can you give any ideas about the behaviour of Mapserver and how to get around this axis order issue? Thanks, Christian Braun Luxembourg Institute of Science and Technology (LIST) Environmental Research and Innovation (ERIN) Department 41, rue du Brill L-4422 Belvaux Tel: +352 42 59 91 - 6608 Fax : +352 275 885 E-mail : christian.braun at list.lu Web: www.list.lu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Thu Mar 19 09:31:47 2015 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 19 Mar 2015 16:31:47 +0000 Subject: [mapserver-users] Is there a way to convert a QGIS layout Message-ID: <96c77b06be974886b25ee2ad843ea57f@C119S212VM022.msvyvi.vaha.local> Hi, >Not sure if this is what you meant though? I meant that I did not know if these two things can be done: 1) I did not know if I can create styles for a layer with QGIS, save style as SLD and that SLD without any further modification with Mapserver. So I had to test it and it seems to work at least with a rather simple SLD . I used the Geoserver demo data "states.shp" as data and the SLD that I made with QGIS is here http://latuviitta.org/documents/states_qgis.sld 2) I did not know if it is possible to convert styles from SLD into CLASSes and STYLEs as they are used in mapfiles but deduikertjes wrote "You can do this conversion by python-mapscript". Well, "you" there does not mean me because I can't do anything with python-mapscript but if QGIS exporter is using that under the hood then the answer is Yes also for this question. -Jukka Rahkonen- Passmore, James H. wrote: Message: 4 Date: Thu, 19 Mar 2015 08:32:34 +0000 From: "Rahkonen Jukka (MML)" To: "b.j.kobben at utwente.nl" , "mapserver-users at lists.osgeo.org" Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout into a ".map" file? Message-ID: The SLD output of QGIS can be good but I am not so sure how good Mapserver is with importing SLD. That could be tested through WMS GetMap and &SLD= or with &SLD_BODY= but there is no tool for converting SLD into layer styles as text which could be saved and used in static mapfiles, or is there? MapServer handles application of external SLD just fine. Original styling: http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=49.8639,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&LAYERS=UKCoShelf_BGS_1M_SBS& External SLD styling: http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=49.8639,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&SLD=http%3A%2F%2Fogc.bgs.ac.uk%2Fsld%2FUKCoShelf_BGS_1M_SBS-original-mod3a.sld Not sure if this is what you meant though? James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From rishe28 at gmail.com Fri Mar 20 05:43:02 2015 From: rishe28 at gmail.com (rishi) Date: Fri, 20 Mar 2015 18:13:02 +0530 Subject: [mapserver-users] display only one district Message-ID: Hi all Iam using Postgres database to diasplay districts on the google map It is working. But now i want to display only one district instead of 50. In my database there are 50 districts data, but i want to display only one. And also i have to use the same mapfile in to 3 projects, in one project all the districts has to be displayed and in one project only one district has to be display. How to do this plz send me the code -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Toutant at inspq.qc.ca Fri Mar 20 05:46:39 2015 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Fri, 20 Mar 2015 08:46:39 -0400 Subject: [mapserver-users] RE display only one district In-Reply-To: References: Message-ID: Have a look at runtime variable substitution http://mapserver.org/cgi/runsub.html rishi @lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2015-03-20 08:43 A jmckenna at gatewaygeomatics.com, "mapserver-users at lists.osgeo.org" cc Objet [mapserver-users] display only one district Hi all Iam using Postgres database to diasplay districts on the google map It is working. But now i want to display only one district instead of 50. In my database there are 50 districts data, but i want to display only one. And also i have to use the same mapfile in to 3 projects, in one project all the districts has to be displayed and in one project only one district has to be display. How to do this plz send me the code_______________________________________________ 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 boolean10001 at yahoo.com Fri Mar 20 11:53:30 2015 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Fri, 20 Mar 2015 18:53:30 +0000 (UTC) Subject: [mapserver-users] display only one district In-Reply-To: References: Message-ID: <1491477562.713066.1426877610631.JavaMail.yahoo@mail.yahoo.com> Rishi, >From a MAP file approach, you can use the FILTER tag inside of the LAYER section: FILTER [string] - This parameter allows for data specific attribute filtering that is doneat the same time spatial filtering is done, but before any CLASSexpressions are evaluated. For OGR and shapefiles the string is simplya mapserver regular expression. For spatial databases the string is aSQL WHERE clause that is valid with respect to the underlying database. - - For example: FILTER ([type]=?road? and [size]<2) In a static way, you will need to have two MAP files (one without FILTER and another with FILTER) and you have to configure each project to point to the right MAP file. ?Mtro. Carlos Ruiz From: rishi To: jmckenna at gatewaygeomatics.com; "mapserver-users at lists.osgeo.org" Sent: Friday, March 20, 2015 6:43 AM Subject: [mapserver-users] display only one district Hi all?Iam using Postgres database to diasplay districts on the google map It is working.But now i want to display only one district instead of 50.In my database there are 50 districts data, but i want to display only one.And also i have to use the same mapfile in to 3 projects, in one project all the districts has to be displayed and in one project only one district has to be display. How to do thisplz send me the code _______________________________________________ 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.Toutant at inspq.qc.ca Fri Mar 20 12:13:20 2015 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Fri, 20 Mar 2015 15:13:20 -0400 Subject: [mapserver-users] display only one district In-Reply-To: <1491477562.713066.1426877610631.JavaMail.yahoo@mail.yahoo.com> References: <1491477562.713066.1426877610631.JavaMail.yahoo@mail.yahoo.com> Message-ID: In other threads of this list, it was suggested to use a subquery in DATA instead of using FILTER, when postgis is used as a datasource. http://mapserver.org/fr/input/vector/postgis.html#data-access-connection-method If you want to use only one mapfile than runtime variable substitution can be used Carlos Ruiz @lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2015-03-20 14:53 Veuillez r?pondre ? Carlos Ruiz A rishi , "jmckenna at gatewaygeomatics.com" , "mapserver-users at lists.osgeo.org" cc Objet Re: [mapserver-users] display only one district Rishi, >From a MAP file approach, you can use the FILTER tag inside of the LAYER section: FILTER [string] This parameter allows for data specific attribute filtering that is done at the same time spatial filtering is done, but before any CLASS expressions are evaluated. For OGR and shapefiles the string is simply a mapserver regular expression. For spatial databases the string is a SQL WHERE clause that is valid with respect to the underlying database. For example: FILTER ([type]=?road? and [size]<2) In a static way, you will need to have two MAP files (one without FILTER and another with FILTER) and you have to configure each project to point to the right MAP file. Mtro. Carlos Ruiz From: rishi To: jmckenna at gatewaygeomatics.com; "mapserver-users at lists.osgeo.org" Sent: Friday, March 20, 2015 6:43 AM Subject: [mapserver-users] display only one district Hi all Iam using Postgres database to diasplay districts on the google map It is working. But now i want to display only one district instead of 50. In my database there are 50 districts data, but i want to display only one. And also i have to use the same mapfile in to 3 projects, in one project all the districts has to be displayed and in one project only one district has to be display. How to do this plz send me the code _______________________________________________ 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 A.Abhayasinghe at bom.gov.au Sun Mar 22 16:28:31 2015 From: A.Abhayasinghe at bom.gov.au (aabhayas) Date: Sun, 22 Mar 2015 16:28:31 -0700 (PDT) Subject: [mapserver-users] Getcapabilities extremely slow in version 6.4.1 In-Reply-To: References: <95d0ea1bd56b40929bf4f7bffc4795b6@C119S212VM022.msvyvi.vaha.local> Message-ID: <1427066911099-5194857.post@n6.nabble.com> Hi I have created an issue in github. I am uploading the test map files in to this post ( I could not work out a way to upload mapfiles in to github) https://github.com/mapserver/mapserver/issues/5081 I have attached two map files and two map part files which can be used to reproduce this bug. Map file layer_group.map uses layer_group.map.part which has LAYER_GROUPS defined. Map file no_layer_group.map uses no_layer_group.map.part which has no LAYER_GROUPS defined. I use the following command line in my server to time the getcapabilities requests. /time /web/cgi-bin/mapserv -nh "QUERY_STRING=map=/web/ms4w/apps/tutorial/htdocs/layer_group.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities"/ /time /web/cgi-bin/mapserv -nh "QUERY_STRING=map=/web/ms4w/apps/tutorial/htdocs/no_layer_group.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities"/ layer_group.map layer_group.part no_layer_group.map no_layer_group.part -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-Getcapabilities-extremely-slow-in-version-6-4-1-tp5191374p5194857.html Sent from the Mapserver - User mailing list archive at Nabble.com. From scott159 at free.fr Tue Mar 24 00:07:31 2015 From: scott159 at free.fr (scott159 at free.fr) Date: Tue, 24 Mar 2015 08:07:31 +0100 (CET) Subject: [mapserver-users] - Mapserver 7 In-Reply-To: <1848458972.549896980.1427180815782.JavaMail.root@zimbra34-e6.priv.proxad.net> Message-ID: <1346826171.549898004.1427180851928.JavaMail.root@zimbra34-e6.priv.proxad.net> Is there a date to next beta or release ? From Steve.Lime at state.mn.us Tue Mar 24 09:54:57 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 24 Mar 2015 16:54:57 +0000 Subject: [mapserver-users] - Mapserver 7 In-Reply-To: <1346826171.549898004.1427180851928.JavaMail.root@zimbra34-e6.priv.proxad.net> References: <1848458972.549896980.1427180815782.JavaMail.root@zimbra34-e6.priv.proxad.net> <1346826171.549898004.1427180851928.JavaMail.root@zimbra34-e6.priv.proxad.net> Message-ID: Another beta should be along soon (within a week?). Feedback/testing has been pretty slow to come thus far... The more of that we get the faster the release process will go. Steve -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of scott159 at free.fr Sent: Tuesday, March 24, 2015 2:08 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] - Mapserver 7 Is there a date to next beta or release ? _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Steve.Lime at state.mn.us Tue Mar 24 10:22:30 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 24 Mar 2015 17:22:30 +0000 Subject: [mapserver-users] queryByLayer - is it a valid method on layerObj? In-Reply-To: References: Message-ID: Hi Phil: Just getting back though email after being out on vacation. The queryByFilter method takes a native MapServer FILTER string and applies it against the layer. It does not process OGC filters, never has. The OGC filter handling code translates an OGC filter into MapServer filter string which is in turn processed by MapServer (and/or the associated driver). This is all much more straightforward in 7.0. I can try and whip up a quick example in Perl MapScript if that would help. Seems like we could consider exposing an OGC filter -> MapServer filter string and then that would get handed off to queryByFilter. I think this would have to be a layer-specific method since that context is probably important in the translation. Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Anzel, Phil - NRCS, Fort Collins, CO Sent: Monday, March 09, 2015 2:12 PM To: mapserver-users at lists.osgeo.org Cc: Anzel, Phil - NRCS, Fort Collins, CO Subject: [mapserver-users] queryByLayer - is it a valid method on layerObj? All, The Mapscript SWIG interface on the layerObj defines a queryByFilter method as public int queryByFilter(mapObj map, string arg1) where arg1 is supposedly the filter to apply when querying the layer, analogous to public int queryByRect(mapObj map, rectObj rect) Where is this method documented? It is not described in either the 6.4 or 7.0 documentation. Based upon the history of the code that I'm attempting to bring back to life the method was probably documented in MapServer 4.x or 5.x. Note that is still visible through SWIG. How should it be used? I tried it with a WFS OGC filter and the log file showed (ignore line wrapping here): [Mon Mar 09 12:18:35 2015].727000 yyparse(): Expression parser error. syntax error [Mon Mar 09 12:18:35 2015].727000 msEvalExpression: Expression parser error. Failed to parse expression: Geometry -88.0865046533,37.5555143852 -88.0860204771,37.5600435404 -88.0782858287,37.5595392364 -88.0787704736,37.5550101113 -88.0865046533,37.5555143852 I tried with a much simpler mapfile filter and got much the same result: [Mon Mar 09 12:53:22 2015].470000 yyparse(): Expression parser error. syntax error [Mon Mar 09 12:53:22 2015].470000 msEvalExpression: Expression parser error. Failed to parse expression: ([mukey] in (713970, 713898)) Do any of you have a working example of its use? Is there a way to use the OGC filter directly within mapscript code? That is ultimately what I'm after. Thanks. - Phil Anzel USDA/NRCS contractor - Team Vistronix This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Phil.Anzel at ftc.usda.gov Tue Mar 24 10:28:40 2015 From: Phil.Anzel at ftc.usda.gov (Anzel, Phil - NRCS, Fort Collins, CO) Date: Tue, 24 Mar 2015 17:28:40 +0000 Subject: [mapserver-users] queryByLayer - is it a valid method on layerObj? In-Reply-To: References: Message-ID: Hi Steve, Thanks for getting back to me on this. I would be happy to take a look, I suspect there will be a good learning curve for me to make sense of the architecture. - Phil Anzel USDA/NRCS contractor - Team Vistronix This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us] Sent: Tuesday, March 24, 2015 11:23 AM To: Anzel, Phil - NRCS, Fort Collins, CO; mapserver-users at lists.osgeo.org Subject: RE: queryByLayer - is it a valid method on layerObj? Hi Phil: Just getting back though email after being out on vacation. The queryByFilter method takes a native MapServer FILTER string and applies it against the layer. It does not process OGC filters, never has. The OGC filter handling code translates an OGC filter into MapServer filter string which is in turn processed by MapServer (and/or the associated driver). This is all much more straightforward in 7.0. I can try and whip up a quick example in Perl MapScript if that would help. Seems like we could consider exposing an OGC filter -> MapServer filter string and then that would get handed off to queryByFilter. I think this would have to be a layer-specific method since that context is probably important in the translation. Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Anzel, Phil - NRCS, Fort Collins, CO Sent: Monday, March 09, 2015 2:12 PM To: mapserver-users at lists.osgeo.org Cc: Anzel, Phil - NRCS, Fort Collins, CO Subject: [mapserver-users] queryByLayer - is it a valid method on layerObj? All, The Mapscript SWIG interface on the layerObj defines a queryByFilter method as public int queryByFilter(mapObj map, string arg1) where arg1 is supposedly the filter to apply when querying the layer, analogous to public int queryByRect(mapObj map, rectObj rect) Where is this method documented? It is not described in either the 6.4 or 7.0 documentation. Based upon the history of the code that I'm attempting to bring back to life the method was probably documented in MapServer 4.x or 5.x. Note that is still visible through SWIG. How should it be used? I tried it with a WFS OGC filter and the log file showed (ignore line wrapping here): [Mon Mar 09 12:18:35 2015].727000 yyparse(): Expression parser error. syntax error [Mon Mar 09 12:18:35 2015].727000 msEvalExpression: Expression parser error. Failed to parse expression: Geometry -88.0865046533,37.5555143852 -88.0860204771,37.5600435404 -88.0782858287,37.5595392364 -88.0787704736,37.5550101113 -88.0865046533,37.5555143852 I tried with a much simpler mapfile filter and got much the same result: [Mon Mar 09 12:53:22 2015].470000 yyparse(): Expression parser error. syntax error [Mon Mar 09 12:53:22 2015].470000 msEvalExpression: Expression parser error. Failed to parse expression: ([mukey] in (713970, 713898)) Do any of you have a working example of its use? Is there a way to use the OGC filter directly within mapscript code? That is ultimately what I'm after. Thanks. - Phil Anzel USDA/NRCS contractor - Team Vistronix This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From talldragon at hotmail.com Wed Mar 25 06:53:08 2015 From: talldragon at hotmail.com (TallDragon) Date: Wed, 25 Mar 2015 06:53:08 -0700 (PDT) Subject: [mapserver-users] Newbie problem: mapfile for wgs84 based on epsg:28992 Message-ID: <1427291588775-5195384.post@n6.nabble.com> Sorry, but after weeks of reading and trying solutions, I really need some help. I have a shapefile in RD New Amersfoort. I understand that there are a lot of problems with the conversion, however my mapserver output is empty and stays empty for weeks now. Can someone please get me in the right direction for this? My map file is MAP NAME EHAM IMAGETYPE PNG EXTENT 4.70774 52.28803 4.80941 52.36267 SIZE 1400 900 SHAPEPATH "/var/maps/eham" IMAGECOLOR 255 255 255 PROJECTION "init=epsg:4326" END # TRANSPARENT ON CONFIG "MS_ERRORFILE" "/home/andre/log/mapserv.txt" LAYER # Groen NAME groenvoorziening DATA groen STATUS ON TYPE POLYGON PROJECTION "init=epsg:28992" END METADATA "wms_srs" "EPSG:28992 EPSG:4326" END # PROJECTION # "proj=sterea" # "lat_0=52.15616055555555" # "lon_0=5.38763888888889" # "k=0.9999079" # "x_0=155000" # "y_0=463000" # "ellps=bessel" # "units=m" # "towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812" # "no_defs" # END CLASS NAME GROEN STYLE COLOR 232 232 232 OUTLINECOLOR 32 32 32 END END END # States polygon layer ends here END the call to http://localhost/cgi-bin/mapserv?map=eham.map&mode=map&layer=groen gives an empty map -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Newbie-problem-mapfile-for-wgs84-based-on-epsg-28992-tp5195384.html Sent from the Mapserver - User mailing list archive at Nabble.com. From David.Fawcett at state.mn.us Wed Mar 25 07:12:14 2015 From: David.Fawcett at state.mn.us (Fawcett, David (MNIT)) Date: Wed, 25 Mar 2015 14:12:14 +0000 Subject: [mapserver-users] Newbie problem: mapfile for wgs84 based on epsg:28992 In-Reply-To: <1427291588775-5195384.post@n6.nabble.com> References: <1427291588775-5195384.post@n6.nabble.com> Message-ID: Have you tried http://localhost/cgi-bin/mapserv?map=eham.map&mode=map&layer= groenvoorziening -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of TallDragon Sent: Wednesday, March 25, 2015 8:53 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Newbie problem: mapfile for wgs84 based on epsg:28992 Sorry, but after weeks of reading and trying solutions, I really need some help. I have a shapefile in RD New Amersfoort. I understand that there are a lot of problems with the conversion, however my mapserver output is empty and stays empty for weeks now. Can someone please get me in the right direction for this? My map file is MAP NAME EHAM IMAGETYPE PNG EXTENT 4.70774 52.28803 4.80941 52.36267 SIZE 1400 900 SHAPEPATH "/var/maps/eham" IMAGECOLOR 255 255 255 PROJECTION "init=epsg:4326" END # TRANSPARENT ON CONFIG "MS_ERRORFILE" "/home/andre/log/mapserv.txt" LAYER # Groen NAME groenvoorziening DATA groen STATUS ON TYPE POLYGON PROJECTION "init=epsg:28992" END METADATA "wms_srs" "EPSG:28992 EPSG:4326" END # PROJECTION # "proj=sterea" # "lat_0=52.15616055555555" # "lon_0=5.38763888888889" # "k=0.9999079" # "x_0=155000" # "y_0=463000" # "ellps=bessel" # "units=m" # "towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812" # "no_defs" # END CLASS NAME GROEN STYLE COLOR 232 232 232 OUTLINECOLOR 32 32 32 END END END # States polygon layer ends here END the call to http://localhost/cgi-bin/mapserv?map=eham.map&mode=map&layer=groen gives an empty map -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Newbie-problem-mapfile-for-wgs84-based-on-epsg-28992-tp5195384.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 talldragon at hotmail.com Wed Mar 25 08:14:34 2015 From: talldragon at hotmail.com (TallDragon) Date: Wed, 25 Mar 2015 08:14:34 -0700 (PDT) Subject: [mapserver-users] Newbie problem: mapfile for wgs84 based on epsg:28992 In-Reply-To: References: <1427291588775-5195384.post@n6.nabble.com> Message-ID: <1427296474013-5195406.post@n6.nabble.com> Yep that works. Staring blind for weeks you miss the simplest thing. So for the real conversion, can anyone advice what projection I should use, the simple epsg:28992 or the complex transformation. Seems there is a standard 100m shift in the epsg:28992 -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Newbie-problem-mapfile-for-wgs84-based-on-epsg-28992-tp5195384p5195406.html Sent from the Mapserver - User mailing list archive at Nabble.com. From geomartino at gmail.com Wed Mar 25 13:38:29 2015 From: geomartino at gmail.com (Martin Ouellet) Date: Wed, 25 Mar 2015 20:38:29 +0000 Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer Message-ID: Hi all, I'm using the virtual plugin of OGR to consume a web service who return CSV coordinates and mapserver is able to draw the points without any problems. The connection definition in my mapfile is something like this. CONNECTION "CSV:/vsicurl/http:///service.phpwkbPointselectWGS84" I would like to pass arguments to that CONNETION string so I could build dynamic request. something like this CONNECTION "CSV:/vsicurl/http:///service.php? *param1=%PARAM1%&param2=%PARAM2%*wkbPointselectWGS84" I know the argument values (in my example PARAM1 and PARAM2) are OK because I'm seeing them in the error message thrown by mapserver (see below). But mapserver refuse to render the points: msDrawMap(): Image handling error. Failed to draw layer named 'photo_ownedby_all'. msOGRFileNextShape(): OGR error. Failed to find layer 'select' on datasource 'CSV:/vsicurl/*http:///geophoto/select.php?PARAM1=40.886913500823205%2C-84.41259765625011&PARAM2=63.97980162961738%2C-43.587402343750284* '. Strangely, if I copy paste this url in the browser, the web service is returning valid csv data: *http:///geophoto/select.php?ll=40.886913500823205%2C-84.41259765625011&ur=63.97980162961738%2C-43.587402343750284* returned PHOTO_LATITUDE,PHOTO_LONGITUDE 48.8099315451953,-77.0906915758454 48.8119226339273,-77.123176861499 48.8139039864207,-77.1556648776822 48.8158756013937,-77.1881556113468 48.8178374775437,-77.2206490494331 48.8171607148511,-77.2546364217682 48.8164732928131,-77.2886228129866 48.8157752119077,-77.3226082078249 48.815066472652,-77.356592590973 any thoughts? MartinO -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Fawcett at state.mn.us Wed Mar 25 13:47:07 2015 From: David.Fawcett at state.mn.us (Fawcett, David (MNIT)) Date: Wed, 25 Mar 2015 20:47:07 +0000 Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer In-Reply-To: References: Message-ID: Martin, Have you looked at the CGI runtime substitution docs?: http://mapserver.org/cgi/runsub.html Make sure that you look at the validation section near the bottom. If the substitution works with CGI WMS, you will need validation. David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Martin Ouellet Sent: Wednesday, March 25, 2015 3:38 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer Hi all, I'm using the virtual plugin of OGR to consume a web service who return CSV coordinates and mapserver is able to draw the points without any problems. The connection definition in my mapfile is something like this. CONNECTION "CSV:/vsicurl/http:///service.phpwkbPointselectWGS84" I would like to pass arguments to that CONNETION string so I could build dynamic request. something like this CONNECTION "CSV:/vsicurl/http:///service.php?param1=%PARAM1%&param2=%PARAM2%wkbPointselectWGS84" I know the argument values (in my example PARAM1 and PARAM2) are OK because I'm seeing them in the error message thrown by mapserver (see below). But mapserver refuse to render the points: msDrawMap(): Image handling error. Failed to draw layer named 'photo_ownedby_all'. msOGRFileNextShape(): OGR error. Failed to find layer 'select' on datasource 'CSV:/vsicurl/http:///geophoto/select.php?PARAM1=40.886913500823205%2C-84.41259765625011&PARAM2=63.97980162961738%2C-43.587402343750284'. Strangely, if I copy paste this url in the browser, the web service is returning valid csv data: http:// server>/geophoto/select.php?ll=40.886913500823205%2C-84.41259765625011&ur=63.97980162961738%2C-43.587402343750284 returned PHOTO_LATITUDE,PHOTO_LONGITUDE 48.8099315451953,-77.0906915758454 48.8119226339273,-77.123176861499 48.8139039864207,-77.1556648776822 48.8158756013937,-77.1881556113468 48.8178374775437,-77.2206490494331 48.8171607148511,-77.2546364217682 48.8164732928131,-77.2886228129866 48.8157752119077,-77.3226082078249 48.815066472652,-77.356592590973 any thoughts? MartinO -------------- next part -------------- An HTML attachment was scrubbed... URL: From rishe28 at gmail.com Wed Mar 25 20:55:50 2015 From: rishe28 at gmail.com (rishi) Date: Thu, 26 Mar 2015 09:25:50 +0530 Subject: [mapserver-users] setting zoomand map center by default Message-ID: hi all iam displaying my map layer on the google map. it is working but the map layer is very small and also it is not center.plz tell me how to do this using open layers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmorissette at mapgears.com Thu Mar 26 05:01:23 2015 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 26 Mar 2015 08:01:23 -0400 Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer In-Reply-To: References: Message-ID: <5513F513.70107@mapgears.com> I believe the variable substitution is working since you see the coordinate values in the exception message received from the server. The error message says that it cannot find layer "select" in the OGR data source, so it may very well be that it ends up being called something else for some reason. I'd suggest hardcoding the coordinate values in your VRT and starting by making the VRT works with hardcoded values. Once it works, put the variables back in. Just a guess, but ogrinfo on that VRT may help figure out the source of the problem. Daniel On 2015-03-25 4:47 PM, Fawcett, David (MNIT) wrote: > Martin, > > Have you looked at the CGI runtime substitution docs?: > http://mapserver.org/cgi/runsub.html > > Make sure that you look at the validation section near the bottom. If > the substitution works with CGI WMS, you will need validation. > > David. > > *From:*mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Martin > Ouellet > *Sent:* Wednesday, March 25, 2015 3:38 PM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] passing parameter to a OGRVRTDataSource layer > > Hi all, > > I'm using the virtual plugin of OGR to consume a web service who return > CSV coordinates and mapserver is able to draw the points without any > problems. > > The connection definition in my mapfile is something like this. > > CONNECTION " name='select'>CSV:/vsicurl/http:// server>/service.phpwkbPointselectWGS84 encoding='PointFromColumns' x='PHOTO_LONGITUDE' > y='PHOTO_LATITUDE'/>" > > I would like to pass arguments to that CONNETION string so I could build > dynamic request. something like this > > CONNECTION " name='select'>CSV:/vsicurl/http:// server>/service.php?*param1=%PARAM1%&param2=%PARAM2%*wkbPointselectWGS84 encoding='PointFromColumns' x='PHOTO_LONGITUDE' > y='PHOTO_LATITUDE'/>" > > I know the argument values (in my example PARAM1 and PARAM2) are OK > because I'm seeing them in the error message thrown by mapserver (see > below). But mapserver refuse to render the points: > > > > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"> > > > > > > msDrawMap(): Image handling error. Failed to draw layer named > 'photo_ownedby_all'. > > msOGRFileNextShape(): OGR error. Failed to find layer 'select' > on datasource 'CSV:/vsicurl/*http:// server>/geophoto/select.php?PARAM1=40.886913500823205%2C-84.41259765625011&PARAM2=63.97980162961738%2C-43.587402343750284*'. > > > > > > Strangely, if I copy paste this url in the browser, the web service is > returning valid csv data: > > *http:// > server>/geophoto/select.php?ll=40.886913500823205%2C-84.41259765625011&ur=63.97980162961738%2C-43.587402343750284* > > returned > > PHOTO_LATITUDE,PHOTO_LONGITUDE > > 48.8099315451953,-77.0906915758454 > > 48.8119226339273,-77.123176861499 > > 48.8139039864207,-77.1556648776822 > > 48.8158756013937,-77.1881556113468 > > 48.8178374775437,-77.2206490494331 > > 48.8171607148511,-77.2546364217682 > > 48.8164732928131,-77.2886228129866 > > 48.8157752119077,-77.3226082078249 > > 48.815066472652,-77.356592590973 > > any thoughts? > > MartinO > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Daniel Morissette T: +1 418-696-5056 #201 http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From Steve.Toutant at inspq.qc.ca Thu Mar 26 06:19:56 2015 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Thu, 26 Mar 2015 09:19:56 -0400 Subject: [mapserver-users] ms7 How to use FILTER Message-ID: I'm confused on how to use FILTER when datasource is postgis or Oracle Spatial (Native Connection) In an old thread, I was told to not use FILTER, but use a WHERE clause in the Data statement. In the ms7 Mapfile-Layer-Data doc, I see for Oracle "Note that there are important performance impacts when using spatial subqueries however. Try using MapServer?s FILTER whenever possible instead." I remember I had a bug with MS6 when using FILTER using WFS. A getfeature on the layer with a spatial or logical filter, the FILTEr in the mapfile was overwritten. Please, how should we define/use FILTER int a mapfile with postgis and also oracle (using native connection, not ogr)? THANKS! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Thu Mar 26 07:20:41 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Thu, 26 Mar 2015 14:20:41 +0000 Subject: [mapserver-users] ms7 How to use FILTER In-Reply-To: References: Message-ID: MapServer FILTERs are now only written using MapServer expression syntax (e.g. ("[someitem]" != "someval")). Drivers can support translation capabilities to create native SQL under the hood. This was done to standardize the syntax across all drivers. Prior to 7.0 the syntax varied by driver. In addition, FILTER values are preserved when used with WFS or native MapServer attribute queries. With database backends there has been little reason to use FILTERs since you could often just extend the DATA statement. Note that if need to you can still define a native SQL independently of the DATA statement using the processing tag "native_filter", for example: PROCESSING "native_filter=native SQL string" This is also preserved with WFS. Does this help? Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Steve.Toutant at inspq.qc.ca Sent: Thursday, March 26, 2015 8:20 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] ms7 How to use FILTER I'm confused on how to use FILTER when datasource is postgis or Oracle Spatial (Native Connection) In an old thread, I was told to not use FILTER, but use a WHERE clause in the Data statement. In the ms7 Mapfile-Layer-Data doc, I see for Oracle "Note that there are important performance impacts when using spatial subqueries however. Try using MapServer's FILTER whenever possible instead." I remember I had a bug with MS6 when using FILTER using WFS. A getfeature on the layer with a spatial or logical filter, the FILTEr in the mapfile was overwritten. Please, how should we define/use FILTER int a mapfile with postgis and also oracle (using native connection, not ogr)? THANKS! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Toutant at inspq.qc.ca Thu Mar 26 07:27:01 2015 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Thu, 26 Mar 2015 10:27:01 -0400 Subject: [mapserver-users] ms7 How to use FILTER In-Reply-To: References: Message-ID: Thanks Steve, yes it helps! If an SQL query is needed, would you suggest to do it in the DATA statement as a subquery or use PROCESSING ?native_filter=native SQL string? steve "Lime, Steve D (MNIT)" 2015-03-26 10:20 A "Steve.Toutant at inspq.qc.ca" , "mapserver-users at lists.osgeo.org" cc Objet RE: [mapserver-users] ms7 How to use FILTER MapServer FILTERs are now only written using MapServer expression syntax (e.g. (?[someitem]? != ?someval?)). Drivers can support translation capabilities to create native SQL under the hood. This was done to standardize the syntax across all drivers. Prior to 7.0 the syntax varied by driver. In addition, FILTER values are preserved when used with WFS or native MapServer attribute queries. With database backends there has been little reason to use FILTERs since you could often just extend the DATA statement. Note that if need to you can still define a native SQL independently of the DATA statement using the processing tag ?native_filter?, for example: PROCESSING ?native_filter=native SQL string? This is also preserved with WFS. Does this help? Steve From: mapserver-users-bounces at lists.osgeo.org [ mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Steve.Toutant at inspq.qc.ca Sent: Thursday, March 26, 2015 8:20 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] ms7 How to use FILTER I'm confused on how to use FILTER when datasource is postgis or Oracle Spatial (Native Connection) In an old thread, I was told to not use FILTER, but use a WHERE clause in the Data statement. In the ms7 Mapfile-Layer-Data doc, I see for Oracle "Note that there are important performance impacts when using spatial subqueries however. Try using MapServer?s FILTER whenever possible instead." I remember I had a bug with MS6 when using FILTER using WFS. A getfeature on the layer with a spatial or logical filter, the FILTEr in the mapfile was overwritten. Please, how should we define/use FILTER int a mapfile with postgis and also oracle (using native connection, not ogr)? THANKS! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Thu Mar 26 07:56:17 2015 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Thu, 26 Mar 2015 14:56:17 +0000 Subject: [mapserver-users] ms7 How to use FILTER In-Reply-To: References: Message-ID: With Postgres I'd use the DATA statement. I don't use Oracle so someone else might be in a better position to comment. From: Steve.Toutant at inspq.qc.ca [mailto:Steve.Toutant at inspq.qc.ca] Sent: Thursday, March 26, 2015 9:27 AM To: Lime, Steve D (MNIT) Cc: mapserver-users at lists.osgeo.org Subject: RE: [mapserver-users] ms7 How to use FILTER Thanks Steve, yes it helps! If an SQL query is needed, would you suggest to do it in the DATA statement as a subquery or use PROCESSING "native_filter=native SQL string" steve "Lime, Steve D (MNIT)" > 2015-03-26 10:20 A "Steve.Toutant at inspq.qc.ca" >, "mapserver-users at lists.osgeo.org" > cc Objet RE: [mapserver-users] ms7 How to use FILTER MapServer FILTERs are now only written using MapServer expression syntax (e.g. ("[someitem]" != "someval")). Drivers can support translation capabilities to create native SQL under the hood. This was done to standardize the syntax across all drivers. Prior to 7.0 the syntax varied by driver. In addition, FILTER values are preserved when used with WFS or native MapServer attribute queries. With database backends there has been little reason to use FILTERs since you could often just extend the DATA statement. Note that if need to you can still define a native SQL independently of the DATA statement using the processing tag "native_filter", for example: PROCESSING "native_filter=native SQL string" This is also preserved with WFS. Does this help? Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Steve.Toutant at inspq.qc.ca Sent: Thursday, March 26, 2015 8:20 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] ms7 How to use FILTER I'm confused on how to use FILTER when datasource is postgis or Oracle Spatial (Native Connection) In an old thread, I was told to not use FILTER, but use a WHERE clause in the Data statement. In the ms7 Mapfile-Layer-Data doc, I see for Oracle "Note that there are important performance impacts when using spatial subqueries however. Try using MapServer's FILTER whenever possible instead." I remember I had a bug with MS6 when using FILTER using WFS. A getfeature on the layer with a spatial or logical filter, the FILTEr in the mapfile was overwritten. Please, how should we define/use FILTER int a mapfile with postgis and also oracle (using native connection, not ogr)? THANKS! -------------- next part -------------- An HTML attachment was scrubbed... URL: From geomartino at gmail.com Thu Mar 26 12:37:45 2015 From: geomartino at gmail.com (Martin Ouellet) Date: Thu, 26 Mar 2015 19:37:45 +0000 Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer In-Reply-To: <5513F513.70107@mapgears.com> References: <5513F513.70107@mapgears.com> Message-ID: Thank you David and Daniel for helping me. I found the problem. The error message was pointing at the layer 'select' but it was the dot (.) int the coordinates of the parameters that was causing the problem. Maybe an escaping problem related to the OGRVRTDataSource XML string. Daniel: What do you think is the best way to encode point in a csv (using the virtual format of OGR) for mapserver: 1) x y coordinates with encoding="PointFromColumns" 2) point in WKT string in the csv 3) point encoded WKB string in the csv 4) maybe something else BUT it must be in a csv format cheers, MartinO On Thu, Mar 26, 2015 at 8:07 AM Daniel Morissette wrote: > I believe the variable substitution is working since you see the > coordinate values in the exception message received from the server. > > The error message says that it cannot find layer "select" in the OGR > data source, so it may very well be that it ends up being called > something else for some reason. > > I'd suggest hardcoding the coordinate values in your VRT and starting by > making the VRT works with hardcoded values. Once it works, put the > variables back in. > > Just a guess, but ogrinfo on that VRT may help figure out the source of > the problem. > > Daniel > > > On 2015-03-25 4:47 PM, Fawcett, David (MNIT) wrote: > > Martin, > > > > Have you looked at the CGI runtime substitution docs?: > > http://mapserver.org/cgi/runsub.html > > > > Make sure that you look at the validation section near the bottom. If > > the substitution works with CGI WMS, you will need validation. > > > > David. > > > > *From:*mapserver-users-bounces at lists.osgeo.org > > [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Martin > > Ouellet > > *Sent:* Wednesday, March 25, 2015 3:38 PM > > *To:* mapserver-users at lists.osgeo.org > > *Subject:* [mapserver-users] passing parameter to a OGRVRTDataSource > layer > > > > Hi all, > > > > I'm using the virtual plugin of OGR to consume a web service who return > > CSV coordinates and mapserver is able to draw the points without any > > problems. > > > > The connection definition in my mapfile is something like this. > > > > CONNECTION " > name='select'>CSV:/vsicurl/http:// > server>/service.phpwkbPoint GeometryType>selectWGS84< > GeometryField > > encoding='PointFromColumns' x='PHOTO_LONGITUDE' > > y='PHOTO_LATITUDE'/>" > > > > I would like to pass arguments to that CONNETION string so I could build > > dynamic request. something like this > > > > CONNECTION " > name='select'>CSV:/vsicurl/http:// > server>/service.php?*param1=%PARAM1%&param2=%PARAM2%* rcDataSource>wkbPoint > selectWGS84 > encoding='PointFromColumns' x='PHOTO_LONGITUDE' > > y='PHOTO_LATITUDE'/>" > > > > I know the argument values (in my example PARAM1 and PARAM2) are OK > > because I'm seeing them in the error message thrown by mapserver (see > > below). But mapserver refuse to render the points: > > > > > > > > > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"> > > > > > > > > > > > > msDrawMap(): Image handling error. Failed to draw layer named > > 'photo_ownedby_all'. > > > > msOGRFileNextShape(): OGR error. Failed to find layer 'select' > > on datasource 'CSV:/vsicurl/*http:// > server>/geophoto/select.php?PARAM1=40.886913500823205%2C-84. > 41259765625011&PARAM2=63.97980162961738%2C-43.587402343750284*'. > > > > > > > > > > > > Strangely, if I copy paste this url in the browser, the web service is > > returning valid csv data: > > > > *http:// > > server>/geophoto/select.php?ll=40.886913500823205%2C-84.4125 > 9765625011&ur=63.97980162961738%2C-43.587402343750284* > > > > returned > > > > PHOTO_LATITUDE,PHOTO_LONGITUDE > > > > 48.8099315451953,-77.0906915758454 > > > > 48.8119226339273,-77.123176861499 > > > > 48.8139039864207,-77.1556648776822 > > > > 48.8158756013937,-77.1881556113468 > > > > 48.8178374775437,-77.2206490494331 > > > > 48.8171607148511,-77.2546364217682 > > > > 48.8164732928131,-77.2886228129866 > > > > 48.8157752119077,-77.3226082078249 > > > > 48.815066472652,-77.356592590973 > > > > any thoughts? > > > > MartinO > > > > > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > -- > Daniel Morissette > T: +1 418-696-5056 #201 > http://www.mapgears.com/ > Provider of Professional MapServer Support since 2000 > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmorissette at mapgears.com Thu Mar 26 12:56:54 2015 From: dmorissette at mapgears.com (Daniel Morissette) Date: Thu, 26 Mar 2015 15:56:54 -0400 Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer In-Reply-To: References: <5513F513.70107@mapgears.com> Message-ID: <55146486.807@mapgears.com> On 2015-03-26 3:37 PM, Martin Ouellet wrote: > > Daniel: What do you think is the best way to encode point in a csv > (using the virtual format of OGR) for mapserver: > 1) x y coordinates with encoding="PointFromColumns" > 2) point in WKT string in the csv > 3) point encoded WKB string in the csv > 4) maybe something else BUT it must be in a csv format > I have used only #1 with CSV and it works great and feels most natural for a CSV. I can't speak for WKT and WKB encoding in a CSV, never tried it. Daniel -- Daniel Morissette T: +1 418-696-5056 #201 http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From Andreas.Eichner at sid.sachsen.de Fri Mar 27 01:36:26 2015 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Fri, 27 Mar 2015 08:36:26 +0000 Subject: [mapserver-users] ms7 How to use FILTER In-Reply-To: References: Message-ID: <6F331135492B944D90731CE93743D5681D325A@FS-EX-DB101.fs.sachsen.de> Days ago I voted to keep native filters in MS7 via a processing instruction. It's value is a SQL expression that is ANDed to every query MS builds. The intended use is mainly to build dynamic filters when using MapScript or the C API. This avoids parsing and modifying the DATA statement. So into DATA goes the main query including subqueries and static WHERE clauses. The FILTER statement contains a MapServer expression either from MAP file, build dynamically by the CGI (e.g. a translated WFS filter) or set via MapScript. HTH > -----Urspr?ngliche Nachricht----- > Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users- > bounces at lists.osgeo.org] Im Auftrag von Lime, Steve D (MNIT) > Gesendet: Donnerstag, 26. M?rz 2015 15:56 > An: Steve.Toutant at inspq.qc.ca > Cc: mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] ms7 How to use FILTER > > With Postgres I'd use the DATA statement. I don't use Oracle so someone > else might be in a better position to comment. > > > > From: Steve.Toutant at inspq.qc.ca [mailto:Steve.Toutant at inspq.qc.ca] > Sent: Thursday, March 26, 2015 9:27 AM > To: Lime, Steve D (MNIT) > Cc: mapserver-users at lists.osgeo.org > Subject: RE: [mapserver-users] ms7 How to use FILTER > > > > Thanks Steve, yes it helps! > > If an SQL query is needed, would you suggest to do it in the DATA > statement as a subquery or use PROCESSING "native_filter=native SQL > string" > > steve > > > > "Lime, Steve D (MNIT)" > > 2015-03-26 10:20 > > A > > "Steve.Toutant at inspq.qc.ca" , "mapserver- > users at lists.osgeo.org" > > cc > > > Objet > > RE: [mapserver-users] ms7 How to use FILTER > > > > > > > > > > > MapServer FILTERs are now only written using MapServer expression syntax > (e.g. ("[someitem]" != "someval")). Drivers can support translation > capabilities to create native SQL under the hood. This was done to > standardize the syntax across all drivers. Prior to 7.0 the syntax varied > by driver. In addition, FILTER values are preserved when used with WFS or > native MapServer attribute queries. > > With database backends there has been little reason to use FILTERs since > you could often just extend the DATA statement. > > Note that if need to you can still define a native SQL independently of > the DATA statement using the processing tag "native_filter", for example: > > PROCESSING "native_filter=native SQL string" > > This is also preserved with WFS. Does this help? > > Steve > > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users- > bounces at lists.osgeo.org ] > On Behalf Of Steve.Toutant at inspq.qc.ca > Sent: Thursday, March 26, 2015 8:20 AM > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] ms7 How to use FILTER > > I'm confused on how to use FILTER when datasource is postgis or Oracle > Spatial (Native Connection) > > In an old thread, I was told to not use FILTER, but use a WHERE clause in > the Data statement. > In the ms7 Mapfile-Layer-Data doc, I see for Oracle > "Note that there are important performance impacts when using spatial > subqueries however. Try using MapServer's FILTER > whenever possible > instead." > > I remember I had a bug with MS6 when using FILTER using WFS. A getfeature > on the layer with a spatial or logical filter, the FILTEr in the mapfile > was overwritten. > > Please, how should we define/use FILTER int a mapfile with postgis and > also oracle (using native connection, not ogr)? > > THANKS! > > From geomartino at gmail.com Fri Mar 27 06:44:11 2015 From: geomartino at gmail.com (Martin Ouellet) Date: Fri, 27 Mar 2015 13:44:11 +0000 Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer In-Reply-To: <55146486.807@mapgears.com> References: <5513F513.70107@mapgears.com> <55146486.807@mapgears.com> Message-ID: thanks Daniel but even if you didn't tried it, can you comment HOW mapserver would react in terms of performance regarding the 3 approch (PointFromColumns, wkt, wkb)? MartinO On Thu, Mar 26, 2015 at 3:57 PM Daniel Morissette wrote: > On 2015-03-26 3:37 PM, Martin Ouellet wrote: > > > > Daniel: What do you think is the best way to encode point in a csv > > (using the virtual format of OGR) for mapserver: > > 1) x y coordinates with encoding="PointFromColumns" > > 2) point in WKT string in the csv > > 3) point encoded WKB string in the csv > > 4) maybe something else BUT it must be in a csv format > > > > I have used only #1 with CSV and it works great and feels most natural > for a CSV. I can't speak for WKT and WKB encoding in a CSV, never tried it. > > Daniel > -- > Daniel Morissette > T: +1 418-696-5056 #201 > http://www.mapgears.com/ > Provider of Professional MapServer Support since 2000 > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hossein.ansari at gmail.com Tue Mar 31 05:53:10 2015 From: hossein.ansari at gmail.com (Hossein Ansari) Date: Tue, 31 Mar 2015 17:23:10 +0430 Subject: [mapserver-users] Is there a C/C++ API for mapserver/mapscript? Message-ID: I know there is APIs for mapserver through mapscript in php & python. but i want using mapserver in a existing C/C++ program. how can i use mapserver in my codes? thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: