From thomas.bonfort at gmail.com Mon Dec 2 05:53:53 2013 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 2 Dec 2013 14:53:53 +0100 Subject: [mapserver-users] MapCahe question -- Caching the first couple of zoom levels In-Reply-To: <1385308672249-5090882.post@n6.nabble.com> References: <1385308672249-5090882.post@n6.nabble.com> Message-ID: James and others, I have also had requests for this off-list, but am somewhat weary to implement this. Firstly, this goes against the concept that mapcache is a *cache*, although I do clearly understand why/when this could be needed. Secondly, there's a whole lot of logic that treats the "metatile" problem that would need to be overridden or worked around in that case (as we would not want to send a full metatile request to the WMS server, but only the extent for a single tile. This would need to be accounted for rather early as multiple incoming requests are synchronised/paused while waiting for the same metatile). This is an issue that doesn't scratch any of my itches, so I will probably not be adding it without any incentive, even more so that there are some workarounds available as pointed out by Andreas and Armin. I would also add that rather than implementing this straightforwardly, I would prefer having the possibility of having multiple caches per tileset, depending on the zoom level, so that e.g. high zoom level tiles could be stored to a volatile memcache backend that automatically does the pruning, thus avoiding the metatile issues completely. regards, thomas On 24 November 2013 16:57, James_in_Utah wrote: > Hi, > I'm trying to configure mapcache (from latest dev version of MS4W) and would > like to cache the first couple of zoom levels of a very large set of USDA > NAIP imagery. I've tried using the minzoom and maxzoom tags in the tileset, > like this: > maxzoom="6">WGS84 > but once I zoom below the maxzoom value I get no imagery. I would like it > to send the request to the source if it is beyond the maxzoom value. Is > there a way to do this? > Thanks, > James > > > > > -- > View this message in context: http://osgeo-org.1560.x6.nabble.com/MapCahe-question-Caching-the-first-couple-of-zoom-levels-tp5090882.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 pschweitzer at usgs.gov Mon Dec 2 07:44:05 2013 From: pschweitzer at usgs.gov (Schweitzer, Peter) Date: Mon, 2 Dec 2013 10:44:05 -0500 Subject: [mapserver-users] mapcache kml click function Message-ID: With help from some of my technical colleagues, I've managed to get mapcache 1.2.0 up and running with mapserver 6.4.0 serving some geoscientific data that otherwise take quite some time to render. This is great stuff; many thanks to the development team! One question: I've managed to get the KML interface working reasonably well, and the one thing that I wish it could do is respond to a user click in the features by bringing up a feature information balloon or simply showing a web page, in a manner similar to the way these data work in Google Earth when loaded as vector data. I'm guessing that the NetworkLink object in KML does not give me a way to specify a data link of this type; have I understood this correctly? Is there another way to persuade Google Earth to open a given URL on click for a selected layer, passing the geographic coordinates of the point clicked in the arguments of the URL? My KML is at http://mrdata.usgs.gov/geology/state/USGS-SGMC.kml That is a NetworkLink pointing to http://mrdata.usgs.gov/mapcache/kml/sgmc at WGS84.kml The vector renditions of the same data are at pages like http://mrdata.usgs.gov/geology/state/kml/vtgeol.kmz normally accessed through pages such as http://mrdata.usgs.gov/geology/state/state.php?state=VT Peter -- Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 email: pschweitzer at usgs.gov http://geology.usgs.gov/peter/ From bob.basques at ci.stpaul.mn.us Mon Dec 2 09:13:45 2013 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 2 Dec 2013 17:13:45 +0000 Subject: [mapserver-users] Transparent (OPACITY) color(S) Message-ID: All, Last week I was trying to set a color to transparent in a mapfile, but it wasn't working the way I expected. I have a polygon layer, on top of an Aerial Photo base, let's call it a lake, with a single poly in it. I have another polygon layer with what we'll call Islands, I want to color fill the lake and apply the transparent color to the islands AFTER rendering to see through the filled lake poly to the underlying aerial layer. I tried all sorts of combinations of TRANSPARENT, OPACITY, OUTPUTFOMAT, etc. in the MAP and /or the LAYER elements without success. I recall this used to be possible with older versions of MapServer. But now it seems that OUTPUTFORMAT has been brought into the equation for recent versions. Hmm, maybe I'm trying to cheat things too much, or I need to read up on NEW Mapserver some more. :c) Anyone have an example of MAPFILE for accomplishing this. Thanks Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Mon Dec 2 09:30:14 2013 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 2 Dec 2013 17:30:14 +0000 Subject: [mapserver-users] Transparent (OPACITY) color(S) In-Reply-To: References: Message-ID: Steve, No way to apply the color transparency on the very end huh? Actaully I have two separate layers, the BASE, aerial layer, and the two polygon layers (in OpenLayers/GeoMoose), each with their own MapFile. I want to render the Lake and islands, then as a last step, change the color of the island fill to transparent(image alpha), to see through to the underlying base layer (Separate image in the browser), seems like it should be possible somehow. What about running through MapServer twice? Render objects, then do a raster color transparency, painful, but should work. I can combine the data, but they are from different sources and I would need to update things regularly, trying to automate it all. Thanks Bobb From: Lime, Steve D (MNIT) Sent: Monday, December 02, 2013 11:22 AM To: Basques, Bob (CI-StPaul); mapserver-users at lists.osgeo.org Subject: RE: Transparent (OPACITY) color(S) I don't believe this has ever been possible. If I understand you, the rendering order is: 1. Draw aerial photo 2. Draw lake 3. Draw islands (i.e. holes) in lake Step 2 has already mucked with pixels that you're drawing (again) in step 3. You'd need to combine the lake and islands into multi-part polygons to get the affect you're after. Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Basques, Bob (CI-StPaul) Sent: Monday, December 02, 2013 11:14 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Transparent (OPACITY) color(S) All, Last week I was trying to set a color to transparent in a mapfile, but it wasn't working the way I expected. I have a polygon layer, on top of an Aerial Photo base, let's call it a lake, with a single poly in it. I have another polygon layer with what we'll call Islands, I want to color fill the lake and apply the transparent color to the islands AFTER rendering to see through the filled lake poly to the underlying aerial layer. I tried all sorts of combinations of TRANSPARENT, OPACITY, OUTPUTFOMAT, etc. in the MAP and /or the LAYER elements without success. I recall this used to be possible with older versions of MapServer. But now it seems that OUTPUTFORMAT has been brought into the equation for recent versions. Hmm, maybe I'm trying to cheat things too much, or I need to read up on NEW Mapserver some more. :c) Anyone have an example of MAPFILE for accomplishing this. Thanks Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Mon Dec 2 09:21:35 2013 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Mon, 2 Dec 2013 17:21:35 +0000 Subject: [mapserver-users] Transparent (OPACITY) color(S) In-Reply-To: References: Message-ID: I don't believe this has ever been possible. If I understand you, the rendering order is: 1. Draw aerial photo 2. Draw lake 3. Draw islands (i.e. holes) in lake Step 2 has already mucked with pixels that you're drawing (again) in step 3. You'd need to combine the lake and islands into multi-part polygons to get the affect you're after. Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Basques, Bob (CI-StPaul) Sent: Monday, December 02, 2013 11:14 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Transparent (OPACITY) color(S) All, Last week I was trying to set a color to transparent in a mapfile, but it wasn't working the way I expected. I have a polygon layer, on top of an Aerial Photo base, let's call it a lake, with a single poly in it. I have another polygon layer with what we'll call Islands, I want to color fill the lake and apply the transparent color to the islands AFTER rendering to see through the filled lake poly to the underlying aerial layer. I tried all sorts of combinations of TRANSPARENT, OPACITY, OUTPUTFOMAT, etc. in the MAP and /or the LAYER elements without success. I recall this used to be possible with older versions of MapServer. But now it seems that OUTPUTFORMAT has been brought into the equation for recent versions. Hmm, maybe I'm trying to cheat things too much, or I need to read up on NEW Mapserver some more. :c) Anyone have an example of MAPFILE for accomplishing this. Thanks Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Lime at state.mn.us Mon Dec 2 09:57:51 2013 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Mon, 2 Dec 2013 17:57:51 +0000 Subject: [mapserver-users] Transparent (OPACITY) color(S) In-Reply-To: References: Message-ID: You should be able to create an image with just the two polygon layers that is transparent. I think you do something like: 1) Set IMAGECOLOR (e.g. background) to, say, white... 2) Draw your first polygon layer... 3) Draw your second polygon layer in white... 4) Save to a transparent format... That would give you the basically the difference between the polygon layers. Steve From: Basques, Bob (CI-StPaul) Sent: Monday, December 02, 2013 11:30 AM To: Lime, Steve D (MNIT); mapserver-users at lists.osgeo.org Subject: RE: Transparent (OPACITY) color(S) Steve, No way to apply the color transparency on the very end huh? Actaully I have two separate layers, the BASE, aerial layer, and the two polygon layers (in OpenLayers/GeoMoose), each with their own MapFile. I want to render the Lake and islands, then as a last step, change the color of the island fill to transparent(image alpha), to see through to the underlying base layer (Separate image in the browser), seems like it should be possible somehow. What about running through MapServer twice? Render objects, then do a raster color transparency, painful, but should work. I can combine the data, but they are from different sources and I would need to update things regularly, trying to automate it all. Thanks Bobb From: Lime, Steve D (MNIT) Sent: Monday, December 02, 2013 11:22 AM To: Basques, Bob (CI-StPaul); mapserver-users at lists.osgeo.org Subject: RE: Transparent (OPACITY) color(S) I don't believe this has ever been possible. If I understand you, the rendering order is: 1. Draw aerial photo 2. Draw lake 3. Draw islands (i.e. holes) in lake Step 2 has already mucked with pixels that you're drawing (again) in step 3. You'd need to combine the lake and islands into multi-part polygons to get the affect you're after. Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Basques, Bob (CI-StPaul) Sent: Monday, December 02, 2013 11:14 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Transparent (OPACITY) color(S) All, Last week I was trying to set a color to transparent in a mapfile, but it wasn't working the way I expected. I have a polygon layer, on top of an Aerial Photo base, let's call it a lake, with a single poly in it. I have another polygon layer with what we'll call Islands, I want to color fill the lake and apply the transparent color to the islands AFTER rendering to see through the filled lake poly to the underlying aerial layer. I tried all sorts of combinations of TRANSPARENT, OPACITY, OUTPUTFOMAT, etc. in the MAP and /or the LAYER elements without success. I recall this used to be possible with older versions of MapServer. But now it seems that OUTPUTFORMAT has been brought into the equation for recent versions. Hmm, maybe I'm trying to cheat things too much, or I need to read up on NEW Mapserver some more. :c) Anyone have an example of MAPFILE for accomplishing this. Thanks Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From lin at hvenegaard.dk Tue Dec 3 05:21:49 2013 From: lin at hvenegaard.dk (=?iso-8859-1?Q?Lars=A0I=2E_Nielsen?=) Date: Tue, 3 Dec 2013 14:21:49 +0100 Subject: [mapserver-users] Standalone Mapserver 6.4 as WFS server - issues with responses In-Reply-To: References: <808B91E58C3D454F8FE97DD4C5142C0C01AD66BDFEDC@hvmex01> <808B91E58C3D454F8FE97DD4C5142C0C01AD66BDFF08@hvmex01> Message-ID: <808B91E58C3D454F8FE97DD4C5142C0C01AD66BE0390@hvmex01> Hi Martin, I think you missed my last post about it being a 64 bit issue. But I tried your suggestion. Both 1.0.0 and 1.1.0 performs perfectly in the 32 bit version. However, in the 64 bit version, both queries ends up with the nasty Windows exception shown below: The instruction at "0x77f15531" referenced memory at "0x0000d990". The memory could not be "read". Click on OK to terminate the program. The error occurs after the capabilities document has been output. Just I experienced with the browser. So the 64 bit version do indeed have some kind of bug. -- I also tried running the command with "describefeaturetype" without typenames, and both the 32 and 64 bit version performs this without issues. So I'm not entirely sure why the 32 bit version gave me troubles the other day. Kind regards / Med venlig hilsen Lars I. Nielsen ---------------------------------------------------------------- Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og Jens Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk Fra: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] P? vegne af Martin Kofahl Sendt: 28. november 2013 20:26 Til: mapserver-users at lists.osgeo.org Emne: Re: [mapserver-users] Standalone Mapserver 6.4 as WFS server - issues with responses Lars, can you try to run the request from command line in order to rule out a connection between iis and mapserser. See http://mapserver.org/de/optimization/debugging.html#using-mapserv-cgi for an how-to. From command prompt you should be able to run somethin like X:\yz\mapserv64.exe -nh "QUERY_STRING=map=BallerupGO_WFS.map&service=WFS&version=1.0.0&request=getcapabilities" You'll have to chdir the Location of BallerupGO_WFS.map before. Are there differences between wfs Version 1.0.0 and 1.1.0? Kind regards, Martin 2013/11/26 Lars I. Nielsen > Hi, I'm still having problems with my setup of a WFS server using Mapserver 6.4.0 :-( My GetCapabilities requests take forever (or more precisely 5 minutes) to finish. Mapserver finishes in a split second, and returns a full document, but the connection - regardless of it being an url in a browser, or running ogrinfo.exe or some other program - stays open for circa 5 minutes before it finishes/times out. How can I get Mapserver/something-else to force closing the connection ? Mapserver runs as a standalone exe under IIS v6 on Windows 2003, but there's nothing in the IIS setup that I can find that prompts this behaviour. http://hvmgo01.hvenegaard.dk/mswfs/?map=BallerupGO_WFS.map&service=WFS&version=1.0.0&request=getcapabilities Any advise will be helpful :-) Kind regards / Med venlig hilsen Lars I. Nielsen ---------------------------------------------------------------- Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og Jens Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk -----Oprindelig meddelelse----- Fra: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] P? vegne af Lars I. Nielsen Sendt: 26. november 2013 10:35 Til: Rahkonen Jukka; mapserver-users at lists.osgeo.org Emne: Re: [mapserver-users] Standalone Mapserver 6.4 as WFS server - issues with responses Hi Jukka, It turns out that it was my adding - PROCESSING "CLOSE_CONNECTION=DEFER" - statements to my layer definitions that blocked fetching attributes from other layers than the first. Apparently the OGR VRT frameworks needs to open separate connections, and keeping the first connection open blocked subsequent connections. This part now works :-) Still working on other issues though ... Kind regards / Med venlig hilsen Lars I. Nielsen ---------------------------------------------------------------- Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og Jens Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk -----Oprindelig meddelelse----- Fra: Rahkonen Jukka [mailto:jukka.rahkonen at mmmtike.fi] Sendt: 19. november 2013 15:59 Til: Lars I. Nielsen; mapserver-users at lists.osgeo.org Emne: Re: [mapserver-users] Standalone Mapserver 6.4 as WFS server - issues with responses Hi, I can only show how my MS 6.2.1 server reacts http://hip.latuviitta.org/cgi-bin/mapserver_wfs?service=wfs&version=1.0.0&request=DescribeFeatureType -Jukka Rahkonen- ________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] k?ytt?j?n Lars I. Nielsen [lin at hvenegaard.dk] puolesta L?hetetty: 19. marraskuuta 2013 16:16 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [mapserver-users] Standalone Mapserver 6.4 as WFS server - issues with responses Hi, I got the standalone Mapserver 6.4 x64 up and running, but there are still some issues: If I run "request=describefeaturetype" on any of the three typenames in my setup, it returns its list of attributes as it should. But if I omit the typename, wanting Mapserver to return a description of all three typenames (which is a valid request), it only returns the attributes for the first !?? Is this WAD, or is Mapserver forgetting to return attributes for the latter two typenames (as I suspect) ? The server is online on this address if anyone wants to have a look: http://hvmgo01.hvenegaard.dk/mswfs/?map=BallerupGO_WFS.map&service=WFS&version=1.0.0&request=getcapabilities DescribeFeatureType that works: http://hvmgo01.hvenegaard.dk/mswfs/?map=BallerupGO_WFS.map&service=WFS&version=1.0.0&request=describefeaturetype&typename=GO_Flader DescribeFeatureType that doesn't work: http://hvmgo01.hvenegaard.dk/mswfs/?map=BallerupGO_WFS.map&service=WFS&version=1.0.0&request=describefeaturetype Kind regards / Med venlig hilsen Lars I. Nielsen ---------------------------------------------------------------- Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og Jens Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk _______________________________________________ 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 pmoen at nd.gov Tue Dec 3 08:45:16 2013 From: pmoen at nd.gov (Moen, Paul T.) Date: Tue, 3 Dec 2013 16:45:16 +0000 Subject: [mapserver-users] postgis layer draws much slower than psql select statement Message-ID: I am having a problem with the draw time of the following layer. LAYER NAME "Daily Precip" CONNECTION "user=XXXXXX password=XXXXXX dbname=swc host=www.fakepg.com port=5432" CONNECTIONTYPE postgis DATA "the_geom from (select (count(*)/((date '8-31-2013'- date '4-1-2013')+1)::numeric>=0.98) as list, round(sum(p.amount)::numeric,2) as label,s.site_id,s.the_geom,round(sum(p.amount)::numeric,2) as amount from precip.station s join precip.precip_data p on p.site_id=s.site_id where the_geom is not null and p.measDate >= date '4-1-2013' and p.measDate <= date '8-31-2013' group by s.site_id,s.the_geom) as foo2 using SRID=2266 USING UNIQUE site_id" GROUP "Water Resources" TYPE POINT STATUS ON CLASS NAME "0" STATUS ON STYLE SYMBOL 'circle' COLOR 0 0 0 SIZE 8 END LABEL FONT helvetica TYPE TRUETYPE SIZE 8 COLOR 0 0 0 ANGLE AUTO POSITION AUTO END END END The following command shp2img -m precip.map -o ~/precip.png produces an image after 20+ seconds. The debug output from mapserver is below. [Tue Dec 3 08:53:02 2013].705076 msDrawMap(): rendering using outputformat named AGG_PNG (AGG/PNG). [Tue Dec 3 08:53:02 2013].705678 msDrawMap(): WMS/WFS set-up and query, 0.000s [Tue Dec 3 08:53:02 2013].715428 msDrawMap(): Layer 0 (North Dakota), 0.010s [Tue Dec 3 08:53:02 2013].756964 msDrawMap(): Layer 1 (General Hydrography), 0.042s [Tue Dec 3 08:53:02 2013].804922 msDrawMap(): Layer 2 (Counties), 0.048s [Tue Dec 3 08:53:24 2013].166022 msDrawMap(): Layer 3 (Daily Precip), 21.361s [Tue Dec 3 08:53:24 2013].166057 msDrawMap(): Drawing Label Cache, 0.000s [Tue Dec 3 08:53:24 2013].166062 msDrawMap() total time: 21.463s [Tue Dec 3 08:53:24 2013].192358 msSaveImage(/Users/xxxxx/precip.png) total time: 0.026s [Tue Dec 3 08:53:24 2013].192398 msFreeMap(): freeing map at 0x7fb1d9010200. The following psql statement executes in 218.802 ms from within psql connection. select (count(*)/((date '8-31-2013'- date '4-1-2013')+1)::numeric>=0.98) as list, round(sum(p.amount)::numeric,2) as label,s.site_id,s.the_geom,round(sum(p.amount)::numeric,2) as amount from precip.station s join precip.precip_data p on p.site_id=s.site_id where the_geom is not null and p.measDate >= date '4-1-2013' and p.measDate <= date '8-31-2013' group by s.site_id,s.the_geom; Time: 218.802 ms My question is why does it take mapserver so long to draw that layer, 21.463s when the select statement runs so much faster from psql? Is there anything I can do about the issue. Versions MapServer version 6.4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE POSTGIS="2.0.3 r11128" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.3" LIBJSON="UNKNOWN" TOPOLOGY RASTER psql output sample list | label | site_id | the_geom | amount ------+-------+---------+----------------------------------------------------+-------- t | 20.14 | 2 | 0101000020DA0800000000000074C737410000000090B6FB40 | 20.14 f | 13.04 | 3 | 0101000020DA08000000000000337036410000000098CB0741 | 13.04 t | 17.29 | 4 | 0101000020DA08000000000000ED2036410000000028BB0B41 | 17.29 ... ... f | 14.27 | 4667 | 0101000020DA08000000000000831038410000000004571B41 | 14.27 f | 14.49 | 4708 | 0101000020DA080000000000009A743A4100000000D0C81C41 | 14.49 f | 0.75 | 4709 | 0101000020DA0800000000000017674041000000009CC81241 | 0.75 (512 rows) Time: 218.802 ms Query plan from psql QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- GroupAggregate (cost=33077.14..33523.12 rows=3577 width=44) (actual time=130.122..191.921 rows=512 loops=1) -> Sort (cost=33077.14..33135.07 rows=23174 width=44) (actual time=129.933..167.485 rows=66303 loops=1) Sort Key: s.site_id, s.the_geom Sort Method: external merge Disk: 3744kB -> Hash Join (cost=701.16..30683.00 rows=23174 width=44) (actual time=11.586..46.325 rows=66303 loops=1) Hash Cond: (p.site_id = s.site_id) -> Bitmap Heap Scan on precip_data p (cost=495.49..30100.03 rows=23291 width=12) (actual time=7.969..20.132 rows=67868 loops=1) Recheck Cond: ((measdate >= '2013-04-01'::date) AND (measdate <= '2013-08-31'::date)) -> Bitmap Index Scan on precip_data_measdate (cost=0.00..489.67 rows=23291 width=0) (actual time=7.899..7.899 rows=67868 loops=1) Index Cond: ((measdate >= '2013-04-01'::date) AND (measdate <= '2013-08-31'::date)) -> Hash (cost=160.95..160.95 rows=3577 width=36) (actual time=3.592..3.592 rows=3444 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 219kB -> Seq Scan on station s (cost=0.00..160.95 rows=3577 width=36) (actual time=0.013..2.632 rows=3444 loops=1) Filter: (the_geom IS NOT NULL) Rows Removed by Filter: 98 Total runtime: 217.698 ms (16 rows) -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Tue Dec 3 08:54:53 2013 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Tue, 3 Dec 2013 17:54:53 +0100 Subject: [mapserver-users] postgis layer draws much slower than psql select statement In-Reply-To: References: Message-ID: Paul, if you add a "DEBUG 2" to your LAYER definition, you'll also get some debugging info as to what is happening inside mapserver's postgis driver, along with the query that is actually sent by mapserver to postgis (as mapserver adds some spatial filtering to account for the current map view). Knowing that you might be able to rewrite your query to speed things up, and/or eventually add your own !BOX! filtering to make a more efficient use of indexes (c.f. near the end of http://mapserver.org/input/vector/postgis.html#data-access-connection-method ) -- thomas On 3 December 2013 17:45, Moen, Paul T. wrote: > I am having a problem with the draw time of the following layer. > > LAYER > NAME "Daily Precip" > CONNECTION "user=XXXXXX password=XXXXXX dbname=swc host=www.fakepg.com > port=5432" > CONNECTIONTYPE postgis > DATA "the_geom from (select (count(*)/((date '8-31-2013'- date > '4-1-2013')+1)::numeric>=0.98) as list, round(sum(p.amount)::numeric,2) as > label,s.site_id,s.the_geom,round(sum(p.amount)::numeric,2) as amount from > precip.station s join precip.precip_data p on p.site_id=s.site_id where > the_geom is not null and p.measDate >= date '4-1-2013' and p.measDate <= > date '8-31-2013' group by s.site_id,s.the_geom) as foo2 using SRID=2266 > USING UNIQUE site_id" > GROUP "Water Resources" > TYPE POINT > STATUS ON > CLASS > NAME "0" > STATUS ON > STYLE > SYMBOL 'circle' > COLOR 0 0 0 > SIZE 8 > END > LABEL > FONT helvetica > TYPE TRUETYPE > SIZE 8 > COLOR 0 0 0 > ANGLE AUTO > POSITION AUTO > END > END > END > > The following command > shp2img -m precip.map -o ~/precip.png > produces an image after 20+ seconds. > > The debug output from mapserver is below. > > [Tue Dec 3 08:53:02 2013].705076 msDrawMap(): rendering using outputformat > named AGG_PNG (AGG/PNG). > [Tue Dec 3 08:53:02 2013].705678 msDrawMap(): WMS/WFS set-up and query, > 0.000s > [Tue Dec 3 08:53:02 2013].715428 msDrawMap(): Layer 0 (North Dakota), > 0.010s > [Tue Dec 3 08:53:02 2013].756964 msDrawMap(): Layer 1 (General > Hydrography), 0.042s > [Tue Dec 3 08:53:02 2013].804922 msDrawMap(): Layer 2 (Counties), 0.048s > [Tue Dec 3 08:53:24 2013].166022 msDrawMap(): Layer 3 (Daily Precip), > 21.361s > [Tue Dec 3 08:53:24 2013].166057 msDrawMap(): Drawing Label Cache, 0.000s > [Tue Dec 3 08:53:24 2013].166062 msDrawMap() total time: 21.463s > [Tue Dec 3 08:53:24 2013].192358 msSaveImage(/Users/xxxxx/precip.png) total > time: 0.026s > [Tue Dec 3 08:53:24 2013].192398 msFreeMap(): freeing map at > 0x7fb1d9010200. > > The following psql statement executes in 218.802 ms from within psql > connection. > > select (count(*)/((date '8-31-2013'- date '4-1-2013')+1)::numeric>=0.98) as > list, round(sum(p.amount)::numeric,2) as > label,s.site_id,s.the_geom,round(sum(p.amount)::numeric,2) as amount from > precip.station s join precip.precip_data p on p.site_id=s.site_id where > the_geom is not null and p.measDate >= date '4-1-2013' and p.measDate <= > date '8-31-2013' group by s.site_id,s.the_geom; > > Time: 218.802 ms > > > My question is why does it take mapserver so long to draw that layer, > 21.463s when the select statement runs so much faster from psql? Is there > anything I can do about the issue. > > > Versions > > MapServer version 6.4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV > SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER > SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG > INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > > POSTGIS="2.0.3 r11128" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March > 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.3" > LIBJSON="UNKNOWN" TOPOLOGY RASTER > > > psql output sample > > list | label | site_id | the_geom > | amount > ------+-------+---------+----------------------------------------------------+-------- > t | 20.14 | 2 | 0101000020DA0800000000000074C737410000000090B6FB40 > | 20.14 > f | 13.04 | 3 | 0101000020DA08000000000000337036410000000098CB0741 > | 13.04 > t | 17.29 | 4 | 0101000020DA08000000000000ED2036410000000028BB0B41 > | 17.29 > ... > ... > f | 14.27 | 4667 | 0101000020DA08000000000000831038410000000004571B41 > | 14.27 > f | 14.49 | 4708 | 0101000020DA080000000000009A743A4100000000D0C81C41 > | 14.49 > f | 0.75 | 4709 | 0101000020DA0800000000000017674041000000009CC81241 > | 0.75 > (512 rows) > Time: 218.802 ms > > Query plan from psql > > QUERY > PLAN > > --------------------------------------------------------------------------------------------------------------------------------------------------------- > > GroupAggregate (cost=33077.14..33523.12 rows=3577 width=44) (actual > time=130.122..191.921 rows=512 loops=1) > > -> Sort (cost=33077.14..33135.07 rows=23174 width=44) (actual > time=129.933..167.485 rows=66303 loops=1) > > Sort Key: s.site_id, s.the_geom > > Sort Method: external merge Disk: 3744kB > > -> Hash Join (cost=701.16..30683.00 rows=23174 width=44) (actual > time=11.586..46.325 rows=66303 loops=1) > > Hash Cond: (p.site_id = s.site_id) > > -> Bitmap Heap Scan on precip_data p (cost=495.49..30100.03 > rows=23291 width=12) (actual time=7.969..20.132 rows=67868 loops=1) > > Recheck Cond: ((measdate >= '2013-04-01'::date) AND > (measdate <= '2013-08-31'::date)) > > -> Bitmap Index Scan on precip_data_measdate > (cost=0.00..489.67 rows=23291 width=0) (actual time=7.899..7.899 rows=67868 > loops=1) > > Index Cond: ((measdate >= '2013-04-01'::date) AND > (measdate <= '2013-08-31'::date)) > > -> Hash (cost=160.95..160.95 rows=3577 width=36) (actual > time=3.592..3.592 rows=3444 loops=1) > > Buckets: 1024 Batches: 1 Memory Usage: 219kB > > -> Seq Scan on station s (cost=0.00..160.95 rows=3577 > width=36) (actual time=0.013..2.632 rows=3444 loops=1) > > Filter: (the_geom IS NOT NULL) > > Rows Removed by Filter: 98 > > Total runtime: 217.698 ms > > (16 rows) > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From pmoen at nd.gov Tue Dec 3 10:20:48 2013 From: pmoen at nd.gov (Moen, Paul T.) Date: Tue, 3 Dec 2013 18:20:48 +0000 Subject: [mapserver-users] postgis layer draws much slower than psql select statement In-Reply-To: References: Message-ID: Perfect answer Thomas! After adding DEBUG 2 in my layer, I see that the actual select statement is select "label",encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as geom,"site_id" from (select (count(*)/((date '8-31-2013'- date '4-1-2013')+1)::numeric>=0.98) as list, round(sum(p.amount)::numeric,2) as label,s.site_id,s.the_geom,round(sum(p.amount)::numeric,2) as amount from precip.station s join precip.precip_data p on p.site_id=s.site_id where the_geom is not null and p.measDate >= date '4-1-2013' and p.measDate <= date '8-31-2013' group by s.site_id,s.the_geom) as foo2 where the_geom && ST_GeomFromText('POLYGON((1050185.01508599 53641.4216216207,1050185.01508599 1290206.76019656,2987470.71218674 1290206.76019656,2987470.71218674 53641.4216216207,1050185.01508599 53641.4216216207))',2266) My new data value in the layer uses the !BOX! substitution. DATA "the_geom from (select precip.*,station.the_geom from (select * from precip.station s where the_geom && !BOX!) station inner join (select (count(*)/((date '8-31-2013'- date '4-1-2013')+1)::numeric>=0.98) as list, round(sum(p.amount)::numeric,2) as label,round(sum(p.amount)::numeric,2) as amount,p.site_id from precip.precip_data p where p.measDate >= date '4-1-2013' and p.measDate <= date '8-31-2013' group by p.site_id) precip on precip.site_id=station.site_id) as foo2 using SRID=2266 USING UNIQUE site_id" This creates the following select statement which takes 5 seconds instead of 20. select "label",encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as geom,"site_id" from (select precip.*,station.the_geom from (select * from precip.station s where the_geom && ST_GeomFromText('POLYGON((1050185.01508599 53641.4216216207,1050185.01508599 1290206.76019656,2987470.71218674 1290206.76019656,2987470.71218674 53641.4216216207,1050185.01508599 53641.4216216207))',2266)) station inner join (select (count(*)/((date '8-31-2013'- date '4-1-2013')+1)::numeric>=0.98) as list, round(sum(p.amount)::numeric,2) as label,round(sum(p.amount)::numeric,2) as amount,p.site_id from precip.precip_data p where p.measDate >= date '4-1-2013' and p.measDate <= date '8-31-2013' group by p.site_id) precip on precip.site_id=station.site_id) as foo2 Hopefully I can clean it up a little more to make it faster. Thanks for your help, Paul On 12/3/13 10:54 AM, "thomas bonfort" wrote: >Paul, >if you add a "DEBUG 2" to your LAYER definition, you'll also get some >debugging info as to what is happening inside mapserver's postgis >driver, along with the query that is actually sent by mapserver to >postgis (as mapserver adds some spatial filtering to account for the >current map view). Knowing that you might be able to rewrite your >query to speed things up, and/or eventually add your own !BOX! >filtering to make a more efficient use of indexes (c.f. near the end >of >http://mapserver.org/input/vector/postgis.html#data-access-connection-meth >od >) > >-- >thomas > >On 3 December 2013 17:45, Moen, Paul T. wrote: >> I am having a problem with the draw time of the following layer. >> >> LAYER >> NAME "Daily Precip" >> CONNECTION "user=XXXXXX password=XXXXXX dbname=swc host=www.fakepg.com >> port=5432" >> CONNECTIONTYPE postgis >> DATA "the_geom from (select (count(*)/((date '8-31-2013'- date >> '4-1-2013')+1)::numeric>=0.98) as list, round(sum(p.amount)::numeric,2) >>as >> label,s.site_id,s.the_geom,round(sum(p.amount)::numeric,2) as amount >>from >> precip.station s join precip.precip_data p on p.site_id=s.site_id where >> the_geom is not null and p.measDate >= date '4-1-2013' and p.measDate <= >> date '8-31-2013' group by s.site_id,s.the_geom) as foo2 using SRID=2266 >> USING UNIQUE site_id" >> GROUP "Water Resources" >> TYPE POINT >> STATUS ON >> CLASS >> NAME "0" >> STATUS ON >> STYLE >> SYMBOL 'circle' >> COLOR 0 0 0 >> SIZE 8 >> END >> LABEL >> FONT helvetica >> TYPE TRUETYPE >> SIZE 8 >> COLOR 0 0 0 >> ANGLE AUTO >> POSITION AUTO >> END >> END >> END >> >> The following command >> shp2img -m precip.map -o ~/precip.png >> produces an image after 20+ seconds. >> >> The debug output from mapserver is below. >> >> [Tue Dec 3 08:53:02 2013].705076 msDrawMap(): rendering using >>outputformat >> named AGG_PNG (AGG/PNG). >> [Tue Dec 3 08:53:02 2013].705678 msDrawMap(): WMS/WFS set-up and query, >> 0.000s >> [Tue Dec 3 08:53:02 2013].715428 msDrawMap(): Layer 0 (North Dakota), >> 0.010s >> [Tue Dec 3 08:53:02 2013].756964 msDrawMap(): Layer 1 (General >> Hydrography), 0.042s >> [Tue Dec 3 08:53:02 2013].804922 msDrawMap(): Layer 2 (Counties), >>0.048s >> [Tue Dec 3 08:53:24 2013].166022 msDrawMap(): Layer 3 (Daily Precip), >> 21.361s >> [Tue Dec 3 08:53:24 2013].166057 msDrawMap(): Drawing Label Cache, >>0.000s >> [Tue Dec 3 08:53:24 2013].166062 msDrawMap() total time: 21.463s >> [Tue Dec 3 08:53:24 2013].192358 msSaveImage(/Users/xxxxx/precip.png) >>total >> time: 0.026s >> [Tue Dec 3 08:53:24 2013].192398 msFreeMap(): freeing map at >> 0x7fb1d9010200. >> >> The following psql statement executes in 218.802 ms from within psql >> connection. >> >> select (count(*)/((date '8-31-2013'- date >>'4-1-2013')+1)::numeric>=0.98) as >> list, round(sum(p.amount)::numeric,2) as >> label,s.site_id,s.the_geom,round(sum(p.amount)::numeric,2) as amount >>from >> precip.station s join precip.precip_data p on p.site_id=s.site_id where >> the_geom is not null and p.measDate >= date '4-1-2013' and p.measDate <= >> date '8-31-2013' group by s.site_id,s.the_geom; >> >> Time: 218.802 ms >> >> >> My question is why does it take mapserver so long to draw that layer, >> 21.463s when the select statement runs so much faster from psql? Is >>there >> anything I can do about the issue. >> >> >> Versions >> >> MapServer version 6.4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ >> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV >> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER >> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG >> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE >> >> >> POSTGIS="2.0.3 r11128" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March >> 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.3" >> LIBJSON="UNKNOWN" TOPOLOGY RASTER >> >> >> psql output sample >> >> list | label | site_id | the_geom >> | amount >> >>------+-------+---------+------------------------------------------------ >>----+-------- >> t | 20.14 | 2 | >>0101000020DA0800000000000074C737410000000090B6FB40 >> | 20.14 >> f | 13.04 | 3 | >>0101000020DA08000000000000337036410000000098CB0741 >> | 13.04 >> t | 17.29 | 4 | >>0101000020DA08000000000000ED2036410000000028BB0B41 >> | 17.29 >> ... >> ... >> f | 14.27 | 4667 | >>0101000020DA08000000000000831038410000000004571B41 >> | 14.27 >> f | 14.49 | 4708 | >>0101000020DA080000000000009A743A4100000000D0C81C41 >> | 14.49 >> f | 0.75 | 4709 | >>0101000020DA0800000000000017674041000000009CC81241 >> | 0.75 >> (512 rows) >> Time: 218.802 ms >> >> Query plan from psql >> >> >>QUERY >> PLAN >> >> >>------------------------------------------------------------------------- >>------------------------------------------------------------------------- >>------- >> >> GroupAggregate (cost=33077.14..33523.12 rows=3577 width=44) (actual >> time=130.122..191.921 rows=512 loops=1) >> >> -> Sort (cost=33077.14..33135.07 rows=23174 width=44) (actual >> time=129.933..167.485 rows=66303 loops=1) >> >> Sort Key: s.site_id, s.the_geom >> >> Sort Method: external merge Disk: 3744kB >> >> -> Hash Join (cost=701.16..30683.00 rows=23174 width=44) >>(actual >> time=11.586..46.325 rows=66303 loops=1) >> >> Hash Cond: (p.site_id = s.site_id) >> >> -> Bitmap Heap Scan on precip_data p >>(cost=495.49..30100.03 >> rows=23291 width=12) (actual time=7.969..20.132 rows=67868 loops=1) >> >> Recheck Cond: ((measdate >= '2013-04-01'::date) AND >> (measdate <= '2013-08-31'::date)) >> >> -> Bitmap Index Scan on precip_data_measdate >> (cost=0.00..489.67 rows=23291 width=0) (actual time=7.899..7.899 >>rows=67868 >> loops=1) >> >> Index Cond: ((measdate >= >>'2013-04-01'::date) AND >> (measdate <= '2013-08-31'::date)) >> >> -> Hash (cost=160.95..160.95 rows=3577 width=36) >>(actual >> time=3.592..3.592 rows=3444 loops=1) >> >> Buckets: 1024 Batches: 1 Memory Usage: 219kB >> >> -> Seq Scan on station s (cost=0.00..160.95 >>rows=3577 >> width=36) (actual time=0.013..2.632 rows=3444 loops=1) >> >> Filter: (the_geom IS NOT NULL) >> >> Rows Removed by Filter: 98 >> >> Total runtime: 217.698 ms >> >> (16 rows) >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users From hiho at ctmap.com Tue Dec 3 13:16:23 2013 From: hiho at ctmap.com (Heidi Ochis) Date: Tue, 3 Dec 2013 14:16:23 -0700 Subject: [mapserver-users] shapefile polygon, overlapping dashed outline displays incorrectly Message-ID: I have a shapefile which is a polygon drawn as a line with a dash-dot- dash pattern. Because the polygon edges overlap each other (it is a county file) the lines don't show up correctly due to the misalignment of the dash pattern. This question was posted in 2009, but I do not see any response for a work-around. I have tried a double style: CLASS STYLE COLOR 255 255 255 WIDTH 3 END STYLE COLOR 0 0 0 WIDTH 3 LINECAP butt PATTERN 20 5 5 5 20 END END END with no success. How do I correct this display error? hiho at ctmap.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkVolz at co.lyon.mn.us Wed Dec 4 07:03:11 2013 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Wed, 4 Dec 2013 15:03:11 +0000 Subject: [mapserver-users] pink tiles on the edge of a cached layer Message-ID: <36CA828A36E29F45B7CF0A1766E5DFA324634E@swmail01.r8nssis.local> Hello, I noticed that I am getting pink tiles on the edge of one of my cached layers. http://geomoose.lyonco.org/lqp/index.html#. I think all of my bounding boxes are the same between my map file, the mapcache settings, and the geomoose / openlayers project. I imagine that I will need to fix this by increasing the boundary box. I was just wondering if I should start by increasing the boundary box of the map file, mapcache, openlayers, or just increase the bbox for all of the settings. Thanks Mark Volz, GISP GIS Specialist From Steve.Lime at state.mn.us Wed Dec 4 07:54:21 2013 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Wed, 4 Dec 2013 15:54:21 +0000 Subject: [mapserver-users] pink tiles on the edge of a cached layer In-Reply-To: <36CA828A36E29F45B7CF0A1766E5DFA324634E@swmail01.r8nssis.local> References: <36CA828A36E29F45B7CF0A1766E5DFA324634E@swmail01.r8nssis.local> Message-ID: I wouldn't think you'd need to mess with the bbox at all. Pink tiles are from URLs like: http://geomoose.lyonco.org/mapcache?LAYER=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&LAYERS=LQPBaseMap&SRS=EPSG%3A103744&BBOX=530608,245072,596144,310608&WIDTH=256&HEIGHT=256 Using that check your web server logs and see if there any clues there. Steve -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Mark Volz Sent: Wednesday, December 04, 2013 9:03 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] pink tiles on the edge of a cached layer Hello, I noticed that I am getting pink tiles on the edge of one of my cached layers. http://geomoose.lyonco.org/lqp/index.html#. I think all of my bounding boxes are the same between my map file, the mapcache settings, and the geomoose / openlayers project. I imagine that I will need to fix this by increasing the boundary box. I was just wondering if I should start by increasing the boundary box of the map file, mapcache, openlayers, or just increase the bbox for all of the settings. Thanks Mark Volz, GISP GIS Specialist _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From MarkVolz at co.lyon.mn.us Wed Dec 4 12:23:03 2013 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Wed, 4 Dec 2013 20:23:03 +0000 Subject: [mapserver-users] pink tiles on the edge of a cached layer In-Reply-To: References: <36CA828A36E29F45B7CF0A1766E5DFA324634E@swmail01.r8nssis.local> Message-ID: <36CA828A36E29F45B7CF0A1766E5DFA32464A3@swmail01.r8nssis.local> Steve, It works now! I changed the settings on mapcache. Mapserver already had a large enough extent, and I did not want to change the adjust the openlayers application so I left those alone. I did forgot to check and now I am curious if I corrected the error by changing the extent in the mapcache grid, or if it was because I changed the wgs84boundingbox in the mapcache tileset. Until I have time to check it out, I will just assume that I corrected the problem by making the grid larger. Thanks Mark Volz, GISP GIS Specialist > -----Original Message----- > From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us] > Sent: Wednesday, December 04, 2013 9:54 AM > To: Mark Volz; mapserver-users at lists.osgeo.org > Subject: RE: pink tiles on the edge of a cached layer > > I wouldn't think you'd need to mess with the bbox at all. Pink tiles are from > URLs like: > > > http://geomoose.lyonco.org/mapcache?LAYER=&SERVICE=WMS&VERSION= > 1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se > _inimage&FORMAT=image%2Fjpeg&LAYERS=LQPBaseMap&SRS=EPSG%3A1 > 03744&BBOX=530608,245072,596144,310608&WIDTH=256&HEIGHT=256 > > Using that check your web server logs and see if there any clues there. > > Steve > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users- > bounces at lists.osgeo.org] On Behalf Of Mark Volz > Sent: Wednesday, December 04, 2013 9:03 AM > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] pink tiles on the edge of a cached layer > > Hello, > > I noticed that I am getting pink tiles on the edge of one of my cached layers. > http://geomoose.lyonco.org/lqp/index.html#. I think all of my bounding > boxes are the same between my map file, the mapcache settings, and the > geomoose / openlayers project. I imagine that I will need to fix this by > increasing the boundary box. I was just wondering if I should start by > increasing the boundary box of the map file, mapcache, openlayers, or just > increase the bbox for all of the settings. > > Thanks > > > Mark Volz, GISP > GIS Specialist > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From severo at rednegra.net Sun Dec 8 06:50:19 2013 From: severo at rednegra.net (Sylvain Lesage) Date: Sun, 08 Dec 2013 15:50:19 +0100 Subject: [mapserver-users] WMS GetLegendGraphic resolution Message-ID: <52A4872B.10104@rednegra.net> Hi, I did not find any information about default resolution (in dpi) for WMS GetLegendGraphic request. In GeoServer, the default is ~91dpi, and a vendor parameter allows to ask for a higher resolution (see http://docs.geoserver.org/stable/en/user/services/wms/get_legend_graphic/legendgraphic.html#controlling-legend-appearance-with-legend-options). Is there a similar option in MapServer ? And if not, what is the default resolution ? Thanks a lot, Sylvain Lesage From stefan.schwarzer at unep.org Mon Dec 9 02:59:22 2013 From: stefan.schwarzer at unep.org (Stefan Schwarzer) Date: Mon, 9 Dec 2013 11:59:22 +0100 Subject: [mapserver-users] =?windows-1252?q?Server_hacked_via_cgi-bin_-_Ma?= =?windows-1252?q?pserver=2C_PHP=2C_=85=3F_How_to_better_protect_the_machi?= =?windows-1252?q?ne_now=3F?= Message-ID: Hi there, our server on which we have an application with mapserver running has been hacked two times within the last month. Each time (it seems), they succeeded to inject a perl script through /cgi-bin/. Now, not yet 100% how they came in? But it seems they came in via PHP in /cgi-bin/. But we're not 100% sure. If it would be the case, we could delete the PHP in /cgi-bin? Are there any reports on /cgi-bin/mapserv being hacked? Thanks for any hints, Stefan From Robert.Burgholzer at deq.virginia.gov Mon Dec 9 04:46:10 2013 From: Robert.Burgholzer at deq.virginia.gov (Burgholzer, Robert (DEQ)) Date: Mon, 9 Dec 2013 12:46:10 +0000 Subject: [mapserver-users] =?windows-1252?q?Server_hacked_via_cgi-bin_-_Ma?= =?windows-1252?q?pserver=2C_PHP=2C_=85=3F_How_to_better_protect_the_machi?= =?windows-1252?q?ne_now=3F?= In-Reply-To: References: Message-ID: <77F5F8FA4B407F43BFCFD3FC3478969154A7AE@COVMSGCES-MBX01> Stefan, I would be interested in information about your case. We had an old node with some outdated CGI stuff (including mapserv) that was compromized a few weeks back, via what appeared to be a CGI issue. We had php in the cgi-bin directory (5.2.13) as well as mapserver 5.6.3. As good fortune had it, I was in the process of migrating stuff from the directories on this old node to a new node at the exact same time as the intruders entry, and managed to capture a few lines from the log before the intruder wiped the logs clean on exit. It was a very odd experience, I found a file named perl-cgi in the cgi-bin directory as I was listing the cgi-bin contents to verify the mapserv location. I did a quick grep of the logs for the file and found the call to that program with a password argument, and copied it to email our sysadmin guy, by the time that I shut down httpd and returned to scouring the logs, the logs had been wiped. In other words, I was lucky enough to be watching it go down in real time. Anyhow, we can discuss this off-list if it is not verified that mapserv may have been involved - or on list if there are any others who have had a similar experience in recent times. /r/b From jmckenna at gatewaygeomatics.com Mon Dec 9 05:25:47 2013 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 09 Dec 2013 09:25:47 -0400 Subject: [mapserver-users] =?windows-1252?q?Server_hacked_via_cgi-bin_-_Ma?= =?windows-1252?q?pserver=2C_PHP=2C_=85=3F_How_to_better_protect_the_machi?= =?windows-1252?q?ne_now=3F?= In-Reply-To: References: Message-ID: <52A5C4DB.4000700@gatewaygeomatics.com> I know a security review was done on MS4W about a year ago, and several important changes were made to improve security in terms of PHP misuse. (servers running MS4W older than version 3.0.5, 2012-05-25, are vulnerable) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2013-12-09 6:59 AM, Stefan Schwarzer wrote: > Hi there, > > our server on which we have an application with mapserver running has been hacked two times within the last month. Each time (it seems), they succeeded to inject a perl script through /cgi-bin/. > > Now, not yet 100% how they came in? But it seems they came in via PHP in /cgi-bin/. But we're not 100% sure. If it would be the case, we could delete the PHP in /cgi-bin? Are there any reports on /cgi-bin/mapserv being hacked? > > Thanks for any hints, > > Stefan From Steve.Lime at state.mn.us Mon Dec 9 06:29:20 2013 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Mon, 9 Dec 2013 14:29:20 +0000 Subject: [mapserver-users] =?windows-1252?q?Server_hacked_via_cgi-bin_-_Ma?= =?windows-1252?q?pserver=2C_PHP=2C_=85=3F_How_to_better_protect_the_machi?= =?windows-1252?q?ne_now=3F?= In-Reply-To: References: Message-ID: Hi Stefan: We have fixed a few security issues over time and like any software there are most certainly existing defects. That said, I am unaware of any real-world exploit of the mapserv binary. Doesn't mean it hasn't happened, just that nothing has been communicated to the development team. Steve ________________________________________ From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] on behalf of Stefan Schwarzer [stefan.schwarzer at unep.org] Sent: Monday, December 09, 2013 4:59 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Server hacked via cgi-bin - Mapserver, PHP, ?? How to better protect the machine now? Hi there, our server on which we have an application with mapserver running has been hacked two times within the last month. Each time (it seems), they succeeded to inject a perl script through /cgi-bin/. Now, not yet 100% how they came in? But it seems they came in via PHP in /cgi-bin/. But we're not 100% sure. If it would be the case, we could delete the PHP in /cgi-bin? Are there any reports on /cgi-bin/mapserv being hacked? Thanks for any hints, Stefan _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From woodbri at swoodbridge.com Mon Dec 9 06:27:39 2013 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Mon, 09 Dec 2013 09:27:39 -0500 Subject: [mapserver-users] =?windows-1252?q?Server_hacked_via_cgi-bin_-_Ma?= =?windows-1252?q?pserver=2C_PHP=2C_=85=3F_How_to_better_protect_the_machi?= =?windows-1252?q?ne_now=3F?= In-Reply-To: References: Message-ID: <52A5D35B.10603@swoodbridge.com> On 12/9/2013 5:59 AM, Stefan Schwarzer wrote: > Hi there, > > our server on which we have an application with mapserver running has > been hacked two times within the last month. Each time (it seems), > they succeeded to inject a perl script through /cgi-bin/. > > Now, not yet 100% how they came in? But it seems they came in via PHP > in /cgi-bin/. But we're not 100% sure. If it would be the case, we > could delete the PHP in /cgi-bin? Are there any reports on > /cgi-bin/mapserv being hacked? Here is a write up I did on this for a client: http://imaptools.com/downloads/cgi-bin-php-exploit.pdf Hope this helps, -Steve W From Steve.Toutant at inspq.qc.ca Mon Dec 9 08:09:31 2013 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Mon, 9 Dec 2013 11:09:31 -0500 Subject: [mapserver-users] RE WMS GetLegendGraphic resolution In-Reply-To: <52A4872B.10104@rednegra.net> Message-ID: Perhaps this will help http://mapserver.org/fr/mapfile/map.html search for defresolution and resolution steve Sylvain Lesage @lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2013-12-08 09:50 A mapserver-users at lists.osgeo.org cc Objet [mapserver-users] WMS GetLegendGraphic resolution Hi, I did not find any information about default resolution (in dpi) for WMS GetLegendGraphic request. In GeoServer, the default is ~91dpi, and a vendor parameter allows to ask for a higher resolution (see http://docs.geoserver.org/stable/en/user/services/wms/get_legend_graphic/legendgraphic.html#controlling-legend-appearance-with-legend-options ). Is there a similar option in MapServer ? And if not, what is the default resolution ? Thanks a lot, Sylvain Lesage _______________________________________________ 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 severo at rednegra.net Mon Dec 9 08:15:12 2013 From: severo at rednegra.net (Sylvain Lesage) Date: Mon, 09 Dec 2013 17:15:12 +0100 Subject: [mapserver-users] RE WMS GetLegendGraphic resolution In-Reply-To: References: Message-ID: <52A5EC90.30402@rednegra.net> El 09/12/13 17:09, Steve.Toutant at inspq.qc.ca escribi?: > > Perhaps this will help > http://mapserver.org/fr/mapfile/map.html > > search for defresolution and resolution > steve > I understand these two parameters are related to the GetMap request, not the GetLegendGraphic request, and therefore correspond to the GeoServer format_options/dpi vendor parameter: http://docs.geoserver.org/latest/en/user/services/wms/vendor.html#format-options not to the GeoServer LEGEND_OPTIONS/dpi vendor parameter: http://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/legendgraphic.html#controlling-legend-appearance-with-legend-options Am I wrong ? The latter is the one I'm looking for an equivalent in MapServer. Thank you Sylvain Lesage From MarkVolz at co.lyon.mn.us Mon Dec 9 12:46:38 2013 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Mon, 9 Dec 2013 20:46:38 +0000 Subject: [mapserver-users] Server hacked via cgi-bin - Mapserver, PHP, ?? How to better protect the machine now? Message-ID: <36CA828A36E29F45B7CF0A1766E5DFA311E2C79B@swmail01.r8nssis.local> Jeff, As far as I am aware the last MS4W package that included MapCache was version 3.0.4 -dev from 2/2012. So does that mean that MS4W users that want to take advantage of Mapcache will have to deal with a security issue until someone contributes funding so that you can push out another MS4W / MapCache package? Thanks Mark > I know a security review was done on MS4W about a year ago, and several > important changes were made to improve security in terms of PHP misuse. > (servers running MS4W older than version 3.0.5, 2012-05-25, are vulnerable) > > -jeff From public at postholer.com Mon Dec 9 15:13:43 2013 From: public at postholer.com (Scott) Date: Mon, 09 Dec 2013 15:13:43 -0800 Subject: [mapserver-users] =?windows-1252?q?Server_hacked_via_cgi-bin_-_Ma?= =?windows-1252?q?pserver=2C_PHP=2C_=85=3F_How_to_better_protect_the_machi?= =?windows-1252?q?ne_now=3F?= In-Reply-To: References: Message-ID: <52A64EA7.6030302@postholer.com> If I understand you correctly, you have the php executable in cgi-bin? That is a major no, no. You should never do that, be it the php binary or the perl binary as an attacker can pass command line parameters directly to the executable bypassing your configuration file. Only scripts like *.pl or *.php, which call the binary on the first line ie, #!/usr/bin/php -q, should be placed in the cgi-bin directory. As far as mapserve in cgi-bin, I don't know enough about it. Personally, I would never put *any* executable in cgi-bin, including mapserv. Scott On 12/09/13 02:59, Stefan Schwarzer wrote: > Hi there, > > our server on which we have an application with mapserver running has been hacked two times within the last month. Each time (it seems), they succeeded to inject a perl script through /cgi-bin/. > > Now, not yet 100% how they came in? But it seems they came in via PHP in /cgi-bin/. But we're not 100% sure. If it would be the case, we could delete the PHP in /cgi-bin? Are there any reports on /cgi-bin/mapserv being hacked? > > Thanks for any hints, > > Stefan > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Michael.Kalbermatten at ne.ch Tue Dec 10 02:31:44 2013 From: Michael.Kalbermatten at ne.ch (=?iso-8859-1?Q?Kalbermatten_Micha=EBl?=) Date: Tue, 10 Dec 2013 10:31:44 +0000 Subject: [mapserver-users] Dynamic variable substitution - validation Message-ID: Dear list, I just tested a nightly build from http://www.gisinternals.com/sdk, I took the dev release of yesterday (which would be MapServer version 6.5dev). I am using a Windows Server (2008 , 64-bits). I am using dynamic variable substitution in my mapfile and I used to put the validation pattern and the default value into the METADATA section of my layer. Something like: LAYER .... METADATA "default_myvariable" "fake" "myvariable_validation_pattern" "^[a-zA-Z\-]+$" END .... END This used to work (with MapServer 6.0.3 / gisinternals, stable release). But using the dev version, the pattern isn't validated anymore. I was able to make it work again by defining a VALIDATION section in my LAYER definition: LAYER .... VALIDATION "default_ myvariable" "-1" "myvariable" "^[a-zA-Z\-]+$" END .... END Thus my question, is there a plan to deprecate the variable substitution stuff from the METADATA section or is this a kind of bug ? Thanks in advance for your answer Best regards Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From lin at hvenegaard.dk Tue Dec 10 06:34:50 2013 From: lin at hvenegaard.dk (=?iso-8859-1?Q?Lars=A0I=2E_Nielsen?=) Date: Tue, 10 Dec 2013 15:34:50 +0100 Subject: [mapserver-users] Bug in Mapserver 6.4.0 as WFS server - - what is it ? Message-ID: <808B91E58C3D454F8FE97DD4C5142C0C01AD68A45827@hvmex01> Hi, In this document, there's a mention of a bug present in 6.4.0 wrt. field types - http://mapserver.org/ogc/wfs_server.html Can anyone shed any light on what exactly this bug is, or point me to a bugtracking description. I've already browsed https://github.com/mapserver/mapserver/issues without much luck. Kind regards / Med venlig hilsen Lars I. Nielsen ---------------------------------------------------------------- Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og Jens Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.schwarzer at unep.org Tue Dec 10 06:59:29 2013 From: stefan.schwarzer at unep.org (Stefan Schwarzer) Date: Tue, 10 Dec 2013 15:59:29 +0100 Subject: [mapserver-users] Error: You don't have permission to access /cgi-bin/mapserv on this server. Message-ID: <16D160D6-FAFB-4383-BAE7-7930E2CC162B@unep.org> Hi there, we've upgraded recently our server from Apache 2.2.x to 2.4.6, and from PHP 5.3.12 to 5.3.27. (Mapscript now 6.0.3) Now, we discover problems with calling /cig-bin/mapserv for our WMS and WFS. It says Forbidden You don't have permission to access /cgi-bin/mapserv on this server. Can anyone help us out on this? What can be the reason? Have security settings in Apache been changed? We spend quite some time looking around and searching for solutions, but couldn't find anything. Thanks for any hints! Stefan From Andreas.Eichner at sid.sachsen.de Tue Dec 10 07:12:30 2013 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Tue, 10 Dec 2013 15:12:30 +0000 Subject: [mapserver-users] Bug in Mapserver 6.4.0 as WFS server - - what is it ? In-Reply-To: <808B91E58C3D454F8FE97DD4C5142C0C01AD68A45827@hvmex01> References: <808B91E58C3D454F8FE97DD4C5142C0C01AD68A45827@hvmex01> Message-ID: <6F331135492B944D90731CE93743D56801A7F4@FS-EX-DB102.fs.sachsen.de> Seems to be this one: https://github.com/mapserver/mapserver/issues/462 As it is referenced by this documentation bug: https://github.com/mapserver/docs/issues/65 HTH > > In this document, there's a mention of a bug present in 6.4.0 wrt. > field types - http://mapserver.org/ogc/wfs_server.html > > > > > Can anyone shed any light on what exactly this bug is, or point me to > a bugtracking description. I've already browsed > https://github.com/mapserver/mapserver/issues without much luck. > > > > > > Kind regards / Med venlig hilsen > Lars I. Nielsen > ---------------------------------------------------------------- > > Landinspekt?r, Senior GIS Programm?r og Konsulent > Hvenegaard og Jens Bo Landinspekt?rer A/S > Rugaardsvej 55, DK-5000 Odense C > Denmark > Tel. +45 6313 5050 > http://www.hvenegaard.dk > > From stefan.schwarzer at unep.org Tue Dec 10 07:37:39 2013 From: stefan.schwarzer at unep.org (Stefan Schwarzer) Date: Tue, 10 Dec 2013 16:37:39 +0100 Subject: [mapserver-users] Error: You don't have permission to access /cgi-bin/mapserv on this server. In-Reply-To: <16D160D6-FAFB-4383-BAE7-7930E2CC162B@unep.org> References: <16D160D6-FAFB-4383-BAE7-7930E2CC162B@unep.org> Message-ID: <84E61F31-820D-4212-ABE3-71E6810E9E7D@unep.org> Ok, as usual, after many hours of trying and searching, one writes a mail, and then, five minutes later one discovers the solution. In our case: In httpd.conf it must read "LoadModule cgi_module modules/mod_cgi.so". And it must look like this: AllowOverride None Options None Require all granted # Order allow,deny # Allow from all Hopes this helps somebody else. And perhaps raises some reactions from you guys for things we still should consider or do differently. Thanks a lot, Stefan On 10.12.2013, at 15:59, Stefan Schwarzer wrote: > Hi there, > > we've upgraded recently our server from Apache 2.2.x to 2.4.6, and from PHP 5.3.12 to 5.3.27. (Mapscript now 6.0.3) > > Now, we discover problems with calling /cig-bin/mapserv for our WMS and WFS. It says > > Forbidden > You don't have permission to access /cgi-bin/mapserv on this server. > > Can anyone help us out on this? What can be the reason? Have security settings in Apache been changed? We spend quite some time looking around and searching for solutions, but couldn't find anything. > > Thanks for any hints! > > Stefan > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From mwkorver at gmail.com Tue Dec 10 11:29:32 2013 From: mwkorver at gmail.com (Mark Korver) Date: Tue, 10 Dec 2013 11:29:32 -0800 Subject: [mapserver-users] gdalinfo error on jp2 file Message-ID: Hi, This is more a gdal question than Mapserver, but I figured others have bumped into this problem already. My goal is to get this data working in Mapserver I am trying to work with NAIP 2012 jp2 files downloaded from the tnris.orgsite. You can see the announcement here. I am working with the DOQQs that are about 20-30MB in size and number about 17,000. http://www.tnris.org/node/199 I am running Ubuntu and gdal version 1.9. The problem is that when I run gdalinfo on one of the jp2 files I get this error. "ERROR 1: The number of components indicated in the IHDR box (4) mismatch the value specified in the code stream (1)" Gdalinfo listing ****************** ubuntu at ip-10-147-199-162:/mnt/tx$ gdalinfo naip12_nc-cir_1m_3603_64_4_20120809.jp2 Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1) Files: naip12_nc-cir_1m_3603_64_4_20120809.jp2 Size is 6400, 7680 Coordinate System is: PROJCS["NAD83 / UTM zone 13N", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-105], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26913"]] Origin = (674180.000000000000000,3993050.000000000000000) Pixel Size = (1.000000000000000,-1.000000000000000) Corner Coordinates: Upper Left ( 674180.000, 3993050.000) (103d 3'57.23"W, 36d 3'59.22"N) Lower Left ( 674180.000, 3985370.000) (103d 4' 3.32"W, 35d59'50.09"N) Upper Right ( 680580.000, 3993050.000) (102d59'41.53"W, 36d 3'55.02"N) Lower Right ( 680580.000, 3985370.000) (102d59'47.84"W, 35d59'45.90"N) Center ( 677380.000, 3989210.000) (103d 1'52.48"W, 36d 1'52.58"N) ERROR 1: The number of components indicated in the IHDR box (4) mismatch the value specified in the code stream (1) Band 1 Block=256x256 Type=Byte, ColorInterp=Undefined Band 2 Block=256x256 Type=Byte, ColorInterp=Undefined Band 3 Block=256x256 Type=Byte, ColorInterp=Undefined Band 4 Block=256x256 Type=Byte, ColorInterp=Undefined ************** Checking to see what jpeg 2000 formats my apt-get install of gdal supports I get. ubuntu at ip-10-147-199-162:/mnt/tx$ gdalinfo --formats Supported Formats: VRT (rw+v): Virtual Raster ................. ERS (rw+v): ERMapper .ers Labelled JPEG2000 (rwv): JPEG-2000 part 1 (ISO/IEC 15444-1) L1B (rov): NOAA Polar Orbiter Level 1b Data Set ................. Is this a jpeg 2000 driver problem? Meaning is this a case of mismatch between the jpeg 2000 driver that my gdal is compiled with and the tnris NAIP jp2 file? You can download a sample file using this link (19MB). http://korver-geodata.s3.amazonaws.com/naip/tx/2012/naip12_nc-cir_1m_3603_64_4_20120809.jp2?AWSAccessKeyId=AKIAJVGZCMETHRONYTUQ&Expires=1417454616&Signature=ZKHM2%2fpmLGn%2b%2b4vXXJKZig5tptM%3d Any pointers would be much appreciated. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at mmmtike.fi Tue Dec 10 12:08:02 2013 From: jukka.rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 10 Dec 2013 20:08:02 +0000 Subject: [mapserver-users] gdalinfo error on jp2 file In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A631F0A6B7A@suutari.haapa.mmm.fi> Hi, I believe this is a driver problem. Image seems to be a 4 band image, probably R-G-B ans Near infrared. There are many JPEG2000 drivers available for GDAL and they are not at all the same when it comes to speed and quality. First I had a try with gdalinfo and Driver: JP2ECW/ERDAS JPEG2000 (SDK 5.0) Band 1 Block=256x256 Type=Byte, ColorInterp=Undefined Description = Band #1 Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Band 2 Block=256x256 Type=Byte, ColorInterp=Undefined Description = Band #2 Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Band 3 Block=256x256 Type=Byte, ColorInterp=Undefined Description = Band #3 Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Band 4 Block=256x256 Type=Byte, ColorInterp=Undefined Description = Band #4 Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Another driver lists different interpretation of bands Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Overviews of mask band: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Band 2 Block=1024x1024 Type=Byte, ColorInterp=Green Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Overviews of mask band: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Band 3 Block=1024x1024 Type=Byte, ColorInterp=Blue Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Overviews of mask band: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Band 4 Block=1024x1024 Type=Byte, ColorInterp=Alpha Overviews: 3200x3840, 1600x1920, 800x960, 400x480, 200x240 Overviews: arbitrary In any case I am sure that you cannot make any usable service by using Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1). Try to get JP2KAK, JP2ECW or JP2MrSID driver. Perhaps easiest would be to convert JPEG2000 images into GeoTIFFs with tiles and jpeg compression. It may sound silly but it works. You have only 17000 images and there are about 1500 minutes in a day so you will have the job done within a few days with a good laptop. You will need a good GDAL driver for that also. If you were on Windows you could use the builds by gisinternals which comes nowadays with JP2ECW (SDK 5) driver. Or then you can convert JPEG2000 into GeoTIFF with Kakadu demo program kdu_expand which is fast. I guess that you must select the three bands out of four for Mapserver to render them as RGB with a PROCESSING directive. -Jukka Rahkonen- ________________________________ Mark Korver wrote > Hi, This is more a gdal question than Mapserver, but I figured others have bumped into this problem already. My goal is to get this data working in Mapserver I am trying to work with NAIP 2012 jp2 files downloaded from the tnris.org site. You can see the announcement here. I am working with the DOQQs that are about 20-30MB in size and number about 17,000. http://www.tnris.org/node/199 I am running Ubuntu and gdal version 1.9. The problem is that when I run gdalinfo on one of the jp2 files I get this error. "ERROR 1: The number of components indicated in the IHDR box (4) mismatch the value specified in the code stream (1)" Gdalinfo listing ****************** ubuntu at ip-10-147-199-162:/mnt/tx$ gdalinfo naip12_nc-cir_1m_3603_64_4_20120809.jp2 Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1) Files: naip12_nc-cir_1m_3603_64_4_20120809.jp2 Size is 6400, 7680 Coordinate System is: PROJCS["NAD83 / UTM zone 13N", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-105], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26913"]] Origin = (674180.000000000000000,3993050.000000000000000) Pixel Size = (1.000000000000000,-1.000000000000000) Corner Coordinates: Upper Left ( 674180.000, 3993050.000) (103d 3'57.23"W, 36d 3'59.22"N) Lower Left ( 674180.000, 3985370.000) (103d 4' 3.32"W, 35d59'50.09"N) Upper Right ( 680580.000, 3993050.000) (102d59'41.53"W, 36d 3'55.02"N) Lower Right ( 680580.000, 3985370.000) (102d59'47.84"W, 35d59'45.90"N) Center ( 677380.000, 3989210.000) (103d 1'52.48"W, 36d 1'52.58"N) ERROR 1: The number of components indicated in the IHDR box (4) mismatch the value specified in the code stream (1) Band 1 Block=256x256 Type=Byte, ColorInterp=Undefined Band 2 Block=256x256 Type=Byte, ColorInterp=Undefined Band 3 Block=256x256 Type=Byte, ColorInterp=Undefined Band 4 Block=256x256 Type=Byte, ColorInterp=Undefined ************** Checking to see what jpeg 2000 formats my apt-get install of gdal supports I get. ubuntu at ip-10-147-199-162:/mnt/tx$ gdalinfo --formats Supported Formats: VRT (rw+v): Virtual Raster ................. ERS (rw+v): ERMapper .ers Labelled JPEG2000 (rwv): JPEG-2000 part 1 (ISO/IEC 15444-1) L1B (rov): NOAA Polar Orbiter Level 1b Data Set ................. Is this a jpeg 2000 driver problem? Meaning is this a case of mismatch between the jpeg 2000 driver that my gdal is compiled with and the tnris NAIP jp2 file? You can download a sample file using this link (19MB). http://korver-geodata.s3.amazonaws.com/naip/tx/2012/naip12_nc-cir_1m_3603_64_4_20120809.jp2?AWSAccessKeyId=AKIAJVGZCMETHRONYTUQ&Expires=1417454616&Signature=ZKHM2%2fpmLGn%2b%2b4vXXJKZig5tptM%3d Any pointers would be much appreciated. Mark From gislars+list at googlemail.com Wed Dec 11 04:46:36 2013 From: gislars+list at googlemail.com (Lars Lingner) Date: Wed, 11 Dec 2013 13:46:36 +0100 Subject: [mapserver-users] group layer and GetFeatureInfo Message-ID: <52A85EAC.9090908@googlemail.com> Hello, my mapfile has three layers (same data, but different Min/MaxScale) and each of them is queryable. Every Layer is in a group and the group get advertised in the Capabilities-Document. Only the queryable info is missing for the group layer. The gfi request itself works on the group layer. But I have to modify my Capabilities-Document, so my webclient will recognize it can query the group. I found an posting from last year [1] but no open/closed ticket. So I'm wondering if there are other settings to get the query info into the Capabilities-Document. If somebody can confirm it as a bug, I'm happy to create ticket. Thanks in advance, Lars [1] http://lists.osgeo.org/pipermail/mapserver-users/2012-July/072893.html From charlie.allgrove at bsgwireless.com Wed Dec 11 09:10:31 2013 From: charlie.allgrove at bsgwireless.com (Charlie Allgrove) Date: Wed, 11 Dec 2013 17:10:31 -0000 Subject: [mapserver-users] Mapserver Expressions Message-ID: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> Hi I'm looking to change the symbol used on a given layer, based on the (Google) zoom level supplied to the mapserv CGI. The Layer in question in the map file looks like this: LAYER VALIDATION 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' END PROJECTION "init=epsg:4326" END NAME hubs TYPE point STATUS ON DATA 'hub_data.shp' CLASS EXPRESSION('%tile%' ~ '16$') NAME 'hub_layer_small' STYLE SYMBOL 'cloud_500' END #STYLE END #CLASS CLASS EXPRESSION('%tile%' ~ '17$') NAME 'hub_layer_large' STYLE SYMBOL 'cloud_200' END #STYLE END #CLASS CLASS NAME 'hub_layer_default' STYLE SYMBOL 'cloud_200' SIZE 2 END #STYLE END #CLASS TEMPLATE "xxx" METADATA "wms_title" "Hub data layer" END END #LAYER Requests are made to the CGI with the following example querystring: ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 I *thought* it was possible to use EXPRESSION to test the 'tile' variable and act accordingly, but it's not working (I always get the default class used instead). > ./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Any pointers? Thanks in advance. Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: From aperi2007 at gmail.com Wed Dec 11 13:54:55 2013 From: aperi2007 at gmail.com (Andrea Peri) Date: Wed, 11 Dec 2013 22:54:55 +0100 Subject: [mapserver-users] How retrieve the CRS/SRS in a html template Message-ID: Hi, I need to visualize the CRS (or SRS) value in an html page returned from a GetFeatureInfo. There is a specific token to retireve it ? I tried to use the [CRS} but it work only when the wms receive a WMS 1.3.0 request and is not working with a WMS 1.1.1 request. Thx, -- ----------------- Andrea Peri . . . . . . . . . qwerty ????? ----------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From lin at hvenegaard.dk Wed Dec 11 23:55:55 2013 From: lin at hvenegaard.dk (=?iso-8859-1?Q?Lars=A0I=2E_Nielsen?=) Date: Thu, 12 Dec 2013 08:55:55 +0100 Subject: [mapserver-users] Bug in Mapserver 6.4.0 as WFS server - - what is it ? In-Reply-To: <6F331135492B944D90731CE93743D56801A7F4@FS-EX-DB102.fs.sachsen.de> References: <808B91E58C3D454F8FE97DD4C5142C0C01AD68A45827@hvmex01> <6F331135492B944D90731CE93743D56801A7F4@FS-EX-DB102.fs.sachsen.de> Message-ID: <808B91E58C3D454F8FE97DD4C5142C0C01AD68A4591E@hvmex01> Thanks Andreas, It's exactly the issue I'm faced with. I hope that this bug comment "Thank you for the clarification, @rouault . Your fix has not yet made it into the current release, ..." means that it'll be in the next release. When may that be due ? Kind regards / Med venlig hilsen Lars I. Nielsen ---------------------------------------------------------------- Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og Jens Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. +45 6313 5050 http://www.hvenegaard.dk -----Oprindelig meddelelse----- Fra: Eichner, Andreas - SID-NLKM [mailto:Andreas.Eichner at sid.sachsen.de] Sendt: 10. december 2013 16:13 Til: Lars?I. Nielsen; mapserver-users at lists.osgeo.org Emne: AW: [mapserver-users] Bug in Mapserver 6.4.0 as WFS server - - what is it ? Seems to be this one: https://github.com/mapserver/mapserver/issues/462 As it is referenced by this documentation bug: https://github.com/mapserver/docs/issues/65 HTH > > In this document, there's a mention of a bug present in 6.4.0 wrt. > field types - http://mapserver.org/ogc/wfs_server.html > > > > > Can anyone shed any light on what exactly this bug is, or point me to > a bugtracking description. I've already browsed > https://github.com/mapserver/mapserver/issues without much luck. > > > > > > Kind regards / Med venlig hilsen > Lars I. Nielsen > ---------------------------------------------------------------- > > Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og Jens > Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark Tel. > +45 6313 5050 http://www.hvenegaard.dk > > From Andreas.Eichner at sid.sachsen.de Thu Dec 12 02:28:17 2013 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Thu, 12 Dec 2013 10:28:17 +0000 Subject: [mapserver-users] Bug in Mapserver 6.4.0 as WFS server - - what is it ? In-Reply-To: <808B91E58C3D454F8FE97DD4C5142C0C01AD68A4591E@hvmex01> References: <808B91E58C3D454F8FE97DD4C5142C0C01AD68A45827@hvmex01> <6F331135492B944D90731CE93743D56801A7F4@FS-EX-DB102.fs.sachsen.de> <808B91E58C3D454F8FE97DD4C5142C0C01AD68A4591E@hvmex01> Message-ID: <6F331135492B944D90731CE93743D56801A951@FS-EX-DB102.fs.sachsen.de> MS 6.2 writes gml_[item]_type out as is, MS 6.4 already maps [Integer|Real|Character|Date|Boolean] to [integer|double|string|date|boolean] (although it accepts "double" for "Real" too) but does not prefix the types name with XMLSchema prefix. This might confuse client applications if they only accept basic types from http://www.w3.org/2001/XMLSchema namespace since they will now be looked up from the targetNamespace (http://mapserver.gis.umn.edu/mapserver by default). > -----Urspr?ngliche Nachricht----- > Von: Lars?I. Nielsen [mailto:lin at hvenegaard.dk] > Gesendet: Donnerstag, 12. Dezember 2013 08:56 > An: Eichner, Andreas - SID-NLKM > Cc: mapserver-users at lists.osgeo.org > Betreff: SV: [mapserver-users] Bug in Mapserver 6.4.0 as WFS server - > - what is it ? > > Thanks Andreas, > > It's exactly the issue I'm faced with. > > I hope that this bug comment "Thank you for the clarification, > @rouault . Your fix has not yet made it into the current release, > ..." means that it'll be in the next release. > > When may that be due ? > > > Kind regards / Med venlig hilsen > Lars I. Nielsen > ---------------------------------------------------------------- > Landinspekt?r, Senior GIS Programm?r og Konsulent > Hvenegaard og Jens Bo Landinspekt?rer A/S > Rugaardsvej 55, DK-5000 Odense C > Denmark > Tel. +45 6313 5050 > http://www.hvenegaard.dk > > -----Oprindelig meddelelse----- > Fra: Eichner, Andreas - SID-NLKM > [mailto:Andreas.Eichner at sid.sachsen.de] > Sendt: 10. december 2013 16:13 > Til: Lars?I. Nielsen; mapserver-users at lists.osgeo.org > Emne: AW: [mapserver-users] Bug in Mapserver 6.4.0 as WFS server - - > what is it ? > > Seems to be this one: > https://github.com/mapserver/mapserver/issues/462 > As it is referenced by this documentation bug: > https://github.com/mapserver/docs/issues/65 > > HTH > > > > > In this document, there's a mention of a bug present in 6.4.0 wrt. > > field types - http://mapserver.org/ogc/wfs_server.html > > > > > > > > > > Can anyone shed any light on what exactly this bug is, or point me > to > > a bugtracking description. I've already browsed > > https://github.com/mapserver/mapserver/issues without much luck. > > > > > > > > > > > > Kind regards / Med venlig hilsen > > Lars I. Nielsen > > ---------------------------------------------------------------- > > > > Landinspekt?r, Senior GIS Programm?r og Konsulent Hvenegaard og > Jens > > Bo Landinspekt?rer A/S Rugaardsvej 55, DK-5000 Odense C Denmark > Tel. > > +45 6313 5050 http://www.hvenegaard.dk > > > > From Michael.Smith at maine.gov Thu Dec 12 12:48:41 2013 From: Michael.Smith at maine.gov (Smith, Michael) Date: Thu, 12 Dec 2013 20:48:41 +0000 Subject: [mapserver-users] time in WMS Message-ID: <8927DBC1C0E7CB4A9823B7478829091D198F6CD2@OIT-TEAQEXMBX01.som.w2k.state.me.us> I have a WMS service: http://mapservertest.maine.gov/wms/mapserv.exe?map=c:/wms/timetest.map&SERVICE=WMS&REQUEST=GetCapabilities Which I am using to try and get time parameters in my WMS. What my users want is to be able to have imagery not turn when a time request is given. This is for a raster WMS which uses a tileindex. Now I have enabled the time by adding a TIME field to my tileindex, the field is a text field with date values like this: "2009-08-31". In my mapfile I specify the wms_timeformat in the map section "wms_timeformat" "YYYY-MM-DD" And the time parameters in each layer "wms_timeextent" "2009-08-30/2009-09-01" "wms_timeitem" "TIME" "wms_timedefault" "2009-08-31" When I make a request this error shows up in my logfile: [Thu Dec 12 13:36:40 2013].438000 msWMSApplyTime: WMS server error. No Time value was given, and the default time value 2009-08-31 is invalid or outside the time extent defined 2009-08-30\2009-09-01 I noticed in the GetCapabilities this too: nearestValue="0">2009-08-30/2009-09-01 Can anybody tell me if this WMS is set up right (and my client - ArcGIS - is not querying correctly) or have I done something wrong in my WMS? Also is there a way to assign a time to a raster? Like I could put a date on an imagery collect? =============================== Michael Smith MS GISP State GIS Manager, Maine Office of GIS State of Maine, Office of Information Technology michael.smith _at_ maine.gov 207-215-5530 Board Member, Maine GeoLibrary Education Chair, Maine GIS Users Group State Rep, National States Geographic Information Council [cid:image001.jpg at 01CEF74F.BF2DA600] State House Station 145 51 Commerce Drive Augusta, ME 04333-0145 69o 47' 58.9"W 44o 21' 54.8"N MAP CONFIG "MS_ERRORFILE" "/ms4w_306/tmp/wmserror.txt" CONFIG "PROJ_LIB" "C:\ms4w_306\proj\nad" EXTENT -72 42 -66 48 UNITS DD SHAPEPATH "d:/wms_raster_data" RESOLUTION 96 #MAXSIZE 4096 MAXSIZE 8192 OUTPUTFORMAT NAME "agg" DRIVER "AGG/PNG" MIMETYPE "image/png" EXTENSION PNG IMAGEMODE RGBA TRANSPARENT ON FORMATOPTION "INTERLACE=OFF" END WEB METADATA "ows_enable_request" "*" "wms_extent" "-72 42 -66 48" "wms_server_version" "1.1.1" "wms_title" "Maine_orthos" "wms_onlineresource" "http://mapservertest.maine.gov/wms/mapserv.exe?map=c:/wms/timetest.map&SERVICE=WMS&" "wms_srs" "EPSG:4326 EPSG:26919 EPSG:26983 EPSG:26984 EPSG:102113 EPSG:3857" "wms_abstract" "State of Maine aerial orthophotos provided by the State of Maine, Maine Office of GIS and Maine GeoLibrary Board" "wms_timeformat" "YYYY-MM-DD" END END PROJECTION "init=epsg:4326" END LAYER NAME "naip2009" GROUP "NAIP_2009" MAXSCALEDENOM 20000 METADATA "wms_title" "NAIP_2009" "wms_timeextent" "2009-08-30/2009-09-01" "wms_timeitem" "TIME" "wms_timedefault" "2009-08-31" END TILEINDEX "naip_09\doq_index.shp" TILEITEM "location" TYPE RASTER OFFSITE 0 0 0 PROJECTION "init=epsg:26919" END END LAYER NAME "naip09_5m_overview" GROUP "NAIP_2009" MINSCALEDENOM 20000 MAXSCALEDENOM 100000 METADATA "wms_title" "NAIP_2009_5m" "wms_timeextent" "2009-08-30/2009-09-01" "wms_timeitem" "TIME" "wms_timedefault" "2009-08-31" END TILEINDEX "naip_09\doq_overview_index.shp" TILEITEM "location5m" TYPE RASTER OFFSITE 0 0 0 PROJECTION "init=epsg:26919" END END LAYER NAME "naip09_25m_overview" GROUP "NAIP_2009" MINSCALEDENOM 100000 MAXSCALEDENOM 500000 METADATA "wms_title" "NAIP_2009_25m" "wms_timeextent" "2009-08-30/2009-09-01" "wms_timeitem" "TIME" "wms_timedefault" "2009-08-31" END TILEINDEX "naip_09\doq_large_overview_index.shp" TILEITEM "location25" TYPE RASTER OFFSITE 0 0 0 PROJECTION "init=epsg:26919" END END LAYER NAME "naip09_100m_overview" GROUP "NAIP_2009" MINSCALEDENOM 500000 METADATA "wms_title" "NAIP_2009_100m" END TYPE RASTER DATA "naip_09\mosaic100.tif" OFFSITE 0 0 0 PROJECTION "init=epsg:26919" END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 9032 bytes Desc: image001.jpg URL: From Tom.Kralidis at ec.gc.ca Fri Dec 13 13:11:20 2013 From: Tom.Kralidis at ec.gc.ca (Kralidis,Tom [Ontario]) Date: Fri, 13 Dec 2013 16:11:20 -0500 Subject: [mapserver-users] support of PostGIS PointZ Message-ID: Hi: we are using MapServer 6.4.0 and our (PostgreSQL 8.4/PostGIS 2.0) database models use the PointZ geometry type (we store x/y/z for our observations). How can we make the z values visible when doing WFS 1.1.0 output? Currently for, say, GML3 output, MapServer returns 2d coordinates. Cheers ..Tom From even.rouault at mines-paris.org Fri Dec 13 13:18:14 2013 From: even.rouault at mines-paris.org (Even Rouault) Date: Fri, 13 Dec 2013 22:18:14 +0100 Subject: [mapserver-users] support of PostGIS PointZ In-Reply-To: References: Message-ID: <201312132218.14963.even.rouault@mines-paris.org> Le vendredi 13 d?cembre 2013 22:11:20, Kralidis,Tom [Ontario] a ?crit : > Hi: we are using MapServer 6.4.0 and our (PostgreSQL 8.4/PostGIS 2.0) > database models use the PointZ geometry type (we store x/y/z for our > observations). > > How can we make the z values visible when doing WFS 1.1.0 output? > Currently for, say, GML3 output, MapServer returns 2d coordinates. gmlWriteGeometry_GML2() and gmlWriteGeometry_GML3() don't currently deal with the Z component. The PostGIS backend only reads x and y. So there's some work needed... > > Cheers > > ..Tom > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Geospatial professional services http://even.rouault.free.fr/services.html From Michael.Smith at erdc.dren.mil Fri Dec 13 14:32:20 2013 From: Michael.Smith at erdc.dren.mil (Smith, Michael ERDC-RDE-CRREL-NH) Date: Fri, 13 Dec 2013 22:32:20 +0000 Subject: [mapserver-users] [EXTERNAL] support of PostGIS PointZ Message-ID: Tom, You can do it with OGR Output formats. For example http://geo.usace.army.mil/cgi-bin/wms/nldwfs?service=wfs&version=1.1.0&requ est=getfeature&typename=leveesclosurestructureln&maxfeatures=10&outputforma t=gml3d You need to create an OGR outputformat (GML) which specifies the 25D geometry type, for example "ows_geomtype? ?Geometry25D?. MapServer also needs to be compiled with USE_POINT_Z_M. See http://mapserver.org/output/ogr_output.html#layer-metadata for the ows_geomtype. Mike -- Michael Smith US Army Corps Remote Sensing GIS/Center On 12/13/13, 1:11 PM, "Kralidis,Tom [Ontario]" wrote: >Hi: we are using MapServer 6.4.0 and our (PostgreSQL 8.4/PostGIS 2.0) >database models use the PointZ geometry type (we store x/y/z for our >observations). > >How can we make the z values visible when doing WFS 1.1.0 output? >Currently for, say, GML3 output, MapServer returns 2d coordinates. > >Cheers > >..Tom >_______________________________________________ >mapserver-users mailing list >mapserver-users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users From mark.kelly228 at googlemail.com Mon Dec 16 02:44:13 2013 From: mark.kelly228 at googlemail.com (mark kellermann) Date: Mon, 16 Dec 2013 11:44:13 +0100 Subject: [mapserver-users] Layer oder class nicht drucken In-Reply-To: References: Message-ID: Hallo, gibt es eine M?glichkeit einen Layer so einzurichten, dass dieser nicht gedruckt werden kann? mfG Mark Kellermann -------------- next part -------------- An HTML attachment was scrubbed... URL: From adams at terrestris.de Mon Dec 16 02:51:04 2013 From: adams at terrestris.de (Till Adams) Date: Mon, 16 Dec 2013 11:51:04 +0100 Subject: [mapserver-users] Layer oder class nicht drucken In-Reply-To: References: Message-ID: <52AEDB18.2080504@terrestris.de> Hallo Herr Kellermann, das scheint mir eher eine Frage Ihrer Architektur und auch Ihres Clients zu sein, als eine Aufgabe des Mapservers. F?r Mapserver ist es erstmal egal, ob der eine Karte zum gucken oder drucken ausliefert, das wei? der in dem Moment vermutlich garnicht. Gr??e, Till Adams english: Dear Mr. Kellermann, I guess this is more a matter of your general architecture and/or client than a matter of mapserver. In general for mapserver there is no difference between a request for showing and a request for printing - normally mapserver even does not know whether the client wants to show or print a map. Reagrds, Till Adams Am 16.12.2013 11:44, schrieb mark kellermann: > Hallo, > > gibt es eine M?glichkeit einen Layer so einzurichten, dass dieser nicht > gedruckt werden kann? > > mfG > > Mark Kellermann > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- NEWS: -> map-it.ulm.de! Das Mitmachportal f?r Ulm -> GO Mobile - jetzt WebGIS auch auf Smartphones -> Jetzt OpenSource! SHOGun - das JavaBackend f?r WebGIS Anwendungen ------------------------------------------------ terrestris GmbH & Co. KG Puetzchens Chaussee 56 53227 Bonn Germany Till Adams Geschaeftsfuehrung Tel: +49 (0)228 / 962 899-52 Mobile: +49 (0)151 / 25394429 Fax: +49 (0)228 / 962 899-57 Skype: tilladams adams at terrestris.de http://www.terrestris.de Amtsgericht Bonn, HRA 6835 ------------------------------------------------ Komplementaerin: terrestris Verwaltungs GmbH vertreten durch: Hinrich Paulsen, Till Adams From jt at mapmedia.de Mon Dec 16 02:53:51 2013 From: jt at mapmedia.de (=?ISO-8859-1?Q?J=F6rg_Thomsen?=) Date: Mon, 16 Dec 2013 11:53:51 +0100 Subject: [mapserver-users] Layer oder class nicht drucken In-Reply-To: References: Message-ID: <52AEDBBF.3080509@mapmedia.de> Hi, I'm not sure if this is the german mailimg-list? > gibt es eine M?glichkeit einen Layer so einzurichten, dass dieser > nicht gedruckt werden kann? -> is it possible to configure a layer as not printable? No. perhaps you can configure it via your client and using a proxy which does not allow a direct access to the wms. But if you can load the image into your Browser or any other client, you can print it. J?rg Am 16.12.2013 11:44, schrieb mark kellermann: > Hallo, > > gibt es eine M?glichkeit einen Layer so einzurichten, dass dieser nicht > gedruckt werden kann? > > mfG > > Mark Kellermann > > > > _______________________________________________ > 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 Mon Dec 16 13:00:03 2013 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Mon, 16 Dec 2013 21:00:03 +0000 Subject: [mapserver-users] Mapserver Expressions In-Reply-To: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> References: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> Message-ID: Did you get this fixed? The layer looks right to me. --Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Charlie Allgrove Sent: Wednesday, December 11, 2013 11:11 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Mapserver Expressions Hi I'm looking to change the symbol used on a given layer, based on the (Google) zoom level supplied to the mapserv CGI. The Layer in question in the map file looks like this: LAYER VALIDATION 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' END PROJECTION "init=epsg:4326" END NAME hubs TYPE point STATUS ON DATA 'hub_data.shp' CLASS EXPRESSION('%tile%' ~ '16$') NAME 'hub_layer_small' STYLE SYMBOL 'cloud_500' END #STYLE END #CLASS CLASS EXPRESSION('%tile%' ~ '17$') NAME 'hub_layer_large' STYLE SYMBOL 'cloud_200' END #STYLE END #CLASS CLASS NAME 'hub_layer_default' STYLE SYMBOL 'cloud_200' SIZE 2 END #STYLE END #CLASS TEMPLATE "xxx" METADATA "wms_title" "Hub data layer" END END #LAYER Requests are made to the CGI with the following example querystring: ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 I *thought* it was possible to use EXPRESSION to test the 'tile' variable and act accordingly, but it's not working (I always get the default class used instead). > ./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Any pointers? Thanks in advance. Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: From schroete at iup.physik.uni-bremen.de Tue Dec 17 05:09:26 2013 From: schroete at iup.physik.uni-bremen.de (=?ISO-8859-15?Q?Heiko_Schr=F6ter?=) Date: Tue, 17 Dec 2013 14:09:26 +0100 Subject: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter Message-ID: <52B04D06.9000603@iup.physik.uni-bremen.de> Hello all, we need to rewarp epsg:4326 to polar i.e. "+proj=ortho +over +lon_0=0 +lat_0=90 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for satellite data projection. The problem is that not enough data are read from the source raster image and the map is "cutout" at the poles. gdalwarp can be passed a switch i.e. "-wo EXTRA_SOURCE=750", which gives the correct warped image on the commandline. To make use of it in mapserver a hint has been given in an old mailing thread (sorry, lost the source) to adjust the following code snippet in resample.c: Version: mapserver-6.4.0 resample.c /* -------------------------------------------------------------------- */ /* Project desired extents out by 2 pixels, and then strip to */ /* available data. */ /* -------------------------------------------------------------------- */ memcpy( &sOrigSrcExtent, &sSrcExtent, sizeof(sSrcExtent) ); sSrcExtent.minx = floor(sSrcExtent.minx-1.0); sSrcExtent.maxx = ceil (sSrcExtent.maxx+1.0); sSrcExtent.miny = floor(sSrcExtent.miny-1.0); sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0); Changing the -/+1.0 to -/+1250.0, for example, warps the RASTER image correctly. Unfortunatly using POSTGIS layer or LINE type layer (i.e. for a grid) the reprojection is distorted as before for the RASTER layer. Is there an option or a place in the sources where the POSTGIS or LINE data layers are handled so that a workaround as above for the RASTER Layer could be used ? I could imagine that it would be a good idea to have a parameter "EXTRA_SOURCE" in the mapfile if need be for polar plots. Thanks Heiko From Andreas.Eichner at sid.sachsen.de Tue Dec 17 06:00:47 2013 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Tue, 17 Dec 2013 14:00:47 +0000 Subject: [mapserver-users] Mapserver Expressions In-Reply-To: References: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> Message-ID: <6F331135492B944D90731CE93743D56801AAA3@FS-EX-DB102.fs.sachsen.de> Substitution works quite well but classification does not because the class' expression hasn't been tokenized when msEvalExpression is called by msShapeGetClass. Root cause of this is in msLayerWhichItems(maplayer.c) which shall tokenize the class' expression but doesn't due to making this dependent of the number of used items being greater than zero. Since you don't use items anywhere in your layer they won't be tokenized at all and will always fail (return FALSE) in msEvalExpression(). Basically it should be safe to simply comment out the if-expression in maplayer.c at line 700: - if(nt > 0) { + /* if(nt > 0) */ { I strongly believe that this isn't intended behaviour and should be considered a bug. > -----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: Montag, 16. Dezember 2013 22:00 > An: Charlie Allgrove; mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] Mapserver Expressions > > Did you get this fixed? The layer looks right to me. --Steve > > > > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- > users-bounces at lists.osgeo.org] On Behalf Of Charlie Allgrove > Sent: Wednesday, December 11, 2013 11:11 AM > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] Mapserver Expressions > > > > Hi > > > > I'm looking to change the symbol used on a given layer, based on the > (Google) zoom level supplied to the mapserv CGI. > > > > The Layer in question in the map file looks like this: > > > > LAYER > > VALIDATION > > 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' > > END > > PROJECTION > > "init=epsg:4326" > > END > > NAME hubs > > TYPE point > > STATUS ON > > DATA 'hub_data.shp' > > CLASS > > EXPRESSION('%tile%' ~ '16$') > > NAME 'hub_layer_small' > > STYLE > > SYMBOL 'cloud_500' > > END #STYLE > > END #CLASS > > CLASS > > EXPRESSION('%tile%' ~ '17$') > > NAME 'hub_layer_large' > > STYLE > > SYMBOL 'cloud_200' > > END #STYLE > > END #CLASS > > CLASS > > NAME 'hub_layer_default' > > STYLE > > SYMBOL 'cloud_200' > > SIZE 2 > > END #STYLE > > END #CLASS > > > > TEMPLATE "xxx" > > METADATA > > "wms_title" "Hub data layer" > > END > > END #LAYER > > > > > > Requests are made to the CGI with the following example querystring: > > ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 > > > > I *thought* it was possible to use EXPRESSION to test the 'tile' > variable and act accordingly, but it's not working (I always get the > default class used instead). > > > > > ./mapserv -v > > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE > SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI > SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL > INPUT=SHAPEFILE > > > > Any pointers? Thanks in advance. > > > > Charlie > > From Andreas.Eichner at sid.sachsen.de Tue Dec 17 07:11:32 2013 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Tue, 17 Dec 2013 15:11:32 +0000 Subject: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter In-Reply-To: <52B04D06.9000603@iup.physik.uni-bremen.de> References: <52B04D06.9000603@iup.physik.uni-bremen.de> Message-ID: <6F331135492B944D90731CE93743D56801AABD@FS-EX-DB102.fs.sachsen.de> Looks like that causes the same effect as setting PROCESSING "LOAD_WHOLE_IMAGE=YES" > -----Urspr?ngliche Nachricht----- > Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users- > bounces at lists.osgeo.org] Im Auftrag von Heiko Schr?ter > Gesendet: Dienstag, 17. Dezember 2013 14:09 > An: mapserver-users at lists.osgeo.org > Betreff: [mapserver-users] Rewarping/Reprojection with GDAL and -wo > EXTRA_SOURCE parameter > > To make use of it in mapserver a hint has been given in an old > mailing > thread (sorry, lost the source) to adjust the following code snippet > in > resample.c: > > Version: mapserver-6.4.0 > resample.c > > /* ------------------------------------------------------------------ > -- */ > /* Project desired extents out by 2 pixels, and then strip > to */ > /* available > data. */ > /* > -------------------------------------------------------------------- > */ > memcpy( &sOrigSrcExtent, &sSrcExtent, sizeof(sSrcExtent) ); > sSrcExtent.minx = floor(sSrcExtent.minx-1.0); > sSrcExtent.maxx = ceil (sSrcExtent.maxx+1.0); > sSrcExtent.miny = floor(sSrcExtent.miny-1.0); > sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0); > > > Changing the -/+1.0 to -/+1250.0, for example, warps the RASTER image > correctly. > From charlie.allgrove at bsgwireless.com Tue Dec 17 07:15:41 2013 From: charlie.allgrove at bsgwireless.com (Charlie Allgrove) Date: Tue, 17 Dec 2013 15:15:41 -0000 Subject: [mapserver-users] Mapserver Expressions In-Reply-To: References: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> Message-ID: <00f801cefb3a$dd4da010$97e8e030$@allgrove@bsgwireless.com> Hi, I didn't get it fixed - and due to time constraints, I've had to do some different things in the CGI wrapper I'm using to get it to do what I want it to do...I might take a dip into the source at some point and see what's what. -- Charlie From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us] Sent: 16 December 2013 21:00 To: Charlie Allgrove; mapserver-users at lists.osgeo.org Subject: RE: [mapserver-users] Mapserver Expressions Did you get this fixed? The layer looks right to me. --Steve From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Charlie Allgrove Sent: Wednesday, December 11, 2013 11:11 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Mapserver Expressions Hi I'm looking to change the symbol used on a given layer, based on the (Google) zoom level supplied to the mapserv CGI. The Layer in question in the map file looks like this: LAYER VALIDATION 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' END PROJECTION "init=epsg:4326" END NAME hubs TYPE point STATUS ON DATA 'hub_data.shp' CLASS EXPRESSION('%tile%' ~ '16$') NAME 'hub_layer_small' STYLE SYMBOL 'cloud_500' END #STYLE END #CLASS CLASS EXPRESSION('%tile%' ~ '17$') NAME 'hub_layer_large' STYLE SYMBOL 'cloud_200' END #STYLE END #CLASS CLASS NAME 'hub_layer_default' STYLE SYMBOL 'cloud_200' SIZE 2 END #STYLE END #CLASS TEMPLATE "xxx" METADATA "wms_title" "Hub data layer" END END #LAYER Requests are made to the CGI with the following example querystring: ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 I *thought* it was possible to use EXPRESSION to test the 'tile' variable and act accordingly, but it's not working (I always get the default class used instead). > ./mapserv -v MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Any pointers? Thanks in advance. Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: From schroete at iup.physik.uni-bremen.de Tue Dec 17 07:45:40 2013 From: schroete at iup.physik.uni-bremen.de (=?ISO-8859-1?Q?Heiko_Schr=F6ter?=) Date: Tue, 17 Dec 2013 16:45:40 +0100 Subject: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter In-Reply-To: <6F331135492B944D90731CE93743D56801AABD@FS-EX-DB102.fs.sachsen.de> References: <52B04D06.9000603@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AABD@FS-EX-DB102.fs.sachsen.de> Message-ID: <52B071A4.7070100@iup.physik.uni-bremen.de> Thanks for the hint, but sorry no, does not change rewarping behaviour of POLYGON or LINE Layers. Distortion and missing parts do remain. The odd thing: The projection of all layers is ok if the BBOX equals or is greater than max extension of the map. i.e. BBOX=-6500000,-6500000,6500000,6500000 [proj=ortho units=m] By "zooming" in i.e. reducing the BBOX the RASTER layer rewarps ok, POLYGON and LINE layers do not. Am 17.12.2013 16:11, schrieb Eichner, Andreas - SID-NLKM: > Looks like that causes the same effect as setting > PROCESSING "LOAD_WHOLE_IMAGE=YES" > >> -----Urspr?ngliche Nachricht----- >> Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users- >> bounces at lists.osgeo.org] Im Auftrag von Heiko Schr?ter >> Gesendet: Dienstag, 17. Dezember 2013 14:09 >> An: mapserver-users at lists.osgeo.org >> Betreff: [mapserver-users] Rewarping/Reprojection with GDAL and -wo >> EXTRA_SOURCE parameter >> >> To make use of it in mapserver a hint has been given in an old >> mailing >> thread (sorry, lost the source) to adjust the following code snippet >> in >> resample.c: >> >> Version: mapserver-6.4.0 >> resample.c >> >> /* ------------------------------------------------------------------ >> -- */ >> /* Project desired extents out by 2 pixels, and then strip >> to */ >> /* available >> data. */ >> /* >> -------------------------------------------------------------------- >> */ >> memcpy( &sOrigSrcExtent, &sSrcExtent, sizeof(sSrcExtent) ); >> sSrcExtent.minx = floor(sSrcExtent.minx-1.0); >> sSrcExtent.maxx = ceil (sSrcExtent.maxx+1.0); >> sSrcExtent.miny = floor(sSrcExtent.miny-1.0); >> sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0); >> >> >> Changing the -/+1.0 to -/+1250.0, for example, warps the RASTER image >> correctly. >> > -- ----------------------------------------------------------------------- Dipl.-Ing. Heiko Schr?ter Institute of Environmental Physics (IUP) phone: ++49-(0)421-218-62092 Institute of Remote Sensing (IFE) fax: ++49-(0)421-218-62070 University of Bremen (FB1) P.O. Box 330440 email: schroete at iup.physik.uni-bremen.de Otto-Hahn-Allee 1 28359 Bremen Germany ----------------------------------------------------------------------- From Steve.Lime at state.mn.us Tue Dec 17 07:50:12 2013 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 17 Dec 2013 15:50:12 +0000 Subject: [mapserver-users] Mapserver Expressions In-Reply-To: <6F331135492B944D90731CE93743D56801AAA3@FS-EX-DB102.fs.sachsen.de> References: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> <6F331135492B944D90731CE93743D56801AAA3@FS-EX-DB102.fs.sachsen.de> Message-ID: Assuming Andreas is correct, yes this would be a bug given cases like this. I can create a ticket titled "Expressions without column references fail.". As a work around Charlie could add a sub-expression to those expressions that depend on a column but that always evaluate to true. Steve -----Original Message----- From: Eichner, Andreas - SID-NLKM [mailto:Andreas.Eichner at sid.sachsen.de] Sent: Tuesday, December 17, 2013 8:01 AM To: Lime, Steve D (MNIT); Charlie Allgrove; mapserver-users at lists.osgeo.org Subject: AW: [mapserver-users] Mapserver Expressions Substitution works quite well but classification does not because the class' expression hasn't been tokenized when msEvalExpression is called by msShapeGetClass. Root cause of this is in msLayerWhichItems(maplayer.c) which shall tokenize the class' expression but doesn't due to making this dependent of the number of used items being greater than zero. Since you don't use items anywhere in your layer they won't be tokenized at all and will always fail (return FALSE) in msEvalExpression(). Basically it should be safe to simply comment out the if-expression in maplayer.c at line 700: - if(nt > 0) { + /* if(nt > 0) */ { I strongly believe that this isn't intended behaviour and should be considered a bug. > -----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: Montag, 16. Dezember 2013 22:00 > An: Charlie Allgrove; mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] Mapserver Expressions > > Did you get this fixed? The layer looks right to me. --Steve > > > > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- > users-bounces at lists.osgeo.org] On Behalf Of Charlie Allgrove > Sent: Wednesday, December 11, 2013 11:11 AM > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] Mapserver Expressions > > > > Hi > > > > I'm looking to change the symbol used on a given layer, based on the > (Google) zoom level supplied to the mapserv CGI. > > > > The Layer in question in the map file looks like this: > > > > LAYER > > VALIDATION > > 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' > > END > > PROJECTION > > "init=epsg:4326" > > END > > NAME hubs > > TYPE point > > STATUS ON > > DATA 'hub_data.shp' > > CLASS > > EXPRESSION('%tile%' ~ '16$') > > NAME 'hub_layer_small' > > STYLE > > SYMBOL 'cloud_500' > > END #STYLE > > END #CLASS > > CLASS > > EXPRESSION('%tile%' ~ '17$') > > NAME 'hub_layer_large' > > STYLE > > SYMBOL 'cloud_200' > > END #STYLE > > END #CLASS > > CLASS > > NAME 'hub_layer_default' > > STYLE > > SYMBOL 'cloud_200' > > SIZE 2 > > END #STYLE > > END #CLASS > > > > TEMPLATE "xxx" > > METADATA > > "wms_title" "Hub data layer" > > END > > END #LAYER > > > > > > Requests are made to the CGI with the following example querystring: > > ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 > > > > I *thought* it was possible to use EXPRESSION to test the 'tile' > variable and act accordingly, but it's not working (I always get the > default class used instead). > > > > > ./mapserv -v > > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE > SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI > SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL > INPUT=SHAPEFILE > > > > Any pointers? Thanks in advance. > > > > Charlie > > From charlie.allgrove at bsgwireless.com Tue Dec 17 08:28:08 2013 From: charlie.allgrove at bsgwireless.com (Charlie Allgrove) Date: Tue, 17 Dec 2013 16:28:08 -0000 Subject: [mapserver-users] Mapserver Expressions In-Reply-To: References: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> <6F331135492B944D90731CE93743D56801AAA3@FS-EX-DB102.fs.sachsen.de> Message-ID: <011501cefb44$fc548af0$f4fda0d0$@allgrove@bsgwireless.com> So... Given my shapefile contains 2 attributes only, LAT and LONG, I *think* you're suggesting something like this: Adding CLASSITEM 'LAT' into the LAYER and modifying the expressions in my original post (for example) FROM ... EXPRESSION('%tile%' ~ '16$') ... TO ... EXPRESSION(('%tile%' ~ '16$') && ([LAT] ne 0)) ... Given my dataset, it's a safe assumption that LAT will never be 0. Does that sound about right? Thanks in advance! Charlie -----Original Message----- From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us] Sent: 17 December 2013 15:50 To: Eichner, Andreas - SID-NLKM; Charlie Allgrove; mapserver-users at lists.osgeo.org Subject: RE: [mapserver-users] Mapserver Expressions Assuming Andreas is correct, yes this would be a bug given cases like this. I can create a ticket titled "Expressions without column references fail.". As a work around Charlie could add a sub-expression to those expressions that depend on a column but that always evaluate to true. Steve -----Original Message----- From: Eichner, Andreas - SID-NLKM [mailto:Andreas.Eichner at sid.sachsen.de] Sent: Tuesday, December 17, 2013 8:01 AM To: Lime, Steve D (MNIT); Charlie Allgrove; mapserver-users at lists.osgeo.org Subject: AW: [mapserver-users] Mapserver Expressions Substitution works quite well but classification does not because the class' expression hasn't been tokenized when msEvalExpression is called by msShapeGetClass. Root cause of this is in msLayerWhichItems(maplayer.c) which shall tokenize the class' expression but doesn't due to making this dependent of the number of used items being greater than zero. Since you don't use items anywhere in your layer they won't be tokenized at all and will always fail (return FALSE) in msEvalExpression(). Basically it should be safe to simply comment out the if-expression in maplayer.c at line 700: - if(nt > 0) { + /* if(nt > 0) */ { I strongly believe that this isn't intended behaviour and should be considered a bug. > -----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: Montag, 16. Dezember 2013 22:00 > An: Charlie Allgrove; mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] Mapserver Expressions > > Did you get this fixed? The layer looks right to me. --Steve > > > > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- > users-bounces at lists.osgeo.org] On Behalf Of Charlie Allgrove > Sent: Wednesday, December 11, 2013 11:11 AM > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] Mapserver Expressions > > > > Hi > > > > I'm looking to change the symbol used on a given layer, based on the > (Google) zoom level supplied to the mapserv CGI. > > > > The Layer in question in the map file looks like this: > > > > LAYER > > VALIDATION > > 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' > > END > > PROJECTION > > "init=epsg:4326" > > END > > NAME hubs > > TYPE point > > STATUS ON > > DATA 'hub_data.shp' > > CLASS > > EXPRESSION('%tile%' ~ '16$') > > NAME 'hub_layer_small' > > STYLE > > SYMBOL 'cloud_500' > > END #STYLE > > END #CLASS > > CLASS > > EXPRESSION('%tile%' ~ '17$') > > NAME 'hub_layer_large' > > STYLE > > SYMBOL 'cloud_200' > > END #STYLE > > END #CLASS > > CLASS > > NAME 'hub_layer_default' > > STYLE > > SYMBOL 'cloud_200' > > SIZE 2 > > END #STYLE > > END #CLASS > > > > TEMPLATE "xxx" > > METADATA > > "wms_title" "Hub data layer" > > END > > END #LAYER > > > > > > Requests are made to the CGI with the following example querystring: > > ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 > > > > I *thought* it was possible to use EXPRESSION to test the 'tile' > variable and act accordingly, but it's not working (I always get the > default class used instead). > > > > > ./mapserv -v > > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE > SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI > SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL > INPUT=SHAPEFILE > > > > Any pointers? Thanks in advance. > > > > Charlie > > From Steve.Lime at state.mn.us Tue Dec 17 08:30:00 2013 From: Steve.Lime at state.mn.us (Lime, Steve D (MNIT)) Date: Tue, 17 Dec 2013 16:30:00 +0000 Subject: [mapserver-users] Mapserver Expressions In-Reply-To: <011501cefb44$fc548af0$f4fda0d0$@allgrove@bsgwireless.com> References: <014a01cef693$e9b965b0$bd2c3110$@allgrove@bsgwireless.com> <6F331135492B944D90731CE93743D56801AAA3@FS-EX-DB102.fs.sachsen.de> <011501cefb44$fc548af0$f4fda0d0$@allgrove@bsgwireless.com> Message-ID: Yes, something like that. I'll try and set up a test case here too. -----Original Message----- From: Charlie Allgrove [mailto:charlie.allgrove at bsgwireless.com] Sent: Tuesday, December 17, 2013 10:28 AM To: Lime, Steve D (MNIT); 'Eichner, Andreas - SID-NLKM'; mapserver-users at lists.osgeo.org Subject: RE: [mapserver-users] Mapserver Expressions So... Given my shapefile contains 2 attributes only, LAT and LONG, I *think* you're suggesting something like this: Adding CLASSITEM 'LAT' into the LAYER and modifying the expressions in my original post (for example) FROM ... EXPRESSION('%tile%' ~ '16$') ... TO ... EXPRESSION(('%tile%' ~ '16$') && ([LAT] ne 0)) ... Given my dataset, it's a safe assumption that LAT will never be 0. Does that sound about right? Thanks in advance! Charlie -----Original Message----- From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us] Sent: 17 December 2013 15:50 To: Eichner, Andreas - SID-NLKM; Charlie Allgrove; mapserver-users at lists.osgeo.org Subject: RE: [mapserver-users] Mapserver Expressions Assuming Andreas is correct, yes this would be a bug given cases like this. I can create a ticket titled "Expressions without column references fail.". As a work around Charlie could add a sub-expression to those expressions that depend on a column but that always evaluate to true. Steve -----Original Message----- From: Eichner, Andreas - SID-NLKM [mailto:Andreas.Eichner at sid.sachsen.de] Sent: Tuesday, December 17, 2013 8:01 AM To: Lime, Steve D (MNIT); Charlie Allgrove; mapserver-users at lists.osgeo.org Subject: AW: [mapserver-users] Mapserver Expressions Substitution works quite well but classification does not because the class' expression hasn't been tokenized when msEvalExpression is called by msShapeGetClass. Root cause of this is in msLayerWhichItems(maplayer.c) which shall tokenize the class' expression but doesn't due to making this dependent of the number of used items being greater than zero. Since you don't use items anywhere in your layer they won't be tokenized at all and will always fail (return FALSE) in msEvalExpression(). Basically it should be safe to simply comment out the if-expression in maplayer.c at line 700: - if(nt > 0) { + /* if(nt > 0) */ { I strongly believe that this isn't intended behaviour and should be considered a bug. > -----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: Montag, 16. Dezember 2013 22:00 > An: Charlie Allgrove; mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] Mapserver Expressions > > Did you get this fixed? The layer looks right to me. --Steve > > > > From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- > users-bounces at lists.osgeo.org] On Behalf Of Charlie Allgrove > Sent: Wednesday, December 11, 2013 11:11 AM > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] Mapserver Expressions > > > > Hi > > > > I'm looking to change the symbol used on a given layer, based on the > (Google) zoom level supplied to the mapserv CGI. > > > > The Layer in question in the map file looks like this: > > > > LAYER > > VALIDATION > > 'tile' '^[0-9]+ [0-9]+ [0-9]{1,2}$' > > END > > PROJECTION > > "init=epsg:4326" > > END > > NAME hubs > > TYPE point > > STATUS ON > > DATA 'hub_data.shp' > > CLASS > > EXPRESSION('%tile%' ~ '16$') > > NAME 'hub_layer_small' > > STYLE > > SYMBOL 'cloud_500' > > END #STYLE > > END #CLASS > > CLASS > > EXPRESSION('%tile%' ~ '17$') > > NAME 'hub_layer_large' > > STYLE > > SYMBOL 'cloud_200' > > END #STYLE > > END #CLASS > > CLASS > > NAME 'hub_layer_default' > > STYLE > > SYMBOL 'cloud_200' > > SIZE 2 > > END #STYLE > > END #CLASS > > > > TEMPLATE "xxx" > > METADATA > > "wms_title" "Hub data layer" > > END > > END #LAYER > > > > > > Requests are made to the CGI with the following example querystring: > > ?layer=hubs&mode=tile&tilemode=gmap&tile=19288 24631 16 > > > > I *thought* it was possible to use EXPRESSION to test the 'tile' > variable and act accordingly, but it's not working (I always get the > default class used instead). > > > > > ./mapserv -v > > MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG > SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE > SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI > SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL > INPUT=SHAPEFILE > > > > Any pointers? Thanks in advance. > > > > Charlie > > From Andreas.Eichner at sid.sachsen.de Tue Dec 17 08:57:38 2013 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Tue, 17 Dec 2013 16:57:38 +0000 Subject: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter In-Reply-To: <52B071A4.7070100@iup.physik.uni-bremen.de> References: <52B04D06.9000603@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AABD@FS-EX-DB102.fs.sachsen.de> <52B071A4.7070100@iup.physik.uni-bremen.de> Message-ID: <6F331135492B944D90731CE93743D56801AAFC@FS-EX-DB102.fs.sachsen.de> Can you try if PROCESSING "POLYLINE_NO_CLIP=YES" helps on TYPE LINE layers? > -----Urspr?ngliche Nachricht----- > Von: Heiko Schr?ter [mailto:schroete at iup.physik.uni-bremen.de] > Gesendet: Dienstag, 17. Dezember 2013 16:46 > An: Eichner, Andreas - SID-NLKM; mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] Rewarping/Reprojection with GDAL and - > wo EXTRA_SOURCE parameter > > Thanks for the hint, but sorry no, does not change rewarping > behaviour > of POLYGON or LINE Layers. > Distortion and missing parts do remain. > > The odd thing: > The projection of all layers is ok if the BBOX equals or is greater > than > max extension of the map. > i.e. BBOX=-6500000,-6500000,6500000,6500000 [proj=ortho units=m] > By "zooming" in i.e. reducing the BBOX the RASTER layer rewarps ok, > POLYGON and LINE layers do not. > > > Am 17.12.2013 16:11, schrieb Eichner, Andreas - SID-NLKM: > > Looks like that causes the same effect as setting > > PROCESSING "LOAD_WHOLE_IMAGE=YES" > > > >> -----Urspr?ngliche Nachricht----- > >> Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- > users- > >> bounces at lists.osgeo.org] Im Auftrag von Heiko Schr?ter > >> Gesendet: Dienstag, 17. Dezember 2013 14:09 > >> An: mapserver-users at lists.osgeo.org > >> Betreff: [mapserver-users] Rewarping/Reprojection with GDAL and - > wo > >> EXTRA_SOURCE parameter > >> > >> To make use of it in mapserver a hint has been given in an old > >> mailing > >> thread (sorry, lost the source) to adjust the following code > snippet > >> in > >> resample.c: > >> > >> Version: mapserver-6.4.0 > >> resample.c > >> > >> /* --------------------------------------------------------------- > --- > >> -- */ > >> /* Project desired extents out by 2 pixels, and then > strip > >> to */ > >> /* available > >> data. */ > >> /* > >> ------------------------------------------------------------------ > -- > >> */ > >> memcpy( &sOrigSrcExtent, &sSrcExtent, sizeof(sSrcExtent) ); > >> sSrcExtent.minx = floor(sSrcExtent.minx-1.0); > >> sSrcExtent.maxx = ceil (sSrcExtent.maxx+1.0); > >> sSrcExtent.miny = floor(sSrcExtent.miny-1.0); > >> sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0); > >> > >> > >> Changing the -/+1.0 to -/+1250.0, for example, warps the RASTER > image > >> correctly. > >> > > > > > -- > --------------------------------------------------------------------- > -- > Dipl.-Ing. Heiko Schr?ter > Institute of Environmental Physics (IUP) phone: ++49-(0)421-218- > 62092 > Institute of Remote Sensing (IFE) fax: ++49-(0)421-218- > 62070 > University of Bremen (FB1) > P.O. Box 330440 email: schroete at iup.physik.uni- > bremen.de > Otto-Hahn-Allee 1 > 28359 Bremen > Germany > --------------------------------------------------------------------- > -- From schroete at iup.physik.uni-bremen.de Tue Dec 17 12:00:48 2013 From: schroete at iup.physik.uni-bremen.de (=?ISO-8859-1?Q?Heiko_Schr=F6ter?=) Date: Tue, 17 Dec 2013 21:00:48 +0100 Subject: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter In-Reply-To: <6F331135492B944D90731CE93743D56801AAFC@FS-EX-DB102.fs.sachsen.de> References: <52B04D06.9000603@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AABD@FS-EX-DB102.fs.sachsen.de> <52B071A4.7070100@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AAFC@FS-EX-DB102.fs.sachsen.de> Message-ID: <52B0AD70.7040201@iup.physik.uni-bremen.de> Seems not to work. Failure can be reproduced by changing BBOX params. I've setup a test site with three layers so you may have a look. Blue Marble = RASTER Grid = LINE Coloured Rect = POSTGIS Warping ok from epsg4326->ortho: http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-6500000,-6500000,6500000,6500000&FORMAT=IMAGE/PNG&FROMDAT=2006-08-06%2000:00&HOEHE=-1&LAYERS=KARTE1,WILLI,GRID&MAP=/var/www/localhost/mapserver/laura.map&PRODUKT=stro3_21&REQUEST=GETMAP&SERVICE=WMS&SRS=EPSG:0815&STYLES=&TIME=2006-10-06%2000:00/2006-10-08%2023:59&TODAT=2006-08-07%2023:59&TRANSPARENT=FALSE&VERSION=1.1.1&WIDTH=600&HEIGHT=600 Warping distorted: http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-4500000,-4500000,4500000,4500000&FORMAT=IMAGE/PNG&FROMDAT=2006-08-06%2000:00&HOEHE=-1&LAYERS=KARTE1,WILLI,GRID&MAP=/var/www/localhost/mapserver/laura.map&PRODUKT=stro3_21&REQUEST=GETMAP&SERVICE=WMS&SRS=EPSG:0815&STYLES=&TIME=2006-10-06%2000:00/2006-10-08%2023:59&TODAT=2006-08-07%2023:59&TRANSPARENT=FALSE&VERSION=1.1.1&WIDTH=600&HEIGHT=600 Am 17.12.2013 17:57, schrieb Eichner, Andreas - SID-NLKM: > Can you try if PROCESSING "POLYLINE_NO_CLIP=YES" helps on TYPE LINE layers? > >> -----Urspr?ngliche Nachricht----- >> Von: Heiko Schr?ter [mailto:schroete at iup.physik.uni-bremen.de] >> Gesendet: Dienstag, 17. Dezember 2013 16:46 >> An: Eichner, Andreas - SID-NLKM; mapserver-users at lists.osgeo.org >> Betreff: Re: [mapserver-users] Rewarping/Reprojection with GDAL and - >> wo EXTRA_SOURCE parameter >> >> Thanks for the hint, but sorry no, does not change rewarping >> behaviour >> of POLYGON or LINE Layers. >> Distortion and missing parts do remain. >> >> The odd thing: >> The projection of all layers is ok if the BBOX equals or is greater >> than >> max extension of the map. >> i.e. BBOX=-6500000,-6500000,6500000,6500000 [proj=ortho units=m] >> By "zooming" in i.e. reducing the BBOX the RASTER layer rewarps ok, >> POLYGON and LINE layers do not. >> >> >> Am 17.12.2013 16:11, schrieb Eichner, Andreas - SID-NLKM: >>> Looks like that causes the same effect as setting >>> PROCESSING "LOAD_WHOLE_IMAGE=YES" >>> >>>> -----Urspr?ngliche Nachricht----- >>>> Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- >> users- >>>> bounces at lists.osgeo.org] Im Auftrag von Heiko Schr?ter >>>> Gesendet: Dienstag, 17. Dezember 2013 14:09 >>>> An: mapserver-users at lists.osgeo.org >>>> Betreff: [mapserver-users] Rewarping/Reprojection with GDAL and - >> wo >>>> EXTRA_SOURCE parameter >>>> >>>> To make use of it in mapserver a hint has been given in an old >>>> mailing >>>> thread (sorry, lost the source) to adjust the following code >> snippet >>>> in >>>> resample.c: >>>> >>>> Version: mapserver-6.4.0 >>>> resample.c >>>> >>>> /* --------------------------------------------------------------- >> --- >>>> -- */ >>>> /* Project desired extents out by 2 pixels, and then >> strip >>>> to */ >>>> /* available >>>> data. */ >>>> /* >>>> ------------------------------------------------------------------ >> -- >>>> */ >>>> memcpy( &sOrigSrcExtent, &sSrcExtent, sizeof(sSrcExtent) ); >>>> sSrcExtent.minx = floor(sSrcExtent.minx-1.0); >>>> sSrcExtent.maxx = ceil (sSrcExtent.maxx+1.0); >>>> sSrcExtent.miny = floor(sSrcExtent.miny-1.0); >>>> sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0); >>>> >>>> >>>> Changing the -/+1.0 to -/+1250.0, for example, warps the RASTER >> image >>>> correctly. >>>> >>> >> >> >> -- >> --------------------------------------------------------------------- >> -- >> Dipl.-Ing. Heiko Schr?ter >> Institute of Environmental Physics (IUP) phone: ++49-(0)421-218- >> 62092 >> Institute of Remote Sensing (IFE) fax: ++49-(0)421-218- >> 62070 >> University of Bremen (FB1) >> P.O. Box 330440 email: schroete at iup.physik.uni- >> bremen.de >> Otto-Hahn-Allee 1 >> 28359 Bremen >> Germany >> --------------------------------------------------------------------- >> -- > > From donald.kerr at dkerr.co.uk Tue Dec 17 12:14:15 2013 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Tue, 17 Dec 2013 20:14:15 -0000 Subject: [mapserver-users] OGR ODBC Layer with Password Message-ID: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> Any takers (see email below)? Help appreciated. Regards, Donald -----Original Message----- From: Donald Kerr [mailto:donald.kerr at dkerr.co.uk] Sent: 12 December 2013 16:45 To: 'Donald Kerr' Subject: OGR ODBC Layer with Password Hi All, I have a layer that uses OGR to connect to an Microsoft Access database via ODBC. CONNECTIONTYPE OGR CONNECTION "ODBC: MyDNSName,MyTableName" # Requires GEOMETRY_COLUMNS table (SPATIAL_REF_SYS optional) - Fails if DATA included in this map file The above works on a database without password protection. When I add a password to the database, I would expect to be able to connect using the following line: CONNECTION "ODBC:Admin/MyPassword at MyDNSName,MyTableName" # Requires GEOMETRY_COLUMNS table (SPATIAL_REF_SYS optional) - Fails if DATA included in this map file But I get the following error in the log file: [Thu Dec 12 16:22:35 2013].484000 msDrawMap(): WMS/WFS set-up and query, 0.000s [Thu Dec 12 16:22:35 2013].484000 msOGRFileOpen(ODBC:Admin/MyPassword at MyDSNName,MyTableName)... [Thu Dec 12 16:22:35 2013].484000 OGROPen(ODBC:Admin/MyPassword at MyDSNName) [Thu Dec 12 16:22:35 2013].515000 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `MyLayerName'. Unable to initialize ODBC connection to DSN for Admin/MyPassword at MyDSNName, [Microsoft][ODBC Microsoft Access Driver] Not a valid password The only difference is the username and password being included in the connection string. If I run the following at the command line, all works well: C:\ >ogrinfo ODBC:Admin/MyPassword at MyDSNName,MyTableName INFO: Open of `ODBC:Admin/MyPassword at MyDSNName,MyTableName' using driver `ODBC' successful. 1: MyTableName It would appear that the Username and Password are being ignored or changed when used by MapServer since ogrinfo is working correctly and opening the connection. Any ideas? Many thanks. Regards, Donald From donald.kerr at dkerr.co.uk Tue Dec 17 12:31:41 2013 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Tue, 17 Dec 2013 20:31:41 -0000 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <4444913D-8B3F-4E9E-A258-8C7B76A880FA@tlfhinc.com> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> <4444913D-8B3F-4E9E-A258-8C7B76A880FA@tlfhinc.com> Message-ID: <006d01cefb66$ff097950$fd1c6bf0$@dkerr.co.uk> Ezmer, Many thanks for the quick reply. There's no error, just a typo. I changed the names of the DSN, and table just for the user group. The real map file has the actual names which are correct i.e. no typos. Regards, Donald -----Original Message----- From: Ezmer DeKleaner [mailto:ezmer.dekleaner at tlfhinc.com] Sent: 17 December 2013 20:27 To: Donald Kerr Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] OGR ODBC Layer with Password Just looking at what you wrote... there is a difference This is what you claim to have in your map file: "CONNECTION "ODBC:Admin/MyPassword at MyDNSName,MyTableName" # Requires GEOMETRY_COLUMNS table (SPATIAL_REF_SYS optional) - Fails if DATA included in this map file but when you past what you have by hand (Note that the name in the ERROR FILE IS MYDSNName... DSN not DNS I suspect a transliteration error.... On Dec 17, 2013, at 12:14 15PST, Donald Kerr wrote: > Any takers (see email below)? Help appreciated. > > Regards, > > Donald > > -----Original Message----- > From: Donald Kerr [mailto:donald.kerr at dkerr.co.uk] > Sent: 12 December 2013 16:45 > To: 'Donald Kerr' > Subject: OGR ODBC Layer with Password > > Hi All, > > I have a layer that uses OGR to connect to an Microsoft Access > database via ODBC. > > CONNECTIONTYPE OGR > CONNECTION "ODBC: MyDNSName,MyTableName" # Requires GEOMETRY_COLUMNS > table (SPATIAL_REF_SYS optional) - Fails if DATA included in this map > file > > The above works on a database without password protection. When I add > a password to the database, I would expect to be able to connect using > the following line: > > CONNECTION "ODBC:Admin/MyPassword at MyDNSName,MyTableName" # Requires > GEOMETRY_COLUMNS table (SPATIAL_REF_SYS optional) - Fails if DATA > included in this map file > > But I get the following error in the log file: > > [Thu Dec 12 16:22:35 2013].484000 msDrawMap(): WMS/WFS set-up and > query, 0.000s [Thu Dec 12 16:22:35 2013].484000 > msOGRFileOpen(ODBC:Admin/MyPassword at MyDSNName,MyTableName)... > [Thu Dec 12 16:22:35 2013].484000 > OGROPen(ODBC:Admin/MyPassword at MyDSNName) > [Thu Dec 12 16:22:35 2013].515000 msOGRFileOpen(): OGR error. Open > failed for OGR connection in layer `MyLayerName'. > Unable to initialize ODBC connection to DSN for > Admin/MyPassword at MyDSNName, [Microsoft][ODBC Microsoft Access Driver] > Not a valid password > > The only difference is the username and password being included in the > connection string. > > If I run the following at the command line, all works well: > > C:\ >ogrinfo ODBC:Admin/MyPassword at MyDSNName,MyTableName > INFO: Open of `ODBC:Admin/MyPassword at MyDSNName,MyTableName' > using driver `ODBC' successful. > 1: MyTableName > > It would appear that the Username and Password are being ignored or > changed when used by MapServer since ogrinfo is working correctly and > opening the connection. > > Any ideas? > > Many thanks. > > Regards, > > Donald > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4259 / Virus Database: 3658/6928 - Release Date: 12/17/13 From jmckenna at gatewaygeomatics.com Tue Dec 17 12:36:21 2013 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 17 Dec 2013 16:36:21 -0400 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> Message-ID: <52B0B5C5.1030500@gatewaygeomatics.com> On 2013-12-17 4:14 PM, Donald Kerr wrote: > Any takers (see email below)? Help appreciated. > > Regards, > > Donald > > -----Original Message----- > From: Donald Kerr [mailto:donald.kerr at dkerr.co.uk] > Sent: 12 December 2013 16:45 > To: 'Donald Kerr' > Subject: OGR ODBC Layer with Password > > Hi All, > > I have a layer that uses OGR to connect to an Microsoft Access database via > ODBC. > > CONNECTIONTYPE OGR > CONNECTION "ODBC: MyDNSName,MyTableName" # Requires GEOMETRY_COLUMNS table > (SPATIAL_REF_SYS optional) - Fails if DATA included in this map file > > The above works on a database without password protection. When I add a > password to the database, I would expect to be able to connect using the > following line: > > CONNECTION "ODBC:Admin/MyPassword at MyDNSName,MyTableName" # Requires > GEOMETRY_COLUMNS table (SPATIAL_REF_SYS optional) - Fails if DATA included > in this map file > > But I get the following error in the log file: > > [Thu Dec 12 16:22:35 2013].484000 msDrawMap(): WMS/WFS set-up and query, > 0.000s [Thu Dec 12 16:22:35 2013].484000 > msOGRFileOpen(ODBC:Admin/MyPassword at MyDSNName,MyTableName)... > [Thu Dec 12 16:22:35 2013].484000 OGROPen(ODBC:Admin/MyPassword at MyDSNName) > [Thu Dec 12 16:22:35 2013].515000 msOGRFileOpen(): OGR error. Open failed > for OGR connection in layer `MyLayerName'. > Unable to initialize ODBC connection to DSN for Admin/MyPassword at MyDSNName, > [Microsoft][ODBC Microsoft Access Driver] Not a valid password > > The only difference is the username and password being included in the > connection string. > > If I run the following at the command line, all works well: > > C:\ >ogrinfo ODBC:Admin/MyPassword at MyDSNName,MyTableName > INFO: Open of `ODBC:Admin/MyPassword at MyDSNName,MyTableName' > using driver `ODBC' successful. > 1: MyTableName > > It would appear that the Username and Password are being ignored or changed > when used by MapServer since ogrinfo is working correctly and opening the > connection. > > Any ideas? > > Many thanks. > > Regards, > > Donald > > If this is all hosted on the same Windows machine, what happens if you leave out the user/pass? eg. ogrinfo ODBC:@DSN table -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From donald.kerr at dkerr.co.uk Tue Dec 17 12:41:12 2013 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Tue, 17 Dec 2013 20:41:12 -0000 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <52B0B5C5.1030500@gatewaygeomatics.com> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> <52B0B5C5.1030500@gatewaygeomatics.com> Message-ID: <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> Jeff, Same password error, I'm afraid. It's as if MapServer is not passing the username/password combination. Many thanks. Regards, Donald -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna Sent: 17 December 2013 20:36 To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] OGR ODBC Layer with Password On 2013-12-17 4:14 PM, Donald Kerr wrote: > Any takers (see email below)? Help appreciated. > > Regards, > > Donald > > -----Original Message----- > From: Donald Kerr [mailto:donald.kerr at dkerr.co.uk] > Sent: 12 December 2013 16:45 > To: 'Donald Kerr' > Subject: OGR ODBC Layer with Password > > Hi All, > > I have a layer that uses OGR to connect to an Microsoft Access > database via ODBC. > > CONNECTIONTYPE OGR > CONNECTION "ODBC: MyDNSName,MyTableName" # Requires GEOMETRY_COLUMNS > table (SPATIAL_REF_SYS optional) - Fails if DATA included in this map > file > > The above works on a database without password protection. When I add > a password to the database, I would expect to be able to connect using > the following line: > > CONNECTION "ODBC:Admin/MyPassword at MyDNSName,MyTableName" # Requires > GEOMETRY_COLUMNS table (SPATIAL_REF_SYS optional) - Fails if DATA > included in this map file > > But I get the following error in the log file: > > [Thu Dec 12 16:22:35 2013].484000 msDrawMap(): WMS/WFS set-up and > query, 0.000s [Thu Dec 12 16:22:35 2013].484000 > msOGRFileOpen(ODBC:Admin/MyPassword at MyDSNName,MyTableName)... > [Thu Dec 12 16:22:35 2013].484000 > OGROPen(ODBC:Admin/MyPassword at MyDSNName) > [Thu Dec 12 16:22:35 2013].515000 msOGRFileOpen(): OGR error. Open > failed for OGR connection in layer `MyLayerName'. > Unable to initialize ODBC connection to DSN for > Admin/MyPassword at MyDSNName, [Microsoft][ODBC Microsoft Access Driver] > Not a valid password > > The only difference is the username and password being included in the > connection string. > > If I run the following at the command line, all works well: > > C:\ >ogrinfo ODBC:Admin/MyPassword at MyDSNName,MyTableName > INFO: Open of `ODBC:Admin/MyPassword at MyDSNName,MyTableName' > using driver `ODBC' successful. > 1: MyTableName > > It would appear that the Username and Password are being ignored or > changed when used by MapServer since ogrinfo is working correctly and > opening the connection. > > Any ideas? > > Many thanks. > > Regards, > > Donald > > If this is all hosted on the same Windows machine, what happens if you leave out the user/pass? eg. ogrinfo ODBC:@DSN table -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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4259 / Virus Database: 3658/6928 - Release Date: 12/17/13 From jmckenna at gatewaygeomatics.com Tue Dec 17 12:47:26 2013 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 17 Dec 2013 16:47:26 -0400 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> <52B0B5C5.1030500@gatewaygeomatics.com> <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> Message-ID: <52B0B85E.9070701@gatewaygeomatics.com> On 2013-12-17 4:41 PM, Donald Kerr wrote: > Jeff, > > Same password error, I'm afraid. It's as if MapServer is not passing the > username/password combination. > > Many thanks. > > Regards, > > Donald > I've been here before. Did you create a "System" DSN on Windows? Then I usually look into the slash (Admin/MyPassword), and I also might debug using single/double quotes (all usual Windows debugging joy). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From donald.kerr at dkerr.co.uk Tue Dec 17 14:15:16 2013 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Tue, 17 Dec 2013 22:15:16 -0000 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <52B0B85E.9070701@gatewaygeomatics.com> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> <52B0B5C5.1030500@gatewaygeomatics.com> <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> <52B0B85E.9070701@gatewaygeomatics.com> Message-ID: <007601cefb75$77287a90$65796fb0$@dkerr.co.uk> Jeff, I've tried all the combinations that I can think of and the following also works (creates test.png with the map & features) outside of mapserver on the command line: shp2img -m my.map -o test.png with: CONNECTION "ODBC:Admin/MyPassword at MyDSNName,MyTableName" in the map file. The following two also work: CONNECTION "ODBC: /MyPassword at MyDSNName,MyTableName" CONNECTION "ODBC: /MyPassword at MyDSNName" ...but no joy with MapServer. I've tried combinations of ' and "" - no luck. Many thanks. Regards, Donald -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna Sent: 17 December 2013 20:47 To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] OGR ODBC Layer with Password On 2013-12-17 4:41 PM, Donald Kerr wrote: > Jeff, > > Same password error, I'm afraid. It's as if MapServer is not passing > the username/password combination. > > Many thanks. > > Regards, > > Donald > I've been here before. Did you create a "System" DSN on Windows? Then I usually look into the slash (Admin/MyPassword), and I also might debug using single/double quotes (all usual Windows debugging joy). -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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4259 / Virus Database: 3658/6928 - Release Date: 12/17/13 From bfraser at geoanalytic.com Tue Dec 17 15:13:21 2013 From: bfraser at geoanalytic.com (Brent Fraser) Date: Tue, 17 Dec 2013 16:13:21 -0700 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> <52B0B5C5.1030500@gatewaygeomatics.com> <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> Message-ID: <52B0DA91.9020309@geoanalytic.com> Donald, It's kind of a work-around, but a few years ago (mapserv v5.2.1) I used the following method to connect to a database via ODBC: CONNECTIONTYPE OGR CONNECTION " ODBC:myUser/myPassword at myDSN,myTable SELECT Longitude, Latitude, IDFROM myTable ID wkbPoint NAD83 " PROCESSING "CLOSE_CONNECTION=DEFER" DATA "myTable" Best Regards, Brent Fraser On 12/17/2013 1:41 PM, Donald Kerr wrote: > Jeff, > > Same password error, I'm afraid. It's as if MapServer is not passing the > username/password combination. > > Many thanks. > > Regards, > > Donald > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna > Sent: 17 December 2013 20:36 > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] OGR ODBC Layer with Password > > On 2013-12-17 4:14 PM, Donald Kerr wrote: >> Any takers (see email below)? Help appreciated. >> >> Regards, >> >> Donald >> >> -----Original Message----- >> From: Donald Kerr [mailto:donald.kerr at dkerr.co.uk] >> Sent: 12 December 2013 16:45 >> To: 'Donald Kerr' >> Subject: OGR ODBC Layer with Password >> >> Hi All, >> >> I have a layer that uses OGR to connect to an Microsoft Access >> database via ODBC. >> >> CONNECTIONTYPE OGR >> CONNECTION "ODBC: MyDNSName,MyTableName" # Requires GEOMETRY_COLUMNS >> table (SPATIAL_REF_SYS optional) - Fails if DATA included in this map >> file >> >> The above works on a database without password protection. When I add >> a password to the database, I would expect to be able to connect using >> the following line: >> >> CONNECTION "ODBC:Admin/MyPassword at MyDNSName,MyTableName" # Requires >> GEOMETRY_COLUMNS table (SPATIAL_REF_SYS optional) - Fails if DATA >> included in this map file >> >> But I get the following error in the log file: >> >> [Thu Dec 12 16:22:35 2013].484000 msDrawMap(): WMS/WFS set-up and >> query, 0.000s [Thu Dec 12 16:22:35 2013].484000 >> msOGRFileOpen(ODBC:Admin/MyPassword at MyDSNName,MyTableName)... >> [Thu Dec 12 16:22:35 2013].484000 >> OGROPen(ODBC:Admin/MyPassword at MyDSNName) >> [Thu Dec 12 16:22:35 2013].515000 msOGRFileOpen(): OGR error. Open >> failed for OGR connection in layer `MyLayerName'. >> Unable to initialize ODBC connection to DSN for >> Admin/MyPassword at MyDSNName, [Microsoft][ODBC Microsoft Access Driver] >> Not a valid password >> >> The only difference is the username and password being included in the >> connection string. >> >> If I run the following at the command line, all works well: >> >> C:\ >ogrinfo ODBC:Admin/MyPassword at MyDSNName,MyTableName >> INFO: Open of `ODBC:Admin/MyPassword at MyDSNName,MyTableName' >> using driver `ODBC' successful. >> 1: MyTableName >> >> It would appear that the Username and Password are being ignored or >> changed when used by MapServer since ogrinfo is working correctly and >> opening the connection. >> >> Any ideas? >> >> Many thanks. >> >> Regards, >> >> Donald >> >> > If this is all hosted on the same Windows machine, what happens if you > leave out the user/pass? eg. ogrinfo ODBC:@DSN table > > -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 > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2014.0.4259 / Virus Database: 3658/6928 - Release Date: 12/17/13 > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From jmckenna at gatewaygeomatics.com Tue Dec 17 15:21:22 2013 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 17 Dec 2013 19:21:22 -0400 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <52B0DA91.9020309@geoanalytic.com> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> <52B0B5C5.1030500@gatewaygeomatics.com> <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> <52B0DA91.9020309@geoanalytic.com> Message-ID: <52B0DC72.7040501@gatewaygeomatics.com> On 2013-12-17 7:13 PM, Brent Fraser wrote: > Donald, > > It's kind of a work-around, but a few years ago (mapserv v5.2.1) I > used the following method to connect to a database via ODBC: > > CONNECTIONTYPE OGR > CONNECTION " > > ODBC:myUser/myPassword at myDSN,myTable > > SELECT Longitude, Latitude, IDFROM myTable > > ID > wkbPoint > NAD83 > x='Longitude'/> > > " > > PROCESSING "CLOSE_CONNECTION=DEFER" > > DATA "myTable" > > Best Regards, > Brent Fraser true, and this is well documented at http://www.mapserver.org/input/vector/VirtualSpatialData.html -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From jmckenna at gatewaygeomatics.com Tue Dec 17 15:25:46 2013 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 17 Dec 2013 19:25:46 -0400 Subject: [mapserver-users] OGR ODBC Layer with Password In-Reply-To: <007601cefb75$77287a90$65796fb0$@dkerr.co.uk> References: <006c01cefb64$8f86a370$ae93ea50$@dkerr.co.uk> <52B0B5C5.1030500@gatewaygeomatics.com> <006f01cefb68$53508700$f9f19500$@dkerr.co.uk> <52B0B85E.9070701@gatewaygeomatics.com> <007601cefb75$77287a90$65796fb0$@dkerr.co.uk> Message-ID: <52B0DD7A.4040805@gatewaygeomatics.com> On 2013-12-17 6:15 PM, Donald Kerr wrote: > Jeff, > > I've tried all the combinations that I can think of and the following also > works (creates test.png with the map & features) outside of mapserver on the > command line: > > shp2img -m my.map -o test.png > > with: > > CONNECTION "ODBC:Admin/MyPassword at MyDSNName,MyTableName" > > in the map file. > > The following two also work: > > CONNECTION "ODBC: /MyPassword at MyDSNName,MyTableName" > CONNECTION "ODBC: /MyPassword at MyDSNName" > > ...but no joy with MapServer. > > I've tried combinations of ' and "" - no luck. > > Many thanks. > > Regards, > > Donald > > I believe I also always test ODBC connections with a commandline tool, I believe it is this: http://msdn.microsoft.com/en-us/library/ms712676%28v=vs.85%29.aspx Usually that shp2img works and something in MapServer/Apache doesn't, is a sign that Apache can't find something (usually DSN is not configured properly, as a System DSN). But that is the first hint to this problem. Wish I had access to your machine, I enjoy debugging this for clients. Off to dinner. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From brfr at metrico.lu Wed Dec 18 00:58:22 2013 From: brfr at metrico.lu (Frank Broniewski) Date: Wed, 18 Dec 2013 09:58:22 +0100 Subject: [mapserver-users] Admin boundaries styling Message-ID: <52B163AE.2010006@metrico.lu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to get the styling right for administrative boundaries. The data source is a polygon shapefile with administrative boundaries of a certain level. I want to have a dashed line style to symbolize the boundary. The layer is used as TYPE LINE. The style I'm using: STYLE Color 100 100 100 Gap 4 Linecap butt Linejoin miter Linejoinmaxsize 3 Pattern 2 6 2 6 2 6 End Symbol "circle" Width 2 END Problem is that the pattern overlaps where a boundary is drawn more than once due to the shared nature of adjacent adminstrative units. Since the source is a shapefile there's no topology that would prevent the issue and my PostGis DB doesn't support that (yet)*. Here's a screenshot that displays the issue: http://www.geometrico.lu/devel/mapserver/boundary-styling.png As you can see the styling varies greatly. So - does anyone have a clue on how to get the styling right? It should look like in the lower right corner of the screenshot ... Many thanks, Frank * BTW: can Mapserver handle PostGIS topology geometry types? - -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSsWOfAAoJEHopqW0d1cQVUjcH+wamQP8jJo8BzrX9JYp6mn2h rzbk4LYyH6Xf144dnJkfrt7G8eziABT0Zg/RDqE6trqkBGlPxO16wOFbIPunEAZC O+veftAYv4pyZbXKvAJF2yXW1L1P/OJNppRO3WnfkZGVDybsWecGkoowl0NdPBgL Ps4FLcVXhgNxpdOZpwgMMDOHs1VGVuZgRXx02SLm8lmzffnixSCuMUtL45Q9HBon 62SCRi/nJ1AYAMVC9+2PeRs4Uni+cIAMRS0nXeE988JcXvDmWsazKXZCwG9iuZhz WUOuIEpTg2wcH3zEemyHkxJnutW5ryUDCbF/u7cCiCgVHq+NesGEfVS6kWqGW2U= =Mm2w -----END PGP SIGNATURE----- From jukka.rahkonen at mmmtike.fi Wed Dec 18 02:22:45 2013 From: jukka.rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 18 Dec 2013 10:22:45 +0000 Subject: [mapserver-users] Admin boundaries styling Message-ID: <84446DEF76453C439E9E97E438E13A631F0A965A@suutari.haapa.mmm.fi> Hi, Would it be acceptable to create a new dataset for rendering the borders by converting polygons into linestrings and merging the overlapping segments? With OpenJUMP you cound do it with a single operation Tools - Edit Geometry - Convert - Extract Segments. Select option "Merge resulting segments" and you've done it. -Jukka Rahkonen- Frank Broniewski wrote: > Hi, > > I'm trying to get the styling right for administrative boundaries. The data source > is a polygon shapefile with administrative boundaries of a certain level. I want to > have a dashed line style to symbolize the boundary. The layer is used as TYPE > LINE. > > > The style I'm using: > > STYLE > Color 100 100 100 > Gap 4 > Linecap butt > Linejoin miter > Linejoinmaxsize 3 > Pattern 2 6 2 6 2 6 End > Symbol "circle" > Width 2 > END > > Problem is that the pattern overlaps where a boundary is drawn more than once > due to the shared nature of adjacent adminstrative units. > Since the source is a shapefile there's no topology that would prevent the issue > and my PostGis DB doesn't support that (yet)*. Here's a screenshot that displays > the issue: > http://www.geometrico.lu/devel/mapserver/boundary-styling.png > As you can see the styling varies greatly. So - does anyone have a clue on how to > get the styling right? It should look like in the lower right corner of the > screenshot ... > > Many thanks, > > Frank > > > * BTW: can Mapserver handle PostGIS topology geometry types? > > > - -- > Frank BRONIEWSKI > > METRICO s.? r.l. > g?om?tres > technologies d'information g?ographique > rue des Romains 36 > L-5433 NIEDERDONVEN > > t?l.: +352 26 74 94 - 28 > fax.: +352 26 74 94 99 > http://www.metrico.lu > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJSsWOfAAoJEHopqW0d1cQVUjcH+wamQP8jJo8BzrX9JYp6mn > 2h > rzbk4LYyH6Xf144dnJkfrt7G8eziABT0Zg/RDqE6trqkBGlPxO16wOFbIPunEAZC > O+veftAYv4pyZbXKvAJF2yXW1L1P/OJNppRO3WnfkZGVDybsWecGkoowl0NdPBg > L > Ps4FLcVXhgNxpdOZpwgMMDOHs1VGVuZgRXx02SLm8lmzffnixSCuMUtL45Q9HB > on > 62SCRi/nJ1AYAMVC9+2PeRs4Uni+cIAMRS0nXeE988JcXvDmWsazKXZCwG9iuZhz > WUOuIEpTg2wcH3zEemyHkxJnutW5ryUDCbF/u7cCiCgVHq+NesGEfVS6kWqGW2 > U= > =Mm2w > -----END PGP SIGNATURE----- > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From Andreas.Eichner at sid.sachsen.de Wed Dec 18 02:27:32 2013 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Wed, 18 Dec 2013 10:27:32 +0000 Subject: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter In-Reply-To: <52B0AD70.7040201@iup.physik.uni-bremen.de> References: <52B04D06.9000603@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AABD@FS-EX-DB102.fs.sachsen.de> <52B071A4.7070100@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AAFC@FS-EX-DB102.fs.sachsen.de> <52B0AD70.7040201@iup.physik.uni-bremen.de> Message-ID: <6F331135492B944D90731CE93743D56801ABAF@FS-EX-DB102.fs.sachsen.de> Can you provide a simple test case, probably a MAP file with inline data? I've created some simple test data but I am unable to reproduce the problem. > -----Urspr?ngliche Nachricht----- > Von: Heiko Schr?ter [mailto:schroete at iup.physik.uni-bremen.de] > Gesendet: Dienstag, 17. Dezember 2013 21:01 > An: Eichner, Andreas - SID-NLKM; mapserver-users at lists.osgeo.org; > Heiko Schr?ter > Betreff: Re: [mapserver-users] Rewarping/Reprojection with GDAL and - > wo EXTRA_SOURCE parameter > > Seems not to work. Failure can be reproduced by changing BBOX params. > I've setup a test site with three layers so you may have a look. > Blue Marble = RASTER > Grid = LINE > Coloured Rect = POSTGIS > > > Warping ok from epsg4326->ortho: > > http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-6500000,- > 6500000,6500000,6500000&FORMAT=IMAGE/PNG&FROMDAT=2006-08- > 06%2000:00&HOEHE=- > 1&LAYERS=KARTE1,WILLI,GRID&MAP=/var/www/localhost/mapserver/laura.map > &PRODUKT=stro3_21&REQUEST=GETMAP&SERVICE=WMS&SRS=EPSG:0815&STYLES=&TI > ME=2006-10-06%2000:00/2006-10-08%2023:59&TODAT=2006-08- > 07%2023:59&TRANSPARENT=FALSE&VERSION=1.1.1&WIDTH=600&HEIGHT=600 > > Warping distorted: > > http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-4500000,- > 4500000,4500000,4500000&FORMAT=IMAGE/PNG&FROMDAT=2006-08- > 06%2000:00&HOEHE=- > 1&LAYERS=KARTE1,WILLI,GRID&MAP=/var/www/localhost/mapserver/laura.map > &PRODUKT=stro3_21&REQUEST=GETMAP&SERVICE=WMS&SRS=EPSG:0815&STYLES=&TI > ME=2006-10-06%2000:00/2006-10-08%2023:59&TODAT=2006-08- > 07%2023:59&TRANSPARENT=FALSE&VERSION=1.1.1&WIDTH=600&HEIGHT=600 > > > > Am 17.12.2013 17:57, schrieb Eichner, Andreas - SID-NLKM: > > Can you try if PROCESSING "POLYLINE_NO_CLIP=YES" helps on TYPE LINE > layers? > > > >> -----Urspr?ngliche Nachricht----- > >> Von: Heiko Schr?ter [mailto:schroete at iup.physik.uni-bremen.de] > >> Gesendet: Dienstag, 17. Dezember 2013 16:46 > >> An: Eichner, Andreas - SID-NLKM; mapserver-users at lists.osgeo.org > >> Betreff: Re: [mapserver-users] Rewarping/Reprojection with GDAL > and - > >> wo EXTRA_SOURCE parameter > >> > >> Thanks for the hint, but sorry no, does not change rewarping > >> behaviour > >> of POLYGON or LINE Layers. > >> Distortion and missing parts do remain. > >> > >> The odd thing: > >> The projection of all layers is ok if the BBOX equals or is > greater > >> than > >> max extension of the map. > >> i.e. BBOX=-6500000,-6500000,6500000,6500000 [proj=ortho units=m] > >> By "zooming" in i.e. reducing the BBOX the RASTER layer rewarps > ok, > >> POLYGON and LINE layers do not. > >> > >> > >> Am 17.12.2013 16:11, schrieb Eichner, Andreas - SID-NLKM: > >>> Looks like that causes the same effect as setting > >>> PROCESSING "LOAD_WHOLE_IMAGE=YES" > >>> > >>>> -----Urspr?ngliche Nachricht----- > >>>> Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- > >> users- > >>>> bounces at lists.osgeo.org] Im Auftrag von Heiko Schr?ter > >>>> Gesendet: Dienstag, 17. Dezember 2013 14:09 > >>>> An: mapserver-users at lists.osgeo.org > >>>> Betreff: [mapserver-users] Rewarping/Reprojection with GDAL and > - > >> wo > >>>> EXTRA_SOURCE parameter > >>>> > >>>> To make use of it in mapserver a hint has been given in an old > >>>> mailing > >>>> thread (sorry, lost the source) to adjust the following code > >> snippet > >>>> in > >>>> resample.c: > >>>> > >>>> Version: mapserver-6.4.0 > >>>> resample.c > >>>> > >>>> /* ------------------------------------------------------------- > -- > >> --- > >>>> -- */ > >>>> /* Project desired extents out by 2 pixels, and then > >> strip > >>>> to */ > >>>> /* available > >>>> data. */ > >>>> /* > >>>> ---------------------------------------------------------------- > -- > >> -- > >>>> */ > >>>> memcpy( &sOrigSrcExtent, &sSrcExtent, sizeof(sSrcExtent) ); > >>>> sSrcExtent.minx = floor(sSrcExtent.minx-1.0); > >>>> sSrcExtent.maxx = ceil (sSrcExtent.maxx+1.0); > >>>> sSrcExtent.miny = floor(sSrcExtent.miny-1.0); > >>>> sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0); > >>>> > >>>> > >>>> Changing the -/+1.0 to -/+1250.0, for example, warps the RASTER > >> image > >>>> correctly. > >>>> > >>> > >> > >> > >> -- > >> ------------------------------------------------------------------ > --- > >> -- > >> Dipl.-Ing. Heiko Schr?ter > >> Institute of Environmental Physics (IUP) phone: ++49-(0)421-218- > >> 62092 > >> Institute of Remote Sensing (IFE) fax: ++49-(0)421-218- > >> 62070 > >> University of Bremen (FB1) > >> P.O. Box 330440 email: schroete at iup.physik.uni- > >> bremen.de > >> Otto-Hahn-Allee 1 > >> 28359 Bremen > >> Germany > >> ------------------------------------------------------------------ > --- > >> -- > > > > From brfr at metrico.lu Wed Dec 18 02:37:49 2013 From: brfr at metrico.lu (Frank Broniewski) Date: Wed, 18 Dec 2013 11:37:49 +0100 Subject: [mapserver-users] Admin boundaries styling In-Reply-To: <84446DEF76453C439E9E97E438E13A631F0A965A@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A631F0A965A@suutari.haapa.mmm.fi> Message-ID: <52B17AFD.90507@metrico.lu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I came up with a similar solution - I imported the shapefile into GRASS and exported the boundaries again as shapefile, but your solution is easier to handle. But I really wish there would be a mapserver-only solution. I am hesitatant to create files for visual reasons only ... Frank Am 2013-12-18 11:22, schrieb Rahkonen Jukka: > Hi, > > Would it be acceptable to create a new dataset for rendering the > borders by converting polygons into linestrings and merging the > overlapping segments? With OpenJUMP you cound do it with a single > operation Tools - Edit Geometry - Convert - Extract Segments. > Select option "Merge resulting segments" and you've done it. > > -Jukka Rahkonen- > > Frank Broniewski wrote: > >> Hi, >> >> I'm trying to get the styling right for administrative >> boundaries. The data source is a polygon shapefile with >> administrative boundaries of a certain level. I want to have a >> dashed line style to symbolize the boundary. The layer is used as >> TYPE LINE. >> >> >> The style I'm using: >> >> STYLE Color 100 100 100 Gap 4 Linecap butt Linejoin miter >> Linejoinmaxsize 3 Pattern 2 6 2 6 2 6 End Symbol "circle" Width >> 2 END >> >> Problem is that the pattern overlaps where a boundary is drawn >> more than once due to the shared nature of adjacent adminstrative >> units. Since the source is a shapefile there's no topology that >> would prevent the issue and my PostGis DB doesn't support that >> (yet)*. Here's a screenshot that displays the issue: >> http://www.geometrico.lu/devel/mapserver/boundary-styling.png As >> you can see the styling varies greatly. So - does anyone have a >> clue on how to get the styling right? It should look like in the >> lower right corner of the screenshot ... >> >> Many thanks, >> >> Frank >> >> >> * BTW: can Mapserver handle PostGIS topology geometry types? >> >> >> - -- Frank BRONIEWSKI >> >> METRICO s.? r.l. g?om?tres technologies d'information >> g?ographique rue des Romains 36 L-5433 NIEDERDONVEN >> >> t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 >> http://www.metrico.lu -----BEGIN PGP SIGNATURE----- Version: >> GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - >> http://www.enigmail.net/ >> >> iQEcBAEBAgAGBQJSsWOfAAoJEHopqW0d1cQVUjcH+wamQP8jJo8BzrX9JYp6mn >> 2h >> rzbk4LYyH6Xf144dnJkfrt7G8eziABT0Zg/RDqE6trqkBGlPxO16wOFbIPunEAZC >> O+veftAYv4pyZbXKvAJF2yXW1L1P/OJNppRO3WnfkZGVDybsWecGkoowl0NdPBg >> L Ps4FLcVXhgNxpdOZpwgMMDOHs1VGVuZgRXx02SLm8lmzffnixSCuMUtL45Q9HB >> on >> 62SCRi/nJ1AYAMVC9+2PeRs4Uni+cIAMRS0nXeE988JcXvDmWsazKXZCwG9iuZhz >> WUOuIEpTg2wcH3zEemyHkxJnutW5ryUDCbF/u7cCiCgVHq+NesGEfVS6kWqGW2 >> U= =Mm2w -----END PGP SIGNATURE----- >> _______________________________________________ mapserver-users >> mailing list mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users - -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSsXrPAAoJEHopqW0d1cQV3RgIAIHILIrDXZ7j3lTnpPVMEx69 +vh7eMNSWNnUp4EdJS1Ia0/xurHclijdJrZ1IN5klohsQFmv22ygdnOP+DSbN8fr N8bCeeZfIfbtTRGR467eFeNCdXg7A3aYEk1E1cJJitG8IP9riPh9zWWelPXk7qJP /r9/Of0vYowCoyxl+yu1V/V8mOD0Wp5aPe7wkGenEf2UvIp9FfmNUPSfHLzJOZKM x2ONp2wO7lhLj9AYHCb8h+jbIbWK4ywvLpjehxr3fS3JMRJscekbxI6hzJ32U7iF FpQxs2xYA0XjosZSAiMu6MnuObPnevRJVdIsycK0gkjHarcfIbeIv/E4HqBtmro= =ES4L -----END PGP SIGNATURE----- From schroete at iup.physik.uni-bremen.de Wed Dec 18 03:19:16 2013 From: schroete at iup.physik.uni-bremen.de (=?ISO-8859-1?Q?Heiko_Schr=F6ter?=) Date: Wed, 18 Dec 2013 12:19:16 +0100 Subject: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter In-Reply-To: <6F331135492B944D90731CE93743D56801ABAF@FS-EX-DB102.fs.sachsen.de> References: <52B04D06.9000603@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AABD@FS-EX-DB102.fs.sachsen.de> <52B071A4.7070100@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801AAFC@FS-EX-DB102.fs.sachsen.de> <52B0AD70.7040201@iup.physik.uni-bremen.de> <6F331135492B944D90731CE93743D56801ABAF@FS-EX-DB102.fs.sachsen.de> Message-ID: <52B184B4.4030105@iup.physik.uni-bremen.de> I've omitted the postgis stuff in the mapfile, because of access restrictions. In the EPSG file i have placed this dummy epsg code for reprojection: <0815> +proj=ortho +over +lon_0=0 +lat_0=90 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <> MAP NAME WELT OUTPUTFORMAT NAME "aggpng24" DRIVER AGG/PNG MIMETYPE "image/png" IMAGEMODE RGB EXTENSION "png" END STATUS ON SHAPEPATH "/your/shape/path/" TRANSPARENT ON MAXSIZE 10000 # Requesting polar plot with a dummy "EPSG:0815" in epsg file # <0815> +proj=ortho +over +lon_0=0 +lat_0=90 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <> PROJECTION "init=epsg:4326" END WEB IMAGEPATH "/var/www/localhost/htdocs/tmpimages/" IMAGEURL "/tmpimages/" METADATA "ows_srs" "EPSG:4326 EPSG:0815 EPSG:0816 EPSG:3857 EPSG:900913" "wms_enable_request" "*" END END LAYER EXTENT -180 -90 180 90 NAME "KARTE1" TYPE RASTER STATUS OFF OPACITY 100 DATA "YourMap.png" METADATA "wms_title" "karte layer" END PROJECTION "init=epsg:4326" END CLASS NAME "karte_class" OUTLINECOLOR 0 0 0 COLOR 180 180 180 SYMBOL 0 END END # Layer LAYER TYPE LINE STATUS OFF EXTENT -180 -90 180 90 NAME "GRID" OPACITY 50 METADATA "wms_title" "grid layer" END PROJECTION "init=epsg:4326" END CLASS NAME "Graticule" STYLE COLOR 180 90 0 MAXWIDTH 2 MINWIDTH 2 END END GRID LABELFORMAT "DD" MAXARCS 1 MININTERVAL 15 MAXINTERVAL 60 MAXSUBDIVIDE 360 END END # Layer END # Ende Map Am 18.12.2013 11:27, schrieb Eichner, Andreas - SID-NLKM: > Can you provide a simple test case, probably a MAP file with inline data? I've created some simple test data but I am unable to reproduce the problem. > >> -----Urspr?ngliche Nachricht----- >> Von: Heiko Schr?ter [mailto:schroete at iup.physik.uni-bremen.de] >> Gesendet: Dienstag, 17. Dezember 2013 21:01 >> An: Eichner, Andreas - SID-NLKM; mapserver-users at lists.osgeo.org; >> Heiko Schr?ter >> Betreff: Re: [mapserver-users] Rewarping/Reprojection with GDAL and - >> wo EXTRA_SOURCE parameter >> >> Seems not to work. Failure can be reproduced by changing BBOX params. >> I've setup a test site with three layers so you may have a look. >> Blue Marble = RASTER >> Grid = LINE >> Coloured Rect = POSTGIS >> >> >> Warping ok from epsg4326->ortho: >> >> http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-6500000,- >> 6500000,6500000,6500000&FORMAT=IMAGE/PNG&FROMDAT=2006-08- >> 06%2000:00&HOEHE=- >> 1&LAYERS=KARTE1,WILLI,GRID&MAP=/var/www/localhost/mapserver/laura.map >> &PRODUKT=stro3_21&REQUEST=GETMAP&SERVICE=WMS&SRS=EPSG:0815&STYLES=&TI >> ME=2006-10-06%2000:00/2006-10-08%2023:59&TODAT=2006-08- >> 07%2023:59&TRANSPARENT=FALSE&VERSION=1.1.1&WIDTH=600&HEIGHT=600 >> >> Warping distorted: >> >> http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-4500000,- >> 4500000,4500000,4500000&FORMAT=IMAGE/PNG&FROMDAT=2006-08- >> 06%2000:00&HOEHE=- >> 1&LAYERS=KARTE1,WILLI,GRID&MAP=/var/www/localhost/mapserver/laura.map >> &PRODUKT=stro3_21&REQUEST=GETMAP&SERVICE=WMS&SRS=EPSG:0815&STYLES=&TI >> ME=2006-10-06%2000:00/2006-10-08%2023:59&TODAT=2006-08- >> 07%2023:59&TRANSPARENT=FALSE&VERSION=1.1.1&WIDTH=600&HEIGHT=600 >> >> >> >> Am 17.12.2013 17:57, schrieb Eichner, Andreas - SID-NLKM: >>> Can you try if PROCESSING "POLYLINE_NO_CLIP=YES" helps on TYPE LINE >> layers? >>>> -----Urspr?ngliche Nachricht----- >>>> Von: Heiko Schr?ter [mailto:schroete at iup.physik.uni-bremen.de] >>>> Gesendet: Dienstag, 17. Dezember 2013 16:46 >>>> An: Eichner, Andreas - SID-NLKM; mapserver-users at lists.osgeo.org >>>> Betreff: Re: [mapserver-users] Rewarping/Reprojection with GDAL >> and - >>>> wo EXTRA_SOURCE parameter >>>> >>>> Thanks for the hint, but sorry no, does not change rewarping >>>> behaviour >>>> of POLYGON or LINE Layers. >>>> Distortion and missing parts do remain. >>>> >>>> The odd thing: >>>> The projection of all layers is ok if the BBOX equals or is >> greater >>>> than >>>> max extension of the map. >>>> i.e. BBOX=-6500000,-6500000,6500000,6500000 [proj=ortho units=m] >>>> By "zooming" in i.e. reducing the BBOX the RASTER layer rewarps >> ok, >>>> POLYGON and LINE layers do not. >>>> >>>> >>>> Am 17.12.2013 16:11, schrieb Eichner, Andreas - SID-NLKM: >>>>> Looks like that causes the same effect as setting >>>>> PROCESSING "LOAD_WHOLE_IMAGE=YES" >>>>> >>>>>> -----Urspr?ngliche Nachricht----- >>>>>> Von: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver- >>>> users- >>>>>> bounces at lists.osgeo.org] Im Auftrag von Heiko Schr?ter >>>>>> Gesendet: Dienstag, 17. Dezember 2013 14:09 >>>>>> An: mapserver-users at lists.osgeo.org >>>>>> Betreff: [mapserver-users] Rewarping/Reprojection with GDAL and >> - >>>> wo >>>>>> EXTRA_SOURCE parameter >>>>>> >>>>>> To make use of it in mapserver a hint has been given in an old >>>>>> mailing >>>>>> thread (sorry, lost the source) to adjust the following code >>>> snippet >>>>>> in >>>>>> resample.c: >>>>>> >>>>>> Version: mapserver-6.4.0 >>>>>> resample.c >>>>>> >>>>>> /* ------------------------------------------------------------- >> -- >>>> --- >>>>>> -- */ >>>>>> /* Project desired extents out by 2 pixels, and then >>>> strip >>>>>> to */ >>>>>> /* available >>>>>> data. */ >>>>>> /* >>>>>> ---------------------------------------------------------------- >> -- >>>> -- >>>>>> */ >>>>>> memcpy( &sOrigSrcExtent, &sSrcExtent, sizeof(sSrcExtent) ); >>>>>> sSrcExtent.minx = floor(sSrcExtent.minx-1.0); >>>>>> sSrcExtent.maxx = ceil (sSrcExtent.maxx+1.0); >>>>>> sSrcExtent.miny = floor(sSrcExtent.miny-1.0); >>>>>> sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0); >>>>>> >>>>>> >>>>>> Changing the -/+1.0 to -/+1250.0, for example, warps the RASTER >>>> image >>>>>> correctly. >>>>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ From schroeter at netgis.de Wed Dec 18 03:53:14 2013 From: schroeter at netgis.de (Sven Schroeter) Date: Wed, 18 Dec 2013 12:53:14 +0100 Subject: [mapserver-users] MS4W Mapcache Message-ID: <001801cefbe7$bbfb9f90$33f2deb0$@de> Hi, I'm testing the MapCache Apache Module from MapServer for Windows (MS4W 3.1.0-beta1) Works fine with the cache types disk, sqlite and tiff. Now I try to create a Cache for Offline with OpenLayers. I want to create a cache in the structure /z/x/y.png but using a template for the cache type disk, it's impossible to restart Apache.