From MarkVolz at co.lyon.mn.us Thu Jan 6 09:19:28 2022 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Thu, 6 Jan 2022 17:19:28 +0000 Subject: [mapserver-users] working with ESRI coordinate systems in proj.db Message-ID: <27487f0bfa544117a99fe80b937ba7d1@co.lyon.mn.us> Hello, Could someone help me with setting up mapserver to use a non ESRI projection that is already stored in proj.db? The coordinate system is for Lyon County, MN #103749 and is stored with ESRI as the authority. I know that we can set up Mapserver to use Web Mercator by setting the adding "init=epsg:4326" to a projection block. Unfortunately I cannot access my counties coordinate system by setting the projection with "init=esri:103749". Thank you for any help! Sincerely, Mark Volz, GISP -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Thu Jan 6 15:24:31 2022 From: sdlime at gmail.com (Steve Lime) Date: Thu, 6 Jan 2022 17:24:31 -0600 Subject: [mapserver-users] working with ESRI coordinate systems in proj.db In-Reply-To: <27487f0bfa544117a99fe80b937ba7d1@co.lyon.mn.us> References: <27487f0bfa544117a99fe80b937ba7d1@co.lyon.mn.us> Message-ID: Hi Mark: Not something I've tried to do so hopefully someone else can weigh in. What version of Proj are you using? --Steve On Thu, Jan 6, 2022 at 11:19 AM Mark Volz wrote: > Hello, > > > > Could someone help me with setting up mapserver to use a non ESRI > projection that is already stored in proj.db? The coordinate system is for > Lyon County, MN #103749 and is stored with ESRI as the authority. I know > that we can set up Mapserver to use Web Mercator by setting the adding > "init=epsg:4326" to a projection block. Unfortunately I cannot access my > counties coordinate system by setting the projection with > ?init=esri:103749?. > > > > Thank you for any help! > > > > Sincerely, > > *Mark Volz, GISP* > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkVolz at co.lyon.mn.us Fri Jan 7 06:20:04 2022 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Fri, 7 Jan 2022 14:20:04 +0000 Subject: [mapserver-users] [MapServer-users] working with ESRI coordinate systems in proj.db Message-ID: <4beaabbe19ef46919a6b625c28ca284b@co.lyon.mn.us> Steve, I am using ms4w version 4.0.5, which I think comes with PROJ 5.20 Thank You Hi Mark: Not something I've tried to do so hopefully someone else can weigh in. What version of Proj are you using? --Steve On Thu, Jan 6, 2022 at 11:19 AM Mark Volz > wrote: Hello, Could someone help me with setting up mapserver to use a non ESRI projection that is already stored in proj.db? The coordinate system is for Lyon County, MN #103749 and is stored with ESRI as the authority. I know that we can set up Mapserver to use Web Mercator by setting the adding "init=epsg:4326" to a projection block. Unfortunately I cannot access my counties coordinate system by setting the projection with ?init=esri:103749?. Thank you for any help! Sincerely, Mark Volz, GISP -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Fri Jan 7 07:13:52 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Fri, 7 Jan 2022 15:13:52 +0000 Subject: [mapserver-users] [MapServer-users] working with ESRI coordinate systems in proj.db Message-ID: <0DF57B48-52CD-4C13-B019-F6FB7025A1A0@ci.stpaul.mn.us> Mark, will this work : https://epsg.io/6505 or are you trying to import data from your ESRI service. We (Jim) went a little different route here, we read the ESRI rest service and stuff everything into a Postgres database as a cache and work against that. We can set whatever EPSG that we need to this way for interoperability. Bobb From: MapServer-users on behalf of Mark Volz Date: Friday, January 7, 2022 at 8:20 AM To: Steve Lime Cc: "mapserver-users at lists.osgeo.org" Subject: Re: [mapserver-users] [MapServer-users] working with ESRI coordinate systems in proj.db Think Before You Click: This email originated outside our organization. Steve, I am using ms4w version 4.0.5, which I think comes with PROJ 5.20 Thank You Hi Mark: Not something I've tried to do so hopefully someone else can weigh in. What version of Proj are you using? --Steve On Thu, Jan 6, 2022 at 11:19 AM Mark Volz > wrote: Hello, Could someone help me with setting up mapserver to use a non ESRI projection that is already stored in proj.db? The coordinate system is for Lyon County, MN #103749 and is stored with ESRI as the authority. I know that we can set up Mapserver to use Web Mercator by setting the adding "init=epsg:4326" to a projection block. Unfortunately I cannot access my counties coordinate system by setting the projection with ?init=esri:103749?. Thank you for any help! Sincerely, Mark Volz, GISP -------------- next part -------------- An HTML attachment was scrubbed... URL: From naci0002 at umn.edu Fri Jan 7 07:12:42 2022 From: naci0002 at umn.edu (Pericles Nacionales) Date: Fri, 7 Jan 2022 09:12:42 -0600 Subject: [mapserver-users] [MapServer-users] working with ESRI coordinate systems in proj.db In-Reply-To: <4beaabbe19ef46919a6b625c28ca284b@co.lyon.mn.us> References: <4beaabbe19ef46919a6b625c28ca284b@co.lyon.mn.us> Message-ID: Mark, Haven't done this in a while but what happens if you replace "esri:103749" with "epsg:103749"? -Perry On Fri, Jan 7, 2022, 08:20 Mark Volz wrote: > Steve, > > > > I am using ms4w version 4.0.5, which I think comes with PROJ 5.20 > > > > Thank You > > > > > > Hi Mark: Not something I've tried to do so hopefully someone else can > weigh in. What version of Proj are you using? --Steve > > > > On Thu, Jan 6, 2022 at 11:19 AM Mark Volz wrote: > > Hello, > > > > Could someone help me with setting up mapserver to use a non ESRI > projection that is already stored in proj.db? The coordinate system is for > Lyon County, MN #103749 and is stored with ESRI as the authority. I know > that we can set up Mapserver to use Web Mercator by setting the adding > "init=epsg:4326" to a projection block. Unfortunately I cannot access my > counties coordinate system by setting the projection with > ?init=esri:103749?. > > > > Thank you for any help! > > > > Sincerely, > > *Mark Volz, GISP* > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkVolz at co.lyon.mn.us Fri Jan 7 07:26:30 2022 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Fri, 7 Jan 2022 15:26:30 +0000 Subject: [mapserver-users] working with ESRI coordinate systems in proj.db In-Reply-To: <037901d80364$8ddf3c60$a99db520$@gmail.com> References: <27487f0bfa544117a99fe80b937ba7d1@co.lyon.mn.us> <037901d80364$8ddf3c60$a99db520$@gmail.com> Message-ID: <8efefb28d8d54384a07378bfd727bfb5@co.lyon.mn.us> Hello, I apologize please ignore my mention of EPSG 4326. My end result is a WMS map in Web Mercator 3857. My underlying data is stored in a shapefile that is in WKID 103749 which is a projection has already been included in proj.db as ESRI as the authority . The underlying map application is using javascript. I know that my map is finding proj.db because it MapServer does not complain when I convert UTM 14 to Web Mercator... but that does not help because the underlying data is not in UTM 14. Here is how I have the projections of my map is set up: MAP PROJECTION "init=epsg:3857" END #end map projection LAYER DATA 'ParcelsLyon.shp' PROJECTION "init=epsg:103749" #Error: proj_create: cannot expand init=espg:103749 type=crs "init=crs:103749" # Error: proj_create: cannot expand init=crs:103749 type=crs "init=ESRI:103749" #Error: proj_create: cannot expand init=esri:103749 type=crs "init=epsg:26914" #MapServer does not warn about any errors, but of course nothing draws because my data is in a different projection END #layer projection END #end layer END #end map Example request http://localhost/cgi-bin/mapserv.exe?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=parcels%2CCityLimits%2CTownships&MAP=%2Fms4w%2Fapps%2Flyondata%2F.%2Fmaps%2Falllayers%2FAllLayers.map&SRS=EPSG%3A3857&STYLES=&WIDTH=1569&HEIGHT=912&BBOX=-10678090.52943604%2C5544408.3738651555%2C-10668156.653791208%2C5550182.55779638 @Bob I could project my shapefile into any projection. However, I will hit a wall with my raster layers which I prefer not to project at this time. Thanks! From: artclifford at gmail.com Sent: Thursday, January 6, 2022 7:19 PM To: Mark Volz Subject: RE: [mapserver-users] working with ESRI coordinate systems in proj.db It's a little unclear to me what you are attempting. A mapfile can be defined where the map's projection is EPSG:3857 (web mercator) set in a projection block at the map level, and your layer definition can have a projection block set to whatever projection you are using. That tells the map to render in web Mercator but says what projection your layer is stored in so that map server knows when to reproject stuff. I think you know that, but I'm just covering the "is it plugged in" issues and to suggest making sure the right projections are in the right projection blocks. Although not quite the problem you are having yet, epsg:4326 is wgs84 lat/lon. Web Mercator is: EPSG:3857. If I remember correctly the projection can be defined for a mapfile projection block using the proj code definition if not the ESPG/numeric code. If that works, it might mean that MapServer isn't using the proj.db file like you expect. Or if it is using a proj.db file it may be located elsewhere. Whether putting the whole proj definition is viable for your ultimate use it would at least identify the problem. Then there's a question of access. How are you "accessing" things? Are you using WFS? Or are you using a python/php/other script? Are things stored in a shp file or postgis or other database? If you are using wfs are you passing the desired projection on the request? Also, are you defining the allowed wms/wfs projections? I'm not sure how much I personally can be of help, but any further context on your setup and what you are attempting that you are free and willing to provide will help folks here narrow down the possibilities. From: MapServer-users > On Behalf Of Mark Volz Sent: Thursday, January 6, 2022 9:19 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] working with ESRI coordinate systems in proj.db Hello, Could someone help me with setting up MapServer to use a non ESRI projection that is already stored in proj.db? The coordinate system is for Lyon County, MN #103749 and is stored with ESRI as the authority. I know that we can set up MapServer to use Web Mercator by setting the adding "init=epsg:4326" to a projection block. Unfortunately I cannot access my counties coordinate system by setting the projection with "init=esri:103749". Thank you for any help! Sincerely, Mark Volz, GISP -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkVolz at co.lyon.mn.us Fri Jan 7 08:08:32 2022 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Fri, 7 Jan 2022 16:08:32 +0000 Subject: [mapserver-users] [MapServer-users] working with ESRI coordinate systems in proj.db In-Reply-To: <0DF57B48-52CD-4C13-B019-F6FB7025A1A0@ci.stpaul.mn.us> References: <0DF57B48-52CD-4C13-B019-F6FB7025A1A0@ci.stpaul.mn.us> Message-ID: <8c0625e5ee9d43288d7b4254f925c130@co.lyon.mn.us> Hello, I figured it out? well sort of anyways. Since I could not figure out how to reference the projection number I instead tried to include the underlying parameters within my map file. It works without reporting any errors? but I presume that this solution is not ideal. MAP PROJECTION ?init=epsg=3857? END #Map Projection LAYER PROJECTION "+proj=lcc +lat_1=44.25 +lat_2=44.58333333333334 +lat_0=44.19555555555555 +lon_0=-95.85000000000001 +x_0=152400.3048006096 +y_0=30480.06096012192 +a=6378559.758 + b=6357173.65471281 +units=ft +no_defs <>" #Parameters for ESRI 103749 END #Layer Projection END #Layer END #Map Please let me know if someone has a cleaner way of accessing ESRI 103749 directly from the projection database. Thank You! Sincerely, Mark Volz, GISP From: Basques, Bob (CI-StPaul) Sent: Friday, January 7, 2022 9:14 AM To: Mark Volz ; Steve Lime Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] [MapServer-users] working with ESRI coordinate systems in proj.db Caution: This email was sent from an external account. If you were expecting an internal email you would not see this notice. Please exercise caution before clicking on any links. Report any suspicious email to the Help Desk. Question Everything: Were you expecting this email? ________________________________ Mark, will this work : https://epsg.io/6505 or are you trying to import data from your ESRI service. We (Jim) went a little different route here, we read the ESRI rest service and stuff everything into a Postgres database as a cache and work against that. We can set whatever EPSG that we need to this way for interoperability. Bobb From: MapServer-users > on behalf of Mark Volz > Date: Friday, January 7, 2022 at 8:20 AM To: Steve Lime > Cc: "mapserver-users at lists.osgeo.org" > Subject: Re: [mapserver-users] [MapServer-users] working with ESRI coordinate systems in proj.db Think Before You Click: This email originated outside our organization. Steve, I am using ms4w version 4.0.5, which I think comes with PROJ 5.20 Thank You Hi Mark: Not something I've tried to do so hopefully someone else can weigh in. What version of Proj are you using? --Steve On Thu, Jan 6, 2022 at 11:19 AM Mark Volz > wrote: Hello, Could someone help me with setting up mapserver to use a non ESRI projection that is already stored in proj.db? The coordinate system is for Lyon County, MN #103749 and is stored with ESRI as the authority. I know that we can set up Mapserver to use Web Mercator by setting the adding "init=epsg:4326" to a projection block. Unfortunately I cannot access my counties coordinate system by setting the projection with ?init=esri:103749?. Thank you for any help! Sincerely, Mark Volz, GISP -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.greenwood at gmail.com Sat Jan 8 18:20:15 2022 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Sat, 8 Jan 2022 19:20:15 -0700 Subject: [mapserver-users] working with ESRI coordinate systems in proj.db In-Reply-To: <8efefb28d8d54384a07378bfd727bfb5@co.lyon.mn.us> References: <27487f0bfa544117a99fe80b937ba7d1@co.lyon.mn.us> <037901d80364$8ddf3c60$a99db520$@gmail.com> <8efefb28d8d54384a07378bfd727bfb5@co.lyon.mn.us> Message-ID: Mark, Rather than use the proj.db to look up an ESRI or EPSG code you could try explicitly defining your source coordinate system. There's an example here: https://mapserver.org/mapfile/projection.html You can also edit, or create your own epsg file. In fact, that used to be a recommended optimization so that proj didn't have to parse a big long epsg file. It's just an ASCII text file. On a Linux computer the default location is in /usr/share/proj/. And as a test, on the server where you're running MapServer, can you do something like: ogr2ogr out.shp source.shp -t_srs epsg:3857 This would tell you if the installed gdal and proj libraries recognise the coordinate system of the source.shp file. Or simpler still, ogrinfo source.shp and see if the coordinate system is identified. If you don't have a .prj file accompanying your source.shp you can declare the source coordinate system with -s_srs esri:103749 or possibly -s_srs epsg:103749 which might give you some clues as to what's working and not working on your computer. Rich On Fri, Jan 7, 2022 at 8:26 AM Mark Volz wrote: > Hello, > > > > I apologize please ignore my mention of EPSG 4326. My end result is a WMS > map in Web Mercator 3857. My underlying data is stored in a shapefile that > is in WKID 103749 which is a projection has already been included in > proj.db as ESRI as the authority . The underlying map application is > using javascript. I know that my map is finding proj.db because it > MapServer does not complain when I convert UTM 14 to Web Mercator? but > that does not help because the underlying data is not in UTM 14. > > > > Here is how I have the projections of my map is set up: > > MAP > > PROJECTION > > "init=epsg:3857" > > END #end map projection > > LAYER > > DATA 'ParcelsLyon.shp' > > PROJECTION > > "init=epsg:103749" #Error: proj_create: cannot expand > init=espg:103749 type=crs > > "init=crs:103749" # Error: proj_create: cannot expand > init=crs:103749 type=crs > > "init=ESRI:103749" #Error: proj_create: cannot expand > init=esri:103749 type=crs > > "init=epsg:26914" #MapServer does not warn about any errors, but of > course nothing draws because my data is in a different projection > > END #layer projection > > END #end layer > > END #end map > > > > Example request > > > http://localhost/cgi-bin/mapserv.exe?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=parcels%2CCityLimits%2CTownships&MAP=%2Fms4w%2Fapps%2Flyondata%2F.%2Fmaps%2Falllayers%2FAllLayers.map&SRS=EPSG%3A3857&STYLES=&WIDTH=1569&HEIGHT=912&BBOX=-10678090.52943604%2C5544408.3738651555%2C-10668156.653791208%2C5550182.55779638 > > > > > > @Bob > > I could project my shapefile into any projection. However, I will hit a > wall with my raster layers which I prefer not to project at this time. > > > > Thanks! > > > > > > *From:* artclifford at gmail.com > *Sent:* Thursday, January 6, 2022 7:19 PM > *To:* Mark Volz > *Subject:* RE: [mapserver-users] working with ESRI coordinate systems in > proj.db > > > > It?s a little unclear to me what you are attempting. > > A mapfile can be defined where the map?s projection is EPSG:3857 (web > mercator) set in a projection block at the map level, and your layer > definition can have a projection block set to whatever projection you are > using. That tells the map to render in web Mercator but says what > projection your layer is stored in so that map server knows when to > reproject stuff. I think you know that, but I?m just covering the ?is it > plugged in? issues and to suggest making sure the right projections are in > the right projection blocks. > > > > Although not quite the problem you are having yet, epsg:4326 is wgs84 > lat/lon. Web Mercator is: EPSG:3857. > > > > If I remember correctly the projection can be defined for a mapfile > projection block using the proj code definition if not the ESPG/numeric > code. If that works, it might mean that MapServer isn?t using the proj.db > file like you expect. Or if it is using a proj.db file it may be located > elsewhere. Whether putting the whole proj definition is viable for your > ultimate use it would at least identify the problem. > > > > Then there?s a question of access. How are you ?accessing? things? Are you > using WFS? Or are you using a python/php/other script? Are things stored in > a shp file or postgis or other database? > > > > If you are using wfs are you passing the desired projection on the > request? Also, are you defining the allowed wms/wfs projections? > > > > I?m not sure how much I personally can be of help, but any further context > on your setup and what you are attempting that you are free and willing to > provide will help folks here narrow down the possibilities. > > > > > > > > > > *From:* MapServer-users *On > Behalf Of *Mark Volz > *Sent:* Thursday, January 6, 2022 9:19 AM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] working with ESRI coordinate systems in > proj.db > > > > Hello, > > > > Could someone help me with setting up MapServer to use a non ESRI > projection that is already stored in proj.db? The coordinate system is for > Lyon County, MN #103749 and is stored with ESRI as the authority. I know > that we can set up MapServer to use Web Mercator by setting the adding > "init=epsg:4326" to a projection block. Unfortunately I cannot access my > counties coordinate system by setting the projection with > ?init=esri:103749?. > > > > Thank you for any help! > > > > Sincerely, > > *Mark Volz, GISP* > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Richard W. Greenwood www.greenwoodmap.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Mon Jan 10 07:49:28 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 10 Jan 2022 15:49:28 +0000 Subject: [mapserver-users] [REMINDER] OSGeo Twin Cities (aka TCMUG) Local Chapter Meeting - Jan 12th Message-ID: All, Anyone interested in presenting virtually this Wednesday for the Local OSGeo Chapter meeting? Can be anything Geo, I'll set up the meeting and recording parts. Thanks Previous meeting recordings are here: Twin Cities, MN, USA Chapter - OSGeo Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From cgodkin at gmail.com Tue Jan 11 17:58:11 2022 From: cgodkin at gmail.com (Carl Godkin) Date: Tue, 11 Jan 2022 17:58:11 -0800 Subject: [mapserver-users] WCS layer units question... Message-ID: Hi, I have a local WCS & WMS server. I am trying to figure out if I can somehow define the Z units of a terrain layer I'm serving. The single band from the individual GeoTIFF files providing the terrain data looks like this (from gdalinfo): Band 1 Block=512x512 Type=Float32, ColorInterp=Gray Description = Layer_1 NoData Value=-999999 Unit Type: m <===================================== units are meters Metadata: LAYER_TYPE=athematic RepresentationType=ATHEMATIC but when I download a GeoTIFF using a WCS GetCoverage request on this layer, the GeoTIFF's single band just looks like this: Band 1 Block=571x3 Type=Float32, ColorInterp=Gray without "Unit Type." I also tried using UNITS Meters in my LAYER definition in my map file (copying an example I found among the case studies on the web site) but it didn't seem to have any effect. Is there some way to define and retrieve the Z units for a WCS server? Thanks very much. carl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Tue Jan 11 23:57:21 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 12 Jan 2022 07:57:21 +0000 Subject: [mapserver-users] WCS layer units question... Message-ID: <05ae7ad2fd1f45f08e1ea6eeafe0d0a9@maanmittauslaitos.fi> Hi, WCS users are supposed to read the metadata with DescribeCoverage, for example https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS&version=2.0.1&request=DescribeCoverage&coverageID=ortokuva_vari The units can be configured in the mapfile with ?wcs_band_uom?. I do not know if it is possible to configure the outputformat to write uom also into the TIFF. That is something that GDAL should do. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Carl Godkin L?hetetty: keskiviikko 12. tammikuuta 2022 3.58 Vastaanottaja: Mapserver-Users (mapserver-users at lists.osgeo.org) Aihe: [mapserver-users] WCS layer units question... Hi, I have a local WCS & WMS server. I am trying to figure out if I can somehow define the Z units of a terrain layer I'm serving. The single band from the individual GeoTIFF files providing the terrain data looks like this (from gdalinfo): Band 1 Block=512x512 Type=Float32, ColorInterp=Gray Description = Layer_1 NoData Value=-999999 Unit Type: m <===================================== units are meters Metadata: LAYER_TYPE=athematic RepresentationType=ATHEMATIC but when I download a GeoTIFF using a WCS GetCoverage request on this layer, the GeoTIFF's single band just looks like this: Band 1 Block=571x3 Type=Float32, ColorInterp=Gray without "Unit Type." I also tried using UNITS Meters in my LAYER definition in my map file (copying an example I found among the case studies on the web site) but it didn't seem to have any effect. Is there some way to define and retrieve the Z units for a WCS server? Thanks very much. carl -------------- next part -------------- An HTML attachment was scrubbed... URL: From cgodkin at gmail.com Wed Jan 12 07:13:11 2022 From: cgodkin at gmail.com (Carl Godkin) Date: Wed, 12 Jan 2022 07:13:11 -0800 Subject: [mapserver-users] WCS layer units question... In-Reply-To: <05ae7ad2fd1f45f08e1ea6eeafe0d0a9@maanmittauslaitos.fi> References: <05ae7ad2fd1f45f08e1ea6eeafe0d0a9@maanmittauslaitos.fi> Message-ID: Thanks for the reply, Jukka. I found "wcs_band_uom" in the docs but I can't seem to make the value I put into my map file appear in the DescribeCoverage output. (The link you sent doesn't work for me.) I do see this though: -3.4028e+38 3.4028e+38 12 The "swe:uom code" would seem to be what I want to affect. For some reason I see the value "watts per square meter per steradian" which appears nowhere in my map file so I wonder if it's some sort of default baked into the code or something. (I had seen that before but hadn't bothered to try to figure out what it was until just now. That's weird.) Thanks for your help, carl On Tue, Jan 11, 2022 at 11:57 PM Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > WCS users are supposed to read the metadata with DescribeCoverage, for > example > https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS&version=2.0.1&request=DescribeCoverage&coverageID=ortokuva_vari > > The units can be configured in the mapfile with ?wcs_band_uom?. I do not > know if it is possible to configure the outputformat to write uom also into > the TIFF. That is something that GDAL should do. > > > > -Jukka Rahkonen- > > > > > > > > *L?hett?j?:* MapServer-users *Puolesta > *Carl Godkin > *L?hetetty:* keskiviikko 12. tammikuuta 2022 3.58 > *Vastaanottaja:* Mapserver-Users (mapserver-users at lists.osgeo.org) < > mapserver-users at lists.osgeo.org> > *Aihe:* [mapserver-users] WCS layer units question... > > > > Hi, > > > > I have a local WCS & WMS server. > > > > I am trying to figure out if I can somehow define the Z units of a terrain > layer I'm serving. > > > > The single band from the individual GeoTIFF files providing the terrain > data looks like this (from gdalinfo): > > > > Band 1 Block=512x512 Type=Float32, ColorInterp=Gray > Description = Layer_1 > NoData Value=-999999 > Unit Type: m <===================================== units are meters > Metadata: > LAYER_TYPE=athematic > RepresentationType=ATHEMATIC > > > > but when I download a GeoTIFF using a WCS GetCoverage request on this > layer, the GeoTIFF's single band just looks like this: > > > > Band 1 Block=571x3 Type=Float32, ColorInterp=Gray > > > > without "Unit Type." > > > > I also tried using > > UNITS Meters > > in my LAYER definition in my map file (copying an example I found among > the case studies on the web site) but it didn't seem to have any effect. > > > > Is there some way to define and retrieve the Z units for a WCS server? > > > > Thanks very much. > > > > carl > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Jan 12 09:47:21 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 12 Jan 2022 17:47:21 +0000 Subject: [mapserver-users] WCS layer units question... Message-ID: <08fcb6542f3c4a6bb072d28adb863ff6@maanmittauslaitos.fi> Hi, Sorry, I thought that our service is open. This should work https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs&VERSION=2.0.0&REQUEST=DescribeCoverage&COVERAGEID=modis The default value of uom is documented in https://www.mapserver.org/ogc/wcs_server.html ?If no specific or default value is given, the output is dependent on the metadata key. The UOM, for example will be set to ?W.m-2.Sr-1?? WCS metadata keywords, including ?{band_name}_band_uom? work for us. I am sure that you will make it to work as well but if you won?t, show us your mapfile. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Carl Godkin L?hetetty: keskiviikko 12. tammikuuta 2022 17.13 Vastaanottaja: Mapserver-Users (mapserver-users at lists.osgeo.org) Aihe: Re: [mapserver-users] WCS layer units question... Thanks for the reply, Jukka. I found "wcs_band_uom" in the docs but I can't seem to make the value I put into my map file appear in the DescribeCoverage output. (The link you sent doesn't work for me.) I do see this though: -3.4028e+38 3.4028e+38 12 The "swe:uom code" would seem to be what I want to affect. For some reason I see the value "watts per square meter per steradian" which appears nowhere in my map file so I wonder if it's some sort of default baked into the code or something. (I had seen that before but hadn't bothered to try to figure out what it was until just now. That's weird.) Thanks for your help, carl On Tue, Jan 11, 2022 at 11:57 PM Rahkonen Jukka (MML) > wrote: Hi, WCS users are supposed to read the metadata with DescribeCoverage, for example https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS&version=2.0.1&request=DescribeCoverage&coverageID=ortokuva_vari The units can be configured in the mapfile with ?wcs_band_uom?. I do not know if it is possible to configure the outputformat to write uom also into the TIFF. That is something that GDAL should do. -Jukka Rahkonen- L?hett?j?: MapServer-users > Puolesta Carl Godkin L?hetetty: keskiviikko 12. tammikuuta 2022 3.58 Vastaanottaja: Mapserver-Users (mapserver-users at lists.osgeo.org) > Aihe: [mapserver-users] WCS layer units question... Hi, I have a local WCS & WMS server. I am trying to figure out if I can somehow define the Z units of a terrain layer I'm serving. The single band from the individual GeoTIFF files providing the terrain data looks like this (from gdalinfo): Band 1 Block=512x512 Type=Float32, ColorInterp=Gray Description = Layer_1 NoData Value=-999999 Unit Type: m <===================================== units are meters Metadata: LAYER_TYPE=athematic RepresentationType=ATHEMATIC but when I download a GeoTIFF using a WCS GetCoverage request on this layer, the GeoTIFF's single band just looks like this: Band 1 Block=571x3 Type=Float32, ColorInterp=Gray without "Unit Type." I also tried using UNITS Meters in my LAYER definition in my map file (copying an example I found among the case studies on the web site) but it didn't seem to have any effect. Is there some way to define and retrieve the Z units for a WCS server? Thanks very much. carl -------------- next part -------------- An HTML attachment was scrubbed... URL: From cgodkin at gmail.com Wed Jan 12 16:44:31 2022 From: cgodkin at gmail.com (Carl Godkin) Date: Wed, 12 Jan 2022 16:44:31 -0800 Subject: [mapserver-users] WCS layer units question... In-Reply-To: <08fcb6542f3c4a6bb072d28adb863ff6@maanmittauslaitos.fi> References: <08fcb6542f3c4a6bb072d28adb863ff6@maanmittauslaitos.fi> Message-ID: Hi Jukka, Thanks for the documentation pointer. I have attached a .map file in which I have all three of the possibilities # Trying all three. My single band is called "band" "wcs_band_uom" "m" "ows_band_uom" "m" "band_band_uom" "m" but I still only see from DescribeCoverage. I am very curious to know what I've overlooked! By the way, I'm running MapServer from the "camptocamp" docker image. It appears to by MapServer 7.7-dev. Thanks so much, carl On Wed, Jan 12, 2022 at 9:47 AM Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > Sorry, I thought that our service is open. This should work > https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs&VERSION=2.0.0&REQUEST=DescribeCoverage&COVERAGEID=modis > > > > The default value of uom is documented in > https://www.mapserver.org/ogc/wcs_server.html > > ?If no specific or default value is given, the output is dependent on the > metadata key. The UOM, for example will be set to ?W.m-2.Sr-1?? > > > > WCS metadata keywords, including ?{band_name}_band_uom? work for us. I am > sure that you will make it to work as well but if you won?t, show us your > mapfile. > > > > -Jukka Rahkonen- > > > > > > *L?hett?j?:* MapServer-users *Puolesta > *Carl Godkin > *L?hetetty:* keskiviikko 12. tammikuuta 2022 17.13 > *Vastaanottaja:* Mapserver-Users (mapserver-users at lists.osgeo.org) < > mapserver-users at lists.osgeo.org> > *Aihe:* Re: [mapserver-users] WCS layer units question... > > > > Thanks for the reply, Jukka. > > > > I found "wcs_band_uom" in the docs but I can't seem to make the value I > put into my map file appear in the DescribeCoverage output. (The link you > sent doesn't work for me.) > > > > I do see this though: > > > > > > > > > > > > > > > > -3.4028e+38 3.4028e+38 > > 12 > > > > > > > > > > > > The "swe:uom code" would seem to be what I want to affect. For some > reason I see the value "watts per square meter per steradian" which appears > nowhere in my map file so I wonder if it's some sort of default baked into > the code or something. (I had seen that before but hadn't bothered to try > to figure out what it was until just now. That's weird.) > > > > Thanks for your help, > > > > carl > > > > > > > > On Tue, Jan 11, 2022 at 11:57 PM Rahkonen Jukka (MML) < > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > Hi, > > > > WCS users are supposed to read the metadata with DescribeCoverage, for > example > https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS&version=2.0.1&request=DescribeCoverage&coverageID=ortokuva_vari > > The units can be configured in the mapfile with ?wcs_band_uom?. I do not > know if it is possible to configure the outputformat to write uom also into > the TIFF. That is something that GDAL should do. > > > > -Jukka Rahkonen- > > > > > > > > *L?hett?j?:* MapServer-users *Puolesta > *Carl Godkin > *L?hetetty:* keskiviikko 12. tammikuuta 2022 3.58 > *Vastaanottaja:* Mapserver-Users (mapserver-users at lists.osgeo.org) < > mapserver-users at lists.osgeo.org> > *Aihe:* [mapserver-users] WCS layer units question... > > > > Hi, > > > > I have a local WCS & WMS server. > > > > I am trying to figure out if I can somehow define the Z units of a terrain > layer I'm serving. > > > > The single band from the individual GeoTIFF files providing the terrain > data looks like this (from gdalinfo): > > > > Band 1 Block=512x512 Type=Float32, ColorInterp=Gray > Description = Layer_1 > NoData Value=-999999 > Unit Type: m <===================================== units are meters > Metadata: > LAYER_TYPE=athematic > RepresentationType=ATHEMATIC > > > > but when I download a GeoTIFF using a WCS GetCoverage request on this > layer, the GeoTIFF's single band just looks like this: > > > > Band 1 Block=571x3 Type=Float32, ColorInterp=Gray > > > > without "Unit Type." > > > > I also tried using > > UNITS Meters > > in my LAYER definition in my map file (copying an example I found among > the case studies on the web site) but it didn't seem to have any effect. > > > > Is there some way to define and retrieve the Z units for a WCS server? > > > > Thanks very much. > > > > carl > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- MAP NAME "example" # Short name prepended to map, legend and scalebar filenames STATUS OFF SIZE 800 600 EXTENT -180 -90 180 90 UNITS DD # Path to folder holding the tile index shapefiles SHAPEPATH "data" IMAGECOLOR 255 255 255 # Background color for transparency MAXSIZE 8192 #CONFIG "MS_ERRORFILE" "tmp/ms_error.txt" # 0-5: 0=Off, 1-5=level of detail written to ms_error.txt DEBUG 5 WEB # Path for temp files; must be writable by www-data IMAGEPATH "tmp/" IMAGEURL "/ms_tmp/" # Base URL for IMAGEPATH. METADATA "ows_abstract" "WMS & WCS Elevation Service" "ows_contactfacsimiletelephone" "" "ows_contactinstructions" "" "ows_enable_request" "*" "ows_hoursofservice" "" "ows_onlineresource" "http://localhost:8080/" "ows_role" "" "ows_srs" "EPSG:4326 EPSG:4269 EPSG:3857" "ows_updatesequence" "2015-02-27T16:26:00Z" "wcs_accessconstraints" "none" "wcs_description" "Terrain server" "wcs_enable_request" "*" "wcs_fees" "none" "wcs_keywordlist" "wcs,test" "wcs_label" "P2 WCS Server" ### required "wcs_metadatalink_format" "text/plain" "wcs_metadatalink_type" "TC211" "wcs_onlineresource" "http://localhost:8080/" ### recommended "wcs_service_onlineresource" "http://localhost:8080/" "wms_rootlayer_name" "" # Suppresses root layer in gdalinfo # Trying all three. My single band is called "band" "wcs_band_uom" "m" "ows_band_uom" "m" "band_band_uom" "m" END END #define your output projection PROJECTION "init=epsg:4269" END #define output formats OUTPUTFORMAT NAME GEOTIFF DRIVER "GDAL/GTiff" MIMETYPE "image/geotiff" IMAGEMODE RGB EXTENSION "tif" END OUTPUTFORMAT NAME "GEOTIFF_32" DRIVER "GDAL/GTiff" MIMETYPE "image/tiff" IMAGEMODE FLOAT32 EXTENSION "tif" END # # Start of layer definitions # LAYER PROCESSING "RESAMPLE=BILINEAR" NAME USGS_13as_elevation METADATA "wms_title" "USGS - 1/3 arc-second grid (western US)" "ows_extent" "-126 30.999444 -110.999444 50.000556" "wms_include_items" "x,y,value_0" "wcs_label" "USGS - 1/3 arc-second grid" ### required "wcs_rangeset_name" "Range 1" ### required to support DescribeCoverage request "wcs_rangeset_label" "USA" ### required to support DescribeCoverage request "wcs_resolution" "0.000092592592593 0.000092592592593" "wcs_bandcount" "1" "wcs_srs" "EPSG:4269" END TYPE RASTER ### required UNITS Meters STATUS ON TILEINDEX "usgs_13as_elevation-index.shp" # Path is relative to SHAPEPATH TILEITEM "Location" TEMPLATE "../template.html" PROJECTION "init=epsg:4269" END END END From jukka.rahkonen at maanmittauslaitos.fi Thu Jan 13 01:08:18 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Thu, 13 Jan 2022 09:08:18 +0000 Subject: [mapserver-users] WCS layer units question... Message-ID: <44612c7ea2be4525b539db7f2170cb42@maanmittauslaitos.fi> Hi, I can only tell that with these metadata settings in my mapfile METADATA "wcs_label" "orto_vv" ### required "wcs_resolution" "0.5 0.5" "wcs_imagemode" "BYTE" "wcs_bandcount" "3" "wcs_band_names" "Band1 Band2 Band3" "wcs_timeposition" "2000-11-11T11:11:11Z,2001-11-11T11:11:11Z" "Band1_band_description" "NIR range 700-900 nm" "Band2_band_description" "Red range 600-700 nm" "Band3_band_description" "Green range 500-600" "Band1_band_uom" "foo" "Band2_band_uom" "bar" "Band3_band_uom" "foobar" "wcs_rangeset_axis" "E,N" "wcs_extent" "212000.000 6762000.000 218000.000 6768000.000" "wcs_rangeset_name" "Range 1" ### required to support DescribeCoverage request "wcs_rangeset_label" "My Label" ### required to support DescribeCoverage request END I can see for example this in DescribeCoverage Green range 500-600 I have the same version 7.7.0-dev (MS4W 4.0.5). -Jukka Rahkonen- L?hett?j?: MapServer-users > Puolesta Carl Godkin L?hetetty: torstai 13. tammikuuta 2022 2.45 Vastaanottaja: Mapserver-Users (mapserver-users at lists.osgeo.org) > Aihe: Re: [mapserver-users] WCS layer units question... Hi Jukka, Thanks for the documentation pointer. I have attached a .map file in which I have all three of the possibilities # Trying all three. My single band is called "band" "wcs_band_uom" "m" "ows_band_uom" "m" "band_band_uom" "m" but I still only see from DescribeCoverage. I am very curious to know what I've overlooked! By the way, I'm running MapServer from the "camptocamp" docker image. It appears to by MapServer 7.7-dev. Thanks so much, carl -------------- next part -------------- An HTML attachment was scrubbed... URL: From cgodkin at gmail.com Thu Jan 13 07:12:07 2022 From: cgodkin at gmail.com (Carl Godkin) Date: Thu, 13 Jan 2022 07:12:07 -0800 Subject: [mapserver-users] WCS layer units question... In-Reply-To: <5864ac63764243d0956f5c1068a4096d@maanmittauslaitos.fi> References: <5864ac63764243d0956f5c1068a4096d@maanmittauslaitos.fi> Message-ID: Hi Jukka, Thanks for pasting in your METADATA. I copied yours to my map file and, sure enough, I finally see the uom displayed! After some experiments, I discovered that "wcs_band_names" is required if you want to affect the metadata. It actually says this in the documentation but I overlooked it. Once I added that, then I see my desired uom displayed by GetCoverage. Hooray! Thanks again for all of the help, carl On Thu, Jan 13, 2022 at 1:05 AM Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > I can only tell that with these metadata settings in my mapfile > > METADATA > > "wcs_label" "orto_vv" ### required > > "wcs_resolution" "0.5 0.5" > > "wcs_imagemode" "BYTE" > > "wcs_bandcount" "3" > > "wcs_band_names" "Band1 Band2 Band3" > > "wcs_timeposition" > "2000-11-11T11:11:11Z,2001-11-11T11:11:11Z" > > "Band1_band_description" "NIR range 700-900 nm" > > "Band2_band_description" "Red range 600-700 nm" > > "Band3_band_description" "Green range 500-600" > > "Band1_band_uom" "foo" > > "Band2_band_uom" "bar" > > "Band3_band_uom" "foobar" > > "wcs_rangeset_axis" "E,N" > > > > "wcs_extent" "212000.000 6762000.000 218000.000 > 6768000.000" > > "wcs_rangeset_name" "Range 1" ### required to support > DescribeCoverage request > > "wcs_rangeset_label" "My Label" ### required to support > DescribeCoverage request > > END > > I can see for example this in DescribeCoverage > > > > > Green range 500-600 > > > > > > > > I have the same version 7.7.0-dev (MS4W 4.0.5). > > > > -Jukka Rahkonen- > > > > > > > > > > *L?hett?j?:* MapServer-users *Puolesta > *Carl Godkin > *L?hetetty:* torstai 13. tammikuuta 2022 2.45 > *Vastaanottaja:* Mapserver-Users (mapserver-users at lists.osgeo.org) < > mapserver-users at lists.osgeo.org> > *Aihe:* Re: [mapserver-users] WCS layer units question... > > > > Hi Jukka, > > > > Thanks for the documentation pointer. I have attached a .map file in > which I have all three of the possibilities > > > > # Trying all three. My single band is called "band" > "wcs_band_uom" "m" > "ows_band_uom" "m" > "band_band_uom" "m" > > > > but I still only see > > > > > > > > from DescribeCoverage. I am very curious to know what I've overlooked! > > > > By the way, I'm running MapServer from the "camptocamp" docker image. It > appears to by MapServer 7.7-dev. > > > > Thanks so much, > > carl > > > > On Wed, Jan 12, 2022 at 9:47 AM Rahkonen Jukka (MML) < > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > Hi, > > > > Sorry, I thought that our service is open. This should work > https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs&VERSION=2.0.0&REQUEST=DescribeCoverage&COVERAGEID=modis > > > > The default value of uom is documented in > https://www.mapserver.org/ogc/wcs_server.html > > ?If no specific or default value is given, the output is dependent on the > metadata key. The UOM, for example will be set to ?W.m-2.Sr-1?? > > > > WCS metadata keywords, including ?{band_name}_band_uom? work for us. I am > sure that you will make it to work as well but if you won?t, show us your > mapfile. > > > > -Jukka Rahkonen- > > > > > > *L?hett?j?:* MapServer-users *Puolesta > *Carl Godkin > *L?hetetty:* keskiviikko 12. tammikuuta 2022 17.13 > *Vastaanottaja:* Mapserver-Users (mapserver-users at lists.osgeo.org) < > mapserver-users at lists.osgeo.org> > *Aihe:* Re: [mapserver-users] WCS layer units question... > > > > Thanks for the reply, Jukka. > > > > I found "wcs_band_uom" in the docs but I can't seem to make the value I > put into my map file appear in the DescribeCoverage output. (The link you > sent doesn't work for me.) > > > > I do see this though: > > > > > > > > > > > > > > > > -3.4028e+38 3.4028e+38 > > 12 > > > > > > > > > > > > The "swe:uom code" would seem to be what I want to affect. For some > reason I see the value "watts per square meter per steradian" which appears > nowhere in my map file so I wonder if it's some sort of default baked into > the code or something. (I had seen that before but hadn't bothered to try > to figure out what it was until just now. That's weird.) > > > > Thanks for your help, > > > > carl > > > > > > > > On Tue, Jan 11, 2022 at 11:57 PM Rahkonen Jukka (MML) < > jukka.rahkonen at maanmittauslaitos.fi> wrote: > > Hi, > > > > WCS users are supposed to read the metadata with DescribeCoverage, for > example > https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS&version=2.0.1&request=DescribeCoverage&coverageID=ortokuva_vari > > The units can be configured in the mapfile with ?wcs_band_uom?. I do not > know if it is possible to configure the outputformat to write uom also into > the TIFF. That is something that GDAL should do. > > > > -Jukka Rahkonen- > > > > > > > > *L?hett?j?:* MapServer-users *Puolesta > *Carl Godkin > *L?hetetty:* keskiviikko 12. tammikuuta 2022 3.58 > *Vastaanottaja:* Mapserver-Users (mapserver-users at lists.osgeo.org) < > mapserver-users at lists.osgeo.org> > *Aihe:* [mapserver-users] WCS layer units question... > > > > Hi, > > > > I have a local WCS & WMS server. > > > > I am trying to figure out if I can somehow define the Z units of a terrain > layer I'm serving. > > > > The single band from the individual GeoTIFF files providing the terrain > data looks like this (from gdalinfo): > > > > Band 1 Block=512x512 Type=Float32, ColorInterp=Gray > Description = Layer_1 > NoData Value=-999999 > Unit Type: m <===================================== units are meters > Metadata: > LAYER_TYPE=athematic > RepresentationType=ATHEMATIC > > > > but when I download a GeoTIFF using a WCS GetCoverage request on this > layer, the GeoTIFF's single band just looks like this: > > > > Band 1 Block=571x3 Type=Float32, ColorInterp=Gray > > > > without "Unit Type." > > > > I also tried using > > UNITS Meters > > in my LAYER definition in my map file (copying an example I found among > the case studies on the web site) but it didn't seem to have any effect. > > > > Is there some way to define and retrieve the Z units for a WCS server? > > > > Thanks very much. > > > > carl > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at state.mn.us Fri Jan 14 09:17:18 2022 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Fri, 14 Jan 2022 17:17:18 +0000 Subject: [mapserver-users] Question on Feature Use Message-ID: Hi all: This is in regard to https://mapserver.org/cgi/controls.html#changing-map-file-parameters-via-a-form-or-a-url ? we?re seriously thinking about dropping this functionality as part of 8.0. It?s just not as relevant as in the past with improvements runtime substitutions and SLD. This will allow us to simplify the code related to mapfile processing a good bit and just make things easier to maintain in the long run. I am curious if and how folks are using this feature ? just to identify high-value use cases that we might need to address. --Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Fri Jan 14 12:53:32 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Fri, 14 Jan 2022 20:53:32 +0000 Subject: [mapserver-users] Question on Feature Use Message-ID: <74225820-F637-4253-B632-B8402972EA03@ci.stpaul.mn.us> All, We?ve used this in the past , and to some extent still do, but it?s on the fringe right now. One thing though, I always looked at this as a backup method to get something working when everything else didn?t work as well as some debugging of calls. I use it mostly when trying to integrate more than one service together, or need to call a MapService from something like PERL for example. It?s not something I generally depend on anymore, but I did cut my teeth on the capability while learning MapServer configuration steps, etc. Bobb From: MapServer-users on behalf of Steve Lime Date: Friday, January 14, 2022 at 11:17 AM To: "mapserver-users at lists.osgeo.org" Subject: [mapserver-users] Question on Feature Use Think Before You Click: This email originated outside our organization. Hi all: This is in regard to https://mapserver.org/cgi/controls.html#changing-map-file-parameters-via-a-form-or-a-url ? we?re seriously thinking about dropping this functionality as part of 8.0. It?s just not as relevant as in the past with improvements runtime substitutions and SLD. This will allow us to simplify the code related to mapfile processing a good bit and just make things easier to maintain in the long run. I am curious if and how folks are using this feature ? just to identify high-value use cases that we might need to address. --Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From trygve at aspenes.priv.no Mon Jan 17 09:59:25 2022 From: trygve at aspenes.priv.no (Trygve Aspenes) Date: Mon, 17 Jan 2022 18:59:25 +0100 Subject: [mapserver-users] Mapcache time dimension default value; and 'tearing down pooled connection' message Message-ID: <14c66890dbd221b4edc076e20083b140@aspenes.priv.no> Hi there! Slowly I'm getting mapserver/mapcache up running and looks now how to improve things. First: When I load a mapcache tileset with time dimension from a pg db the oldest image is displayed in my client. Is it possible to somehow get the newest image as default? My tileset dimension look something like this: host=mapserver-db user=$PGSQ_USERNAME password=$PGSQ_PASSWORD dbname=mapserver port=5432 SELECT to_char(time, 'YYYY-MM-DD"T"HH24:MI:SS"Z"') FROM products where product_name='' order by Id SELECT to_char(time,'YYYY-MM-DD"T"HH24:MI:SS"Z"') FROM products WHERE time >= to_timestamp(:start_timestamp) AND time <= to_timestamp(:end_timestamp) AND product_name='' ORDER BY time DESC I saw the `d1` default value in the documentation, but don't understand of that is a dummy or an actual selector. I have grepped around the source code, but could not see anything obvious. Second: My client updates/fetch the getCapabilities of my mapcache server every minute. Each time this is fetched the mapcache log is filled with messages like: mod_mapcache.c(164): [client ] tearing down pooled connection (dim__time) to make room, referer: I dont understand why these connections is teared down every time getCapabilites is requested. I have looked in the documentation, but could not see how to control this. But in the mapcache.xml.sample the connection pool config is described. But adding this to my mapcache config does not remove these tear downs. 2000 120000000 Any suggestions why this connection tear down is happening and if there is something to do about it. It slows down the getCapabilities request a bit, but if I add to many tileset I guess this will even further slow down. Thanks Trygve Aspenes From dhoese at gmail.com Mon Jan 17 17:52:28 2022 From: dhoese at gmail.com (David Hoese) Date: Mon, 17 Jan 2022 19:52:28 -0600 Subject: [mapserver-users] Mapcache time dimension default value; and 'tearing down pooled connection' message In-Reply-To: <14c66890dbd221b4edc076e20083b140@aspenes.priv.no> References: <14c66890dbd221b4edc076e20083b140@aspenes.priv.no> Message-ID: Trygve, Hello from outside the Pytroll community ;) I can't answer your second question as I don't have much experience with getCapabilities, but I think I have an answer for the first question. My understanding for the `default` parameter was that that was the returned time string if no times were returned by the query (empty result). I have always expected this to be a normal time string like 2022-01-01T12:00:00Z (to match your expected format. However, the fact that you always get the oldest image when the default is "d1" is surprising to me so I hope the mapcache devs can correct me. As for the source code for this, I found that the default from the XML goes into a dimension object as "default_value". It then gets set as the default "requested_value" like here: https://github.com/MapServer/mapcache/blob/447c0c6848fd101c11e6d54e451037e571117ef1/lib/tileset.c#L585 Going down the rabbit hole led me to here: https://github.com/MapServer/mapcache/blob/447c0c6848fd101c11e6d54e451037e571117ef1/lib/dimension_pg.c#L265-L271 As far as I can tell "get_values_for_entry_query" is just the "validate_query" query from your XML config. So somehow your validate query with "dp1" input may be returning the oldest time in your database. Just a guess. I'm interested in this answer, but definitely not the best person to give it to you. Dave On 1/17/22 11:59, Trygve Aspenes wrote: > Hi there! > > Slowly I'm getting mapserver/mapcache up running and looks now how to > improve things. > > First: When I load a mapcache tileset with time dimension from a pg db > the oldest image is displayed in my client. Is it possible to somehow > get the newest image as default? > My tileset dimension look something like this: > > ??????????? time="true" unit="ISO8601"> > ??????????????? > ??????????????????? host=mapserver-db user=$PGSQ_USERNAME > password=$PGSQ_PASSWORD dbname=mapserver port=5432 > ??????????????? > ??????????????? SELECT to_char(time, > 'YYYY-MM-DD"T"HH24:MI:SS"Z"') FROM products where product_name=' product>' order by Id > ??????????????? > ??????????????????? SELECT to_char(time,'YYYY-MM-DD"T"HH24:MI:SS"Z"') > FROM products > ??????????????????? WHERE time >= to_timestamp(:start_timestamp) > ??????????????????? AND time <= to_timestamp(:end_timestamp) > ??????????????????? AND product_name='' > ??????????????????? ORDER BY time DESC > ??????????????? > ??????????? > > I saw the `d1` default value in the documentation, but don't understand > of that is a dummy or an actual selector. I have grepped around the > source code, but could not see anything obvious. > > Second: My client updates/fetch the getCapabilities of my mapcache > server every minute. Each time this is fetched the mapcache log is > filled with messages like: > > mod_mapcache.c(164): [client ] tearing down pooled connection (dim_ product>_time) to make room, referer: > > I dont understand why these connections is teared down every time > getCapabilites is requested. > > I have looked in the documentation, but could not see how to control > this. But in the mapcache.xml.sample the connection pool config is > described. But adding this to my mapcache config does not remove these > tear downs. > > ??? > ??????? 2000 > ??????? 120000000 > ??? > > Any suggestions why this connection tear down is happening and if there > is something to do about it. It slows down the getCapabilities request a > bit, but if I add to many tileset I guess this will even further slow down. > > Thanks > > Trygve Aspenes > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From ben at ausvet.com.au Tue Jan 18 05:02:42 2022 From: ben at ausvet.com.au (Ben Madin) Date: Tue, 18 Jan 2022 21:02:42 +0800 Subject: [mapserver-users] Question on Feature Use In-Reply-To: References: Message-ID: Thanks Steve, I could see some potential, but we haven?t ever used this. Cheers Ben On Sat, 15 Jan 2022 at 01:17, Lime, Steve D (MNIT) wrote: > Hi all: This is in regard to > https://mapserver.org/cgi/controls.html#changing-map-file-parameters-via-a-form-or-a-url > ? we?re seriously thinking about dropping this functionality as part of > 8.0. It?s just not as relevant as in the past with improvements runtime > substitutions and SLD. This will allow us to simplify the code related to > mapfile processing a good bit and just make things easier to maintain in > the long run. I am curious if and how folks are using this feature ? just > to identify high-value use cases that we might need to address. > > > > --Steve > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -- -- Sent from my iPhone. -------------- next part -------------- An HTML attachment was scrubbed... URL: From trygve at aspenes.priv.no Wed Jan 19 01:47:23 2022 From: trygve at aspenes.priv.no (Trygve Aspenes) Date: Wed, 19 Jan 2022 10:47:23 +0100 Subject: [mapserver-users] wms_timeextent from time elements in postgres in mapserver map file Message-ID: Hi all My problem is I have new data every 5 minutes updateing a postgres db with, among others columns, one timestamp column. Thats easy. But its not easy to automatically update my mapserver map file for the wms_timeextent element with the same information. Is it possible to use this time information from my db in the wms_timeextent definition in my map file? Filling the actual available time extent dynamically? Thanks Trygve From dhoese at gmail.com Wed Jan 19 13:41:53 2022 From: dhoese at gmail.com (David Hoese) Date: Wed, 19 Jan 2022 15:41:53 -0600 Subject: [mapserver-users] wms_timeextent from time elements in postgres in mapserver map file In-Reply-To: References: Message-ID: Possibly unhelpful, but since you haven't gotten a response from anyone else: I just have mine set to the first available time and a time in the year 2040. I don't have data past the current date/time, but wms_timeextent isn't wrong either. Dave On 1/19/22 03:47, Trygve Aspenes wrote: > Hi all > > My problem is I have new data every 5 minutes updateing a postgres db > with, among others columns, one timestamp column. Thats easy. But its > not easy to automatically update my mapserver map file for the > wms_timeextent element with the same information. > > Is it possible to use this time information from my db in the > wms_timeextent definition in my map file? Filling the actual available > time extent dynamically? > > Thanks > > Trygve > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From trygve at aspenes.priv.no Wed Jan 19 22:26:26 2022 From: trygve at aspenes.priv.no (Trygve Aspenes) Date: Thu, 20 Jan 2022 07:26:26 +0100 Subject: [mapserver-users] wms_timeextent from time elements in postgres in mapserver map file In-Reply-To: References: Message-ID: Thanks again Dave Yeah, that's what I did. But the client I'm using is actually using this so the client makes the data "available" into the future which is quite annoying for the user. So I have to come up with a better solution. So a dirty fix I came up with is to make a template map file with environment variable name for the time extent (updated by some script) and then generate the map file using envsubst (from gettext package). (Maybe jinja2 also could be used, I have to think about it) This works, but it does not feel like an elegant solution. But I think I will go for this if no better solution comes up. Trygve Den 2022-01-19 22:41, skrev David Hoese: > Possibly unhelpful, but since you haven't gotten a response from > anyone else: I just have mine set to the first available time and a > time in the year 2040. I don't have data past the current date/time, > but wms_timeextent isn't wrong either. > > Dave > > On 1/19/22 03:47, Trygve Aspenes wrote: >> Hi all >> >> My problem is I have new data every 5 minutes updateing a postgres db >> with, among others columns, one timestamp column. Thats easy. But its >> not easy to automatically update my mapserver map file for the >> wms_timeextent element with the same information. >> >> Is it possible to use this time information from my db in the >> wms_timeextent definition in my map file? Filling the actual available >> time extent dynamically? >> >> Thanks >> >> Trygve >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From jbo-ads at mailo.com Thu Jan 20 00:48:32 2022 From: jbo-ads at mailo.com (jbo-ads at mailo.com) Date: Thu, 20 Jan 2022 09:48:32 +0100 Subject: [mapserver-users] Mapcache time dimension default value; and 'tearing down pooled connection' message In-Reply-To: References: <14c66890dbd221b4edc076e20083b140@aspenes.priv.no> Message-ID: <90a859f8-5838-e711-a1dc-5f9bcac51bc2@mailo.com> Hello, Despite being one of "the mapcache devs", I have no answer to the second question. This involves MapCache connection pool which uses APR pools and which I am not familiar with: https://github.com/MapServer/mapcache/blob/8b4d277df4f7951edd84e4fb8903dc544c3315a9/lib/connection_pool.c#L153 As for the first question, "d1" is not a magical value: this is just a placeholder in the documentation for an actual default time value or time interval. https://mapserver.org/mapcache/dimensions.html?highlight=d1#configuring-a-time-dimension-using-an-explicit-back-end Jerome Le 18/01/2022 ? 02:52, David Hoese a ?crit?: > Trygve, > > Hello from outside the Pytroll community ;) > > I can't answer your second question as I don't have much experience > with getCapabilities, but I think I have an answer for the first > question. My understanding for the `default` parameter was that that > was the returned time string if no times were returned by the query > (empty result). I have always expected this to be a normal time string > like 2022-01-01T12:00:00Z (to match your expected format. However, the > fact that you always get the oldest image when the default is "d1" is > surprising to me so I hope the mapcache devs can correct me. > > As for the source code for this, I found that the default from the XML > goes into a dimension object as "default_value". It then gets set as > the default "requested_value" like here: > > https://github.com/MapServer/mapcache/blob/447c0c6848fd101c11e6d54e451037e571117ef1/lib/tileset.c#L585 > > > Going down the rabbit hole led me to here: > > https://github.com/MapServer/mapcache/blob/447c0c6848fd101c11e6d54e451037e571117ef1/lib/dimension_pg.c#L265-L271 > > > As far as I can tell "get_values_for_entry_query" is just the > "validate_query" query from your XML config. So somehow your validate > query with "dp1" input may be returning the oldest time in your > database. Just a guess. I'm interested in this answer, but definitely > not the best person to give it to you. > > Dave > > On 1/17/22 11:59, Trygve Aspenes wrote: >> Hi there! >> >> Slowly I'm getting mapserver/mapcache up running and looks now how to >> improve things. >> >> First: When I load a mapcache tileset with time dimension from a pg >> db the oldest image is displayed in my client. Is it possible to >> somehow get the newest image as default? >> My tileset dimension look something like this: >> >> ???????????? > time="true" unit="ISO8601"> >> ???????????????? >> ???????????????????? host=mapserver-db user=$PGSQ_USERNAME >> password=$PGSQ_PASSWORD dbname=mapserver port=5432 >> ???????????????? >> ???????????????? SELECT to_char(time, >> 'YYYY-MM-DD"T"HH24:MI:SS"Z"') FROM products where product_name='> product>' order by Id >> ???????????????? >> ???????????????????? SELECT >> to_char(time,'YYYY-MM-DD"T"HH24:MI:SS"Z"') FROM products >> ???????????????????? WHERE time >= to_timestamp(:start_timestamp) >> ???????????????????? AND time <= to_timestamp(:end_timestamp) >> ???????????????????? AND product_name='' >> ???????????????????? ORDER BY time DESC >> ???????????????? >> ???????????? >> >> I saw the `d1` default value in the documentation, but don't >> understand of that is a dummy or an actual selector. I have grepped >> around the source code, but could not see anything obvious. >> >> Second: My client updates/fetch the getCapabilities of my mapcache >> server every minute. Each time this is fetched the mapcache log is >> filled with messages like: >> >> mod_mapcache.c(164): [client ] tearing down pooled connection >> (dim__time) to make room, referer: >> >> I dont understand why these connections is teared down every time >> getCapabilites is requested. >> >> I have looked in the documentation, but could not see how to control >> this. But in the mapcache.xml.sample the connection pool config is >> described. But adding this to my mapcache config does not remove >> these tear downs. >> >> ???? >> ???????? 2000 >> 120000000 >> ???? >> >> Any suggestions why this connection tear down is happening and if >> there is something to do about it. It slows down the getCapabilities >> request a bit, but if I add to many tileset I guess this will even >> further slow down. >> >> Thanks >> >> Trygve Aspenes >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From JimLug at clackamas.us Mon Jan 24 11:39:35 2022 From: JimLug at clackamas.us (Lugosi, Jim) Date: Mon, 24 Jan 2022 19:39:35 +0000 Subject: [mapserver-users] MapFile DATA CONNECTION Message-ID: Hi folks, We are in the process of upgrading our Open Source Web Mapping Stack (ex. MapServer, PostgreSQL, PostGIS, OpenLayers). However, we have run into an issue with performance when switching from our manually compiled 9.6 PostgreSQL version / PostGIS 2.4 to PostgreSQL 13 / PostGIS 3.x (yum install & config). The rendering and map interaction is very slow. We are have tuned the database based on our previous configuration and new documentation for PostgreSQL. Yet performance is still suffering. The database seems to be function as expected. We are tracking the requests and responses from the database. Over 90% of the requests are being handled in under 1 second. However, the one thing I did notice is the amount of queries to obtain the postgis version. Why is this extra query/connection being sent? Seems a bit too much. Anyway, and help and/or suggestions would be greatly appreciated. Linux - CentOS 7.x MapServer - own server PostgreSQL/PostGIS - own server Application(s) - own server Thanks __:) _ \<,_ (*)/ (*) James Lugosi Clackamas County GISP IS Software Specialist, Senior 121 Library Court, Oregon City OR 97045 503-723-4829 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Jan 24 15:10:46 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 24 Jan 2022 19:10:46 -0400 Subject: [mapserver-users] MapFile DATA CONNECTION In-Reply-To: References: Message-ID: Hi James, I've definitely been in your shoes before with these major Postgres upgrades. Although not specific to your problem, here are some of my first steps to verify in battling these types of issues: - always set PROCESSING "CLOSE_CONNECTION=DEFER" on each PG layer - always set EXTENT and "wms_extent" on each PG layer - after the Postgres upgrade, execute on your restored database through psql : SELECT postgis_extensions_upgrade(); - possibly remove any need for a reprojection in your requests, and re-test without - set various CONFIG settings to turn on debugging (see https://mapserver.org/optimization/debugging.html ) Those are some quick thoughts here, without any food in my stomach before dinner, ha. -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-01-24 3:39 p.m., Lugosi, Jim via MapServer-users wrote: > Hi folks, > > We are in the process of upgrading our Open Source Web Mapping Stack > (ex. MapServer, PostgreSQL, PostGIS, OpenLayers).? However, we have run > into an issue with performance when switching from our manually compiled > 9.6 PostgreSQL version / PostGIS 2.4 to PostgreSQL 13 / PostGIS 3.x (yum > install & config).? The rendering and map interaction is very slow.? We > are have tuned the database based on our previous configuration and new > documentation for PostgreSQL.? Yet performance is still suffering. > > The database seems to be function as expected.? We are tracking the > requests and responses from the database.? Over 90% of the requests are > being handled in under 1 second.? However, the one thing I did notice is > the amount of queries to obtain the postgis version.? Why is this extra > query/connection being sent?? Seems a bit too much. > > Anyway, and help and/or suggestions would be greatly appreciated. > > Linux ? CentOS 7.x > > MapServer ? own server > > PostgreSQL/PostGIS ? own server > > Application(s) ? own server > > Thanks > > ???? __J > ?? _ \<,_ > ? (_*_)/ (_*_) > > James Lugosi > > Clackamas County GISP > > IS Software Specialist, Senior > > 121 Library Court, Oregon City OR 97045 > > 503-723-4829 > > From jukka.rahkonen at maanmittauslaitos.fi Wed Jan 26 02:11:38 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 26 Jan 2022 10:11:38 +0000 Subject: [mapserver-users] LUT file too long, what to do? Message-ID: Hi, I am trying to adjust satellite image colors with a GIMP curve file but trial fails because the file is too long [Wed Jan 26 12:03:52 2022].708000 msDrawRasterLayerLow(sentinel_lut): entering. [Wed Jan 26 12:03:52 2022].713000 drawGDAL(): Unable to access file. LUT definition from file c:\ms4w_data\sentinel_malli_a.crv longer than maximum buffer size (2500 bytes). Is this a hard coded limit or can user override it somehow? The .crv file has 26000 characters and it is using ridiculous precision in entries (0.98265581597222207) but it is not easy to shrink it into 2500 characters. -Jukka Rahkonen- -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Wed Jan 26 02:18:49 2022 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 26 Jan 2022 11:18:49 +0100 Subject: [mapserver-users] LUT file too long, what to do? In-Reply-To: References: Message-ID: Hi Jukka, Unfortunately it's hardcoded: https://github.com/MapServer/MapServer/blob/2d73b379284aa12a2013929dfb6cdc244ae60994/mapdrawgdal.c#L1064 but it shouldn't be very difficult for you to apply a local patch fixing that. regards, thomas On Wed, Jan 26, 2022 at 11:11 AM Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > I am trying to adjust satellite image colors with a GIMP curve file but > trial fails because the file is too long > > > > [Wed Jan 26 12:03:52 2022].708000 msDrawRasterLayerLow(sentinel_lut): > entering. > > [Wed Jan 26 12:03:52 2022].713000 drawGDAL(): Unable to access file. LUT > definition from file c:\ms4w_data\sentinel_malli_a.crv longer than maximum > buffer size (2500 bytes). > > > > Is this a hard coded limit or can user override it somehow? The .crv file > has 26000 characters and it is using ridiculous precision in entries > (0.98265581597222207) but it is not easy to shrink it into 2500 characters. > > > > -Jukka Rahkonen- > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Jan 26 02:37:15 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 26 Jan 2022 10:37:15 +0000 Subject: [mapserver-users] LUT file too long, what to do? Message-ID: Hi Thomas, It appeared that GIMP has invented a new format for saving the curves since the Mapverver LUT processing option was introduced in 2006 and the new format is not supported anyway. GIMP can still export the old compact format and for that the 2500 character limit may be realistic. -Jukka- L?hett?j?: thomas bonfort L?hetetty: keskiviikko 26. tammikuuta 2022 12.19 Vastaanottaja: Rahkonen Jukka (MML) Kopio: Mapserver-Users (mapserver-users at lists.osgeo.org) Aihe: Re: [mapserver-users] LUT file too long, what to do? Hi Jukka, Unfortunately it's hardcoded: https://github.com/MapServer/MapServer/blob/2d73b379284aa12a2013929dfb6cdc244ae60994/mapdrawgdal.c#L1064 but it shouldn't be very difficult for you to apply a local patch fixing that. regards, thomas On Wed, Jan 26, 2022 at 11:11 AM Rahkonen Jukka (MML) > wrote: Hi, I am trying to adjust satellite image colors with a GIMP curve file but trial fails because the file is too long [Wed Jan 26 12:03:52 2022].708000 msDrawRasterLayerLow(sentinel_lut): entering. [Wed Jan 26 12:03:52 2022].713000 drawGDAL(): Unable to access file. LUT definition from file c:\ms4w_data\sentinel_malli_a.crv longer than maximum buffer size (2500 bytes). Is this a hard coded limit or can user override it somehow? The .crv file has 26000 characters and it is using ridiculous precision in entries (0.98265581597222207) but it is not easy to shrink it into 2500 characters. -Jukka Rahkonen- _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From francesco.martinelli at ingv.it Wed Jan 26 08:59:54 2022 From: francesco.martinelli at ingv.it (Francesco Martinelli) Date: Wed, 26 Jan 2022 17:59:54 +0100 Subject: [mapserver-users] msPostGISLayerWhichShapes() Error : java library set wrong query Message-ID: Hi all, I have a java program calling the method draw() of class edu.umn.gis.mapscript.mapObj after I compiled mapserver 7.6.4 on Ubuntu 20.04 The result produce the following error: *java.lang.UnknownError: msDrawMap():* Image handling error. Failed to draw layer named 'MyLayer'.;*msPostGISLayerWhichShapes(): Query error*. Error executing query. Check server logs edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) In mapfile I set the parameters: *CONFIG* "MS_ERRORFILE" "myfile" *DEBUG* 6 ... *LAYER* *CONNECTIONTYPE* postgis *DATA* "the_geom FROM (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini USING UNIQUE gid" *CLASSITEM* "my_column" ... and in the error file I got the following message: [Wed Jan 26 17:14:19 2022].558530 msDrawMap(): rendering using outputformat named png24 (AGG/PNG). [Wed Jan 26 17:14:19 2022].569532 msPostGISLayerWhichShapes(): Error (ERROR: parse error - invalid geometry HINT: "POLYGON((774076,75" <-- parse error at position 18 within geometry ) executing query: select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini where "the_geom" && ST_GeomFromText('*POLYGON((774076,75 4875124,5,774076,75 5115124,5,1014076,75 5115124,5,1014076,75 4875124,5,774076,75 4875124,5))*',find_srid('','classi_comuni','the_geom')) [Wed Jan 26 17:14:19 2022].569545 msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs [Wed Jan 26 17:14:19 2022].569605 msDrawMap(): Image handling error. Failed to draw layer named 'MyLayer'. I checked the error is caused by decimal separators being commas instead of dots. As far as I understand the correct query would be (in *red* the changes): select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini where "the_geom" && ST_GeomFromText('*POLYGON((774076.75 4875124.5,774076.75 5115124.5,1014076.75 5115124.5,1014076.75 4875124.5,774076.75 4875124.5*))',find_srid('','classi_comuni','the_geom')) I think I should set something during the compilation of java mapserver library. Please can someone drive me on how to solve it? Thank you, Francesco -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Jan 26 11:12:33 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 26 Jan 2022 19:12:33 +0000 Subject: [mapserver-users] msPostGISLayerWhichShapes() Error : java library set wrong query In-Reply-To: References: Message-ID: Hi, I wonder if it could be related to which locale Java detects on your computer ? Italian (or Finnish) computer -> comma as a separator. Maybe something that deals around the same thing https://stackoverflow.com/questions/4713166/decimal-separator-in-numberformat. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Francesco Martinelli L?hetetty: keskiviikko 26. tammikuuta 2022 19.00 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [mapserver-users] msPostGISLayerWhichShapes() Error : java library set wrong query Hi all, I have a java program calling the method draw() of class edu.umn.gis.mapscript.mapObj after I compiled mapserver 7.6.4 on Ubuntu 20.04 The result produce the following error: java.lang.UnknownError: msDrawMap(): Image handling error. Failed to draw layer named 'MyLayer'.;msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) In mapfile I set the parameters: CONFIG "MS_ERRORFILE" "myfile" DEBUG 6 ... LAYER CONNECTIONTYPE postgis DATA "the_geom FROM (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini USING UNIQUE gid" CLASSITEM "my_column" ... and in the error file I got the following message: [Wed Jan 26 17:14:19 2022].558530 msDrawMap(): rendering using outputformat named png24 (AGG/PNG). [Wed Jan 26 17:14:19 2022].569532 msPostGISLayerWhichShapes(): Error (ERROR: parse error - invalid geometry HINT: "POLYGON((774076,75" <-- parse error at position 18 within geometry ) executing query: select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini where "the_geom" && ST_GeomFromText('POLYGON((774076,75 4875124,5,774076,75 5115124,5,1014076,75 5115124,5,1014076,75 4875124,5,774076,75 4875124,5))',find_srid('','classi_comuni','the_geom')) [Wed Jan 26 17:14:19 2022].569545 msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs [Wed Jan 26 17:14:19 2022].569605 msDrawMap(): Image handling error. Failed to draw layer named 'MyLayer'. I checked the error is caused by decimal separators being commas instead of dots. As far as I understand the correct query would be (in red the changes): select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini where "the_geom" && ST_GeomFromText('POLYGON((774076.75 4875124.5,774076.75 5115124.5,1014076.75 5115124.5,1014076.75 4875124.5,774076.75 4875124.5))',find_srid('','classi_comuni','the_geom')) I think I should set something during the compilation of java mapserver library. Please can someone drive me on how to solve it? Thank you, Francesco -------------- next part -------------- An HTML attachment was scrubbed... URL: From francesco.martinelli at ingv.it Thu Jan 27 01:28:38 2022 From: francesco.martinelli at ingv.it (Francesco Martinelli) Date: Thu, 27 Jan 2022 10:28:38 +0100 Subject: [mapserver-users] msPostGISLayerWhichShapes() Error : java library set wrong query In-Reply-To: References: Message-ID: Thank you Jukka, what you say could be the source of the problem, but (I think) I have no direct control on how the library format the query string I reported: it is bundled within the call to the method edu.umn.gis.mapscript.mapObj.draw() *Here is the code*: mapObj myMap = new mapObj("myMapFile.map"); rectObj originalMapView = myMap.getExtent(); rectObj maxView = new rectObj(-1, -1, -1, -1, myMap.getUnits().swigValue()); maxView.setMinx(originalMapView.getMinx()); maxView.setMaxx(originalMapView.getMaxx()); maxView.setMiny(originalMapView.getMiny()); maxView.setMaxy(originalMapView.getMaxy()); rectObj myView = new rectObj(-1, -1, -1, -1, 3); myView.setMinx(*774076.75*); myView.setMaxx(*1014076.75*); myView.setMiny(*4875124.5*); myView.setMaxy(*5115124.5*); myMap.setExtent(myView); myMap.setSize(600, 600); pointObj mousePosition = new pointObj(300, 300, 0); myMap.zoomPoint(1, mousePosition, 600, 600, myView, maxView); myMap.draw(); *resulting in the error*: *java.lang.UnknownError: msDrawMap():* Image handling error. Failed to draw layer named 'MyLayer'.;*msPostGISLayerWhichShapes(): Query error*. Error executing query. Check server logs edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) *and in the ERROR file*: [Wed Jan 26 17:14:19 2022].569532 msPostGISLayerWhichShapes(): Error (ERROR: parse error - invalid geometry HINT: "POLYGON((774076,75" <-- parse error at position 18 within geometry ) executing query: select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) AS confini where "the_geom" && ST_GeomFromText('*POLYGON((774076,75 4875124,5,774076,75 5115124,5,1014076,75 5115124,5,1014076,75 4875124,5,774076,75 4875124,5))*',find_srid('','classi_comuni','the_geom')) Please any other idea on how I could solve it? Thank you, Francesco Il giorno mer 26 gen 2022 alle ore 20:12 Rahkonen Jukka (MML) < jukka.rahkonen at maanmittauslaitos.fi> ha scritto: > Hi, > > > > I wonder if it could be related to which locale Java detects on your > computer ? Italian (or Finnish) computer -> comma as a separator. Maybe > something that deals around the same thing > https://stackoverflow.com/questions/4713166/decimal-separator-in-numberformat > . > > > > -Jukka Rahkonen- > > > > *L?hett?j?:* MapServer-users *Puolesta > *Francesco Martinelli > *L?hetetty:* keskiviikko 26. tammikuuta 2022 19.00 > *Vastaanottaja:* mapserver-users at lists.osgeo.org > *Aihe:* [mapserver-users] msPostGISLayerWhichShapes() Error : java > library set wrong query > > > > Hi all, > > I have a java program calling the method draw() of class > edu.umn.gis.mapscript.mapObj > > after I compiled mapserver 7.6.4 on Ubuntu 20.04 > > > > The result produce the following error: > > *java.lang.UnknownError: msDrawMap():* Image handling error. Failed to > draw layer named 'MyLayer'.;*msPostGISLayerWhichShapes(): Query error*. > Error executing query. Check server logs > edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method) > edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397) > > In mapfile I set the parameters: > > *CONFIG* "MS_ERRORFILE" "myfile" > > *DEBUG* 6 > > ... > > *LAYER* > > *CONNECTIONTYPE* postgis > > *DATA* "the_geom FROM (SELECT * FROM classi_comuni WHERE tipo_area = > 2 ORDER BY tipo_area DESC) AS confini USING UNIQUE gid" > > *CLASSITEM* "my_column" > > ... > > and in the error file I got the following message: > > [Wed Jan 26 17:14:19 2022].558530 msDrawMap(): rendering using > outputformat named png24 (AGG/PNG). > [Wed Jan 26 17:14:19 2022].569532 msPostGISLayerWhichShapes(): Error > (ERROR: parse error - invalid geometry > HINT: "POLYGON((774076,75" <-- parse error at position 18 within geometry > ) executing query: select > "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text from > (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) > AS confini where "the_geom" && ST_GeomFromText('*POLYGON((774076,75 > 4875124,5,774076,75 5115124,5,1014076,75 5115124,5,1014076,75 > 4875124,5,774076,75 4875124,5))* > ',find_srid('','classi_comuni','the_geom')) > [Wed Jan 26 17:14:19 2022].569545 msPostGISLayerWhichShapes(): Query > error. Error executing query. Check server logs > [Wed Jan 26 17:14:19 2022].569605 msDrawMap(): Image handling error. > Failed to draw layer named 'MyLayer'. > > > > I checked the error is caused by decimal separators being commas instead > of dots. > > As far as I understand the correct query would be (in *red* the changes): > > select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as > geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 > ORDER BY tipo_area DESC) AS confini where "the_geom" && ST_GeomFromText('*POLYGON((774076.75 > 4875124.5,774076.75 5115124.5,1014076.75 5115124.5,1014076.75 > 4875124.5,774076.75 4875124.5* > ))',find_srid('','classi_comuni','the_geom')) > > > > > > I think I should set something during the compilation of java mapserver > library. > > Please can someone drive me on how to solve it? > > > > > > Thank you, > > Francesco > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From benedek.petrovicz at gmail.com Fri Jan 28 04:02:50 2022 From: benedek.petrovicz at gmail.com (Benedek Petrovicz) Date: Fri, 28 Jan 2022 13:02:50 +0100 Subject: [mapserver-users] Can't add external vector tile layer source to mapfile Message-ID: Hi! I'm trying to add an MVT layer to my Mapfile, but it doesn't work and I ran out of ideas. Some info about the layer I'm trying to add: https://support.regrid.com/articles/using-the-tileserver/ This is my LAYER definition in my Mapfile *(based on the guidance of https://gdal.org/drivers/vector/mvt.html and https://mapserver.org/input/vector/ogr.html )* LAYER NAME "Parcel" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "MVT:https://tiles.regrid.com/api/v1/parcels/{z}" DATA "parcels" STATUS ONEND By debugging the layer I get the following logs: [Thu Dec 30 12:17:42 2021].906000 msOGRFileOpen(MVT:https://tiles.regrid.com/api/v1/parcels/{z})... [Thu Dec 30 12:17:42 2021].906000 OGROPen(MVT:https://tiles.regrid.com/api/v1/parcels/{z}) [Thu Dec 30 12:17:43 2021].133000 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `Parcel'. File not found or unsupported format. Check server logs. [Thu Dec 30 12:17:43 2021].133000 msDrawMap(): Image handling error. Failed to draw layer named 'Parcel'. [Thu Dec 30 12:17:43 2021].134000 freeLayer(): freeing layer at 01012900. I'm expecting this to work because the following ogrinfo command runs without any issues: ogrinfo "MVT:https://tiles.regrid.com/api/v1/parcels/14/3579/6522.mvt" parcels I couldn't find a single example online about adding an MVT layer to a Mapfile. Is there anyone who could prompt me in the right direction or just have a working example? Thank you Petrovicz -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbo-ads at mailo.com Sun Jan 30 13:03:42 2022 From: jbo-ads at mailo.com (jbo-ads at mailo.com) Date: Sun, 30 Jan 2022 22:03:42 +0100 Subject: [mapserver-users] MapCache 1.12.0rc1 Message-ID: <464189e9-6da8-096b-608d-d9c2d0dd7ae5@mailo.com> The MapCache / MapServer team is pleased to announce the first release candidate of MapCache 1.12.0. Change log from 1.10 is found at https://mapserver.org/development/changelog/mapcache/changelog-1-12.html#changes-from-1-10-0-to-1-12-0-rc1 An archive of source code is found at https://download.osgeo.org/mapserver/mapcache-1.12.0-rc1.tar.gz Please help us test and let us know of any findings (https://github.com/MapServer/mapcache/issues/new). -- The MapCache / MapServer team