Re: [MapServer-users] Runtime substitution on MAP CONFIG environmental variables

2023-12-26 Thread Steve Lime via MapServer-users
The validation block would go in the WEB object. However, the runtime subs
don't operate with config options. There was a ticket related to this
message opened already (see
https://github.com/MapServer/MapServer/issues/6994), presumably based on
this thread. I'm curious what other devs think about the idea.

--Steve

On Tue, Dec 19, 2023 at 7:21 AM Marcin Niemyjski via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hello,
>
> is it possible to perform such operation using parameters stored in
> request URL
> MAP
>   NAME "Results of crop prediction"
>
>   CONFIG "AWS_S3_ENDPOINT" "some.ednpoint.com"
>   CONFIG "AWS_ACCESS_KEY_ID" "%s3_access%"
>   CONFIG "AWS_SECRET_ACCESS_KEY" "%s3_secret%"
> ...
>
> so, I can select which pair of S3 keys i would like to use.
>
> If it is, where should validation block be stored?
>
> Best,
> Marcin
>
> 
>  Book
> time to meet with me
> 
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Speeding up msDrawMap() for shapefiles

2023-12-18 Thread Steve Lime via MapServer-users
Did you have a look at https://blog.cleverelephant.ca/2022/04/coshp.html?

On Mon, Dec 18, 2023 at 2:39 PM Matthew Graber via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi Jukka,
>
> Thanks for the advice. I was able to confirm through local testing that
> using "DATA" is consistently faster than using the OGR connection (was
> getting over 500 ms for OGR vs just over 300 ms for DATA). My results are
> also suggesting that performing the shapefile optimizations may make my
> request several hundredths of a second faster, I'm a little less sure on
> that one. But regardless, it appears that the bulk of the problem with the
> slow S3 connection is likely S3's overhead, so I don't think there's
> anything more I can do with MapServer to speed it up.
>
> Thanks again,
> Matt
>
> On Fri, Dec 8, 2023 at 11:58 AM Rahkonen Jukka <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
>> Hi,
>>
>>
>>
>> You should test the same shapefiles locally for understanding where the
>> time gets spent. Normal time with simple styles is perhaps up to 300 ms.
>> The optimization hints were written long before there were S3 or Amazon
>> (the company).
>>
>> Unfortunately I don’t know how to optimize access to S3.
>>
>>
>>
>> -Jukka Rahkonen-
>>
>>
>>
>> *Lähettäjä:* MapServer-users  
>> *Puolesta
>> *Matthew Graber via MapServer-users
>> *Lähetetty:* perjantai 8. joulukuuta 2023 21.47
>> *Vastaanottaja:* mapserver-users@lists.osgeo.org
>> *Aihe:* [MapServer-users] Speeding up msDrawMap() for shapefiles
>>
>>
>>
>> Hi,
>>
>>
>>
>> I'm trying to speed up the time required for msDrawMap() to execute for
>> rendering shapefiles. Currently, according to the mapserver logs, it's
>> taking 2.5-3.5 seconds, sometimes up to 5 seconds for it to execute:
>>
>>
>>
>> [Wed Dec  6 18:43:47 2023].699791 CGI Request 53 on process 2641
>> [Wed Dec  6 18:43:47 2023].717216 msDrawMap(): rendering using
>> outputformat named png (AGG/PNG).
>> [Wed Dec  6 18:43:52 2023].299580 msDrawMap(): Layer 1010
>> (Shapefile_Layer), 4.582s
>> [Wed Dec  6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, 0.000s
>> [Wed Dec  6 18:43:52 2023].299803 msDrawMap() total time: 4.584s
>> [Wed Dec  6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s
>>
>> [Wed Dec  6 18:43:52 2023].310883 mapserv request processing time
>> (msLoadMap not incl.): 4.611s
>>
>>
>>
>> The mapfile is currently set up using "CONNECTIONTYPE OGR" and
>> "CONNECTION" to access the shapefiles from an S3 bucket as follows:
>>
>>
>>
>> CONNECTIONTYPE OGR
>> CONNECTION'/vsis3/s3_bucket_path/my_shapefile%.shp'
>>
>>
>>
>> I noticed at https://mapserver.org/input/vector/shapefiles.html that it
>> says "Shapefile access is built directly into MapServer. It is also
>> available through OGR, but direct access without OGR is recommended and
>> discussed here."
>>
>> So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to
>> "DATA" as follows:
>>
>>
>>
>>  DATA'/vsis3/s3_bucket_path/my_shapefile%.shp'
>>
>>
>>
>> I haven't been able to observe any definitive speed improvements by doing
>> this yet, although I can't say for sure that there aren't any.
>>
>>
>>
>> Based on https://mapserver.org/optimization/vector.html, I also tried
>> using the shptree command to create a spatial index and the coshp command
>> to sort the shapefile and index. Even after doing that, I still see load
>> msDrawMap() times of up to 5 seconds.
>>
>>
>>
>> Does anyone know of any other optimizations that could be made here? Or
>> if not, would using shptree and coshp on the shapefile and then accessing
>> it in the mapfile using "DATA" to take it from S3 be the optimal way to set
>> things up?
>>
>>
>>
>> Thanks!
>>
>> Matt
>>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Can I call mapserver with GetLegendGraphic request using curl?

2023-12-15 Thread Steve Lime via MapServer-users
I do this all the time to create static versions of assets. Typically I
just use a bash script and wget but I can't think of a reason offhand why
curl wouldn't work just fine. What does a curl call look like?

--Steve

On Thu, Dec 14, 2023 at 3:32 PM Schweitzer, Peter N via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> I have map interfaces that use a dozen or so legend graphics, but it
> requires separate calls to mapserver for every user.  I would prefer to
> cache these images (PNG) rather than make mapserver recalculate the same
> legend graphic many times for each user session.  But when I do a curl, I
> keep getting the "requires a TEMPLATE" message.  The images work within my
> JS (OpenLayers 5.3), but not through a stand-alone web request.
>
> Example:  https://mrdata.usgs.gov/general/map-global.html  27 calls to
> mapserv to get legend images that don't change.
>
> Is there a way I can get these images and cache them on the server so that
> mapserver doesn't have to chew up processor cycles and time for them every
> time?
>
> Thanks for any help you may be able to offer.
>
> Peter
>
> Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192)
> (703) 648-6533  email: pschweit...@usgs.gov
> https://www.usgs.gov/staff-profiles/peter-n-schweitzer
> https://orcid.org/-0002-9532-6681
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] multiple shapepaths

2023-12-05 Thread Steve Lime via MapServer-users
It won’t work. A configuration is loaded in entirety first, and then
applied as necessary.

On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Not sure. I cannot get it working anyway. Any ideas, Steve?
>
> On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via MapServer-users wrote:
> > Hi,
> >
> > I am not sure, but perhaps overwriting it, would work?
> >
> > MAP
> >
> >   shapepath 'blah'
> >
> >   Layer 1
> >   Layer 2
> >
> >   shapepath 'blubb'
> >
> >   Layer 3
> >   Layer 4
> >
> > Jörg
> >
> >
> >
> > Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
> >> Yes, that is what I sought, didn't know it was possible. Thanks!
> >>
> >> Jan
> >>
> >> On 02/12/2023 19:29, Steve Lime wrote:
> >>> One other thought, you can use multiple paths via runtime subs to
> >>> approximate what I think you’re looking for, so:
> >>>
> >>> WEB
> >>>   VALIDATION
> >>> path1_default “/opt/path1”
> >>> path1 “^\/opt\/path1$”
> >>>   path2_default “/opt/path2”
> >>>   path2 “^\/opt\/path2$”
> >>>   END
> >>> END
> >>>
> >>> Then in DATA values you’d use %path1% or %path2%. This is another
> >>> use case for variables that was suggested recently. We could,
> >>> perhaps, define a way to mark something as immutable via url so the
> >>> regex could be simplified and only the default would ever be used
> >>> (e.g. “path2” “immutable”).
> >>>
> >>> —Steve
> >>>
> >>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime  wrote:
> >>>
> >>> Nope, just the one value.
> >>>
> >>> On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users
> >>>  wrote:
> >>>
> >>> Hi,
> >>>
> >>> Is it possible to use multiple paths in a shapepath?
> >>> ./data1:./data2
> >>> does not work
> >>>
> >>> Jan
> >>> ___
> >>> MapServer-users mailing list
> >>> MapServer-users@lists.osgeo.org
> >>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >>>
> >>
> >>
> >> ___
> >> MapServer-users mailing list
> >> MapServer-users@lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] multiple shapepaths

2023-12-02 Thread Steve Lime via MapServer-users
One other thought, you can use multiple paths via runtime subs to
approximate what I think you’re looking for, so:

WEB
  VALIDATION
path1_default “/opt/path1”
path1 “^\/opt\/path1$”
path2_default “/opt/path2”
path2 “^\/opt\/path2$”
  END
END

Then in DATA values you’d use %path1% or %path2%. This is another use case
for variables that was suggested recently. We could, perhaps, define a way
to mark something as immutable via url so the regex could be simplified and
only the default would ever be used (e.g. “path2” “immutable”).

—Steve

On Fri, Dec 1, 2023 at 11:28 PM Steve Lime  wrote:

> Nope, just the one value.
>
> On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users <
> mapserver-users@lists.osgeo.org> wrote:
>
>> Hi,
>>
>> Is it possible to use multiple paths in a shapepath? ./data1:./data2
>> does not work
>>
>> Jan
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] multiple shapepaths

2023-12-01 Thread Steve Lime via MapServer-users
Nope, just the one value.

On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi,
>
> Is it possible to use multiple paths in a shapepath? ./data1:./data2
> does not work
>
> Jan
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] MapServer WEB global footer header are shown as result even if no feature was effected

2023-11-06 Thread Steve Lime via MapServer-users
Hi Astrid: I noticed this too but in a slightly different way. It's a bug,
see the discussion here:

  https://github.com/MapServer/MapServer/issues/6907


Basically the EMPTY keyword is being ignored. This will be fixed in 8.2...


--Steve

On Mon, Nov 6, 2023 at 9:39 AM Astrid Emde (WhereGroup) via MapServer-users
 wrote:

> Hello all,
>
> I have noticed a different behaviour in MapServer 8 in comparision to
> MapServer 7.
>
> In the Web-Section I use a global header and footer and I created an
> empty.html page. The definition in the Web-Section looks like:
>
> WEB
> HEADER './templates/header.html'
> FOOTER './templates/footer.html'
> EMPTY 'http://myserver/ms_empty.html'
>
> Before Version 8
> - MapServer would show the EMPTY-html if no result comes back from a
> Featureinfo-Request
>
> But with MapServer 8
> - The Header & Footer are given back - with no results in the middle
>
> When I define everything in the LAYER the behaviour is a bit better - I
> get back an empty result but still not the content of the EMPTY-File
>  HEADER "./templates/header.html"
>  TEMPLATE "./templates/plz.html"
>  FOOTER "./templates/footer.html"
>
> My question: How can I get back the old behaviour and only get back the
> content of the Empty-file?
>
> Did the definition change?
> Or is it a bug? Does someone else noticed the behaviour?
>
> I checked the actual issues, but I could not find anything about it
>
> https://github.com/MapServer/MapServer/issues/6907
>
>
> Documentation see
> https://mapserver.org/mapfile/web.html
>
> --
> Best regards
>
> Astrid Emde
> GIS-Consultant
>
> **
> Where2B Konferenz 2023
> 14. Dezember 2023 in Bonn und Online
> https://where2b-conference.com/
> **
>
>Astrid Emde
>WhereGroup GmbH
>Eifelstraße 7
>53119 Bonn
>Germany
>
>Tel: +49(0)228 90 90 38 - 22
>Fax: +49(0)228 90 90 38 - 11
>
>astrid.e...@wheregroup.com
>www.wheregroup.com
>
>Meinen PGP Public-Key können Sie unter pgp.mit.edu herunterladen:
>
>
> https://keys.openpgp.org/vks/v1/by-fingerprint/01F8152D36FC07C25EADDE86C5084ACC1C287CCB
>Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
>
>Folgen Sie der WhereGroup auf twitter:
>http://twitter.com/WhereGroup_com
>
>Geschäftsführer:
>Olaf Knopp, Peter Stamm
>Amtsgericht Bonn, HRB 9885
>
> ---___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] mappyfile is now an OSGeo Community Project

2023-09-28 Thread Steve Lime via MapServer-users
Agreed! Congrats Seth!

On Thu, Sep 28, 2023 at 9:29 AM Even Rouault via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi Seth,
>
> Congratulations!  I believe it would make sense to point to mappyfile on
> the mapserver.org documentation. Exact place to be determined ("Around
> MapServer?"), but referencing the FOSS ecosystem upon MapServer would
> certainly be useful to users.
>
> Even
>
> Le 28/09/2023 à 12:05, Seth G via MapServer-users a écrit :
> > Hi all,
> >
> > This month mappyfile became an official OSGeo Community Project [1]. To
> celebrate there is a v1.0.0 release, this drops Python 2.7 support, but
> includes over a year of fixes and improvements. Full release notes are at
> [2].
> >
> > mappyfile is a Python library that allows you to easily create, edit,
> and format MapServer Mapfiles. Source code is on GitHub [3] and docs are at
> https://mappyfile.readthedocs.io/ and it is available on PyPI [4].
> >
> > Any feedback or issue reporting welcome,
> >
> > Seth
> >
> > [1] https://www.osgeo.org/projects/mappyfile/
> > [2] https://mappyfile.readthedocs.io/en/latest/HISTORY.html
> > [3] https://github.com/geographika/mappyfile
> > [4] https://pypi.org/project/mappyfile/
> >
> > --
> > web:https://geographika.net & https://mapserverstudio.net
> > twitter: @geographika
> > ___
> > MapServer-users mailing list
> > MapServer-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Some remote SVG files doesn't in 8.1

2023-07-17 Thread Steve Lime
There seems to be a regression with svg- I have another sample file that
doesn’t render correctly (or at all). Just need to find a little time to
resolve it.

On Tue, Jul 11, 2023 at 12:10 PM Martin Høgh  wrote:

> I've a MapFile with a point layer using a class style with a SVG symbol:
>
> CLASS
>  NAME 'point'
>  STYLE
>  SYMBOL
> '
> https://raw.githubusercontent.com/NordjyllandsTrafikselskab/gisimages/ca64d7a849c7cf0290ec41ec263a97b9195d0ff8/01.01.01.Bus.svg
> '
>  END
> END
>
> In 7.6 this works fine, but in 8.1 the SVG symbol is not showing (no
> errors but the image is blank). But if change the SVG file to e.g.:
>
> https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/AJ_Digital_Camera.svg
>
> it works. So I guess it's something with the SVG file?
>
> MapServer version 8.0.1 PROJ version 7.2 GDAL version 3.4 OUTPUT=PNG
> OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
> SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV
> SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=SOS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI
> SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL
> INPUT=SHAPEFILE INPUT=FLATGEOBUF
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] breaking changes in branch-7-6 after commit of experimental changes from branch-8-0

2023-05-30 Thread Steve Lime
This is my fault... The intention was to localize those bounds checks in a
benign manner. However, I should have known that restricting angle to 0-360
might catch someone off guard and loosened that for the 7.6 backport. Those
changes had been in the 8.0 branch for many months with zero negative
feedback. We could issue a 7.6.6 release with a -360 to 360 range. I've not
heard of any other related issues with that change.

--Steve

On Tue, May 30, 2023 at 7:45 AM Rahkonen Jukka <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> It looks like Steve Lime was reading the text in the paragraph and not the
> line the defines the synopsis and thought that the documentation was
> explicit
> https://github.com/MapServer/MapServer/issues/6463#issuecomment-1025938850
>
> “since style-level angle documentation refers specifically to 0-360 I
> think we should limit from 0-360 if there are no objections”. Or maybe he
> was remembering what he was thinking when writing the original code?
>
> Please make a pull request for improving the documentation, for my mind it
> is vague now.
>
>
>
> -Jukka Rahkonen-
>
>
>
>
>
>
>
> *Lähettäjä:* Oliver Christen 
> *Lähetetty:* tiistai 30. toukokuuta 2023 15.21
> *Vastaanottaja:* Rahkonen Jukka 
> *Kopio:* mapserver-users@lists.osgeo.org
> *Aihe:* Re: [MapServer-users] breaking changes in branch-7-6 after commit
> of experimental changes from branch-8-0
>
>
>
> before that commit, the following code was working:
>
>
>
> STYLE
>   COLOR 255 255 255
>   SYMBOL "rectangle3"
>   ANGLE -45
>   SIZE 8
>   GAP 10
> END
>
>
>
> after that commit, it no longer works, as ANGLE -45 is not accepted
> anymore, instead it had to be changed to
>
>
>
> STYLE
>   COLOR 255 255 255
>   SYMBOL "rectangle3"
>   ANGLE 315
>   SIZE 8
>   GAP 10
> END
>
>
>
> the documentation https://mapserver.org/mapfile/style.html say it must be
> of type DOUBLE, but double can be negative and nothing say explicitly in
> the documentation that the value can not be negative.
>
>
>
> I see this discussion here:
> https://github.com/MapServer/MapServer/issues/6463
>
> but no comment if something was done or agreed on about this.
>
> A note should be added to the documentation to make that clear, as it was
> done for label size (see below).
>
> I can do a PR if that would be acceptable ?
>
>
>
> for label size, I see that a note was added saying the value must be
> greater than zero on 26 january 2022, so I guess this is on me for not
> noticing it (but im not alone not noticing it so I guess it wasnt clearly
> stated/announced either)
>
>
>
> Best regards
>
> Oliver
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Tue, May 30, 2023 at 1:27 PM Rahkonen Jukka <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
> Hi,
>
>
>
> Maybe the commit could be adjusted in Mapserver 7. Out of curiosity, what
> is the use case for zero sized labels and symbols? To disable them, or?
> About the angle, by the Mapserver 7.0 documentation, doesn’t it feel like
> negative angles were not thought to work ever?
>
>
> “Angle, given in degrees, to rotate the symbol (counter clockwise).
> Default is 0 (no rotation). If you have an attribute that specifies angles
> in a clockwise direction (compass direction), you have to adjust the angle
> attribute values before they reach MapServer (360-ANGLE), as it is not
> possible to use a mathematical expression for ANGLE.”
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* MapServer-users  
> *Puolesta
> *Oliver Christen
> *Lähetetty:* tiistai 30. toukokuuta 2023 13.59
> *Vastaanottaja:* mapserver-users@lists.osgeo.org
> *Aihe:* [MapServer-users] breaking changes in branch-7-6 after commit of
> experimental changes from branch-8-0
>
>
>
> Dear Mapserver commiters
>
>
>
> this commit there:
>
> https://github.com/MapServer/MapServer/pull/6818
>
>
>
> broke a lot of things,
>
> like style angles not supporting negative values anymore or label size
> mandatorily greater than zero (also possibly for symbol)
>
>
>
> Im not against changes, but changes should be:
>
> a) documented
>
> b) announced with preferably a deprecation period
>
>
>
> so, please revert that commit or provide adequate change/documentation for
> all the breaking changes.
>
>
>
> Thank you
>
> Best regards
>
> Oliver Christen
>
>
>
> --
>
>
>
>
> <https://www.camptocamp.com/en/news-events/camptocamp-flagship-office-bussigny>
>
> *New address from 1st September 2022*
>
>
>
> *Camptocamp SA*
>
> Route de la Chaux 4
>
> 1030 Bussigny
>
> Suisse
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Qgis layer style file in mapfile

2023-05-15 Thread Steve Lime
This would be very useful. Is that work also potentially identifying gaps
(or opportunities) with MapServer styling to make things easier? --Steve

On Thu, May 11, 2023 at 5:35 AM Seth G  wrote:

> Hi Marcin,
>
> Good timing with the question! There is currently a code sprint happening
> for the GeoStyler project [1]
> This allows conversion between different styles including QGIS and
> MapServer Mapfiles.
> If you are looking to convert from QGIS to Mapfile you need to use the
> geostyler-cli [2] to convert the QGIS style to the intermediary GeoStyler
> format and then use the GeoCat script [3] to convert this to a Mapfile.
> This is currently a fairly complex way do do things but we're looking at a
> Python wrapper to make this a simple one line command.
>
> Seth
>
> [1] https://geostyler.org/
> [2] https://github.com/geostyler/geostyler-cli
> [3]
> https://github.com/GeoCat/bridge-style/blob/master/bridgestyle/mapserver/fromgeostyler.py
>
> --
> web:https://geographika.net
> twitter: @geographika
>
> On Thu, May 11, 2023, at 11:55 AM, Marcin Niemyjski via MapServer-users
> wrote:
>
> Hello,
>
> is it possible to somehow use Qgis layer style file in mapfile to define
> how is Polygon layer displayed?
>
> Best,
> Marcin
>
>
>
>
>
>
> 
>
> Book time to meet with me
> 
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] MSSQL plugin path outside of the global CONFIG file

2023-03-24 Thread Steve Lime
One point of clarification. If a config file is referenced then when the
mapfile is read then the value for PLUGIN is always interpreted as a key to
the list of plugins. That is always the case for CGI/FastCGI where a config
file is required. In the case of MapScript (or shp2map) loading a mapfile,
the config file is optional and the value for PLUGIN works as prior
versions if a config file is not referenced. This was done to minimize
impact on scripts. If a mapfile serves dual purposes then a config file
will be required and PLUGIN values represent keys.

--Steve

On Mon, Mar 20, 2023 at 9:13 AM Jörg Thomsen (WhereGroup) <
joerg.thom...@wheregroup.com> wrote:

> Hello Benedek,
>
>  > Is it mandatory now, to define the PLUGIN path from the global CONFIG
> file?
>
> short answer: yes it's mandatory and it's a security issue.
>
> the documentation is very explizit
> (see https://mapserver.org/mapfile/layer.html):
>
> > For MapServer >=8:
> defining plugins for dataconnections in the config-gile
> ...
> > For MapServer <8:
> defining plugins for dataconnections in the mapfile
>
> further in https://mapserver.org/mapfile/config.html :
> > This block allows for keys to be mapped to plugin library paths.
>  > For example the MS SQL Plugin.
>  > **This registry of plugins avoids possible unsafe libraries being
>  >  loaded by a mapfile.**
>
> Regards, Jörg
>
>
>
>
>
>
> Am 20.03.23 um 14:51 schrieb Benedek Petrovicz:
> > Hi!
> >
> > Before MapServer 8, I always defined the mssql plugin path in the
> > mapfiles directly.
> > It was a convenient way for my use case.
> >
> > Now from MapServer 8 there's the required global CONFIG file I have to
> > define.
> > Which is fine, but MapServer will only allow loading the plugin through
> > that global CONFIG file.
> >
> > The CONFIG reference states the following:
> >
> > /"PLUGINS: This block allows for keys to be mapped to plugin library
> > paths."/
> >
> > For me, this means I can define a global plugin keyword if I want to,
> > but I don't have to.
> > In reality I don't have other options. At least I don't know about any.
> >
> > Is it mandatory now, to define the PLUGIN path from the global CONFIG
> file?
> >
> > Thank you!
> > Benedek Petrovicz
> >
> > ___
> > MapServer-users mailing list
> > MapServer-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> --
> Viele Grüße,
> Jörg Thomsen
> -
> Aufwind durch Wissen!
> Web-Seminare und Online-Schulungen
> bei der www.foss-academy.com
> -
>
>
> Jörg Thomsen
> WhereGroup GmbH
> Bundesallee 23
> 10717 Berlin
> Germany
>
> Tel: +49 (0)30 / 5130 278 74
> Fax: +49 (0)30 / 5130 278 11
>
> joerg.thom...@wheregroup.com
> www.wheregroup.com
>
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
>
> ---
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] MS_MAP_PATTERN cannot accept network share

2023-03-24 Thread Steve Lime
Hi Benedek: You'll need to fiddle with MS_MAP_BAD_PATTERN. Looking at the
sample configuration file it's value is:

  MS_MAP_BAD_PATTERN "[/\\]{2}|[/\\]?\\.+[/\\]|,"

If a mapfile path matches any of those, it's rejected. By default it's
blocking anything with \\, //, back references or commas anywhere in the
path. This makes it easier to write clear MS_MAP_PATTERN values. Anway, you
can override that value in the config file to remove blocking the //. Then
you'd want to make sure your MS_MAP_PATTERN starts with something like:

  MS_MAP_PATTERN "^//MY-NAS/MapFiles"

and be sure to test your patterns. Let us know how it goes.

--Steve

On Thu, Mar 23, 2023 at 3:48 PM Benedek Petrovicz <
benedek.petrov...@gmail.com> wrote:

> Hi!
>
> I'm running into an issue where I cannot reference the mapfiles from a
> network share.
> I'm getting the following error: *msCGILoadMap(): Web application error.
> CGI variable "map" fails to validate.*
>
> The path to my mapfile is the following: *//MY-NAS/MapFiles/test.map*
> It's under a network share.
>
> I know that it should work, because when I set a MAP alias to the same
> path in the global config, it just works.
>
> I tried multiple MS_MAP_PATTERN settings, but couldn't get it to accept
> the path.
>
>- *MS_MAP_PATTERN "."*
>- *MS_MAP_PATTERN "^.+$"*
>
> Is there any way to get MapServer accept a network share path?
> Unfortunately I cannot use the MAP aliases, because I have to make it work
> for multiple dynamic environments.
>
> I'm trying to make it work under MapServer 8.
>
> Thank you!
> Benedek
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] pixmap overlapping

2023-03-11 Thread Steve Lime
One other idea would be to use a style at the label level with blank text,
something like:

CLASS # no class-level style
  TEXT “ “ # blank space
  LABEL
POSITION CC
STYLE
   SYMBOL …your pixmap…
   …
END
  END
END

I think this could work although you might have to fiddle with it a bit.

—Steve


On Fri, Mar 10, 2023 at 5:01 PM Steve Lime  wrote:

> So points drawn with a pixmap symbol? No, not that I'm aware of. Might be
> helpful so see a picture of what you're trying to work around. Using
> truetype icons as labels has been one way I've tried to do something
> along those lines. I suppose clustering might be another option. --Steve
>
> On Thu, Mar 9, 2023 at 5:43 AM Carlos Neves (LREC)  wrote:
>
>> Hi list,
>>
>> Is there a way to avoid overlapping Cartographic Symbol type pixmap on
>> the map?  FORCE FALSE works only with labels.
>>
>> Any help would be appreciated.
>>
>> Regards
>>
>> Carlos
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] pixmap overlapping

2023-03-10 Thread Steve Lime
So points drawn with a pixmap symbol? No, not that I'm aware of. Might be
helpful so see a picture of what you're trying to work around. Using
truetype icons as labels has been one way I've tried to do something
along those lines. I suppose clustering might be another option. --Steve

On Thu, Mar 9, 2023 at 5:43 AM Carlos Neves (LREC)  wrote:

> Hi list,
>
> Is there a way to avoid overlapping Cartographic Symbol type pixmap on
> the map?  FORCE FALSE works only with labels.
>
> Any help would be appreciated.
>
> Regards
>
> Carlos
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-22 Thread Steve Lime
Hi Matthew: That functionality was indeed removed as part of 8.0. I kind of
expect that we might build back something for more limited use cases if
necessary, Does SLD support opacity/transparency?

--Steve


On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber  wrote:

> Hello all!
>
> With MapServer 8, I'm wondering what the proper way to change the opacity
> of a single layer in a multilayer WMS request is.
>
> For example, the following URL excerpt shows the old way of accomplishing
> this that worked while using MapServer 7:
>
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50
>
> My understanding is that this would have the same effect as adding
> "OPACITY 50" to the test_b layer in the mapfile. The mapfile containing
> test_a and test_b did not have OPACITY included when they were written.
> Obviously, this no longer works with MapServer 8, and now that request has
> the same results as omitting the "[test_b]=OPACITY+50" portion
> entirely.
>
> Based on https://mapserver.org/fr/MIGRATION_GUIDE.html, I see that
> OPACITY now belongs inside a COMPOSITE object. I tried the following
> modifications to the request URL:
>
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50
>
> I also tried this both with the mapfile left as-is, and with an empty
> COMPOSITE object being included in each layer object, and each time I got
> the same unsuccessful result as before.
>
> Is there a way to accomplish this in MapServer 8?
>
> Also, does this map.layer[layername]=... syntax still work in MapServer 8?
> The documentation at
> https://mapserver.org/cgi/controls.html#using-mapserver-version-8
> suggests it might no longer work for MapServer 8 (based on the heading
> "Using MapServer version < 8"), but the documentation at
> https://mapserver.org/pdf/MapServer.pdf shows the same examples with the
> heading "Using MapServer version <= 8" on page 1065 of the PDF, so I'm
> unsure if this is still intended to work in MapServer 8.
>
> Thank you,
> Matt
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] wms time validation of time parameter against timeextent gives unexpected results

2023-02-06 Thread Steve Lime
Does WMS 1.1 behave the same? I suppose it comes down to how 2022 is
interpreted as part of a range, I would have expected it would mean any
date in that year. Sounds like it's behaving like strictly less than
2022-01-01. What happens if you set the range using full dates, so
something like: 20050101/20221231?

--Steve

On Thu, Feb 2, 2023 at 3:33 AM Clausen Marcel via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

>
> Dear all
>
> We have the following question concerning the configuration and usage of
> time enabled wms layers.
>
> We are using the following metadata section for a time-enabled layer:
>
> METADATA
> "wms_enable_request" "*"
> "wms_title" "lubis_bildstreifen"
> "wms_extent" "210 105 285 140"
> "wms_timeextent" "2005/2022"
> "wms_timeitem" "flugdatum" # this is a date column in postgres
> END
>
>
> The time precision/resolution of the timeextent has to be set as year.
>
> The validation of the time parameter against the time extent with year
> precision gives some strange results. We were using the following getmap
> request for the tests:
>
>
> localhost:/local/?SERVICE=WMS=1.3.0=GetMap=image/png=true=ch.swisstopo.lubis-bildstreifen=EPSG:2056==860=600=242,105,285,135=2022
>
> parameter:  time=2005
> result: returns all features of 2005
> expected result:ok
>
> parameter:  time=2022
> result: returns all features of 2022
> expected result:ok
>
> parameter:  time=2023
> result: returns ServiceException [1]
> expected result:ok
>
> parameter:  time=2022-01-01
> result: returns ServiceException [2]
> expected result:we would expect this to be a valid timestamp
>
> parameter:  time=2022-01-01/2022-12-31
> result: returns ServiceException [3]
> expected result:we would expect this to be a valid timestamp
>
> It seems that if the precision of the time parameter is of -MM or
> -MM-TT the upper bound of the defined timextent 2005/2022 is not
> respected correctly.
> We got the same result with the timextent defined  as: 2005/2022/P1Y
>
> our mapserver version is:
> 
>
> Does someone have some insights or hints?
>
> Best regards
> Clausen Marcel
>
> [1]
> msWMSApplyTime: WMS server
> error. Time value(s) 2023 given is invalid or outside the time extent
> defined (2005/2022).
>
> [2]
>  msWMSApplyTime: WMS server
> error. Time value(s) 2022-01-01 given is invalid or outside the time extent
> defined (2005/2022). 
>
> [3]
>  msWMSApplyTime: WMS server
> error. Time value(s) 2022-01-01/2022-12-31 given is invalid or outside the
> time extent defined (2005/2022). 
>
>
>
>
>
>
>
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Clipped labels in mapcache/mapserver map

2022-11-03 Thread Steve Lime
So I checked a map here and found similar settings:

   - label-level: PARTIALS FALSE,
   - map-level metadata: "labelcache_map_edge_buffer" "-20"
   - mapcache: 20

I don't use the LABEL_NO_CLIP processing directive. The one obvious
difference is the negative value for the map edge buffer - I know negative
values were originally how that was specified but I thought we generalized
that value some time ago.

I wonder if the "ANGLE follow" might be the cause - perhaps there's an
error in the size computation of the rotated text - perhaps at different
position values? Just guessing though.

The only way to easily debug/test is going to be examining a metatile that
results in a clipped label. You could delete an affected tile and then let
mapcache generate a replacement. You should be able to pick up the metatile
WMS call from the logs.

--Steve

On Tue, Nov 1, 2022 at 8:25 PM Steve Lime  wrote:

> Have you tried a larger edge buffer? I suppose that’s tough to to test
> given the randomness. I’ll check my settings on a similar setup when I’m in
> the office tomorrow and let you know. It would be interesting to see the
> corresponding metatile to see if the label is whole there. I wouldn’t think
> so but having a reproducible test case would help immensely.
>
> Anyone know how to compute a metatile URL for a given tile x/y/z?
>
> —Steve
>
> On Mon, Oct 31, 2022 at 10:16 AM Thomas Ellett von Brasch <
> thomas.ell...@kartverket.no> wrote:
>
>> Hi all,
>>
>>
>>
>> I'm really struggling to fix a longstanding issue with clipped labels in
>> a couple of our wmts services.
>>
>> I've tried following the mapserver/mapcache docs and numerous variations
>> of different attributes, but with no luck.
>>
>>
>>
>> The main problem bug fixing is that the issue seems to be quite random,
>> just popping up here and there.
>>
>>
>>
>> Examples can be seen in these urls:
>>
>>
>>
>>
>> https://norgeskart.no/#!?project=norgeskart=1002=11=6879652.31=167744.51
>>
>>
>>
>> (the 'Stor rar' and 'S' names in the centre of the map)
>>
>>
>>
>>
>> https://norgeskart.no/#!?project=norgeskart=1002=6=6440416.41=127931.07
>>
>>
>>
>> ('Kristiansan' , which should be 'Kristiansand')
>>
>>
>>
>> I have "labelcache_map_edge_buffer" "10" in the mapfile and
>> 10 set in the mapcache file.
>>
>>
>>
>> In the source WMS, the placenames layers are line layers (with very small
>> line geometries used just to give curved lines) and the layers (we have
>> several name layers for the different zoom levels, but they're all set up
>> in the same way) look like (truncated):
>>
>>
>>
>> LAYER
>>
>> NAME "N100Stedsnavn"
>>
>> PROCESSING "CLOSE_CONNECTION=DEFER"
>>
>> PROCESSING "LABEL_NO_CLIP=True"
>>
>> TYPE LINE
>>
>>
>>
>> CLASS
>>
>>   NAME "N100 Stedsnavn"
>>
>>   EXPRESSION ([fmx_rotation] != 0)
>>
>>   LABEL
>>
>>   *PARTIALS FALSE*
>>
>> *ANGLE follow*
>>
>> ANTIALIAS TRUE
>>
>> FONT "verdana"
>>
>> SIZE [fontsize]
>>
>> COLOR [geodb_color]
>>
>> ENCODING "UTF-8"
>>
>>   PRIORITY [fontsize]
>>
>> *FORCE FALSE*
>>
>>   MINDISTANCE 50
>>
>>  OUTLINECOLOR 254 254 254
>>
>>  POSITION [horizontalalignment]
>>
>>  TYPE TRUETYPE
>>
>>   END
>>
>>   TEXT "[textstring]"
>>
>> END
>>
>> END
>>
>>
>>
>> And the tileset definition in the mapcache config file looks like:
>>
>>
>>
>> 
>>
>> norgeskart_bakgrunn
>>
>> norgeskart_bakgrunn
>>
>> 
>>
>> Topografisk Norgeskart og dybdedata og svalbard minus
>> matrikkel
>>
>>Cache for Norgeskart
>>
>> 
>>
>> googlemaps
>>
>> utm33n
>>
>> PNG
>>
>> *8 8*
>>
>> *10*
>>
>> 
>>
>>
>>
>> Is it possible the metatiles being used in the original seed job and
>> later seeding jobs are different somehow?
>>
>>
>>
>> Given that the labelcache_map_edge_buffer is set (along with metabuffer)
>> and we have PARTIALS FALSE in the mapfile, I didn't think that cut labels
>> would be possible?
>>
>>
>>
>> Any thoughts or ideas would be great J
>>
>>
>>
>> Thanks in advance!
>>
>>
>>
>> Tom
>>
>>
>>
>>
>>
>> [image: cid:image001.jpg@01D3A415.20CB4FE0]
>>
>> *Tom Ellett von Brasch*
>> Sjefsingeniør
>> *Geodatatjenester*
>>
>> Direkte: 32 11 84 73
>>
>> Mobil: 45806402
>>
>> E-post: thomas.ell...@kartverket.no
>>
>>
>> Tlf. sentralbord: 32 11 80 00
>> www.kartverket.no
>>
>>
>>
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Clipped labels in mapcache/mapserver map

2022-11-01 Thread Steve Lime
Have you tried a larger edge buffer? I suppose that’s tough to to test
given the randomness. I’ll check my settings on a similar setup when I’m in
the office tomorrow and let you know. It would be interesting to see the
corresponding metatile to see if the label is whole there. I wouldn’t think
so but having a reproducible test case would help immensely.

Anyone know how to compute a metatile URL for a given tile x/y/z?

—Steve

On Mon, Oct 31, 2022 at 10:16 AM Thomas Ellett von Brasch <
thomas.ell...@kartverket.no> wrote:

> Hi all,
>
>
>
> I'm really struggling to fix a longstanding issue with clipped labels in a
> couple of our wmts services.
>
> I've tried following the mapserver/mapcache docs and numerous variations
> of different attributes, but with no luck.
>
>
>
> The main problem bug fixing is that the issue seems to be quite random,
> just popping up here and there.
>
>
>
> Examples can be seen in these urls:
>
>
>
>
> https://norgeskart.no/#!?project=norgeskart=1002=11=6879652.31=167744.51
>
>
>
> (the 'Stor rar' and 'S' names in the centre of the map)
>
>
>
>
> https://norgeskart.no/#!?project=norgeskart=1002=6=6440416.41=127931.07
>
>
>
> ('Kristiansan' , which should be 'Kristiansand')
>
>
>
> I have "labelcache_map_edge_buffer" "10" in the mapfile and
> 10 set in the mapcache file.
>
>
>
> In the source WMS, the placenames layers are line layers (with very small
> line geometries used just to give curved lines) and the layers (we have
> several name layers for the different zoom levels, but they're all set up
> in the same way) look like (truncated):
>
>
>
> LAYER
>
> NAME "N100Stedsnavn"
>
> PROCESSING "CLOSE_CONNECTION=DEFER"
>
> PROCESSING "LABEL_NO_CLIP=True"
>
> TYPE LINE
>
>
>
> CLASS
>
>   NAME "N100 Stedsnavn"
>
>   EXPRESSION ([fmx_rotation] != 0)
>
>   LABEL
>
>   *PARTIALS FALSE*
>
> *ANGLE follow*
>
> ANTIALIAS TRUE
>
> FONT "verdana"
>
> SIZE [fontsize]
>
> COLOR [geodb_color]
>
> ENCODING "UTF-8"
>
>   PRIORITY [fontsize]
>
> *FORCE FALSE*
>
>   MINDISTANCE 50
>
>  OUTLINECOLOR 254 254 254
>
>  POSITION [horizontalalignment]
>
>  TYPE TRUETYPE
>
>   END
>
>   TEXT "[textstring]"
>
> END
>
> END
>
>
>
> And the tileset definition in the mapcache config file looks like:
>
>
>
> 
>
> norgeskart_bakgrunn
>
> norgeskart_bakgrunn
>
> 
>
> Topografisk Norgeskart og dybdedata og svalbard minus
> matrikkel
>
>Cache for Norgeskart
>
> 
>
> googlemaps
>
> utm33n
>
> PNG
>
> *8 8*
>
> *10*
>
> 
>
>
>
> Is it possible the metatiles being used in the original seed job and later
> seeding jobs are different somehow?
>
>
>
> Given that the labelcache_map_edge_buffer is set (along with metabuffer)
> and we have PARTIALS FALSE in the mapfile, I didn't think that cut labels
> would be possible?
>
>
>
> Any thoughts or ideas would be great J
>
>
>
> Thanks in advance!
>
>
>
> Tom
>
>
>
>
>
> [image: cid:image001.jpg@01D3A415.20CB4FE0]
>
> *Tom Ellett von Brasch*
> Sjefsingeniør
> *Geodatatjenester*
>
> Direkte: 32 11 84 73
>
> Mobil: 45806402
>
> E-post: thomas.ell...@kartverket.no
>
>
> Tlf. sentralbord: 32 11 80 00
> www.kartverket.no
>
>
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] mapserver 8 - CGI map_object substitutions broken?

2022-10-06 Thread Steve Lime
Hi Tim: I was wondering if I'd see any messages on that topic. Short story
is that the functionality was removed in MS8. I never liked the
all-or-nothing aspect of it and was working on a method to control which
objects would be allowed to be updated. The solutions I came up with were
convoluted and were going to add a lot of complexity to the codebase for
little value. That functionality is poorly documented and by itself overly
complicates the code. So after a note to mapserver-users trying to judge
how much it was used - with limited replies - it was decided to remove it.
I'm dealing with my own upgrade issues as a result, but it's worth it in
the end IMHO.

If necessary, it's better to revisit with another method - ideally
something along the lines of runsubs. The challenge is specifying when to
apply them and how to validate values. Strings are easy, but numeric/color
values aren't so we'd need to do something like add runtime bindings
(similar to attribute bindings) so you'd write SIZE %mysize% instead. One
advantage being you could reuse the variable across layers.

So, what are the options right now? It sort of depends on your needs. Do
you need to only support a couple of sizes for a class or do you truly need
*any* size? Options include:

   - multiple mapfiles - probably using includes to limit redundancy
   - class groups
   - if you're using a db backend I think attribute bindings could work
   paired with runsubs

DATA "shape FROM (select *, %textsize% AS textsize FROM ...)

VALIDATION

"textsize_default" "13"

"textsize" "^8|10|12|14$"

END

CLASS

  LABEL

SIZE [textsize] # I think attribute binding works here

  END

END


   - MapScript - load the mapfile, do the changes you need, render the map

Happy to discuss further and perhaps other folks have ideas.

--Steve

On Thu, Oct 6, 2022 at 12:47 PM Tim Kempisty via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Good afternoon, all.
>
> I am migrating a project from MS7 to the new Mapserver 8.0.0, and I've
> stumbled upon evidence that map_object notation support for CGI variable
> substitution may be broken.
>
> Here's the relevant doc for CGI Controls:
>
> https://mapserver.org/cgi/controls.html
>
> Scoll down to the heading:  "Changing map file parameters via a form or a
> URL"
> We have been using the map_object notation method to set custom image
> sizes and font sizes.
>
> Excuse the messy query string.  The important parts are  "_size" and
> "[...]"
>
> /var/www/cgi-bin/mapserv.cgi -nh
> "QUERY_STRING=mode=map=/usr/local/mapfiles/kempisty/nbm_view/foo.map=genNoDec=blend=v4.0=conus=maxt=2022-10-06T14:00=2022-10-08T06:00=-3270279.3477121103%20-163255.0404466032%202666810.2533767014%203144901.0582670807_size=1215+677[genNoDec].class[0].label[0]=SIZE+8"
> > /var/www/html/kempisty/foo7.png
>
> MS7 gives a map size 1215x677 with labels rendered in 8 point font, as
> expected.  The same command, using mapserver 8 instead of 7, gives an
> image size 2345x1597 (map size as defined in the mapfile) with labels
> rendered in 13 point font (also as defined in the mapfile).
>
> Using MS8... if I send =1215+677 instead of _size=1215+677 ...
> I will get the image at the correct size.  So the predefined CGI control
> variables still work.  It suggests to me, it is only the map_object
> notation method that is broken.  Has that been disabled in MS8, or is it
> now subject to a new configuration requirement that I'm not aware of?
>
> Relevant string isolated for reference:
> _size=1215+677[genNoDec].class[0].label[0]=SIZE+8"
>
> I'm open to other methods of changing font size on the fly.  We did it
> this way because %var% runtime substitutions aren't supported for CLASS:
> LABEL: SIZE.
>
> -Tim Kempisty
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] msLoadMap(): Unable to access file. (full file path)

2022-09-07 Thread Steve Lime
Hi Michal: AFAIK it's always been that way as an aid to debugging. I can
certainly appreciate the argument that error messages shouldn't contain any
references to file locations and could write that information to debug logs
instead. I'm curious what others think.

I always resort to using mapfile aliases to obfuscate locations but I
believe even that approach could cough up a path (albeit an incorrect one)
if the alias is set incorrectly.

--Steve

On Tue, Sep 6, 2022 at 7:22 AM Michal Seidl  wrote:

>
> Hello,
> is there way not to show the full path in the msLoadMap(): Unable to
> access file error?
>
> I have managed to hide path through the Apache mod_rewrite, but showing
> full path on error in not security issue?
>
> Thanks Michal Seidl
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Mapserver 8 rc1

2022-08-25 Thread Steve Lime
Thanks for checking! Looks like there might be an issue with
the msPostGISReplaceBoxToken() rewrite in C++ in mappostgis.cpp.

On Thu, Aug 25, 2022 at 4:20 PM Scott  wrote:

> ms_error log is telling me it's unable to build the SQL query. There are
> no errors in the postgresql log.
>
> Even if I comment the line out I get an error, such as:
> --where st_intersects(geom, !BOX!)
> or:
> /* !BOX! */
>
> If it exists any where in the DATA block, it fails.
>
> Here's the ms error log:
>
> [Thu Aug 25 13:46:55 2022].451955 msPostGISBuildSQL(): General error
> message. Failed to build SQL 'where'.
> [Thu Aug 25 13:46:55 2022].451980 msPostGISLayerWhichShapes(): Query
> error. Failed to build query SQL.
> [Thu Aug 25 13:46:55 2022].452010 msDrawMap(): Image handling error.
> Failed to draw layer named 'wptByTrailType'.
>
> On 8/25/22 13:03, Steve Lime wrote:
> > Hmmm... Wasn't an intentional omission. If you have logging turned on
> > and can see the resulting SQL, does the !BOX! get replaced but just
> > incorrectly or is the !BOX! still in the SQL.
> >
>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Mapserver 8 rc1

2022-08-25 Thread Steve Lime
Hmmm... Wasn't an intentional omission. If you have logging turned on and
can see the resulting SQL, does the !BOX! get replaced but just incorrectly
or is the !BOX! still in the SQL.

On Wed, Aug 24, 2022 at 5:16 PM Scott  wrote:

> I've installed 8rc1 and I've run into an issue. I didn't see anything in
> the change log, so I'll put it here.
>
> The !BOX! variable that has been historically available doesn't seem to
> be supported with CONNECTIONTYPE POSTGIS any longer. For instance:
>
> DATA "geom from (
>select
>   geom
>from sometable
>where st_intersects(geom, !BOX!)
> ) as sq using unique geom using srid=4269"
>
> ...will throw an error:
>
> 
>  "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>
> 
> 
> msDrawMap(): Image handling error. Failed to draw layer named
> wptsAll.
> msPostGISLayerWhichShapes(): Query error. Failed to build query SQL.
> msPostGISBuildSQL(): General error message. Failed to build SQL
> where.
> 
> 
>
> If I remove the !BOX! it will work.
>
> Thanks!
> Scott
>
> --
> www.postholer.com
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapScript Projection Performance

2022-06-09 Thread Steve Lime
The changes to MapScript help dramatically - at least using main. I end up
with code like:

my $proj_26915 = new mapscript::projectionObj('epsg:26915');
my $proj_4326 = new mapscript::projectionObj('epsg:4326');
my $reprojector =  new mapscript::reprojectionObj( $proj_26915,
$proj_4329);

while (my $shape = $layer->nextShape()) {
my $point = $shape->getCentroid();
$point->project($reprojector);
# do something with $point
}

Execution time drops from ~4.3 sec to ~0.2 sec. Only change to the
mapproject.* source was moving the structure definition for a
reprojectionObj into the header file so Swig can get at it. I'll prepare a
pull request...

--Steve

On Wed, Jun 8, 2022 at 2:40 PM Steve Lime  wrote:

> Thanks for the response Even.
>
> Switching to 4329 drops a few milliseconds, no major improvement.
>
> If I still create the projection objects but don't actually project the
> point object then the execution time drops back to 0m0.180s or thereabouts.
> Creating the projection objects is just running msLoadProjectionString()
> under the hood. Must not be doing that much - no reprojector is being
> created.
>
> $point->project() is running msProjectPoint() under the hood. I'm guessing
> the reprojector is being constructed every time that's called.
>
> Note that I don't see a performance hit with 7.6 or 8.0 (main) with CGI
> when doing loads of reprojection.
>
> So, following on your idea we'd need changes to the swig interface:
>
>1. reprojector.i - with a constructor to take in/out projection objects
>2. overloaded project methods added to line.i, point.i, rect.i and
>shape.i
>
> I'll try that.
>
> --Steve
>
> On Wed, Jun 8, 2022 at 11:09 AM Even Rouault 
> wrote:
>
>> Steve,
>>
>> are you sure you don't still run into the projection initialization, or
>> actually the cost to get the reprojector object from the (in, out)
>> projection tuple from the cache maintained by createNormalizedPJ() ?
>>
>> If the following functions were mapped to SWIG
>>
>>MS_DLL_EXPORT reprojectionObj*
>> msProjectCreateReprojector(projectionObj* in, projectionObj* out);
>>
>>MS_DLL_EXPORT int msProjectPointEx(reprojectionObj* reprojector,
>> pointObj *point);
>>
>> that could be interesting to check if they speed up things.
>>
>> You might also try to check if using EPSG:4269 instead of EPSG:4326
>> wouldn't speed up things, to eliminate the datum change from the
>> equation (if you have PROJ grids available, they might be used to do the
>> NAD83 -> WGS84 shift)
>>
>> Even
>>
>> Le 08/06/2022 à 17:50, Steve Lime a écrit :
>> > Hi all: I have a Perl script that runs against a shapefile to project
>> > a geometry centroid from UTM to Lat/Lon. Code looks something like this:
>> >
>> > my $proj_26915 = new mapscript::projectionObj('epsg:26915');
>> > my $proj_4326 = new mapscript::projectionObj('epsg:4326');
>> >
>> > while (my $shape = $layer->nextShape()) {
>> > my $point = $shape->getCentroid();
>> > $point->project($proj_26915, $proj_4326);
>> > # do something with $point
>> > }
>> >
>> > I get the following representative timings with ~250 polygon
>> > geometries in the shapefile.
>> >
>> >   MapServer 7.4 + Proj 6.2.1 = 0m0.180s
>> >   MapServer 7.6 + Proj 6.2.1 = 0m7.000s
>> >   MapServer 8.0 (main) + Proj 7.2.1 = 0m4.300s
>> >
>> > Huge difference and things kinda become unusable. Things improve a bit
>> > with newer versions but the performance hit is substantial. I
>> > thought at first that it was the projection initialization that was
>> > taking all the time but it's actually the
>> > "$point->project($proj_26915, $proj_4326);" statement.
>> >
>> > Perhaps I'm doing something wrong?
>> >
>> > --Steve
>> >
>> > ___
>> > MapServer-users mailing list
>> > MapServer-users@lists.osgeo.org
>> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>> --
>> http://www.spatialys.com
>> My software is free, but my time generally not.
>>
>>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Screen is square blank square window

2022-06-08 Thread Steve Lime
What version/distribution are you using? This sound familiar to another
issue I remember but I couldn't find it looking quickly in github. I
thought that was specific to a particular Windows binary distribution.
--Steve

On Wed, Jun 8, 2022 at 1:20 PM Jeremy JK  wrote:

> Hello all,
> When I call on mapserver I see nothing in the browser window
> only a grey square against a black background
> Thanks for your help
>
> this is my mapserver petition:
>
>
> http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mdm61vectorCaribe.map=cbarbados_administrativeboundaries=image%2Fpng=4891.969809375=5=5=0==WMS=1.1.1=GetMap==059=EPSG%3A900913=-12281420.399711,-1098306.4872519,-4405349.0063027,4850328.8011857=805=608
>
> This is the log file
> 52, -6635790.2658974118530750 1476490.8980501613114029,
> -6635788.7212414033710957 1476485.6568205237854272,
> -6635788.5621886961162090 1476485.1171328218188137,
> -6635786.9534297138452530 1476479.6583917171228677,
> -6635783.4353540828451514 1476467.1054714780766517,
> -6635779.1915921270847321 1476450.7408135060686618,
> -6635777.6594455474987626 1476444.0638863830827177,
> -6635776.2385215582326055 1476434.2757148493546993,
> -6635775.0103269824758172 1476422.8186795604415238,
> -6635773.4231182178482413 1476408.2214688013773412,
> -6635772.0777894463390112 1476396.2395822617691010,
> -6635770.4671615911647677 1476382.4886730741709471,
> -6635768.7171466927975416 1476359.7367921238765121,
> -6635766.8391131982207298 1476343.5201003090478480))
> [Wed Jun  8 14:18:21 2022].812616 msPostGISLayerNextShape called.
> [Wed Jun  8 14:18:21 2022].812648 msPostGISLayerFreeItemInfo called.
> [Wed Jun  8 14:18:21 2022].812659 msPostGISLayerClose called: the_geom
> from caribe.barbados_administrativeboundaries using unique gid using
> srid=900913
> [Wed Jun  8 14:18:21 2022].812736
> msConnPoolRelease(cbarbados_administrativeboundaries,user=postgres
> password=StrongAdminP@ssw0rd dbname=postgis_db host=127.0.0.1
> port=5432,0x5648bf2b6100)
> [Wed Jun  8 14:18:21 2022].812752 msDrawMap(): Layer 20
> (cbarbados_administrativeboundaries), 0.783s
> [Wed Jun  8 14:18:21 2022].834235 msPostGISLayerIsOpen called.
> [Wed Jun  8 14:18:21 2022].843507 msConnPoolClose(user=postgres
> password=StrongAdminP@ssw0rd dbname=postgis_db host=127.0.0.1
> port=5432,0x5648bf2b6100)
>
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapScript Projection Performance

2022-06-08 Thread Steve Lime
Thanks for the response Even.

Switching to 4329 drops a few milliseconds, no major improvement.

If I still create the projection objects but don't actually project the
point object then the execution time drops back to 0m0.180s or thereabouts.
Creating the projection objects is just running msLoadProjectionString()
under the hood. Must not be doing that much - no reprojector is being
created.

$point->project() is running msProjectPoint() under the hood. I'm guessing
the reprojector is being constructed every time that's called.

Note that I don't see a performance hit with 7.6 or 8.0 (main) with CGI
when doing loads of reprojection.

So, following on your idea we'd need changes to the swig interface:

   1. reprojector.i - with a constructor to take in/out projection objects
   2. overloaded project methods added to line.i, point.i, rect.i and
   shape.i

I'll try that.

--Steve

On Wed, Jun 8, 2022 at 11:09 AM Even Rouault 
wrote:

> Steve,
>
> are you sure you don't still run into the projection initialization, or
> actually the cost to get the reprojector object from the (in, out)
> projection tuple from the cache maintained by createNormalizedPJ() ?
>
> If the following functions were mapped to SWIG
>
>MS_DLL_EXPORT reprojectionObj*
> msProjectCreateReprojector(projectionObj* in, projectionObj* out);
>
>MS_DLL_EXPORT int msProjectPointEx(reprojectionObj* reprojector,
> pointObj *point);
>
> that could be interesting to check if they speed up things.
>
> You might also try to check if using EPSG:4269 instead of EPSG:4326
> wouldn't speed up things, to eliminate the datum change from the
> equation (if you have PROJ grids available, they might be used to do the
> NAD83 -> WGS84 shift)
>
> Even
>
> Le 08/06/2022 à 17:50, Steve Lime a écrit :
> > Hi all: I have a Perl script that runs against a shapefile to project
> > a geometry centroid from UTM to Lat/Lon. Code looks something like this:
> >
> > my $proj_26915 = new mapscript::projectionObj('epsg:26915');
> > my $proj_4326 = new mapscript::projectionObj('epsg:4326');
> >
> > while (my $shape = $layer->nextShape()) {
> > my $point = $shape->getCentroid();
> > $point->project($proj_26915, $proj_4326);
> > # do something with $point
> > }
> >
> > I get the following representative timings with ~250 polygon
> > geometries in the shapefile.
> >
> >   MapServer 7.4 + Proj 6.2.1 = 0m0.180s
> >   MapServer 7.6 + Proj 6.2.1 = 0m7.000s
> >   MapServer 8.0 (main) + Proj 7.2.1 = 0m4.300s
> >
> > Huge difference and things kinda become unusable. Things improve a bit
> > with newer versions but the performance hit is substantial. I
> > thought at first that it was the projection initialization that was
> > taking all the time but it's actually the
> > "$point->project($proj_26915, $proj_4326);" statement.
> >
> > Perhaps I'm doing something wrong?
> >
> > --Steve
> >
> > ___
> > MapServer-users mailing list
> > MapServer-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] MapScript Projection Performance

2022-06-08 Thread Steve Lime
Hi all: I have a Perl script that runs against a shapefile to project a
geometry centroid from UTM to Lat/Lon. Code looks something like this:

my $proj_26915 = new mapscript::projectionObj('epsg:26915');
my $proj_4326 = new mapscript::projectionObj('epsg:4326');

while (my $shape = $layer->nextShape()) {
my $point = $shape->getCentroid();
$point->project($proj_26915, $proj_4326);
# do something with $point
}

I get the following representative timings with ~250 polygon geometries in
the shapefile.

  MapServer 7.4 + Proj 6.2.1 = 0m0.180s
  MapServer 7.6 + Proj 6.2.1 = 0m7.000s
  MapServer 8.0 (main) + Proj 7.2.1 = 0m4.300s

Huge difference and things kinda become unusable. Things improve a bit with
newer versions but the performance hit is substantial. I thought at first
that it was the projection initialization that was taking all the time but
it's actually the "$point->project($proj_26915, $proj_4326);" statement.

Perhaps I'm doing something wrong?

--Steve
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Any trick to buffer labelpoly?

2022-04-29 Thread Steve Lime
Looks like there were some new responses on the post referenced. Will those
work for you? Otherwise we’d have to re-think the label poly geomtranform
to either allow an argument or be embedded in a more complex expression.

On Fri, Apr 29, 2022 at 1:24 AM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> There is a wish to buffer the labelpoly in
> https://gis.stackexchange.com/questions/429779/mapserver-background-buffer-around-labels-geomtransform-labelpoly
> but it does not seem to be supported directly. Can anybody suggest a trick
> or workaround?
>
>
>
> -Jukka Rahkonen-
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] dynamic ows_serviceurl

2022-04-12 Thread Steve Lime
One other thing. One challenge with environment variables is knowing what's
consistently available within a runtime environment - CGI is different from
FastCGI and there are differences across web servers. That's one of the
reasons pre-processing is kind of attractive IMHO. I suppose the v.8 config
file could play a role but I'm unsure what that would be beyond a place to
set values consistently.

On Tue, Apr 12, 2022 at 8:04 PM Steve Lime  wrote:

> Hi Paul: The idea of referencing environment variables has come up before.
> Another example would be to leverage settings injected into cloud
> deployments as environment variables (I think there's an old ticket that
> was recently re-opened on the topic). I'm not sure what the best way to
> handle this would be. One possibility would be using a mechanism similar to
> runtime subs where you'd reference the variables within the mapfile using
> ${variable} or whatever. Another idea would be to use a pre-processor of
> some sort to "compile" a mapfile from the environment. The latter would
> result in better performance since you'd generate the resulting file once
> and could also do things like inlining included snippets. This
> functionality would be helpful for the cloud deployments, simplifying
> deployments in multiple (dev, test, prod) environments and for keeping
> secrets out of repos altogether.
>
> We're putzing around with the pre-processing idea a bit but haven't gotten
> anything fully baked. Others?
>
> -Steve
>
> On Tue, Apr 12, 2022 at 4:56 AM Paul via MapServer-users <
> mapserver-users@lists.osgeo.org> wrote:
>
>> hi list, this has probably been discussed before, but maybe there are
>> updates (on v8?)
>>
>> we would like to extract the ows_onlineresource from the environment,
>> instead of having an administrator to configure it on the mapfile
>>
>> currently we implement a hack where the webserver layer sends an
>> additional query parameter `ows_url` to mapserver which contains the
>> current url
>>
>> in the mapfile this is implemented as
>>
>> ```
>>
>> WEBVALIDATION  "ows_url" 
>> "(\b(https?|ftp|file)://)?[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"
>> ENDMETADATA  "ows_onlineresource"   "%ows_url%"  
>>   ENDEND
>>
>> ```
>>
>> I wonder if others run into similar challenges, or if there are much more
>> simple best practices for this case.
>>
>> I can imagine allowing a environment parameter 'proxy-url' like geoserver
>> would make sense, but it should allow some kind of template, eg:
>>
>> ```
>> PROXY-URL https://example.com/cgi-bin/mapserv?map={map}.map
>> ```
>>
>> which in our case would be
>>
>> ```
>> PROXY-URL https://example.com/cgi-bin/{map}
>> ```
>>
>> Thank you, Paul.
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] dynamic ows_serviceurl

2022-04-12 Thread Steve Lime
Hi Paul: The idea of referencing environment variables has come up before.
Another example would be to leverage settings injected into cloud
deployments as environment variables (I think there's an old ticket that
was recently re-opened on the topic). I'm not sure what the best way to
handle this would be. One possibility would be using a mechanism similar to
runtime subs where you'd reference the variables within the mapfile using
${variable} or whatever. Another idea would be to use a pre-processor of
some sort to "compile" a mapfile from the environment. The latter would
result in better performance since you'd generate the resulting file once
and could also do things like inlining included snippets. This
functionality would be helpful for the cloud deployments, simplifying
deployments in multiple (dev, test, prod) environments and for keeping
secrets out of repos altogether.

We're putzing around with the pre-processing idea a bit but haven't gotten
anything fully baked. Others?

-Steve

On Tue, Apr 12, 2022 at 4:56 AM Paul via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> hi list, this has probably been discussed before, but maybe there are
> updates (on v8?)
>
> we would like to extract the ows_onlineresource from the environment,
> instead of having an administrator to configure it on the mapfile
>
> currently we implement a hack where the webserver layer sends an
> additional query parameter `ows_url` to mapserver which contains the
> current url
>
> in the mapfile this is implemented as
>
> ```
>
> WEBVALIDATION  "ows_url" 
> "(\b(https?|ftp|file)://)?[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"
> ENDMETADATA  "ows_onlineresource"   "%ows_url%"   
>  ENDEND
>
> ```
>
> I wonder if others run into similar challenges, or if there are much more
> simple best practices for this case.
>
> I can imagine allowing a environment parameter 'proxy-url' like geoserver
> would make sense, but it should allow some kind of template, eg:
>
> ```
> PROXY-URL https://example.com/cgi-bin/mapserv?map={map}.map
> ```
>
> which in our case would be
>
> ```
> PROXY-URL https://example.com/cgi-bin/{map}
> ```
>
> Thank you, Paul.
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Securing MapServer Deployments

2022-04-06 Thread Steve Lime
Nice job Seth, this is a really useful post! --Steve

On Fri, Apr 1, 2022 at 9:03 AM Seth G  wrote:

> Hi all,
>
> I've written a blog post on Securing MapServer Deployments at
> https://geographika.net/posts/securing_mapserver.html which also includes
> details on the new CONFIG file available in MapServer 8.0
> If anyone has any other tips or best practices around security, please
> send them on to the list,
>
> Seth
>
> --
> web:https://geographika.net
> twitter: @geographika
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] center in a map the results of [shpext]

2022-03-30 Thread Steve Lime
Trying to work up a demo that shows a couple of ways to do this... --Steve

On Mon, Mar 28, 2022 at 5:45 PM roman villarreal <
romanvillarre...@live.com.mx> wrote:

> Hi list i wish all of you are ok
>
> i hope some body can help me, im working with a mapserver templete to
> display the results of a ITEMQUERY in a map , in that query i get the
> searched object extents in the [shpext] variable (482125.35
> 2152693.00 482125.35 2152693.00) (point)
>
> How can i center in the template map the data of [shpext]? , because now,
> the results displays with the mapfile extents and the results not always
> are on the center of the map
>
> im using a very old versions because is an old proyect (ms4w: 3.0.6, ms:
> 6.0.3, pmapper: 4.3.2)
>
> thaks for all of your help
>
> regards
>
> Román
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] How can I get blur visual effect for lines or outlines?

2022-02-24 Thread Steve Lime
Thanks for doing this Lars, this is very helpful! --Steve

On Wed, Feb 23, 2022 at 9:32 AM  wrote:

> Hi,
>
> I have made an example about the layer Composition pipeline, since there
> are some missing information in the documentation.
>
> https://gist.github.com/LarsSchy/4aa75fd2a6bc7eb01a7cff9beb64b59a
>
>
>
>
>
> The mapfile in the GIST shows how to use the Composition pipeline. The
> examples are based on what Thomas B. has described on the users-list in the
> past.
> In addition to that I have added examples with a line and a point symbol.
>
> Have fun / Lars Schylberg
>
>
> 22 februari 2022 kl. 15:01, "Steve Lime"  > skrev:
>
> I don't believe you can set a blurring (or sharpening) filter. However,
> have a look at the layer composite feature (
> https://mapserver.org/mapfile/composite.html), it might get you a
> reasonable approximation of what you're looking for. --Steve
> On Mon, Feb 21, 2022 at 5:27 PM Kyle Qian  wrote:
>
> Hi, is there any way I can get blur visual effect for lines or outlines
> just like mapbox?
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] vector tiles?

2022-02-22 Thread Steve Lime
Correct. Rich, what docs would be most helpful?

On Sat, Feb 19, 2022 at 8:09 AM Thomas Gratier 
wrote:

> Hi,
>
> The code has been merged https://github.com/MapServer/MapServer/pull/5376
> but as you can see in the PR the documentation page has never been created.
> The demo code mentioned in the RFC works
> https://mapserver.org/development/rfc/ms-rfc-119.html#bug-id-and-references
>
>
> Regards
>
> Thomas Gratier
>
> Le sam. 19 févr. 2022 à 03:11, Richard Greenwood <
> richard.greenw...@gmail.com> a écrit :
>
>> Are vector tiles supported and documented? My searches only find RFC 119.
>>
>> --
>> Richard W. Greenwood
>> www.greenwoodmap.com
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] How can I get blur visual effect for lines or outlines?

2022-02-22 Thread Steve Lime
I don't believe you can set a blurring (or sharpening) filter. However,
have a look at the layer composite feature (
https://mapserver.org/mapfile/composite.html), it might get you a
reasonable approximation of what you're looking for. --Steve

On Mon, Feb 21, 2022 at 5:27 PM Kyle Qian  wrote:

> Hi, is there any way I can get blur visual effect for lines or outlines
> just like mapbox?
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserv cli and run-time substitution

2022-02-06 Thread Steve Lime
This should be the way to do it. No quotes around %year% in either
expression.

On Sun, Feb 6, 2022 at 4:32 AM Seth G  wrote:

> So does the following also work? Without quotes should mean it is treated
> as a number:
>
> EXPRESSION ([year] = %year%)
>
> --
> web:https://geographika.net
> twitter: @geographika
>
>
> On Sun, Feb 6, 2022, at 10:28 AM, andy wrote:
>
> Hi Seth,
> and thank you.
>
> On Sun, 6 Feb 2022 at 10:08, Seth G  wrote:
>
>
>
> Maybe the value is being treated as a string, so you could test if the
> following worked (equals rather than less than):
>
> EXPRESSION ("[year]" = "%year%")
>
>
> This works, but there are some points that seem strange to me:
>
> - if in the map file I set "[year] < 1976", it works. Than year is a
> number;
> - my layer source is a virtual file, a CSV, in which I set " name="year" src="year" type="integer"/>"
>
> So why do I have to set it as a string, if it is already set as a number
> and if it works as a number when I do not use run-time substitution?
> My files are in this compressed one:
> https://github.com/aborruso/blackboard/blob/gh-pages/trash/processing.7z
>
> Best regards
>
> --
> ___
>
> Andrea Borruso
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
> ___
>
> "cercare e saper riconoscere chi e cosa,
>  in mezzo all’inferno, non è inferno,
> e farlo durare, e dargli spazio"
>
> Italo Calvino
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserv cli and run-time substitution

2022-02-05 Thread Steve Lime
H... Looks right to me. Will need to run a test locally and report back.

On Sat, Feb 5, 2022 at 11:14 AM andy  wrote:

> Hi,
> I have this map file [1] in which I use this simple class expression
> "EXPRESSION ([year] < 1976)".
> Starting from it, I'm able to create the png output I want, running:
>
> mapserv -nh "QUERY_STRING=map=data.map=map" >out.png
>
> But if I replace the hard coded year value with '%year%', and then I run
> this command
>
> mapserv -nh "QUERY_STRING=map=data.map=map=1976" >out.png
>
> I have a wrong PNG output, in which the layer that has the run-time
> substitution variable is not rendered properly, because it seems that the
> value is not collected.
>
> What's wrong with my steps? How to use run-time substitution via cli?
>
> Thank you,
>
> Andrea
>
> [1] https://gist.github.com/aborruso/f40da26ec0cb9daa8cb7b308189ce3b3
>
>
> --
> ___
>
> Andrea Borruso
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
> ___
>
> "cercare e saper riconoscere chi e cosa,
>  in mezzo all’inferno, non è inferno,
> e farlo durare, e dargli spazio"
>
> Italo Calvino
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] working with ESRI coordinate systems in proj.db

2022-01-06 Thread Steve Lime
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@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] QSTRING HELP

2021-12-13 Thread Steve Lime
1) You didn’t say which version (hopefully latest, greatest) but you should
only need the entry in the validation block. Note an “anything” validation
is not recommended.
2) A qstring with no qitem is interpreted as a MapServer logical expression
I believe, and your example is not a valid expression. What exactly is
returned, I mean, what does empty mean? There might indicate a bug and a
expression parsing error is being suppressed some where.
3) A qitem+qstring is meant to cover a very simple use case. You’d need to
use a plain qstring or even better, WFS to do something more complex.

On Sat, Dec 11, 2021 at 8:54 AM Carlos Neves (LREC)  wrote:

> Hi list,
>
> I need to query and highlite a map in a Mapserver layer using ITEMNQUERY
>
> 1st -  I have validate qstring for any character
>
>  METADATA
>  "wms_title" "counties"
>  "qstring_validation_pattern" ".*"
>  END
>  VALIDATION
> "qstring" ".*"
>  END
>
> 2nd - I'm not sure, but it seems in Mapserver Manual that  QITEM is an
> option and you can use expressions like "qstring=county_name = New
> York". I have no mapserver return error  but the query allways returns
> empty.
>
>
> 3rd - With CGI qlayer=counties=county_name=New  it works,
> but i need to use others items  and others search conditions like
> substrings like "New Jersey" or "New York"
>
>
> Any help would be appreciated
>
> Carlos
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Corrupted PNG issue

2021-11-23 Thread Steve Lime
So that's 3 reports of issues with the GIS Internals build(s) then. Still
could be MapServer-based though...

On Tue, Nov 23, 2021 at 7:30 AM James Passmore - BGS 
wrote:

> Possibly not related, but I reported an issue to Tamas Szekeres
> (gisinternals) back in March against
> release-1928-x64-gdal-3-2-1-mapserver-7-6-2(dfdda8a 258d73a) then again in
> May with release-1928-x64-gdal-3-3-0-mapserver-7-6-3.zip (7c05724
> eeeffe6).  I could not get GetMap or GetLegendGraphic to work against my
> data, which is working against 7.4.0.
>
> WFS and WMS GetFeatureInfo were working as expected.
>
> James
>
>
>
>
> This email and any attachments are intended solely for the use of the
> named recipients. If you are not the intended recipient you must not use,
> disclose, copy or distribute this email or any of its attachments and
> should notify the sender immediately and delete this email from your
> system. UK Research and Innovation (UKRI) has taken every reasonable
> precaution to minimise risk of this email or any attachments containing
> viruses or malware but the recipient should carry out its own virus and
> malware checks before opening the attachments. UKRI does not accept any
> liability for any losses or damages which the recipient may sustain due to
> presence of any viruses.
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Corrupted PNG issue

2021-11-22 Thread Steve Lime
John: What happens if you take WMS out of the equation, so:

  mapserv.exe -nh "QUERY_STRING=
map=dynamic\5708d96b-c606-4c35-95e7-085fedc1dcce.map=map" > test.png

--Steve

On Fri, Nov 19, 2021 at 1:01 PM John Huotari  wrote:

> Thanks for the feedback Jukka, Steve, and Seth.
>
>
>
> Using mapserv.exe –nh at the command line produces the same corrupt PNGs
> as I get through a web server.
>
>
>
> Using MapServer 7.7.0dev from MS4W as Jukka suggested produces good PNGs,
> so that’s a viable alternative for me.
>
>
>
> I’ve done some playing around with different versions available from
> GISInternals and it appears that PNG images generate fine up through their
> GDAL 3.2.1 and MapServer 7.6.2 version
> (release-1900-x64-gdal-3-2-1-mapserver-7-6-2), but started producing
> corrupt PNGs in their GDAL 3.2.2 and MapServer 7.6.2 version
> (release-1928-x64-gdal-3-2-2-mapserver-7-6-2).
>
>
>
> If anyone with Windows wants to attempt to reproduce, the older
> GISInternals versions are available here:
> https://www.gisinternals.com/archive.php
>
>
>
> And the .map file I’m using for testing this is just hitting a
> publicly-available WMS.
>
>
>
> MAP
>
>   NAME "MAP"
>
>   CONFIG "MS_ERRORFILE" "c:/temp/ms_error.txt"
>
>   CONFIG "PROJ_LIB" "C:/ms/projlib/"
>
>   EXTENT -20037508.342789244 -20037508.342789244 20037508.342789244
> 20037508.342789244
>
>   SIZE 256 256
>
>   SYMBOLSET "c:\ms\symbols.txt"
>
>   FONTSET "c:\ms\fonts.txt"
>
>   IMAGECOLOR 255 255 255
>
>   TRANSPARENT ON
>
>   DEFRESOLUTION 72
>
>   RESOLUTION 72
>
>   UNITS meters
>
>   PROJECTION "init=epsg:3857" END
>
>   WEB
>
> METADATA
>
>   "wms_enable_request" "*"
>
> END
>
>   END
>
>   LAYER
>
> STATUS DEFAULT TYPE RASTER NAME "WMS_DRG"
>
> CONNECTIONTYPE WMS CONNECTION "
> https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer
> ?"
>
> PROJECTION "init=epsg:3857" END
>
> METADATA
>
>   "wms_srs"  "EPSG:3857"
>
>   "wms_name"  "0"
>
>   "wms_server_version"  "1.1.1"
>
>   "wms_format"  "image/png"
>
> END
>
>   END
>
> END
>
>
>
>
>
>
>
>
>
> *From:* Steve Lime 
> *Sent:* Thursday, November 18, 2021 8:53 AM
> *To:* John Huotari 
> *Cc:* mapserver-users@lists.osgeo.org
> *Subject:* [EXTERNAL] Re: [mapserver-users] Corrupted PNG issue
>
>
>
> Hmmm... I've not run into or heard of this before although I'm not a
> windows user. I did a quick sanity check with a mapfile here and the latest
> 7.4 and 7.6 versions. While not exactly the same setup you have in terms of
> versions, they produce the exact same png image.
>
>
>
> What do you get for output if you use mapserv.exe at the command line? So
> something like:
>
>
>
>   mapserv.exe -nh "QUERY_STRING=
> map=dynamic\5708d96b-c606-4c35-95e7-085fedc1dcce.map=WMS=1.3.0=GetMap=image%2Fpng=true=MAP=true=512=512=EPSG%3A3857==-10877294.873093722%2C5536486.832751887%2C-10876071.880641159%2C5537709.82520445"
> > test.png
>
>
>
> That would take PostMan and the web server out of the picture. Is there
> any chance different versions of libpng are being used? What are you using
> to manage the tiles?
>
>
>
> --Steve
>
>
>
> On Wed, Nov 17, 2021 at 4:57 PM John Huotari via MapServer-users <
> mapserver-users@lists.osgeo.org> wrote:
>
> I’m attempting to upgrade from MapServer 7.6.1 to 7.6.4 via compiled
> packages obtained from GISInternals.  I’m running it on Windows/IIS and
> whereas 7.6.1 was generating .PNG tiles perfectly for me, after upgrading
> to 7.6.4, the .PNGs being created appear to be corrupt.  I can replace the
> 7.6.4 exe and dlls with 7.6.1 versions and the PNG images generate fine
> again, so while there are quite a few places that could introduce an issue,
> with the exception of a change to MapServer everything would be identical
> in my stack between having the issue in 7.6.4 and not in 7.6.1.
>
>
>
> The good headers from 7.6.1 look like this
>
>
>
> 89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52
>
>
>
> and the corrupted ones from 7.6.4 look like this
>
>
>
> 89 50 4e 47 0d 0d 0a 1a 0d 0a 00 00 00 0d 49 48 44 52
>
>
>
> It appears that the 0a values from the valid header are being converted to
> 0d 0a.  I might be wrong here, but it

Re: [mapserver-users] Corrupted PNG issue

2021-11-18 Thread Steve Lime
Hmmm... I've not run into or heard of this before although I'm not a
windows user. I did a quick sanity check with a mapfile here and the latest
7.4 and 7.6 versions. While not exactly the same setup you have in terms of
versions, they produce the exact same png image.

What do you get for output if you use mapserv.exe at the command line? So
something like:

  mapserv.exe -nh "QUERY_STRING=
map=dynamic\5708d96b-c606-4c35-95e7-085fedc1dcce.map=WMS=1.3.0=GetMap=image%2Fpng=true=MAP=true=512=512=EPSG%3A3857==-10877294.873093722%2C5536486.832751887%2C-10876071.880641159%2C5537709.82520445"
> test.png

That would take PostMan and the web server out of the picture. Is there any
chance different versions of libpng are being used? What are you using to
manage the tiles?

--Steve

On Wed, Nov 17, 2021 at 4:57 PM John Huotari via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> I’m attempting to upgrade from MapServer 7.6.1 to 7.6.4 via compiled
> packages obtained from GISInternals.  I’m running it on Windows/IIS and
> whereas 7.6.1 was generating .PNG tiles perfectly for me, after upgrading
> to 7.6.4, the .PNGs being created appear to be corrupt.  I can replace the
> 7.6.4 exe and dlls with 7.6.1 versions and the PNG images generate fine
> again, so while there are quite a few places that could introduce an issue,
> with the exception of a change to MapServer everything would be identical
> in my stack between having the issue in 7.6.4 and not in 7.6.1.
>
>
>
> The good headers from 7.6.1 look like this
>
>
>
> 89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52
>
>
>
> and the corrupted ones from 7.6.4 look like this
>
>
>
> 89 50 4e 47 0d 0d 0a 1a 0d 0a 00 00 00 0d 49 48 44 52
>
>
>
> It appears that the 0a values from the valid header are being converted to
> 0d 0a.  I might be wrong here, but it appears to me that something is
> interpreting the 0a as a line feed and given the code is running on
> Windows, is converting that LF into a CR LF.  The replacement doesn’t seem
> to be limited to the file header as I see the 7.6.4 version of the file is
> slightly larger (18,571 bytes instead of 18,407 bytes) and in spot
> checking, I’ve verified some additional 0d’s exist precede 0a within the
> data blocks of the .PNG.  Has anyone experienced anything like this or know
> of any fixes?
>
>
>
> PNG Images produced on the server with shp2img are just fine, it’s only
> images produced by making a WMS request to mapserv.exe that have the
> issue.  An example WMS request would be
>
>
>
> https:// Removed>/mapserv.exe?map=dynamic\5708d96b-c606-4c35-95e7-085fedc1dcce.map=WMS=1.3.0=GetMap=image%2Fpng=true=MAP=true=512=512=EPSG%3A3857==-10877294.873093722%2C5536486.832751887%2C-10876071.880641159%2C5537709.82520445
>
>
>
> Maybe I’m completely misdiagnosing the problem as these PNG image files
> just show up as corrupted within a browser – for example FireFox reports
> “The image  cannot be displayed because it contains
> errors.”  The way I obtained the actual .PNG images to view in a binary
> editor was to use PostMan and save the body of the results.  Perhaps
> PostMan introduced the extra bytes when saving an unrecognizable format
> file to disk whereas it did not when saving a file it recognized as a valid
> PNG.  I can’t find anything different between the valid and invalid files
> beyond the extra 0d’s that have been added though, so I don’t think PostMan
> or anything else in the chain introduced them.
>
> *** PLEASE NOTE ***
> This message, along with any attachments, is for the designated
> recipient(s) only and may contain privileged, proprietary, or otherwise
> confidential information. If this message has reached you in error, kindly
> destroy it without review and notify the sender immediately. Any other use
> of such misdirected e-mail by you is prohibited. Where allowed by local
> law, electronic communications with Zurich and its affiliates, including
> e-mail and instant messaging (including content), may be scanned for the
> purposes of information security and assessment of internal compliance with
> company policy.
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] (no subject)

2021-10-07 Thread Steve Lime
I've not used a similar setup but it seems like there's no need to create
tiles if you're passing WMS calls through to another WMS server. Do you get
tiles if you make tiled service requests?

On Tue, Oct 5, 2021 at 1:52 PM Atlanta Geek  wrote:

> Im attempting to configure mapcache.
> I assume that this is covered in this mailing list as well.  Mapcache is
> returning images of the map for me but the cache files are not being
> written.  Its strange because I can use the seeding command with the same
> xml file and its populating the expected directory but when I go through
> the mapcache script its not writing to that cache directory.
>
> Any guidance would be appreciated.
>
> The URL Im testing with is this.
>
> http://192.168.112.225/mapcache?service=WMS=GetMap=default==image%2Fpng=true=1.1.1=2048=2048=EPSG%3A3857=-10018754.171394622,0,0,10018754.171394628
>
>
>
> mapcache.xml is as follows:
> 
>
>/tmp/mapcache
>   
>
> 
>fast
>256
> 
>
>   
>  
> image/jpeg
> default
> /usr/lib/cgi-bin/osm-bw.map
> true
>  
>   
>   
>  http://192.168.112.225/cgi-bin/mapserv?
>   
>
>
>   vmap0
>   disk
>   WGS84
>   g
>   png
>   3600
>
>png
>
>
>   png
>   assemble
>   bilinear
>   4096
>   
> 
>   
> http://192.168.112.225/cgi-bin/mapserv?transparent=true=/usr/lib/cgi-bin/osm-bw.map
> 
> 
>   
>
>
>
>
>
>
>
>report
>/tmp
>debug
> 
> --
> http://www.atlantageek.com
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Tile Mode Output Format

2021-09-22 Thread Steve Lime
Try map.imagetype=jpeg...

On Tue, Sep 21, 2021 at 2:56 PM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> It seems that formats were not considered at all
> https://mapserver.org/development/rfc/ms-rfc-43.html
>
>
>
> -Jukka Rahkonen-
>
>
>
>
>
> *Lähettäjä:* MapServer-users  
> *Puolesta
> *Patrick Young
> *Lähetetty:* tiistai 21. syyskuuta 2021 22.41
> *Vastaanottaja:* mapserver-users@lists.osgeo.org
> *Aihe:* [mapserver-users] Tile Mode Output Format
>
>
>
> Hello,
>
>
>
> Is it possible to change the output format returned when using tile mode
> via a query string parameter?  I've tried a few parameters (e.g.
> ?IMAGETYPE=jpeg) but no luck, it seems to always use what IMAGETYPE is set
> to in the map file.
>
>
>
> Many Thanks,
>
> Patrick
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Recoloring a raster...

2021-09-16 Thread Steve Lime
No, you didn't misunderstand, that's what I was looking for (duh)...
However, I get really inconsistent behavior using that method. Partially
because upon closer inspection my RGB has more than 6 colors
(anti-aliasing). Still large blocks of pixels don't match when using an
expression like ([red] = 255 AND [green] = 0 AND [blue] = 0) even though
they should, based on inspection with a tool like Photoshop. I figured out
a workaround.

On Thu, Sep 16, 2021 at 12:26 PM Daniel Morissette 
wrote:

> Maybe I misunderstood the question, is it not what raster class
> expressions are for?
>
> https://mapserver.org/input/raster.html#classifying-rasters
>
>CLASS
>  NAME "red -> blue"
>  EXPRESSION ([red] = 255 AND [green] = 0 AND [blue] = 0)
>  STYLE
>COLOR 0 0 255
>  END
>END
>
>
> On 2021-09-16 12:46, Steve Lime wrote:
> > Hi all: I think this is possible. What's the easiest/best way to recolor
> > a raster image, so for example, turning all pixels of 255 0 0 to 0 0
> > 255? There are only 6 colors in the input image I need to deal with.
> >
> > --Steve
> >
> > ___
> > MapServer-users mailing list
> > MapServer-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
>
> --
> Daniel Morissette
> Mapgears Inc
> T: +1 418-696-5056 #201
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Recoloring a raster...

2021-09-16 Thread Steve Lime
Hi all: I think this is possible. What's the easiest/best way to recolor a
raster image, so for example, turning all pixels of 255 0 0 to 0 0 255?
There are only 6 colors in the input image I need to deal with.

--Steve
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Potential bug when using Layer-Tile-Index where indexed files are GeoTiff files

2021-09-14 Thread Steve Lime
I'd agree this is a bug - just not sure what the fix should be.

On Mon, Sep 6, 2021 at 4:21 AM Sommer, Ashley (L, Dutton Park)
 wrote:

> Hi Everyone,
> I'm trying to get WCS service with TIME parameter support working on
> latest Mapserver.
> My data is a timeseries of large geotiff files, in a directory, with the
> date encoded in the filename.
> Eg:
>  - /datasets/mydataset/v1/layer1/raster_2020-08-01.tif
>  - /datasets/mydataset/v1/layer1/raster_2020-08-02.tif
>  - etc.
> I'm had it working on the WMS side of things, simply using Runtime
> Substitution, and embedding the TIME parameter into the DATA directive.
> eg:
>   DATA "/datasets/mydataset/v1/layer1/raster_%time%.tif"
> That worked for WMS, but not for WCS. When Mapserver's WCS service
> encounters a TIME parameter, it assumes I'm using a tile index. If there is
> no tile index, it errors out.
>
> So I create a tile index for this dataset. Using gdaltindex for a record
> of "location" for each raster, then adding a temporal attribute to the dbf
> file, and assigning dates to each of the records.
> I then tried to use that in place of DATA:
> LAYER
>   NAME "mylayer"
>   TILEINDEX "/datasets/mydataset/v1/layer1/index.shp"
>   TILEITEM "location"
> END
> Unfortunately, that doesn't work, because Mapserver now requires the use
> of new-style Layer-Tile-Index directives in order for WCS to work properly.
> So I changed it to:
> LAYER
>   NAME "MyIndex"
>   TILEINDEX "/datasets/mydataset/v1/layer1/index.shp"
>   TILEITEM "location"
> END
> LAYER
>   TILEINDEX "MyIndex"
>   TILEITEM "location"
> END
>
> This now works to some extent, but then I get an error:
> msTiledSHPTryOpen(): Unable to access file. Unable to open shapefile
> 'raster_2020-08-02.tif' for layer 'MyIndex' ... fatal error.
> msShapefileOpen(): Unable to access file. (/tmp/raster_2020-08-02.tif)
> msShapefileOpen(): Unable to access file.
> (/datasets/mydataset/v1/layer1/raster_2020-08-01.tif)
>
> I believe I have tracked down why this is happening, and I believe it is a
> bug.
> 1) Mapserver _can_ open the .shp and .dbf file at the location. It must be
> able to to get the file location from the dbf index.
> 2) msTiledSHPTryOpen() is a helper fn that runs _after_ opening a tile
> index, to test if we can open the first-indexed file (to template some
> parts of the layer).
> See comment here:
> https://github.com/MapServer/MapServer/blob/0d156a72893b1df712cb49c1b3ddaeed5365a68b/mapshape.c#L2028
> See also msTileSHPTryOpen fn here:
> https://github.com/MapServer/MapServer/blob/0d156a72893b1df712cb49c1b3ddaeed5365a68b/mapshape.c#L1868
> 3) So msTiledSHPTryOpen() tries to open the first-indexed file:
> "/datasets/mydataset/v1/layer1/raster_2020-08-02.tif" but returns an error,
> even though it _can_ open that file.
> The problem is, it is using msShapefileOpen() to do this, which in-turn
> uses msSHPOpen() to open the tif file:
> See msShapefileOpen fn:
> https://github.com/MapServer/MapServer/blob/0d156a72893b1df712cb49c1b3ddaeed5365a68b/mapshape.c#L1665
> See opener:
> https://github.com/MapServer/MapServer/blob/0d156a72893b1df712cb49c1b3ddaeed5365a68b/mapshape.c#L1686
> 4) msSHPOpen() assumes whatever file its opening will have a .shp file and
> a .shx file.
> In this case, it's trying to open a .tif file. The function tries to open
> a non-existent /datasets/mydataset/v1/layer1/raster_2020-08-02.shp file.
> See the implementation here:
> https://github.com/MapServer/MapServer/blob/0d156a72893b1df712cb49c1b3ddaeed5365a68b/mapshape.c#L194
> And where it opens a file here:
> https://github.com/MapServer/MapServer/blob/0d156a72893b1df712cb49c1b3ddaeed5365a68b/mapshape.c#L252
>
> So I believe it is a bug to use msShapefileOpen() to test if a tileindex
> can open a file at its first-indexed location, because that file may not be
> a .shp file.
>
> I might be able to put in a PR to fix the bug, but I don't know the
> codebase well enough to not potentially introduce regressions.
> Let me know what you think?
>
> - Ashley Sommer
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] serving WMS GetFeatureInfo to ESRI JavaScript client

2021-09-09 Thread Steve Lime
Hi Rich! I didn't see any replies to this email and I don't have any
particular experience. That said, it seems to me that the vendor that is
receiving the content would want it in some sort of presentation agnostic
format so that they can apply a design, choose which attributes to display
and so forth. So HTML doesn't make that much sense and standard XML/GML
responses would be better IMHO.

--Steve

On Wed, Sep 1, 2021 at 5:31 PM Richard Greenwood <
richard.greenw...@gmail.com> wrote:

> I need to serve WMS GetFeatureInfo requests in a suitable format for an
> ESRI JavaScript client. I'm asking if anyone has any tips or experience
> they could share.
>
> I'm not developing the client. I'm serving the content to a company that's
> used to using ESRI REST services and doesn't have any experience with WMS.
> I don't have any experience with the ESRI JavaScript client.
>
> From what little I've found so far the request is typically
>   INFO_FORMAT=text/html
> but the response is formatted as XML. Should the response mime type be
> text/xml or does it matter? Is there an XML structure that the ESRI client
> expects to receive or is that entirely up to the app developer?
>
> Thanks,
> Rich
>
> --
> Richard W. Greenwood, PLS
> www.greenwoodmap.com
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] offset and symbolscaledenom

2021-09-01 Thread Steve Lime
Not that I know of - unless you did so yourself via MapScript. This seems
like a limitation of the current implementation rather than a bug. We'd
need to add additional parameters to limit the offsets (e.g. MINOFFSET,
MAXOFFSET). --Steve

On Fri, Aug 27, 2021 at 2:18 PM Travis Kirstine 
wrote:

> Is there a method to scale the offset value between min / max sizes when
> using symbolscaledenom.  I'm trying to scale and offset a label but it
> appears the offset is static based on the symbolscaledenon.
>
> Thanks
>
> mapfile
>
> LAYER
> 
> SYMBOLSCALEDENOM 1000
> CLASS
>   NAME "label"
>   EXPRESSION "POINT"
>   LABEL
> OFFSET 0 12
> FONT arial
> SIZE 12
> MINSIZE 8
> MAXSIZE 12
> TYPE truetype
> COLOR 0 0 0
> STYLE
>   GEOMTRANSFORM 'labelpoly'
>   COLOR "#ff4f"
> END
>   END
> END
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [Feature Request] Ability to extract capture group contents from regex validation

2021-07-28 Thread Steve Lime
Interesting idea, certainly not crazy. I'm not sure what's possible with
regex libs commonly used with MapServer builds.

On Tue, Jul 27, 2021 at 6:34 AM Trond Michelsen <
trondmm-mapserver+2...@crusaders.no> wrote:

> This sounds like a good idea to me, but I would suggest to use named
> capture groups. In perl, this uses this syntax: (?pattern). So,
> in this example, it could be:
>
> "datetime" "^(?[0-9]{4})[-_](?[0-9]{2})[-_](?[0-9]{2})$"
> # <- 3 capture groups
>
> And the result could then be used in substitution as: %year%, %month%
> and %day%. Maybe with an added prefix, but I'd prefer without, tbh.
>
> On Tue, Jul 27, 2021 at 06:12:44AM +, Sommer, Ashley (L, Dutton
> Park) wrote:
> > Hi All,
> > This is slightly related to my previous thread today, but more general.
> >
> > I want to gauge interested in this idea.
> > I want to be able to use Runtime Substitution mechanisms to do something
> like this:
> >
> > MAP
> >   ...
> >   VALIDATION
> > "datetime" "^([0-9]{4})[-_]([0-9]{2})[-_]([0-9]{2})$" # <- 3 capture
> groups
> >   END
> >
> >   LAYER
> > DATA "/mnt/dataset/%datetime_1%/%datetime_2%/%datetime_3%.tif"
> > ...
> >   END
> >   ...
> > END
> >
> > Where the query with =2018-01-29 is split into parts using
> capture groups 1, 2, and 3 from the validation regex, and stored as new
> runtime substitution variables: %datetime_1%, %datetime_2%, and
> %datetime_3%.
> > Then using these values, substitute them into the DATA string (or any
> other valid substitution point).
> > Substituted:
> > DATA "/mnt/dataset/2018/01/29.tif"
> >
> > The regex mechanism to validate the incoming parameter value is already
> in place, and it seems like just one more little step is needed to save the
> captured groups into new runtime substitution variables.
> >
> > - Ashley Sommer
>
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> --
> Trond Michelsen
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] CGI variable "map" fails to validate.

2021-06-03 Thread Steve Lime via mapserver-users
I should note that 7.6.3 (also 7.4.5, 7.2.3 and 7.0.8) should make defining
a value for MS_MAP_PATTERN much simpler. We updated things to use two
filters instead of one. The first, MS_MAP_BAD_PATTERN, checks for
problematic character sequences in the map value, for example /./, /../ or
// and fails if there is a match. This means you don't have to account for
those with MS_MAP_PATTERN alone and you can just write something simple
like:

  MS_MAP_PATTERN "^\/etc\/mapserver"

You need to be running the latest version for this to work as intended and
of course that's strongly recommended.

--Steve


On Thu, Jun 3, 2021 at 8:12 AM Jeff McKenna via mapserver-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi David,
>
> MS4W also uses PCRE for its regex engine, so Windows users will soon be
> facing these same issues as you (I'll be making this as easy as possible
> for the new Windows users).
>
> So to answer your question: I believe most users aren't yet aware of
> what regex engine they use, and, also I believe that the PCRE regex
> engine is used more frequently in the MapServer community than what is
> believed.  (most automated tests do not use PCRE, for example, even
> though it is so commonly used)
>
> I'm not sure if I have the answer that you need, but I wanted to give a
> perspective from the Windows side.
>
> -jeff
>
>
> --
> Jeff McKenna
> GatewayGeo: Developers of MS4W, MapServer Consulting and Training
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
> On 2021-06-03 9:29 a.m., David Pavlíček via mapserver-users wrote:
> > Hi Steve,
> > your pattern works like a charm... escaped hyphen was the issue. I
> > tested the previous regex with regex101.com <http://regex101.com> and
> it
> > matches with no problems against most of the available variants except
> > PCRE. Which regex engine is suitable for a test against MapServer?
> >
> > Thank you.
> >
> > st 2. 6. 2021 v 15:16 odesílatel Steve Lime  > <mailto:sdl...@gmail.com>> napsal:
> >
> > Hi David: Presumably the Docker image is running the most recent
> > version of 7.4 which would have that pull request applied. That
> > said, I don't think it's the culprit here and I have seen some
> > issues with -'s where the MS_MAP_PATTERN expression compiles fine
> > but doesn't match as expected. Re-writing the expression to move the
> > - character can help. Try this:
> >
> >
> >
>  
> MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$
> >
> > --Steve
> >
> > On Wed, Jun 2, 2021 at 3:07 AM David Pavlíček via mapserver-users
> >  > <mailto:mapserver-users@lists.osgeo.org>> wrote:
> >
> > Hello,
> > I'm using camptocamp/mapserver:7.4 docker image to run mapserver
> > on our servers and I have recently encountered this error:
> >
> > [warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web
> > application error. CGI variable "map" fails to validate.
> > 2098 - 172.17.0.1 - - [02/Jun/2021:04:57:42 +] "GET
> >
>  
> /?map=/etc/mapserver/puobod/krpk-puobod-red.map=getcapabilities=WMS"
> >
> > In fact, any mapfile with hyphens won't work. They fail against
> > MS_MAP_PATTERN regex or something. This is strange because I
> > tested this regex and it works fine. Container MS ENV variables
> > look like this:
> >
> > MS_ERRORFILE=stderr
> >
>  
> MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$
> > MS_DEBUGLEVEL=0
> > MS_MAPFILE=/etc/mapserver/mapserver.map
> >
> > Maybe something related to this PR:
> > https://github.com/MapServer/MapServer/pull/6314
> > <https://github.com/MapServer/MapServer/pull/6314>
> >
> > Any suggestions about that? Renaming project is not an option
> > because they are referenced in many places outside of our direct
> > reach (GIS clients, servers, etc)
> >
> > Thanks, David
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] CGI variable "map" fails to validate.

2021-06-02 Thread Steve Lime via mapserver-users
Hi David: Presumably the Docker image is running the most recent version of
7.4 which would have that pull request applied. That said, I don't think
it's the culprit here and I have seen some issues with -'s where the
MS_MAP_PATTERN expression compiles fine but doesn't match as expected.
Re-writing the expression to move the - character can help. Try this:


MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$

--Steve

On Wed, Jun 2, 2021 at 3:07 AM David Pavlíček via mapserver-users <
mapserver-users@lists.osgeo.org> wrote:

> Hello,
> I'm using camptocamp/mapserver:7.4 docker image to run mapserver on our
> servers and I have recently encountered this error:
>
> [warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web application error.
> CGI variable "map" fails to validate.
> 2098 - 172.17.0.1 - - [02/Jun/2021:04:57:42 +] "GET
> /?map=/etc/mapserver/puobod/krpk-puobod-red.map=getcapabilities=WMS"
>
> In fact, any mapfile with hyphens won't work. They fail against
> MS_MAP_PATTERN regex or something. This is strange because I tested this
> regex and it works fine. Container MS ENV variables look like this:
>
> MS_ERRORFILE=stderr
>
> MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$
> MS_DEBUGLEVEL=0
> MS_MAPFILE=/etc/mapserver/mapserver.map
>
> Maybe something related to this PR:
> https://github.com/MapServer/MapServer/pull/6314
>
> Any suggestions about that? Renaming project is not an option because they
> are referenced in many places outside of our direct reach (GIS clients,
> servers, etc)
>
> Thanks, David
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Steve Lime
Worth adding to main?

On Wed, May 19, 2021 at 10:15 AM Eichner, Andreas - SID <
andreas.eich...@sid.sachsen.de> wrote:

> If you want to give Cairo a try, you could modify mapcairo.c like this:
>
> diff --git a/mapcairo.c b/mapcairo.c
> index 0f4cc094..d28947d6 100644
> --- a/mapcairo.c
> +++ b/mapcairo.c
> @@ -517,6 +517,12 @@ imageObj* createImageCairo(int width, int height,
> outputFormatObj *format,colorO
>
>  cairo_set_line_cap (r->cr,CAIRO_LINE_CAP_ROUND);
>  cairo_set_line_join(r->cr,CAIRO_LINE_JOIN_ROUND);
> +{
> +const char* antialias = msGetOutputFormatOption(format,
> "ANTIALIAS", "TRUE");
> +if (EQUAL(antialias, "OFF") || EQUAL(antialias, "FALSE") ||
> EQUAL(antialias, "0")) {
> +cairo_set_antialias(r->cr, CAIRO_ANTIALIAS_NONE);
> +}
> +}
>  image->img.plugin = (void*)r;
>} else {
>  msSetError(MS_RENDERERERR, "Cannot create cairo image of size %dx%d.",
>
> This adds a FORMATOPTION "ANTIALIAS" to the CAIRO/*-Drivers that defaults
> to TRUE. But when explicitly set to 0/OFF/FALSE it calls
> cairo_set_antialias() to disable it. The raster buffer created by the CAIRO
> renderer is passed to the PNG writer which enables COMPRESSION,
> PALETTE_FORCE, QUANTIZE_FORCE. So you can combine it:
>
>  OUTPUTFORMAT
>NAME "cairopng"
>DRIVER CAIRO/PNG
>MIMETYPE "image/png"
>IMAGEMODE RGB
>EXTENSION "png"
>FORMATOPTION "ANTIALIAS=FALSE"
>FORMATOPTION "QUANTIZE_FORCE=ON"
>FORMATOPTION "QUANTIZE_COLORS=256"
>FORMATOPTION "COMPRESSION=9"
>  END
>
> I used the msautotest/renderers/line_simple.map example to test and that
> crushed the resulting png from 5920 bytes down to 947 bytes.
>
> HTH, Andreas
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-18 Thread Steve Lime
If you don't care about quality then JPEG is an option... ;-) I also wonder
if there are ways to create true 8-bit output in other ways. No way GD
comes back.

On Tue, May 18, 2021 at 1:12 PM Richard Greenwood <
richard.greenw...@gmail.com> wrote:

> Oops - typo there, reducing the colors from 256 to *125* reduced the
> image size by about 15%.
>
> On Tue, May 18, 2021 at 12:11 PM Richard Greenwood <
> richard.greenw...@gmail.com> wrote:
>
>> Bob - I think GD was quite unpopular with the developers. Thomas Bonfort
>> was pretty adamant about removing it. I'm hoping that there may be options
>> in AGG.
>>
>> Seth - FORMATOPTION "COMPRESSION=9" only reduced the size by about 3% in
>> my lines and text test case.
>>
>> Even - the default AGG/PNG8 has QUANTIZE_FORCE=on
>> and QUANTIZE_COLORS=256. I think I remember you saying somewhere that
>> reducing the number of colors mostly just reduced the pallet size and
>> that's pretty much what I see. e.g. reducing the pallet from 256 to 15
>> colors reduces the image size by about 15% in my lines and text test.
>>
>> Thanks all for the suggestions.
>> Rich
>>
>>
>> On Tue, May 18, 2021 at 11:49 AM Even Rouault 
>> wrote:
>>
>>> Forcing paletted images using QUANTIZE_FORCE=on and decreasing the number 
>>> of colors with QUANTIZE_COLORS can also help:
>>>
>>>  FORMATOPTION "QUANTIZE_FORCE=on"
>>>  FORMATOPTION "QUANTIZE_COLORS=200"
>>>
>>> Le 18/05/2021 à 19:30, Seth G a écrit :
>>>
>>> I've not used it but the following might help for the AGG/PNG driver:
>>>
>>> FORMATOPTION "COMPRESSION=9"
>>>
>>> https://mapserver.org/mapfile/outputformat.html
>>>
>>> The default is 6.
>>>
>>> --
>>> web:http://geographika.co.uk
>>> twitter: @geographika
>>>
>>>
>>> On Tue, May 18, 2021, at 7:16 PM, Basques, Bob (CI-StPaul) wrote:
>>>
>>> All,
>>>
>>>
>>>
>>> I know the GD stuff has been a long running conversation in the
>>> MapServer realm, but does this indicate that maybe discussing something on
>>> adding GD back in might be prudent?  Or are there methods to get down to
>>> these previous files sizes with the newer approaches?
>>>
>>>
>>>
>>> I have the same concerns related to image size from the performance
>>> side, and running on Mobile in our case.
>>>
>>>
>>>
>>> Bobb
>>>
>>>
>>>
>>>
>>>
>>> *From: *mapserver-users 
>>>  on behalf of Richard
>>> Greenwood  
>>> *Date: *Tuesday, May 18, 2021 at 11:50 AM
>>> *To: *"mapserver-users@lists.osgeo.org"
>>>  
>>> 
>>> *Subject: *[mapserver-users] anti-aliasing (was differing image size
>>> with different mapserver versions)
>>>
>>>
>>>
>>> *Think Before You Click: *This email originated *outside *our
>>> organization.
>>>
>>>
>>>
>>> Thanks to several helpful replies to my previous thread I know that the
>>> increased image size between MapServer 6 with the GD driver and MapServer 7
>>> with the AGG driver is due to differences in anti-aliasing (and lack of) in
>>> the two drivers. (AGG features anti-aliasing and sub-pixel resolution
>>> ).
>>>
>>>
>>>
>>> Gamma setting from 0-1 affects the size of a filled polygon layer by a
>>> factor of almost 3x. But gamma has no effect on text, lines, and polygon
>>> outlines. So images comprised of these types of features are approximately
>>> 2x larger with the AGG/PNG8 driver than with the GD/GIF driver.
>>>
>>>
>>>
>>> Where else should I be looking to reduce my images sizes? I serve rural
>>> areas with poor internet so in my case, smaller image sizes are more
>>> important than higher quality images.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Rich
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Richard W. Greenwood, PLS
>>> www.greenwoodmap.com
>>>
>>>
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>
>>> ___
>>> mapserver-users mailing 
>>> listmapserver-users@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>> -- http://www.spatialys.com
>>> My software is free, but my time generally not.
>>>
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>> --
>> Richard W. Greenwood, PLS
>> www.greenwoodmap.com
>>
>
>
> --
> Richard W. Greenwood, PLS
> www.greenwoodmap.com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Docker for AWS S3 and Mapserver 7 on OSGeo Github?

2021-05-13 Thread Steve Lime
It's not a docker image I'm familiar with. It looks to be pinned to a very
specific version of MapServer - one that shouldn't be used given its age
and subsequent releases so I wouldn't include it "as is". Not sure what the
interest would be in developing a project-sanctioned image that was kept
current with the most recent version of MapServer and other dependencies
such as GDAL, PROJ, etc...

On Wed, May 12, 2021 at 9:22 AM Brian M Hamlin  wrote:

> Hi Steve, Mapserver PSC and All -
>
>   First, please know that *OSGeo dot org* is delivering the 14th edition
> of the *OSGeoLive Linux* based on Ubuntu/Debian/GNU OS. Release candidate
> 5 is built today and we at OSGeoLive team are soliciting feedback. (details
> on request)
>
>   I want to ask the *Mapserver* team and users for feedback on a somewhat
> random find on Github, starting with a YNews thread recently.  An employee
> of MAXAR posted that they use a Mapserver-in-Docker to provide WMS endpoint
> for large sat imagery on AWS in S3 buckets -- without having to handle the
> data, essentially "on demand"
>
>   https://github.com/OSGeo/mapserver-docker
>
>   Is this Docker image familiar ?  Is it worth including in a fairly-small
> group of repos on the official OSGeo Github ?  other feeback or leads?
>
>   thanks and very best regards --Brian M Hamlin/  MAPLABS  /
> Berkeley, Calif.
>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] 7.6.3 released - includes important security fix

2021-04-30 Thread Steve Lime
The MapServer team is pleased (kinda) to announce the 7.6.3 security
and maintenance release.

Importantly, this release addresses a flaw, discovered by project
developers, in MapServer CGI mapfile loading that makes it possible to
bypass security controls (ticket #6313). This flaw makes it difficult
to easily limit where MapServer can load a mapfile from and affects
versions 4.10 and later. This is a critical issue and all users are
encouraged to update as soon as possible.

What does this mean for you?


   1. If you've not used MS_MAP_PATTERN or MS_MAP_NO_PATH as part of
securing your installation then this doesn't have much impact since
you're not using the controls. That said, this is a critical
configuration step and you should upgrade and make use of those
controls to limit where mapfiles can be accessed.
   2. If you've relied on MS_MAP_PATTERN exclusively, you should
upgrade and be in good shape. However, it's a great time to review and
test MS_MAP_PATTERN.
   3. If you've relied on MS_MAP_NO_PATH primarily (like me), you
should upgrade and set a value for MS_MAP_PATTERN.

We are simultaneously releasing versions 7.0.8, 7.2.3 and 7.4.5 as
well. Updates to binary distributions will follow ASAP.

For the list of additional changes see the Changelog at
https://mapserver.org/development/changelog/changelog-7-6.html

Or head to Download at https://mapserver.org/download.html

For those wanting searchable offline documentation, the updated PDF is
available at https://download.osgeo.org/mapserver/docs/MapServer.pdf

-- 
The MapServer Team
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] tile_map_edge_buffer and python mapscript

2021-04-09 Thread Steve Lime
Looks like I misspoke. I checked the code and it shows tile_map_edge_buffer
being limited to mode=tile only. I don't think that param has any impact on
the test you referenced.

There's another metadata parameter that is more generally useful with
metatile generation called "labelcache_map_edge_buffer". It reserves space
around the edge of the map to deal with labels at the edge of tiles.
Typically you generate metatiles and then carve them up into actual tiles.
Mode=tile only generates single tiles which limits utility although it has
its place.

I think if you really wanted similar behaviour for your script to mode=tile
you'd have to replicate that logic in your python code - so create a larger
image and then clip out the center. What is your ultimate goal?


On Mon, Apr 5, 2021 at 5:57 PM Baev Alexandr  wrote:

> Нi Steve: Тhanks for the answer!
>
> Are there features of activating tile mode for mapscript? Whether it is
> necessary to pass in the request variable *mode=tile* (as mapserv CGI),
> or *TILED=TRUE* (as test in git version
> https://github.com/MapServer/MapServer/blob/main/msautotest/wxs/wms_tiled.map 
> … something
> like a geoserver).
> By simply including metadata tile_map_edge_buffer - tile buffer does not
> work for me.
>
> My Mapfile header (this template):
>
> MAP
> NAME "test map"
> SIZE 1280 1024
> MAXSIZE 4096
> UNITS meters
> IMAGETYPE PNG
> EXTENT {{extent_x_min}} {{extent_y_min}} {{extent_x_max}}
> {{extent_y_max}}
> IMAGECOLOR 255 255 255
> SYMBOLSET "{{symbolset}}"
> FONTSET "{{fontset}}"
> WEB
> METADATA
> "tile_map_edge_buffer" "64"
> wms_title "test map"
> wms_featureinfoformat "text/plain"
> wms_srs "EPSG:3857 EPSG:32638 EPSG:4326"
> wms_enable_request "*"
> wms_encoding "UTF8"
> END
> END
> PROJECTION
>   "init=epsg:{{db_epsg}}"
> END
>
> LAYER
> NAME "test layer"
> PROCESSING "LABEL_NO_CLIP=True"
> PROCESSING "CLOSE_CONNECTION=DEFER"
> EXTENT {{extent_x_min}} {{extent_y_min}} {{extent_x_max}}
> {{extent_y_max}}
> PROJECTION
> "init=epsg:{{db_epsg}}"
> END
> METADATA
> wms_title "test layer"
> END
> CONNECTIONTYPE postgis
> CONNECTION "{{db_string}}"
> DATA "{{query_string}}"
> STATUS   ON
> TYPE POLYGON
>
> ……...
>
> Runing this on python mapscript:
>
> map_obj = mapscript.mapObj(mapfile) #mapfile described earlier
> request = mapscript.OWSRequest()
> mapscript.msIO_installStdoutToBuffer()
> request.loadParamsFromURL(query_string) #query_string
> — request of web framework
> status_id = map_obj.OWSDispatch(request)
> content_type = mapscript.msIO_stripStdoutBufferContentType()
> result = mapscript.msIO_getStdoutBufferBytes()
> mapscript.msIO_resetHandlers()
>
> Сan this work in tile mode? Тhanks in advance!
>
> Baev Alexandr
> old...@bk.ru 
>
>
> Вторник, 6 апреля 2021, 0:33 +03:00 от Steve Lime :
>
> Hi Baev: That metadata element is used by the tile mode and by the
> WMS/GetMap code. So a WMS GetMap request though MapScript should make use
> of it. --Steve
>
> On Sun, Apr 4, 2021 at 2:39 PM Baev Alexandr via mapserver-users <
> mapserver-users@lists.osgeo.org
> >
> wrote:
>
> Mapserver last release version 7.6.2
> Will tile_map_edge_buffer work in python mapscript? Or does it only work
> with mapserv CGI (mode=tile)?
> If it works, what should be done? Additional configuration may be
> required mapscript.OWSRequest() ?
>
> Help me, please!
>
> Baev Alexandr
> old...@bk.ru 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> 
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> С уважением,
> Baev Alexandr
> old...@bk.ru
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] tile_map_edge_buffer and python mapscript

2021-04-05 Thread Steve Lime
Hi Baev: That metadata element is used by the tile mode and by the
WMS/GetMap code. So a WMS GetMap request though MapScript should make use
of it. --Steve

On Sun, Apr 4, 2021 at 2:39 PM Baev Alexandr via mapserver-users <
mapserver-users@lists.osgeo.org> wrote:

> Mapserver last release version 7.6.2
> Will tile_map_edge_buffer work in python mapscript? Or does it only work
> with mapserv CGI (mode=tile)?
> If it works, what should be done? Additional configuration may be
> required mapscript.OWSRequest() ?
>
> Help me, please!
>
> Baev Alexandr
> old...@bk.ru
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Layer Attribute Metadata

2021-03-30 Thread Steve Lime
Hi Seth: I don't think adding it would be difficult. What would the emitted
attribute look like w/that property added? --Steve

On Sat, Mar 27, 2021 at 4:11 PM Seth G  wrote:

> Hi all,
>
> Is anyone aware of any OGC service which can return comments for a layer
> attribute/field?
> The WFS DescribeFeatureType [1] seems the most likely candidate but has no
> "description" or equivalent property at the attribute level. Attributes are
> returned as follows:
>
> 
>
> The docs for the WFS layer object
> https://www.mapserver.org/ogc/wfs_server.html#layer-object allow the
> following to be set for each attribute:
>
> gml_[item name]_alias
> gml_[item name]_precision
> gml_[item name]_type
> gml_[item name]_value
> gml_[item name]_width
>
> It would be nice if there was an option to set something like the
> following, and have it returned as part of the layer metadata:
>
> gml_[item name]_description
>
> This way the automated parts of the attribute (type, precision etc.) could
> be included along with a description of what the field contains.
>
> Does anyone have a way of handling this with MapServer?
>
> Seth
>
> [1]
> http://opengeospatial.github.io/e-learning/wfs/text/operations.html#describefeaturetype
>
>
> --
> web:http://geographika.co.uk
> twitter: @geographika
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Security Advisory – Limiting Mapfile Access

2021-03-30 Thread Steve Lime
Hi all: This is an important reminder that, as part of a secure deployment,
it is important to limit MapServer CGI access to mapfiles. The MapServer
CGI has long supported the use of environment variables as a primary
mechanism to do this. If you haven’t implemented these controls then that
constitutes undue risk that is easily mitigated and we strongly encourage
you to do so as soon as possible. It’s also a great time to review those
settings if you already have them in place as we’ve recently updated regex
examples related to MS_MAP_PATTERN to limit path traversal.



Relevant documentation can be found at:

   - https://mapserver.org/optimization/limit_mapfile_access.html
   

   - https://mapserver.org/environment_variables.html
   




Please don’t hesitate to reach out with questions.



--Steve
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Fwd: MapServer PostGIS: WMS Layers Without Features

2021-03-02 Thread Steve Lime
What are you using to view the WMS service? What do you get if you take WMS
configuration out of the equation and just do a call like so:

  http://localhost/cgi-bin/mapserv.exe?map=[your
mapfile]=map=all

That should get you an image with all the features in all the layers for
your default extent.

--Steve

On Mon, Mar 1, 2021 at 1:05 PM Nathan L 
wrote:

> -- Forwarded message - From: Nathan L
>>> nathan.tyler.lo...@gmail.com Date: Tue, Feb 23, 2021 at 1:04 PM
>>> Subject: MapServer PostGIS: WMS Layers Without Features To: GISCO ListServ
>>> l...@giscolorado.org
>>>
>>> Hi, ya'll! I'm in need of some help.
>>>
>>> I've prepared an instance of PostGIS and MapServer on the same machine.
>>> I have loaded data into PostGIS and can view these features successfully in
>>> thick clients (ArcGIS Pro, QGIS).
>>>
>>> My MapServer appears to be creating a successful WMS service with two
>>> layers. However, these two layers, called from PostGIS, are empty of any
>>> features. The same two layers were the features successfully confirmed to
>>> be in the PostGIS database, above. Nevertheless, my WMS layers from
>>> MapServer show up empty.
>>>
>>> What am I missing?
>>>
>>> My Mapfile: https://pastebin.com/tRTJKTxA
>>>
>>> My ms_error.txt: https://pastebin.com/daJJMEkJ
>>>
>>> My PostgreSQL log file: https://pastebin.com/EN2LzheE
>>>
>>> My WMS Returns: https://pastebin.com/NR0W0Pg7
>>>
>>> Nathan Tyler Lowry
>>>
>>> Comprehensive GIS Solutions
>>>
>>> (719) 208-7092 Desk
>>>
>>> (719) 963-3571 Cell
>>>
>>> (719) 960-2084 Fax
>>>
>>> nathan.tyler.lo...@gmail.com
>>>
>> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PostgreSQL authentication method.

2021-02-18 Thread Steve Lime
I wonder if that's more a function of the PostgreSQL client library
version/capabilities. Do you know what MapServer is compiled against? You
might try connecting to your database with psql as another test of the
client lib.

On Thu, Feb 18, 2021 at 2:25 PM Moen, Paul T.  wrote:

> I recently tried a Mapserver layer connected to a PostgreSQL 13.2 database
> that had password_encryption = scram-sha-256.  I was unsuccessful in
> getting it to work until I switched it to md5 and reset the passwords.  The
> following error was logged and the interesting part seems to be
> (authentication method 10 not supported).
>
> [Thu Feb 18 13:57:02.652879 2021] [php7:warn] [pid 16668] [client
> 192.168.100.4:57341] PHP Warning:  mapObj::drawQuery(): [MapServer
> Error]: msPostGISLayerOpen(): Database connection failed. Check server logs
> for more details.Is the database running? Is it allowing connections? Does
> the specified user exist? Is the password valid? Is the database on the
> standard port?\n in /Volumes/Data/WebServer/newswc/php/drawmappm.php on
> line 243, referer: http://stagmapservice.swc.nd.gov/
> Database connection failed (authentication method 10 not supported
> ) with connect string 'user=dauser password=** dbname=swc
> host=dadatabase.blah.blah.blah port=5432'
> Is the database running? Is it allowing connections? Does the specified
> user exist? Is the password valid? Is the database on the standard port? in
> msPostGISLayerOpen()msPostGISLayerOpen(): Query error. Database connection
> failed. Check server logs for more details.Is the database running? Is it
> allowing connections? Does the specified user exist? Is the password valid?
> Is the database on the standard port?
> msDrawMap(): Image handling error. Failed to draw layer named 'Countries -
> Natl Atlas'.
>
> Is this an issue with MapServer?  If so, will scram-sha-256 authentication
> be supported by Mapserver?
>
> Thanks,
>
> Paul
>
> MapServer version 7.6.2 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=SOS_SERVER
> SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Labels colliding with symbols

2021-02-16 Thread Steve Lime
Hmmm... Point symbols are automatically considered as part of label
placement and collision detection. Since they are drawn first, their
placement is cached and labels are placed around them. Can you share
specifics on your layers and symbols - perhaps a small test case? --Steve

On Tue, Feb 16, 2021 at 4:28 PM Iljya Kalai  wrote:

> Hi,
>
> On my map, labels sometimes overlap symbols. Is there a way to avoid this,
> or are only label/label conflicts avoided? I tried both CC and AUTO for
> LAYER::CLASS::LABEL::POSITION.
>
> https://i.imgur.com/C9Ir7dA.png
>
> Thanks!
> Iljya
>
>
> *# *Map file extract
> ...
> LAYER
> NAME "LINE"
> TYPE LINE
> CLASS
>   STYLE
> COLOR 0 0 0
> WIDTH 1
>   END
>   LABEL
> COLOR 150 150 150
> TYPE truetype
> SIZE 10
> ANGLE AUTO
> POSITION CC
> TEXT "hello"
>   END
> END
>   END
>
> LAYER
> NAME "SYMBOLS"
> TYPE POINT
> ...
> CLASS
> STYLE
>   SYMBOL "ABC"
>END
> END
> END
> ...
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS Filter and Validation-Block

2021-01-19 Thread Steve Lime
I don't believe any of the WxS non-vendor parameters use the validation
blocks. Instead they have their own service-specific validation. Same goes
for the CGI params - they are validated using explicit code (e.g. mapext
must consist of 4 numeric elements). Exceptions (from the CGI perspective)
are parameters like *qstring *where developer-defined validation is
required because there is no set content model to follow. What you're
describing for the WFS/WMS filter might be an interesting extension - I
would think it would be easy to add (probably would need a different key,
something like wfs.filter). I'm curious what others more familiar with the
WFS/WMS filters think.

Another idea would be to disable parts of the filter specification
using wfs_enable_request
metadata - or perhaps using a new bit of metadata wfs_enable_filter?

--Steve

On Tue, Jan 19, 2021 at 3:36 AM Jörg Thomsen (WhereGroup) <
joerg.thom...@wheregroup.com> wrote:

> no hints anyone? :)
>
> Jörg
>
> Am 15.01.21 um 14:55 schrieb Jörg Thomsen (WhereGroup):
> > Hello,
> >
> > I wonder how to allow / deny FE-filter in my WFS (e.g. no
> spatial-filter).
> > Is this possible in any way?
> >
> > I tried to use the validation-block, anything like
> >
> >  VALIDATION
> >  "filter" "(?gm)^((?!).)*$"
> >  END
> >
> > but the validations only seem to be considered for values which are used
> > within the mapfile, also a validation for "service" doesn't take any
> > effect:
> >  VALIDATION
> >  "service" "uups"
> >  END
> >
> > Viele Grüße,
> > Jörg
> >
>
>
> Viele Grüße,
> Jörg Thomsen
>
> --
> -
> Aufwind durch Wissen!
> Web-Seminare und Online-Schulungen
> bei der www.foss-academy.com
> -
>
> Jörg Thomsen
> WhereGroup GmbH
> Bundesallee 23
> 10717 Berlin
> Germany
>
> Fon: +49 (0)30 / 5130 278 74
> Fax: +49 (0)30 / 5130 278 11
>
> joerg.thom...@wheregroup.com
> www.wheregroup.com
>
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
>
> ---
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver 7.6.2

2020-12-31 Thread Steve Lime
The original error looks like it was related to this:


https://stackoverflow.com/questions/39700537/undefined-reference-to-boost-serialization-functions

I think you do something like this (see
https://stackoverflow.com/questions/25243336/specifying-libraries-for-cmake-to-link-to-from-command-line
):

  cmake ... CMAKE_C_STANDARD_LIRBARIES="-lboost_serialization"

The new error looks to be related to multiple versions of GDAL installed.
If you search on "AH01215: GDAL: In GDALDestroy - unloading GDAL shared
library" you'll see that error referenced in a couple of forums, including
mapserver-users. Do you have both a package and source-built GDAL? You
might be better off uninstalling the source-built stuff.

--Steve


On Wed, Dec 30, 2020 at 2:13 PM Jeff McKenna 
wrote:

> Hi Stephane,
>
> I'm not sure about your last issue.  You could first execute 'sudo
> ldconfig' so your last compiled libs are found, then try a shp2img
> command with your mapfile.
>
> I have seen cases where there are conflicting library versions used by
> either the GDAL or MapServer dependencies: test this with a 'ldd  name> command.
>
> That's not a fun scenario, but, I've been there before ha.
>
> Sorry maybe others have better advice for this.
>
> -jeff
>
>
>
> --
> Jeff McKenna
> GatewayGeo: MapServer Consulting and Training Services
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
> On 2020-12-30 1:36 p.m., Stephane Poissant wrote:
> > HI Jeff,
> >
> > That was a partial success! Thank you for you recommendation!
> > It compiled successfully by compiling gems and recompiling goal as you
> > suggested.
> >
> > I still have 1 issue.
> >
> > While rendering stuff that use to work on previous version, it no longer
> > works in this lates one.
> > I get AH01215 error in http.
> >
> > AH01215: GDAL: In GDALDestroy - unloading GDAL shared library.:
> > /var/www/html/map/mapserv.cgi, referer: http://utility.sk.com/
> > 
> >
> > I am not a developper. It is hard for me to describe where this issue
> > can possibly come from.
> > It does not render on screen the way it should be.
> >
> > I will turn back on perl, have ruby, python and php in the makefile as
> > it could be related….
> >
> > Nevertheless, I would like to thank you for your very quick response and
> > "right on" target answers!
> >
> > SP
> >
> >
> > Stéphane Poissant
> > Portable: 514-793-3506
> > spoissan...@gmail.com 
> >
> >
> >> On Dec 30, 2020, at 10:14 AM, Jeff McKenna
> >> mailto:jmcke...@gatewaygeomatics.com>>
> >> wrote:
> >>
> >> Also, after you compile GEOS be sure to recompile GDAL ('make clean'
> >> first), then continue on to tackle your MapServer cmake command.
> >>
> >> Happy new year to all,
> >>
> >> -jeff
> >>
> >>
> >>
> >> --
> >> Jeff McKenna
> >> GatewayGeo: MapServer Consulting and Training Services
> >> co-founder of FOSS4G
> >> http://gatewaygeo.com/ 
> >>
> >>
> >>
> >> On 2020-12-30 9:56 a.m., Jeff McKenna wrote:
> >>> Hi Stephane,
> >>> Be sure to compile GEOS (3.9.0 is recommended from
> >>> http://download.osgeo.org/geos/geos-3.9.0.tar.bz2 ), and then add
> >>> into your cmake command: -DWITH_GEOS=1
> >>> Wishing you a happy new year,
> >>> -jeff
> >>
> >> ___
> >> mapserver-users mailing list
> >> mapserver-users@lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Styling KML output

2020-12-07 Thread Steve Lime
So you're using the OGR driver. I wouldn't expect that to leverage
MapServer class/styles at all - more of a data dump. There is a separate
KML driver (see https://mapserver.org/output/kml_output.html) and you can
also use templates to generate KML and define styles as part of the
templates themselves.

--Steve

On Thu, Dec 3, 2020 at 7:30 AM Martin Høgh  wrote:

> I've setup KML/KMZ output for WFS with these definitions:
>
>  OUTPUTFORMAT
>  NAME kml
>  DRIVER "OGR/KML"
>  MIMETYPE "application/vnd.google-earth.kml+xml"
>  IMAGEMODE FEATURE
>  EXTENSION "kml"
>  FORMATOPTION "FORM=simple"
>  FORMATOPTION 'FILENAME=gmap75.kml'
>  FORMATOPTION "maxfeaturestodraw=1000"
>  END
>
>  OUTPUTFORMAT
>  NAME kmz
>  DRIVER "OGR/LIBKML"
>  MIMETYPE "application/vnd.google-earth.kmz"
>  IMAGEMODE FEATURE
>  EXTENSION "kmz"
>  FORMATOPTION "FORM=simple"
>  FORMATOPTION 'FILENAME=gmap75.kmz'
>  FORMATOPTION "maxfeaturestodraw=1000"
>  END
>
> It works fine.
>
> When serving KML polygons they all have a red outline and no fill:
>
>
> ffff0
>
> Is it supposed to use the classes in the MapFile? Or is there another
> way to style KML output?
>
> Best regards,
>
> Martin Høgh
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RASTER conditionally use default palette color based on pixel value

2020-12-07 Thread Steve Lime
Seems like you'd have to draw it twice - once with the using the
palette and a second time where you do whatever filtering and color
re-assignment you want.

On Sat, Dec 5, 2020 at 11:24 AM Scott  wrote:

>
> For instance:
>
> ...
>
> CLASS
>NAME "useDefaultColor"
>EXPRESSION ([pixel] >= 100 && [pixel] < 200)
>STYLE
>   #COLOR "#cc"   <-- this works (uncommented of course)
>   COLOR [red] [green] [blue] <-- this does not
>END
> END
> ...
>
> Thank you!
>
>
> --
> www.postholer.com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Docker: Mapproxy Image with binary MapServer support

2020-09-16 Thread Steve Lime
Excellent, thanks for sharing!

On Tue, Sep 15, 2020 at 7:29 AM Just van den Broecke 
wrote:

> FYI:
>
> Developed new Docker Image: MapProxy with MapServer binary support, i.e.
> MP directly calling MS binary (i.s.o via WMS), see GH repo [1] and
> DockerHub [2].
>
> Also offering a slim/straightforward MapServer Docker Image with Lighttp
> FastCGI [3]
>
> [1] https://github.com/justb4/docker-mapproxy-mapserver
> [2] https://hub.docker.com/repository/docker/justb4/mapproxy-mapserver/
> [3] https://github.com/justb4/docker-mapserver
>
> Best,
>
> Just van den Broecke
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Available now - a new way to support the MapServer project!

2020-09-14 Thread Steve Lime
Hi all: We're pleased to announce another way to support the MapServer
project thanks to Github Sponsors and OSGeo. Sponsorship allows you to
directly support project activities such as:

   - new feature development and ongoing maintenance
   - documentation and demo development
   - release management
   - participation in code sprints

MapServer is the product of thousands of hours of donated time by the
community. That said, sponsorship (hopefully) will allow the
Project Steering Committee (PSC) to target investment in activities that
might otherwise receive little attention. Look for the "Sponsor" button in
Github (https://github.com/mapserver/mapserver) or the "donate" button on
the MapServer website.

Many thanks to Mike Smith, Jeff McKenna and OSGeo for getting this set up!

--Steve
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Use Ground Control Points from GeoTIFF

2020-09-01 Thread Steve Lime
What does the mapfile look like?

On Tue, Sep 1, 2020 at 10:26 AM Jesper Kempe  wrote:

> Hi
>
> I have a GeoTiff file that gdalinfo presents like this:
>
> gdalinfo sat.tif
> Driver: GTiff/GeoTIFF
> Files: sat.tif
> Size is 10474, 10717
> Coordinate System is `'
> GCP Projection =
> GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.257223563,
> AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4326"]]
> GCP[  0]: Id=1, Info=
>   (0,0) -> (27.5783052509812,65.9184735836942,229.992792810313)
> GCP[  1]: Id=2, Info=
>   (524,0) -> (27.1416007200269,65.9731480840222,172.994255514815)
> GCP[  2]: Id=3, Info=
>   (1048,0) -> (26.7005564512604,66.0268770755367,152.994545626454)
> GCP[  3]: Id=4, Info=
>   (1572,0) -> (26.257537545879,66.0793551447287,131.994995356537)
> GCP[  4]: Id=5, Info=
>   (2096,0) -> (25.8102107755995,66.1308402121171,163.993212723173)
> 
>
> with 482 GCPs.
>
>
> The file opens ok in Qgis and is located in the right location.
> But I can´t in any way get it to show correctly in Mapserver.
>
> Is this possible to do? Or do I have to gdalwarp the file to a known
> projection and set the PROJECTION of the layer?
>
> Thanks
> Jesper
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Compiling Mapserver with Oracle Spatial support issue

2020-08-25 Thread Steve Lime
Hmmm... Does -DWITH_ORACLESPATIAL=ON (so ON vs 1) make a difference? It
shouldn't... If you do a "ldd mapserv" is the binary linked against the
Oracle libs?

On Wed, Aug 19, 2020 at 12:55 AM Marcin Grudzień 
wrote:

> Hi,
>
> I am new to Mapserver. I am trying to compile MapServer 7.6.1 with Oracle
> Spatial support on Ubuntu 20.04.
>
> I basically follow the instruction on
> https://www.mapserver.org/installation/unix.html#.
>
> To configure my environment I use
> cmake .. -DINSTALL_LIB_DIR:PATH=/usr/lib
> -DCMAKE_PREFIX_PATH="/usr/local;/opt;/usr/lib;/usr/lib/x86_64-linux-gnu;/usr/local/lib;/usr/lib/oracle/11.2/client64/bin;/usr/lib/oracle/11.2/client64/lib"
> -DWITH_CLIENT_WFS=1 -DWITH_CLIENT_WMS=1 -DWITH_CURL=1 -DWITH_SOS=1
> -DWITH_PHP=1 -DWITH_PERL=1 -DWITH_RUBY=0 -DWITH_JAVA=1 -DWITH_CSHARP=0
> -DWITH_PYTHON=1 -DWITH_SVGCAIRO=0 *-DWITH_ORACLESPATIAL=1* -DWITH_MSSQL2008=0
> -DWITH_CURL=1 -DWITH_LIBXML2=1 ../ >../configure.out.txt
>
> The cmake output shows:
> * Summary of configured options for this build
> --  * Mandatory components
> --   * GDAL: /usr/local/lib/libgdal.so
> --   * PROJ: /usr/lib/x86_64-linux-gnu/libproj.so
> --   * png: /usr/lib/x86_64-linux-gnu/libpng.so
> --   * jpeg: /usr/lib/x86_64-linux-gnu/libjpeg.so
> --   * freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so
> --  * Optional components
> --   * GIF: /usr/lib/x86_64-linux-gnu/libgif.so
> --   * MYSQL: disabled
> --   * FRIBIDI: /usr/lib/x86_64-linux-gnu/libfribidi.so
> --   * HARFBUZZ: /usr/lib/x86_64-linux-gnu/libharfbuzz.so
> --   * GIF: /usr/lib/x86_64-linux-gnu/libgif.so
> --   * CAIRO: /usr/lib/x86_64-linux-gnu/libcairo.so
> --   * SVGCAIRO: disabled
> --   * RSVG: disabled
> --   * CURL: /usr/lib/x86_64-linux-gnu/libcurl.so
> --   * PIXMAN: disabled
> --   * LIBXML2: /usr/lib/x86_64-linux-gnu/libxml2.so
> --   * POSTGIS: /usr/lib/x86_64-linux-gnu/libpq.so
> --   * GEOS: /usr/lib/x86_64-linux-gnu/libgeos_c.so
> --   * FastCGI: /usr/lib/x86_64-linux-gnu/libfcgi.so
> --   * PROTOBUFC: /usr/local/lib/libprotobuf-c.so
> *--   * Oracle Spatial:
> /usr/lib/oracle/11.2/client64/lib/libclntsh.so;/usr/lib/oracle/11.2/client64/lib/libocci.so;/usr/lib/oracle/11.2/client64/lib/libnnz11.so*
> --   * Exempi XMP: disabled
> --  * Optional features
> --   * WMS SERVER: ENABLED
> --   * WFS SERVER: ENABLED
> --   * WCS SERVER: ENABLED
> --   * SOS SERVER: ENABLED
> --   * WMS CLIENT: ENABLED
> --   * WFS CLIENT: ENABLED
> --   * ICONV: ENABLED
> --   * Thread-safety support: disabled
> --   * KML output: disabled
> --   * Z+M point coordinate support: ENABLED
> --   * XML Mapfile support: disabled
> --  * Mapscripts
> --   * Python: ENABLED
> --   * PHP: ENABLED
> --   * PHPNG: disabled
> --   * PERL: ENABLED
> --   * RUBY: disabled
> --   * JAVA: ENABLED
> --   * C#: disabled
> --   * V8 Javascript: disabled
> --   * Apache Module (Experimental): disabled
> --
> -- PROJECT_BINARY_DIR is set to /home/mgrudzien/mapserver-7.6.1/build
> -- Will install files to /usr/local
> -- Will install libraries to /usr/lib
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/mgrudzien/mapserver-7.6.1/build
>
> Then I compile and install MapServer. However, when I execute mapserv -v I
> get
> MapServer version 7.6.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ
> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS
> SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
> SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
> SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS
> INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> The Oracle Spatial is not supported. What am I doing wrong?  How this can
> be solved?
>
> Best regards,
> Marcin
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] REST API as a LAYER DATA source

2020-07-30 Thread Steve Lime
Presumably you could use an OGR layer although I've not done it myself. I
guess I'd recommend starting with:

  * https://mapserver.org/input/vector/ogr.html
  * https://gdal.org/drivers/vector/esrijson.html#vector-esrijson

--Steve


On Thu, Jul 30, 2020 at 11:50 AM Scott  wrote:

> I would like to use a REST API as a mapfile LAYER/DATA source, not output.
>
> Can someone point me to the correct documentation for that?
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] sending a polygon to wcs-mapserver for masking

2020-07-07 Thread Steve Lime
Are you referring to dynamically setting a feature in a mask layer (
https://mapserver.org/development/rfc/ms-rfc-79.html)?

On Sat, Jul 4, 2020 at 1:08 PM Ahmet Temiz  wrote:

> Hi,
> How can I send a polygon to wcs-mapserver for masking  through cgi/url   ?
> I want to process polygon sent with wcs/wms.
> regards
>
> --
> Ahmet Temiz
> Jeoloji Müh.
> Afet ve Acil Durum Yönetimi Başkanlığı
> Deprem  Dairesi Başkanlığı
>
>
> 
>
> Ahmet Temiz
> Geological Eng.
>
> Disaster and Emergency Management
> of Presidency
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Differerent output format for GetFeatureInfo - template strategy

2020-06-27 Thread Steve Lime
If your data is very standardized I can see where this would be helpful. I
think if the layer attribute was interpreted as a regex then that might do
the trick. I’d advocate adding another attribute though to avoid a
regression since layer names commonly contain characters that would be
problematic in a regex. Something like “layerPattern”. With that you could
do:

  [resultset layerPattern=“.”]
...
  [/resultset]

and it would apply to all layers. Note there is also include support in
templates so you can use a common presentation over and over even if you
had to define a resultset for each layer. So something like:

  [resultset layer=“l1”]
[include file=“common.html”]
  [/resultset]
  [resultset layer=“l2”]
[include file=“common.html”]
  [/resultset]

This could be a candidate for 7.6.1 I suppose.

—Steve

On Thu, Jun 25, 2020 at 7:20 AM  wrote:

> Dear mapserver community
>
> I am trying to set a WMS where the a GetFeatureInfo  will support more
> than one INFO_FORMAT, currently I have text/html implemented [1],  which
> uses a layer level implementation.  This works fine when you have only one
> format [2].
>
> Now I need to have 2 formats,  html and geojson/json.
>
> Documentation is very clear that the best strategy  is to use the
> OUTPUTFORMAT,  each output format associated with a specific template, this
> works fine .
>
> Problem is that all examples that I see using outputformat have a very
> clear layer name indication (below is nums)
>
> // mapserver template[resultset layer=mums]
>
>
> This simplely doesn't work if you have 100 layers on a mapfile and we need
> a output format template for all of them,  I have search for some generic
> parameter that could relay the layer name being used but no luck. With
> setting the layer name it doesn't work!! And arguments can't be replaced
>
> Question :
> - How can I have a generic  [resultset ] that can be use by multiple
> layers [3]
> - Template at layer level works good but I  don't think we can support 2
> formats there, is this correct???
>
>
> System:
> mapserver7.6.0 gdal2.4 proj4
>
>
> Thank you
> Jorge de Jesus
>
> [1]
> https://maps.isric.org/mapserv?map=/map/bdod.map=WMS=1.3.0=GetFeatureInfo=47.130647,8.931116,48.604188,29.54223=EPSG:4326=1073=445=bdod_0-5cm_Q0.5==image/tiff_LAYERS=bdod_0-5cm_Q0.5_FORMAT=text/html=509=359_COUNT=1
>
> [2]
> https://gis.stackexchange.com/questions/343901/getfeatureinfo-template-of-mapserver-not-replacing-values
>
> [3] https://pastebin.com/FdepGTf7
>
>
>
> ISRIC — World Soil Information
>
> PO Box 353 | 6700 AJ Wageningen
>
> Droevendaalsesteeg 3 (Building 101) | 6708 PB Wageningen
> 
>
> The Netherlands
> 
>
> Telephone (Secretariat): +31 317 483735
>
> E-mail: i...@isric.org
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] PostGIS Raster Filters

2020-06-18 Thread Steve Lime
Can you access/filter the data outside MapServer with only GDAL? Might be
easier to battle one piece of software rather than two.

On Thu, Jun 18, 2020 at 10:09 AM  wrote:

> Hello-
>
>
>
> I’m trying to setup a WMS layer that is reading a raster table in
> PostGIS.  I am loading NOAA Global Hydro Estimation data in a single table
> (tiled) and have a field that contains the datetime for the raster.  I
> followed the examples here:
>
>
>
> https://postgis.net/docs/RT_FAQ.html#idm29732
>
>
>
> In my case I would like to use the “where” statement to filter the raster
> tiles, but the ‘where’ statement only seems to work with the ‘rid’ field
> (e.g. rid=123).  Based on the example in the PostGIS docs, it looks like it
> should theoretically work.  I tried the “FILTER” in the map file, but I
> assume that only works with vector data since it did nothing.
>
>
>
> Does anybody know the trick to filter tiled raster data from a PostGIS
> raster table?
>
>
>
> Any help is greatly appreciated!
>
>
>
> Cheers,
>
>
>
> BW
>
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] deployed mapping engine comparison stats

2020-06-16 Thread Steve Lime
That's probably a result of what drove MapServer development early on.
MapServer itself is just a binary (CGI/FCGI) that can do stuff as simple as
making simple inset maps or scalebars to distributing maps and data using
OGC services with plenty of variations in between. Each call is discrete
and there are no long running processes. A single deployment could serve
dozens of wide-ranging purposes and in that situation a catalog makes no
sense. Those "purposes" often only make sense with the context of the
application that uses them. Closest thing to a catalog would be
GetCapability responses. Then of course you have MapScript applications
that would be difficult, if not impossible, to identify as being related to
MapServer.

On Sat, Jun 6, 2020 at 11:56 AM Jonathan Moules <
jonathan-li...@lightpear.com> wrote:

> Hi Folks,
>
> (Disclosure: I'm the person behind that blog post.)
>
> > I wonder how this statistics would look like if MapServer had a built-in
> web administration interface like the other competing applications.
>
> The fact MS is so high without it shows it may not be that important, at
> least not to the core audience.
>
> I think the biggest differentiator in the stats between the top three may
> be the fact that MapServers don't have any sort of catalog of services or
> other way to find other services on the box. By which I mean, ArcGIS Server
> allows you to crawl it and get all of the public services and datasets.
> GeoServer if there are namespaces (their way of grouping things into
> services) you can go up a level and see what the root is serving, thus
> potentially finding more datasets and another service that way (but only
> one). But MapServer doesn't have a mechanism like that apparently (I asked
> on this list a couple years ago), which means that it's hard to know if
> I've found everything on a specific box. That's the biggest catch with the
> MapServer stat at least.
>
> Cheers,
>
> Jonathan
>
>
> On 2020-06-05 20:28, Tamas Szekeres wrote:
>
> Very interesting comparison.
> I wonder how this statistics would look like if MapServer had a built-in
> web administration interface like the other competing applications.
>
> Best regards,
>
> Tamas
>
>
> Jeff McKenna  ezt írta (időpont: 2020.
> jún. 5., P, 18:09):
>
>> Something I noticed this morning: MapServer users might be interested in
>> recently published statistics of deployed mapping engine types (ArcGIS,
>> GeoServer, MapServer/MapCache, QGIS Server, etc.) :
>> https://www.geoseer.net/blog/?p=2020-06-04_geospatial_server_software
>>
>>
>> -jeff
>>
>>
>>
>>
>> --
>> Jeff McKenna
>> MapServer Consulting and Training Services
>> co-founder of FOSS4G
>> http://gatewaygeo.com/
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> ___
> mapserver-users mailing 
> listmapserver-users@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] MAXSCALEDENOM using runtime var

2020-06-16 Thread Steve Lime
Hi Scott: Nope, the various scale denominator properties are not mutable
via URL parameters. It's a relatively simple change to make it happen (just
modify maplexer.l (look for the keyword of choice) and rebuild) but I'm not
sure it's a great idea since you could be opening up some performance
headaches for both your mapping box and backend data sources. I mean, a
user could essentially affect at what level high density data could be
drawn at, so imagine asking for high density roads at a global scale from a
remote PostgreSQL/PostGIS source.

--Steve

On Tue, Jun 16, 2020 at 3:36 PM Scott  wrote:

> Is it possible to set MAX(MIN)SCALEDENOM using a runtime variable?
>
> Example:
>
> ...
> MAXSCALEDENOM %maxscaledenom%
> ...
>
>
>
> --
> www.postholer.com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] deployed mapping engine comparison stats

2020-06-05 Thread Steve Lime
We're number 3!

On Fri, Jun 5, 2020 at 11:09 AM Jeff McKenna 
wrote:

> Something I noticed this morning: MapServer users might be interested in
> recently published statistics of deployed mapping engine types (ArcGIS,
> GeoServer, MapServer/MapCache, QGIS Server, etc.) :
> https://www.geoseer.net/blog/?p=2020-06-04_geospatial_server_software
>
>
> -jeff
>
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
>
>
>
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] List properties of mapserver objects

2020-05-19 Thread Steve Lime
Are you using PHP/MapScript or the Swig-based version?

On Mon, May 18, 2020 at 4:14 AM Georgiana Paiu 
wrote:

> I am using mapserver 7 with PHP and I was trying to list the properties
> and the values of some objects (example styleObj, labelObj) by
> using get_object_vars function from PHP. It seems the result is always an
> empty array. Can you help me with a suggestion, please?
>
> I mention that before I was using mapserver 5 and it was working fine.
>
> Thank you,
>
> *Georgiana Paiu*
> Web Developer
> (+40) 75 443 4340 <(+40)+75+443+4340> | paiu.georgi...@gmail.com | Skype:
> georgiana.paiu 
>   
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] HTML Legends with MapServer

2020-05-07 Thread Steve Lime
Query templates already support the concept of includes:

  [include src="some other template"]

so I wonder if it might be possible to extend that functionality to HTML
legend processing. Do you have a particularly complex example you could
share with me?

--Steve

On Thu, May 7, 2020 at 4:42 AM Sven Schroeter  wrote:

> Hi all,
>
> i have been using html legend templates for the mapserver for a very
> long time.
> With many layers such a template can become very long and confusing.
> Is there a possibility to split such a template into several files and
> e.g. include certain areas like in the mapfile?
> Maybe I could solve this with PHP Mapscript?  Up to now I have been
> using processLegendTemplate to output the HTML code.
>
> Thanks
> Sven
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN

2020-04-27 Thread Steve Lime
To be clear, Fran - are you saying the issue isn't the result set rather
the order? If so I don't know of a way to affect that order.

In terms of a nearest feature or features. This would be something that I
would be keen on addressing. I've run into a variant of this issue using
the CGI and mode=query when searching multiple layers. The query finds the
first matching feature but not necessarily the closest. It's an issue
primarily with line and point layers when you need to set TOLERANCE values
to make things clickable. Jukka, what does the vendor specific extension in
GeoServer look like from WFS filter standpoint?

--Steve

On Mon, Apr 27, 2020 at 10:21 AM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> The DWithin function in WFS is a true/false function just like the
> equivalent PostGIS function https://postgis.net/docs/ST_DWithin.html. You
> can’t find the nearest feature with DWithin. A not so good workaround is to
> increase the distance until the result is not empty.
>
>
>
> Mapserver does not have a vendor specific function for nearest either like
> Geotools/Geoserver. Especially the pgnearest function that works with
> PostGIS backend and returns n nearest features would be practical for your
> use case
> https://docs.geotools.org/stable/userguide/library/main/function_list.html.
> Geotools should also have a similar function for Oracle that is using the
> native SDO_NN function.
>
>
>
> Unfortunately I can’t say how to proceed for making nearest or nearestN
> queries with Mapserver.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* mapserver-users  
> *Puolesta
> *Fran Acuña Parra
> *Lähetetty:* maanantai 27. huhtikuuta 2020 16.59
> *Vastaanottaja:* mapserver-users@lists.osgeo.org
> *Aihe:* [mapserver-users] GetFeature WFS request with Spatial Filter
> DWITHIN
>
>
>
> Hi,
>
>
>
> Following the topic about another question that I sent, I'm using a
> Getfeature WFS request with a DWITHIN spatial filter to returns the closes
> feature of a layer given some specific coordinates. The request works fine,
> but when there are several features that match the filter it doesn't
> returns the closest one in the first position of the response(GML for
> example). Is there a way to achieve this?
>
>
>
> Thanks in advance.
>
>
>
> Regards,
>
>
>
> Fran Acuña
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Make PROJECTION mandatory?

2020-04-27 Thread Steve Lime
I would prefer to pursue as a documentation/communication exercise first.
It's not that I don't agree that PROJECTION blocks are generally
recommended but making them required and introducing artificial projections
to deal with cases when projections aren't used (embedded legends, scale
bars and other static map elements) will touch a lot of code. It's also a
major breaking change that would potentially break a large percentage of
mapfiles going forward.

--Steve

On Mon, Apr 27, 2020 at 8:43 AM Jeff McKenna 
wrote:

> Hi Jukka,
>
> I personally consider defining PROJECTION blocks at the MAP level and
> all LAYERs mandatory, in my day-to-day work, for each and every mapfile.
>   If you do not specify all of these, MapServer makes assumptions and
> you are just asking for trouble downstream through WMS clients etc.
> (your users)
>
> I also do not rely on any PROJECTION AUTO magic either, for my paying
> clients.
>
> These are all nice tricks but in critical production environments I stay
> away from them; instead, find the source projection, and define the MAP
> projection block and all LAYER projection blocks.
>
> I'm not sure this answers your questions, but this was my 'gut reaction'
> to your message.  I believe we have the same thinking here.
>
> -jeff
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> https://gatewaygeo.com/
>
>
>
> On 2020-04-27 10:36 a.m., Rahkonen Jukka (MML) wrote:
> > Hi,
> >
> > Recent Mapserver buids require PROJ and GDAL
> > https://mapserver.gis.umn.edu/ja/development/rfc/ms-rfc-127.html. That
> > means that every Mapserver can support PROJECTION blocks both at the MAP
> > level and within LAYER. And because there are no more builds without
> > Proj support there is no real need for writing mapfiles without
> > PROJECTION blocks. Therefore I suggest that such mapfiles should be
> > considered invalid in the future. If it is for some reason too strict
> > requirement, what if we at least edit the documentation
> > https://mapserver.org/mapfile/projection.html so that it really
> > encourages users to write the PROJECTION blocks. GetCapabilities could
> > also show something like
> > 
> >
> > Having layers without PROJECTION saves users from writing this much text:
> >
> > “PROJECTION "init=epsg:3857" END
> >
> > but when the user meets any problem with accessing data or rendering the
> > first thing to check is the projection. In the mailing list it means one
> > more question-answer round before getting closer to the real problem –
> > if the problem was not in the projection, as it very often is.
> >
> > If source data are in local coordinate system it would be better to
> > define also that explicitly with a special keyword like PROJECTION
> “LOCAL”.
> >
> > Would other user consider making projection compulsory rather as an
> > improvement or inconvenience?
> >
> > -Jukka Rahkonen-
> >
> >
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] free() methods

2020-04-23 Thread Steve Lime
With SWIG MapScript, the de-allocation of objects happens behind the
scenes, so as objects go out of scope their resources are free'd IF the
object is not referenced by another one. --Steve

On Tue, Apr 21, 2020 at 6:05 AM Robert Pivalone 
wrote:

> Hello.
>
> In MapServer 6 / 7 + PHP MapScript API, labelObj, layerObj, mapObj,
> classObj, shapeObj and styleObj have a "free()" method.
>
> In MapServer 7.x + SWIG MapScript API, it seems there are no "free()"
> method. Are they not exposed ? or useless now ?
>
> Regards.
>
> PS : From the PHP MapScript API documentation : void free() : Free the
> object properties and break the internal references. Note that you have to
> unset the php variable to free totally the resources.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] layer with "truncated" symbols 2

2020-03-27 Thread Steve Lime
The parameter tile_map_edge_buffer applies *only* to MapServer CGI with
mode=tile (https://mapserver.org/output/tile_mode.html). It's set as a
METADATA property within the WEB object (I think). The gutter parameter has
a similar effect. I assume it's padding the WMS extent sent to MapServer
and requesting a larger image. You could look at the WMS URLs being
requested with that parameter set to 0 and to 50 to be sure.

--Steve

On Fri, Mar 27, 2020 at 6:36 AM Leehan  wrote:

> Thanks for all these links.
> I read most of them and understood a very few. I tried to find the simplest
> solution for me.
> In OL doc, I noticed a gutter option for ol/source/TileWMS. According to
> this, on Mapserver side, there was a parameter to adjust :
> tile_map_edge_buffer, I never found where to modify it !
> So as a start, I only added a "gutter: 50" on my js file. As far as I
> understand : a buffer is created around red circle so symbols are "cut" but
> farther so they appear entirely. It was enough.
> 
>
>
>
> --
> Sent from:
> http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] layer with "truncated" symbols 2

2020-03-27 Thread Steve Lime
It's the dynamic size that's causing the issues. I still think this could
work (on the server side) but I'll need to work up my own test case to
avoid a bunch of back and forth. --Steve

On Fri, Mar 27, 2020 at 4:27 AM Leehan  wrote:

> following your advice, I added quedalle classe :
>
> ...
> LAYER
> NAME "nombre de cas"
> TYPE POINT
> PROJECTION
> "init=epsg:2154"
> END
> EXTENT 276838.0988 4584246.823 909596.998 8872270.142
> CONNECTIONTYPE POSTGIS
> CONNECTION blabla
> LABELITEM "nb_cas"
> CLASS
>  EXPRESSION "quedalle"
>  STYLE
> SYMBOL "circle"
> SIZE 150
> COLOR 0 0 0
>  END
> END
> CLASS
> STYLE
> SYMBOL "cas"
> SIZE [ln_nb_cas]
> COLOR [couleur]
> OPACITY 70
> END #fin style
> LABEL
> COLOR 0 0 0
> OUTLINECOLOR 255 255 255
> FONT "verdana-gras"
> TYPE truetype
> SIZE 8
> END
> END #fin class
>
> And indeed I am using an attribute for red circle size.
> But the result is still the same.
> (I can't believe I am the first to experience this issue!)
> If it can help, here is a snap with the dummy class :
> 
>
>
>
> --
> Sent from:
> http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] layer with "truncated" symbols 2

2020-03-26 Thread Steve Lime
With symbols MapServer typically handles this situation by adjusting the
extent used to select features based on the largest symbol size - so
features just off the edge of the map are still rendered partially. That
said, based on your sample graphic it looks like you're setting the size of
the circles dynamically using attribute binding? If so, MapServer wouldn't
have access to those values ahead of time to adjust the selection extent.
One idea might be to somehow add something in the red circle layer to force
that computation, I'd have to see the layer definition to be sure but you
could try adding a dummy class with a size value that represents the
largest expected size. So:

LAYER
  NAME 'red_circles'
  ...
  CLASS # this class is never drawn
EXPRESSION 'dummy'
STYLE SYMBOL 'cicle' SIZE 175 COLOR 0 0 0 END
  END
  CLASS
# your normal red circle class
  END

Of course this forces the larger selection extent for all tiles but it
could work and if the data isn't particularly big it wouldn't add too much
overhead.

--Steve

On Thu, Mar 26, 2020 at 12:49 PM TC Haddad  wrote:

>
> Can you configure Openlayers to not send tiled WMS requests to Mapserver?
>
> If you still want to send tiled requests, you could try setting up
> MapCache to see if it improves the situation.
>
> On Thu, Mar 26, 2020 at 1:09 AM Leehan  wrote:
>
>> I am not using qgis : It s an Openlayers + Mapserver application ;
>>
>>
>>
>> --
>> Sent from:
>> http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapserver tile edge rendering behaviour

2020-03-11 Thread Steve Lime
MapServer uses the center of the pixel but does compensate for models
defined by other specs (e.g. WMS, which defines an extent as outer edge to
outer edge. Straight CGI (mode=map) will adjust the requested extent based
on the image size to ensure that square cells are being used. WMS allows
for non-square cells.

It’s possible you’re seeing the effect because the requested extent and
image size are off just a bit. Would need a little more info to be sure.

When tiling you can set edge buffers to deal with this sort of thing.
Generally you’d choose a value to match your widest symbol. How exactly
you’d deal with this depends on how you’re generating tiles (mapcache,
mode=tile, etc...).

—Steve

On Wed, Mar 11, 2020 at 8:59 AM Johannes Paul 
wrote:

> Hello,
> I use a data source (postgis or shapefile, it doesn't matter, the
> behaviour is the same), that is made of a simple polygon created from a
> bbox, on which is applied a simple 'outlinecolor'.
> When calling my URL with a bbox that is *exactly* the size of that
> polygon, mapserver only renders the bottom and the right hand edges; top
> and left hand egdes are not drawn on my output image!?
> When forcing 'WIDTH 2', I do get a thin (1 pixel) outline on the top and
> left hand edges, and a thick (2 pixels) on the bottom and right hand edges.
> I expect this is related to where mapserver is taking the coordinate
> within the pixel (center? corner?), but I'm not sure ? Any option to
> overcome that behaviour ?
> Thanks in advance.
> Johannes
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] URL configuration Style Symbol not changing

2020-03-04 Thread Steve Lime
There's no attempt to turn the name into a symbol index after the mapfile
is initially parsed so it looks like you need to reference the symbol index
directly in this case. So for a polygon a value of 0 would get you a solid
fill, and so on.

On Wed, Mar 4, 2020 at 1:18 AM Martin Over  wrote:

> Hi, according to the migration guide this schould work:
>
> ...[lakes].class[0].style[0]=SYMBOL+crosshatch+COLOR+151+51+151+SIZE+15&...
> Every other Parameter works fine, but the SYMBOL is ignored und the
> default SYMBOL is rendered.
> The is nothing in the logs, DEBUG Level 5.
> Is there a special validation required?
>
> Best regards,
>
> Martin
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapserver 6.4 does not draw dense line segments at lower zoom levels. Why?

2020-03-02 Thread Steve Lime
Hi! My guess is your v.5 style is being interpreted differently in v.6. For
example, what’s the purpose of the ANGLE 360? There were some big changes
between versions 5 and 6. For example you don’t have to use a circular
brush to draw a thick line. You should be able to do something much simpler
like:

  STYLE
COLOR 0 0 255
WIDTH 2
  END

—Steve


On Mon, Mar 2, 2020 at 4:48 PM Ei Fujioka  wrote:

> Hello all,
>
> I'm upgrading a web site that I have been developing for many years. The
> web site uses Mapserver & Mapscript along with PHP. Mapserver layers are
> drawn on top of Google Maps using Javascript.
>
> What I'm struggling to figure out is that a line layer is not drawn at
> lower zoom levels with Mapserver & Mapscript 6.4 and PHP 5.4.16. When
> zooming in, the lines will start getting drawn but still not fully.
>
> The same layer was drawn at any zoom levels without any problem under
> Mapserver 5.2 and PHP 5.2.6.
>
> Are there any mapfile settings (new to Mapserver 6.4 or changed from
> Mapserver 5.2) that limit the number of line segments to be drawn at
> unit cell or affects how the lines are drawn at differently zoom levels?
> Are there any limits in Mapscript/PHP regarding data size to fetch or
> draw? The line data of the layer is stored in a PostgreSQL table which
> has a lot of records (~270,000 line segments). If the line layer does
> not have such a large number of records (e.g. ~10,000), it draws fine.
>
> Please take a look at an image (screenshots) that shows how the lines
> are drawn differently between Mapserver 5.2 and Mapserver 6.4:
> http://seamap.env.duke.edu/images/mapserver6_4_not_draw_lines.png
>
> The new web site is not publicly available yet, so I can't let you
> explore but the existing web site that draws the example line layer fine
> can be accessed at
> http://seamap.env.duke.edu/dataset/2001
> # Please turn on "Survey tracks" in the Layer selection.
>
>
> The snippet of the mapfile is below.
> Thanks for your help in advance!
>
> Ei Fujioka
> Duke University
>
>
> === Mapfile ===
> MAP
>EXTENT -20001364 -15000982 20001253 15000982
>IMAGETYPE "PNG"
>NAME "OBIS-SEAMAP_OGC_SERVICES"
>SIZE 256 256
>STATUS ON
>TRANSPARENT TRUE
>UNITS METERS
>
>OUTPUTFORMAT
>  NAME "PNG"
>  MIMETYPE "image/png"
>  DRIVER "AGG/PNG"
>  EXTENSION "png"
>  IMAGEMODE RGBA
>  TRANSPARENT TRUE
>END # OUTPUTFORMAT
>
>PROJECTION
>  "init=epsg:3857"
>END # PROJECTION
>
> SYMBOL
>NAME "solid_line"
>TYPE ELLIPSE
>POINTS
>  1 1
>END
>  FILLED true
> END
>
>WEB
>  IMAGEPATH "/var/www/tmp/"
>  IMAGEURL "/tmp/"
>  METADATA
>"wms_srs""EPSG:3857 EPSG:4326"
>"ows_enable_request""*"
>"wms_title""Online Mapper"
>  END # METADATA
>END # WEB
>
>LAYER
>  CLASSITEM "classitem_dataset"
>  CONNECTION "user=xxx password=xxx dbname=xxx host=xxx"
>  CONNECTIONTYPE POSTGIS
>  DATA "geom from (SELECT ..., as classitem_dataset, 'solid_line' as
> symbol FROM z_tracks WHERE ...) AS foo USING UNIQUE oid USING SRID=4326"
>  METADATA
>"wms_legend_graphic""true"
>"gml_featureid""oid"
>"title""Survey tracklines"
>"gml_include_items""all"
>"wms_title""Survey tracklines"
>  END # METADATA
>  NAME "survey_tracks"
>  PROJECTION
>"init=epsg:4326"
>  END # PROJECTION
>  STATUS OFF
>  TILEITEM "location"
>  TOLERANCE 1
>  TYPE LINE
>  UNITS METERS
>  CLASS
>NAME "class_0"
>EXPRESSION "0_ON"
>STYLE
>  ANGLE 360
>  COLOR 255 0 0
>  OUTLINECOLOR 255 0 0
>  SIZE 2
>  SYMBOL [symbol]
>END # STYLE
>  END # CLASS
>
>  # In total 60 CLASS ... END are defined
>END # LAYER
>
>
> --
> 
>Ei Fujioka
>Research Scientist
>Nicholas School
>Duke University
>
>(919) 684-3518
>efuji...@duke.edu
> 
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapcache : Incompatible libpng version in application and library

2020-02-28 Thread Steve Lime
I'd think you must multiple libpng installed. Did you search your system
independent of the package manager?

On Wed, Feb 26, 2020 at 4:12 AM Johannes Paul 
wrote:

> Hello,
> I've compiled Mapcache from source, and the installation worked just fine,
> without any error, however when I run mapcache_seed, I get the following
> error :
>
> libpng warning: Application was compiled with png.h from libpng-1.5.13
> libpng warning: Application  is  running with png.c from libpng-1.2.56
> libpng error: Incompatible libpng version in application and library
>
> Mapcache has been compiled correctly using libpng 1.5.13, however I don't
> understand why mapcache_seed is trying to run with libpng 1.2.56 which is
> not even installed !
>
> Any idea ?
> Thanks,
> Johannes
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Show traffic on roads.

2020-02-23 Thread Steve Lime
How are the data stored? With PostGIS one could aggregate features
(ST_Collect?) based on an attribute and render that. You’re still drawing
each segment but likely more efficiently.

—Steve

On Sat, Feb 22, 2020 at 4:25 PM Atlanta Geek  wrote:

> Is there a good way to show heavy traffic using mapserver without drawing
> each individual road segment as a different line.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] FILTER and multi STYLE tags

2020-01-24 Thread Steve Lime
You have to get a little more recent... Those changes didn't appear until
7.4.3. --Steve

On Fri, Jan 24, 2020 at 2:27 AM Kalbermatten Michaël <
michael.kalbermat...@ne.ch> wrote:

> Hi Steve,
>
>
>
> Thanks for the quick answer and sorry for my late reply.
>
>
>
> I downloaded the latest stable release which can be found on the
> gisinternals website. On the 17th January 2020, that would have been
> release-1900-x64-gdal-3-0-2-mapserver-7-4-2, which I think is the latest
> release. Should I try out a daily release ? or where the changes you are
> talking about already included in release 7.4.2?
>
>
>
> Michael
>
>
>
>
>
> > Hi Michaël: What version are you using? There were some fixes related to
>
> > rendering queries in the latest 7.4 release.
>
> >
>
> > —Steve
>
> >
>
> > On Friday, January 17, 2020, Kalbermatten Michaël <
>
> > Michael.Kalbermatten at ne.ch>> wrote:
>
> >
>
> >> Dear all,
>
> >>
>
> >>
>
> >>
>
> >> We have quite a strange filter behavior.
>
> >>
>
> >>
>
> >>
>
> >> We have a layer (relying on PostGIS data and  with multine geometries)
>
> >> containing several classes with some of them having multiple STYLE tags.
>
> >> Something like:
>
> >>
>
> >>
>
> >>
>
> >> CLASS
>
> >>
>
> >> NAME "Ouvrages d'art"
>
> >>
>
> >> EXPRESSION "Ouvrages d'art"
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 255 141 0
>
> >>
>
> >> WIDTH 8
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> END
>
> >>
>
> >> CLASS
>
> >>
>
> >> NAME "OFROU"
>
> >>
>
> >> EXPRESSION "OFROU"
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 255 0 0
>
> >>
>
> >> WIDTH 8
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 255 141 0
>
> >>
>
> >> WIDTH 2
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> END
>
> >>
>
> >> CLASS
>
> >>
>
> >> NAME "CFF"
>
> >>
>
> >> EXPRESSION "CFF"
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 35 35 35
>
> >>
>
> >> WIDTH 3
>
> >>
>
> >> LINECAP butt
>
> >>
>
> >> END
>
> >>
>
> >> STYLE
>
> >>
>
> >> COLOR 35 35 35
>
> >>
>
> >> SYMBOL "barre"
>
> >>
>
> >> SIZE 12
>
> >>
>
> >> GAP -10
>
> >>
>
> >> END
>
> >>
>
> >> END
>
> >>
>
> >>
>
> >>
>
> >> A WMS request on this layer will renderer all objects regarding their
>
> >> class, which is the expected behavior.
>
> >>
>
> >>
>
> >>
>
> >> Now, a FILTER tag is applied on this layer, a request which would look
>
> >> like:
>
> >>
>
> >>
>
> >>
>
> >> http://myserver.com/my_mapserver_cgi?SERVICE=WMS
>
> >>
>
> >> =1.3.0
>
> >>
>
> >> =GetMap
>
> >>
>
> >> =image/png
>
> >>
>
> >> =true
>
> >>
>
> >> =rt55_chantiers_futurs
>
> >>
>
> >> =
>
> >>
>
> >> =(http://www.opengis.net/ogc
> ">>><
>
> >> PropertyName>>annee_debut>><
>
> >> Literal>>2021>>><
>
> >>
> Literal>>2021)
>
> >>
>
> >> =EPSG:2056
>
> >>
>
> >> =1925
>
> >>
>
> >> =936
>
> >>
>
> >> =2503325,1194925,2599575,1222975
>
> >>
>
> >>
>
> >>
>
> >> (I removed the URL escaping and made it multiline for readability)
>
> >>
>
> >>
>
> >>
>
> >> This request generates something really strange. Returned features from
>
> >> the server are rendered until Mapserver encounters the first feature
> which
>
> >> corresponds to a class having more than one STYLE tag. All other
> features
>
> >> (coming next regarding the request sent to the PostGIS server) are not
>
> >> rendered any more. Mapserver does not trigger any error, nor does the
>
> >> database. In the mapserver logs:
>
> >>
>
> >>
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].64 CGI Request 1 on process 4228
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].649000 FLTLayerApplyPlainFilterToLayer():
>
> >> ("[annee_debut]" ~* ".*2021.*"), rect=2503325,1194925,2599575,1222975
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): rendering using
>
> >> outputformat named png (AGG/PNG).
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): WMS/WFS set-up and query,
>
> >> 0.000s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Layer 917
>
> >> (rt55_chantiers_futurs), 0.000s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Drawing Label Cache,
> 0.000s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].658000 msDrawMap() total time: 0.003s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].709000 msSaveImage(stdout) total time: 0.051s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].709000 mapserv request processing time
>
> >> (msLoadMap not incl.): 0.069s
>
> >>
>
> >> [Wed Jan 15 08:03:11 2020].709000 msFreeMap(): freeing map at
>
> >> 0258E99A8030.
>
> >>
>
> >>
>
> >>
>
> >> After playing with the Mapfile and related data for a few hours, we
>
> >> discovered that because we analyzed  the following elements :
>
> >>
>
> >>
>
> >>
>
> >> - The feature order in the database
>
> >>
>
> >> - The STYLE tags in the mapfile classes: making all classes having
>
> >> only one STYLE tag
>
> >>
>
> >>
>
> 

Re: [mapserver-users] FILTER and multi STYLE tags

2020-01-17 Thread Steve Lime
Hi Michaël: What version are you using? There were some fixes related to
rendering queries in the latest 7.4 release.

—Steve

On Friday, January 17, 2020, Kalbermatten Michaël <
michael.kalbermat...@ne.ch> wrote:

> Dear all,
>
>
>
> We have quite a strange filter behavior.
>
>
>
> We have a layer (relying on PostGIS data and  with multine geometries)
> containing several classes with some of them having multiple STYLE tags.
> Something like:
>
>
>
> CLASS
>
> NAME "Ouvrages d'art"
>
> EXPRESSION "Ouvrages d'art"
>
> STYLE
>
> COLOR 255 141 0
>
> WIDTH 8
>
> LINECAP butt
>
> END
>
> END
>
> CLASS
>
> NAME "OFROU"
>
> EXPRESSION "OFROU"
>
> STYLE
>
> COLOR 255 0 0
>
> WIDTH 8
>
> LINECAP butt
>
> END
>
> STYLE
>
> COLOR 255 141 0
>
> WIDTH 2
>
> LINECAP butt
>
> END
>
> END
>
> CLASS
>
> NAME "CFF"
>
> EXPRESSION "CFF"
>
> STYLE
>
> COLOR 35 35 35
>
> WIDTH 3
>
> LINECAP butt
>
> END
>
> STYLE
>
> COLOR 35 35 35
>
> SYMBOL "barre"
>
> SIZE 12
>
> GAP -10
>
> END
>
> END
>
>
>
> A WMS request on this layer will renderer all objects regarding their
> class, which is the expected behavior.
>
>
>
> Now, a FILTER tag is applied on this layer, a request which would look
> like:
>
>
>
> http://myserver.com/my_mapserver_cgi?SERVICE=WMS
>
> =1.3.0
>
> =GetMap
>
> =image/png
>
> =true
>
> =rt55_chantiers_futurs
>
> =
>
> =(http://www.opengis.net/ogc;><
> PropertyName>annee_debut<
> Literal>2021<
> Literal>2021)
>
> =EPSG:2056
>
> =1925
>
> =936
>
> =2503325,1194925,2599575,1222975
>
>
>
> (I removed the URL escaping and made it multiline for readability)
>
>
>
> This request generates something really strange. Returned features from
> the server are rendered until Mapserver encounters the first feature which
> corresponds to a class having more than one STYLE tag. All other features
> (coming next regarding the request sent to the PostGIS server) are not
> rendered any more. Mapserver does not trigger any error, nor does the
> database. In the mapserver logs:
>
>
>
> [Wed Jan 15 08:03:11 2020].64 CGI Request 1 on process 4228
>
> [Wed Jan 15 08:03:11 2020].649000 FLTLayerApplyPlainFilterToLayer():
> ("[annee_debut]" ~* ".*2021.*"), rect=2503325,1194925,2599575,1222975
>
> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): rendering using
> outputformat named png (AGG/PNG).
>
> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): WMS/WFS set-up and query,
> 0.000s
>
> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Layer 917
> (rt55_chantiers_futurs), 0.000s
>
> [Wed Jan 15 08:03:11 2020].658000 msDrawMap(): Drawing Label Cache, 0.000s
>
> [Wed Jan 15 08:03:11 2020].658000 msDrawMap() total time: 0.003s
>
> [Wed Jan 15 08:03:11 2020].709000 msSaveImage(stdout) total time: 0.051s
>
> [Wed Jan 15 08:03:11 2020].709000 mapserv request processing time
> (msLoadMap not incl.): 0.069s
>
> [Wed Jan 15 08:03:11 2020].709000 msFreeMap(): freeing map at
> 0258E99A8030.
>
>
>
> After playing with the Mapfile and related data for a few hours, we
> discovered that because we analyzed  the following elements :
>
>
>
> - The feature order in the database
>
> - The STYLE tags in the mapfile classes: making all classes having
> only one STYLE tag
>
>
>
> Thus, if a use these classes:
>
>
>
> CLASS
>
> NAME "Ouvrages d'art"
>
> EXPRESSION "Ouvrages d'art"
>
> STYLE
>
> COLOR 255 141 0
>
> WIDTH 8
>
> LINECAP butt
>
> END
>
> END
>
> CLASS
>
> NAME "OFROU"
>
> EXPRESSION "OFROU"
>
> STYLE
>
> COLOR 255 0 0
>
> WIDTH 8
>
> LINECAP butt
>
> END
>
> END
>
> CLASS
>
> NAME "CFF"
>
> EXPRESSION "CFF"
>
> STYLE
>
> COLOR 35 35 35
>
> WIDTH 3
>
> LINECAP butt
>
> END
>
> END
>
>
>
> Then everything works as expected (using a filter tag in the request), and
> all features are rendered by Mapserver.
>
>
>
> Moreover it is not a DB issue, because if you send a WFS request using
> exactly the same layer definition and the same filter to Mapserver, then
> everything is working as expected (all expected features are returned).
>
>
>
> This really looks like some kind of rendering issue combined to filtering.
>
>
>
> Any hints or thoughts on that ?
>
>
>
> Best regards
>
>
>
> Michael
>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] mapscript with php as module does not flush buffers

2020-01-07 Thread Steve Lime
Hmmm... Raster or vector? I can poke around the GDAL/OGR code to see if
something is happening in MapServer. Have you tried explicit layer closes?

On Thu, Jan 2, 2020 at 5:06 PM Jan Hartmann  wrote:

> Hi all,
>
> I use PHP-Mapscript to server WMS-maps, with a MapFile based on an
> underlying VRT-file. My application changes the geometry transformation
> of the VRT-file, and reloads the WMS. It uses the same MapFile ($oMap =
> ms_newMapObj($mapfile), but with a changed underlying VRT-file;
>
> When I use PHP as CGI, the reloaded WMS correctly shows the map with the
> new transformation. With PHP as an Apache module,  older transformations
> are displayed in a random manner. I guess the VRT-file gets buffered
> somewhere, but I am unable to flush that buffer, either with
> PHP-functions or with random parameters for the WMS-call.
>
> Any ideas? I would prefer to use PHP as a module.
>
> Thanks,
>
> Jan
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Issue with label content for UNION layers

2019-12-10 Thread Steve Lime
What version?

On Tuesday, December 10, 2019, Julian Hollingbery 
wrote:

> Hi list,
>
>
>
> I’m seeing a strange phenomenon regarding label content for a layer with
> connectiontype UNION.
>
> A WMS request to the parent layer (including the UNION layer) produces the
> result I’d expect, but the same request directly to the UNION layer labels
> all features with the same label.
>
> Correct:
>
> http://172.30.229.42//fcgi-bin/mapserv.fcgi?map=/
> mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_
> Stednavne_test.map=WMS=1.3.0=
> GetMap=588000.0,6042000.0,888000.0,6342000.0=EPSG:
> 25832=500=500=danske_stednavne&
> STYLES==image/png=FALSE
> 
>
> Wrong:
>
> http://172.30.229.42//fcgi-bin/mapserv.fcgi?map=/
> mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_
> Stednavne_test.map=WMS=1.3.0=
> GetMap=588000.0,6042000.0,888000.0,6342000.0=EPSG:
> 25832=500=500=landskabsform=&
> FORMAT=image/png=FALSE
> 
>
>
>
> The reponses can be seen here: https://www.dropbox.com/sh/
> 121shf8djnx3b3d/pGTLfcuga_mXWDaWFsKQa?dl=0
>
>
>
> Any thoughts?
>
>
>
> Best Regards,
>
> Julian
>
>
>
> MAP
>
> NAME "danske_stednavne"
>
> EXTENT 12 590 100 650
>
> MAXSIZE 1
>
>
>
> OUTPUTFORMAT
>
> NAME "png24"
>
> DRIVER "AGG/PNG"
>
> MIMETYPE "image/png; mode=24bit"
>
> EXTENSION "png"
>
> IMAGEMODE "RGB"
>
> FORMATOPTION INTERLACE=OFF
>
> END
>
> PROJECTION
>
> "init=epsg:25832"
>
> END
>
> DEBUG 0
>
> CONFIG "ON_MISSING_DATA" "LOG"
>
> FONTSET "fonts/fontset.txt"
>
>
>
> WEB
>
> METADATA
>
> "wms_srs" "EPSG:25832 EPSG:4326 EPSG:4258 EPSG:25833
> EPSG:32632 EPSG:32633 EPSG:4093 EPSG:4094 EPSG:4095 EPSG:4096 EPSG:3395
> EPSG:3857"
>
> END
>
> END
>
>
>
> LAYER
>
> NAME "landskabsform"
>
> EXTENT 12 590 100 650
>
> TEMPLATE "blank.html"
>
> LABELITEM skrivemaade
>
> STATUS DEFAULT
>
> TYPE polygon
>
> CONNECTIONTYPE UNION
>
> CONNECTION "oer_store,oer_mellem"
>
> METADATA
>
> "wms_srs" "epsg:25832"
>
> END
>
> PROJECTION
>
> "init=epsg:25832"
>
> END
>
>
>
> STYLEITEM "AUTO"
>
> # Define an empty class that will be filled at runtime from the
> color and
>
> # styles read from each source layer.
>
> CLASS
>
> END
>
>
>
> END #LAYER
>
>
>
> LAYER
>
> NAME "oer_store"
>
> INCLUDE "./danske_stednavne_post_include.map"
>
> DATA "geometri from stednavne_nohist_l1_wms.oer_store using
> unique objectid using srid=25832"
>
> TYPE polygon
>
> STATUS OFF
>
> LABELITEM "skrivemaade"
>
> METADATA
>
> "wms_srs" "epsg:25832"
>
> END
>
> PROJECTION
>
> "init=epsg:25832"
>
> END
>
> CLASS
>
> STYLE
>
> OUTLINECOLOR 91 91 91
>
> WIDTH 1
>
> END #STYLE
>
>
>
> LABEL
>
> COLOR 0 0 0
>
> FONT "verdana"
>
> TYPE truetype
>
> SIZE 12
>
> END #LABEL
>
> END #CLASS
>
> END #LAYER
>
>
>
> LAYER
>
> NAME "oer_mellem"
>
> INCLUDE "./danske_stednavne_post_include.map"
>
> DATA "geometri from stednavne_nohist_l1_wms.oer_mellem using
> unique objectid using srid=25832"
>
> TYPE polygon
>
> STATUS OFF
>
> LABELITEM skrivemaade
>
> METADATA
>
> "wms_srs" "epsg:25832"
>
> END
>
> PROJECTION
>
> "init=epsg:25832"
>
> END
>
> CLASS
>
> STYLE
>
> OUTLINECOLOR 91 91 91
>
> WIDTH 1
>
> END #STYLE
>
>
>
> LABEL
>
> COLOR 0 0 0
>
> FONT "verdana"
>
> TYPE truetype
>
> SIZE 10
>
> END #LABEL
>
> END #CLASS
>
> END #LAYER
>
>
>
> END #MAP
>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Info Template

2019-11-20 Thread Steve Lime
For the sake of completeness, "$value" is the default format and doesn't
need to be explicitly set. --Steve

On Wed, Nov 20, 2019 at 7:29 AM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi Markus,
>
>
>
> I am not sure if you’d prefer me to answer in Finnish but English is
> easier for the majority of readers.
>
>
>
> Certainly it is possible to use data from a database with templates yes
> but you did not tell the details about for what purpose you are trying to
> use the templates. The DATA (perhaps with CONNECTION) that is used in LAYER
> https://mapserver.org/mapfile/layer.html can also be used as a data
> source for templates.
>
>
>
> An example from an old mail
> http://osgeo-org.1560.x6.nabble.com/html-tags-in-GetFeatureInfo-td5224781.html
> contains a template that defines the html format of GetFeatureInfo. Each
> “item name” is a name of the attribute in the source data. If vector data
> for the LAYER comes from MYSQL then the attributes are read from MYSQL as
> well.
>
>
>
> 
> NIMI
>  [item name=NIMI format="$value" escape=none]
> LISÄTIEDOT
>  [item name=KIELLONLISATIETO format="$value" escape=none]
> VOIMASSAOLO
>  [item name=VOIMASSAOLO format="$value" escape=none]
> YHTEYSTIEDOT
>  [item name=YHTEYSTIEDOT format="$value" escape=none]
>  
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* mapserver-users  
> *Puolesta
> *Markus Lütke Brintrup
> *Lähetetty:* keskiviikko 20. marraskuuta 2019 14.53
> *Vastaanottaja:* mapserver-users@lists.osgeo.org
> *Aihe:* [mapserver-users] Info Template
>
>
>
> Hallo Liste,
>
>
>
> besteht die Möglichkeit in der Template.html eines Map-Projektes eine
> Datenbankanbindung an zu steuern?
>
> Beispiel:
>
> 
>
> Projektname:
>
> [Werte aus MYSQL-DB]
>
> 
>
>
>
> Freundliche Grüße
>
>
>
> Markus Lütke Brintrup
>
>
>
> WipflerPLAN
>
> Niederlassung Donauries
>
>
>
> Telefon: 09081 27509-44
>
> Telefax: 09081 27509-50
>
> m...@wipflerplan.de
>
> *www.wipflerplan.de *
>
>
>
> WipflerPLAN Planungsgesellschaft mbH
>
> Standort Nördlingen
>
> An der Lach 11a
>
> 86720 Nördlingen
>
> Amtsgericht Ingolstadt HRB 190595
>
> Geschäftsführer:
>
> Wilhelm Wipfler
>
> Ursula Burkart
>
> Adelheid Buchard
>
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Query

2019-11-15 Thread Steve Lime
That was setup by one of the MapServer PSC members and can be considered
official - it's a little out of date however (MapServer 7.2 I believe).

On Fri, Nov 15, 2019 at 8:54 AM Bobby Biran  wrote:

> Hi MapServer
>
>
>
> We can across https://hub.docker.com/u/mapserver in DockerHub and wanted
> to confirm if this is an official account from yourselves ?
>
>
>
> Regards
>
> Bobby
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] two values in runtime-substitution Filter vs. processing native_filter

2019-11-01 Thread Steve Lime
So you're seeing a different substitution result when using %key% in:

  FILTER '...%key%...'

versus:

  PROCESSING 'NATIVE_FILTER=...%key%'

If so that would be a bug. The value that replaces %key% should be
consistent. The value you supply could be different though because how the
expression is being further processed (e.g. MapServer vs. layer-specific
driver) is different. I'll have to whip up a quick test case to verify.

Otherwise I think in general you'd want to avoid lists if possible and send
things individually so key1=value1=value2... and then use something
like:

PROCESSING 'NATIVE_FILTER=...column in ('%key1%','%key2'%)

I would think validation would be easier in this case but I understand it
might not be practical with an indeterminate number of options. In that
case its probably best to send a completely encoded set of values (complete
with quotes) depending on the diver, so...

  key=%27value1%27%2C%27value2%27%2C%27value3%27

and then use:

  PROCESSING 'NATIVE_FILTER=...column in ('%key%)

I can't think of an alternative short of 1) adding the ability to split and
format strings before substitution (set a delimiter and a printf pattern)
or 2) adding a function like Perl's qw (quote word) that would handle
string delimiters for you qw(value1,value2). The latter would only work for
FILTERs,

--Steve

On Thu, Oct 31, 2019 at 3:31 AM Jörg Thomsen (WhereGroup) <
joerg.thom...@wheregroup.com> wrote:

> Good morning everyone,
>
> we built an application which uses a runtime substitution for the filter
> string. And we found a different behavior between (the old) Filter and
> the native_processing filter if two values are parsed.
>
> the request http://?..=vaule1,value2
> results to
> 'value1','value2' with the old FILTER () and to
> 'value1,value2'when using PROCESSING 'NATIVE_FILTER
>
> We have to use the PROCESSING 'NATIVE_FILTER, but need as result
> 'value1','value2', because we want to use it in a sql-query like:
> value in ('value1','value2').
>
> First question:
> has anyone an idea how to handle this? We could request
> http://?..=value1','value2
> but that's no nice solution.
>
> Second question: is it the wanted behavior or perhaps a bug?
>
> Jörg
>
> --
>
> ***
> Where2B Konferenz 2019
> 12. Dezember 2019 in Bonn
> where2b-conference.com
> ***
>
> Jörg Thomsen
> WhereGroup GmbH
> Gillweg 3
> 14193 Berlin
> Germany
>
> Fon: +49 (0)30 / 5130 278 74
> Fax: +49 (0)30 / 5130 278 11
>
> joerg.thom...@wheregroup.com
> www.wheregroup.com
>
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
>
> ---
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapcache - Is it possible to have two tilesets share a single cache at particular zoom levels?

2019-10-24 Thread Steve Lime
You'd still need to configure the political map tileset not to generate
tiles in the symlinked folders but to serve tiles from those folders - I
don't think that's possible. IMHO it's better to configure your political
map tiles to only be available for a specific range of zoom levels and
advertise that explicitly.

On Thu, Oct 24, 2019 at 3:34 PM Mark Volz  wrote:

> Andreas,
>
> Good idea.  It looks like Windows can create symlinks.  I suppose I could
> try symlinking the cache for levels 5-11.  Do you know if I would need to
> create hard or soft links to do this?   Also, I would like to make sure our
> backup software does not try to backup the actual data twice...
> Reference:
> https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
>
> Thanks!
>
> Sincerely,
> Mark Volz, GISP
> Lyon County GIS Coordinator
> 504 Fairgrounds Rd
> Marshall, MN 56258
> Ph:  (507) 532-8218
> http://lyonco.org/
> http://geomoose.lyonco.org/
>
>
> >What about symlinking the level directories?
>
>
> > -Original Message-
> > From: mapserver-users [mailto:mapserver-users-
> > boun...@lists.osgeo.org] On Behalf Of Mark Volz
> > Sent: Wednesday, October 23, 2019 4:12 PM
> > To: mapserver-users@lists.osgeo.org
> > Subject: [mapserver-users] Mapcache - Is it possible to have two
> > tilesets share a single cache at particular zoom levels?
> >
> > Hello,
> >
> >
> >
> > I have two similar tilesets configured in Mapcache.  One of the
> > tilesets displays a political map at small scales, then changes to an
> > air photo map as the user zooms into the map.  The second tileset
> > displays air photos at every zoom level.  It would be useful if these
> > tilesets could share a single cache for zoom levels 5-11.  This way we
> > could save a significant amount of space on the server.
> >
> >
> >
> > Example #1:
> >
> > Political and Air Photo Basemap:
> >
> > * Zoom level 0-4:  Use the cache from the "political map
> > cache"
> >
> > * Zoom level 5-11: Use the cache from the "air photo
> > cache"
> >
> > Air Photo Basemap
> >
> > * Zoom level 0-11:  Use the cache from the "air photo
> > cache"
> >
> > Result:
> >
> > * Any tiles at level 5-11, which will take up the majority
> > of the space on the sever will not need to be duplicated between the
> > two tilesets.
> >
> >
> >
> > Please let me know if it is possible to share caches between different
> > tilesets.
> >
> >
> >
> > Thanks!
> >
> >
> >
> > Sincerely,
> >
> > Mark Volz, GISP
> >
> > Lyon County GIS Coordinator
> >
> >
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] PIXMAP Symbols png and jpeg not recongnized

2019-10-23 Thread Steve Lime
Any chance there are multiple versions of libpng and libjpeg?

On Wed, Oct 23, 2019 at 1:31 AM Flavio Hendry  wrote:

> Hi Steve
>
> Thanks for the answer ... the issue we see, is that png and jpeg do not
> work as PIXMAP symbols - such as the below throws an error:
>
> SYMBOL
>   NAME "cablecar"
>   TYPE PIXMAP
>   IMAGE 'symbols/cablecar.png'
> END
>
> The error it throws:
> "Image handling error. Failed to draw layer named 'Aerialway Points'."
>
> Using TYPE PIXMAP with gif or TYPE SVG works ...
>
> We have:
> - libpng-dev1.6.34
> - libjpeg-dev 8c
>
>
> --
> Mit freundlichem Gruss / Best regards
> Flavio Hendry
>
> 
> TYDAC Inc.  - http://www.tydac.ch
> Swiss Maps  - http://www.mapplus.ch
> 
>   Mit freundlichen Gruessen / Kind Regards
>  Flavio Hendry, CEO - mailto:fla...@tydac.ch
>  TYDAC AG - http://www.tydac.ch
> Geographic Information Solutions
>    Optingenstrasse 27 -- CH-3013 Bern
> 
>  Tel +41 (0)31 368 0180
> 
> Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

  1   2   3   4   5   6   >