Re: [MapServer-users] Data from MSSQL without extent

2024-04-25 Thread Seth G via MapServer-users
Hi,

You are probably looking for *wfs_use_default_extent_for_getfeature* (and 
setting to "false" in the LAYER METADATA) - see 
https://mapserver.org/ogc/wfs_server.html#layer-object

I ran into this myself as described in 
https://github.com/MapServer/MapServer/issues/5994

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Apr 25, 2024, at 5:55 PM, Benedek Petrovicz via MapServer-users wrote:
> Hi!
> 
> Is there a possibility to skip filtering for the extent when pulling in data 
> from MSSQL?
> I have to deal with some layers where I'd like to load everything for a 
> certain criteria, but don't need the extent filtering.
> 
> Thank you
> Petrovicz
> ___
> 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] setting COLOR of SVG symbol ?

2024-03-28 Thread Seth G via MapServer-users
Hi,

Unfortunately, I don't think this is currently possible, based on a previous 
reply from Steve Lime [1]:

> I don't believe you can muck with the SVG color since SVG can carry multiple 
> elements and colors. That complexity doesn't map very well to a single color 
> value in a styleObj. It's probably best to consider SVG as immutable, same as 
> an image symbol. You can use truetype fonts (or vector symbols) if you want 
> something scaleable where you can alter color.

I guess if it works in QGIS then it should be possible to implement this in the 
MapServer codebase too. 

Seth

[1] https://lists.osgeo.org/pipermail/mapserver-users/2019-June/081218.html

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Mar 27, 2024, at 10:45 PM, karsten via MapServer-users wrote:
> Hi All,
>  
> for the first time trying to use svg symbols for a layer. The svgs I am using 
> can be styled in QGIS (have edited to allow). 
> What is the status in MapServer should setting  the color via a style work ? 
> 
> I had no luck setting the COLOR on the symbol so far
> 
> Here is my style
>  
>  STYLE
>SYMBOL "electric_point"
>SIZE 20
>COLOR 255 0 0
>  END # STYLE 
>  
> symbol
>  
> SYMBOL
> NAME 'electric_point'
> TYPE svg
> image 'symbols/annotation/electric.svg'
> END
>  
> So far this renders black symbols , any ideas how to fix this ?
>  
> Cheers
> Karsten
>  
> Karsten Vennemann
> www.terragis.net
>  
> ___
> 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, OpenLayers and OUTPUTFORMAT explanations

2024-03-20 Thread Seth G via MapServer-users
Hi,

Probably best to check the WFS service GetCapabilities document to check which 
formats are supported. 
(From memory) wfs_getfeature_formatlist can include either the NAME or the 
MIMETYPE of the OUTPUTFORMAT.
You have MIMETYPE set to "application/json;subtype=geojson", so maybe try 
chaging this to "application/json" or changing the NAME from "geojson" to 
""application/json" to get an exact match. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Tue, Mar 19, 2024, at 11:26 AM, mathias cunault via MapServer-users wrote:
> Hello,
> Something that was never clear to me.
> Here is a mapfile for a WFS definition:
> MAP
> NAME "Mapserver-Inrap"
> FONTSET "C:\ms4w\Apache\site\fonts\fonts.txt"
> OUTPUTFORMAT
> NAME "geojson"
> DRIVER "OGR/GEOJSON"
> MIMETYPE "application/json;subtype=geojson" #option
> # FORMATOPTION "STORAGE=stream" #requis
> # FORMATOPTION "FORM=SIMPLE"
> FORMATOPTION "STORAGE=memory" #requis
> FORMATOPTION "FORM=SIMPLE"
> END #fin format
> 
> EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 #xmin 
> ymin xmax ymax
> 51.07538310654 #xmin ymin xmax ymax
> UNITS METERS
> DEBUG 5
> CONFIG "CPL_DEBUG" "ON"
> CONFIG "PROJ_DEBUG" "ON"
> CONFIG MS_ERRORFILE 
> "C:/ms4w/Apache/error/errorMapFile_vue_ol_prescription.txt"
> 
> SYMBOLSET "C:\ms4w\Apache\site\symbols\symbols.sym"
> 
> PROJECTION # proj de sortie
> "init=epsg:2154"
> END
> 
> WEB 
> METADATA
> "wfs_title" "WFS Caviar"
> "wfs_onlineresource" 
> "http:///mapserv.exe?MAP=C:/ms4w/Apache/site/mapfile/vue_ol_prescription.map;
> "wms_encoding" "UTF-8"
> "wfs_srs" "EPSG:2154 EPSG:32620 EPSG:3857 EPSG:900913 EPSG:4326"
> "wfs_enable_request" "*"
> "wfs_abstract" "blabla"
> "wfs_getfeature_formatlist" "application/json, GeoJSON, json"
> END #fin metadata
> END #end web
> 
> #-debut prescription
> LAYER
> NAME "prescription"
> TYPE POLYGON
> CONNECTIONTYPE POSTGIS
> CONNECTION "host=xxx dbname=activite user=wxxx password=xxx port=5432"
> DATA "geom from activite.vue_ol_prescription using unique gid using SRID=2154"
> EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 #aide 
> pour performance
> PROCESSING "CLOSE_CONNECTION=DEFER"
> CLASS
> ...
> END #-fin classe unique
> METADATA
> "gml_include_items" "all" #obligé pour afficher attributs getfeatureinfo
> "wfs_title" "prescription_2154"
> #d'après la doc pas besoin si défini dans les metadata de la map cf.10.1
> #"wfs_srs" "EPSG:2154"
> "gml_featureid" "gid"
> "wfs_enable_request" "*"
> "wfs_use_default_extent_for_getfeature" "false"
> # si geojson en premier alors geoson dans l'url pour OpenLayers:
> "wfs_getfeature_formatlist" "GeoJSON, json, application/json"
> END #fin metadata prescription
> TEMPLATE "bidon.html"
> END #fin layer prescription
> 
> END #-fin mapfile
> 
> It works fine in QGIS.
> In a javascript file with the OpenLayers library, I can define a source with 
> an url function like this:
>  url: function (extent) {
> return (
>   "http:///cgi-bin/mapserv.exe?MAP=C:/.../vue_ol_prescription.map&; +
>   "service=WFS=1.1.0=GetFeature=prescription&" +
>   "outputformat=geojson=EPSG:2154=" +
>   extent.join(",") +
>   ",EPSG:3857"
> )
> 
> Why can't I use outputformat = application/json though it is permitted by the 
> outpuformat in mapfile layer definition ? I have an error : "application.json 
>  not permitted".
> Leehan
> ___
> 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 issues with WFS

2024-02-17 Thread Seth G via MapServer-users
Hi Carlos,

If you add DEBUG 5 to the LAYER, and set the CONFIG MS_ERRORFILE do you get 
more details in the logs for why the filter is failing?
The error indicates MapServer cannot parse the filter. The unencoded filter is 
shown below. 

http://www.opengis.net/fes/2.0; 
xmlns:gml="http://www.opengis.net/gml/3.2;>

  
   wkb_geometry
   
448535 197714
448849 197791
   
  
  http://www.opengis.net/fes/2.0;>
   wkb_geometry
   http://www.opengis.net/fes/2.0; name="geomFromWKT">
http://www.opengis.net/fes/2.0;>POLYGON((447915.652115244 
195673.1860001606531, 449272.4820001816079 195673.1860001606531, 
449272.4820001816079 200345.652186265, 447915.652115244 
200345.652186265, 447915.652115244 
195673.1860001606531))
   
  



I'm guessing the geomFromWKT is not supported, so the filter should pass a GML 
Polygon object to filter by using an intersecting geometry. See 
https://mapserver.org/ogc/filter_encoding.html#tests for an example



Geometry



135.5329,34.6624 135.4921,34.8153 135.3673,34.7815
  135.3800,34.6216 135.5361,34.6210 135.5329,34.6624






Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Mon, Feb 12, 2024, at 1:33 PM, Carlos Padron Florez via MapServer-users 
wrote:
> Hi,
> 
> I have a WFS version 2.0.0 and I want to request from it features using a 
> filter but I get this error:
> msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in 
> GetFeature :  
> The request is the following:
> 
> https://SERVER/wfs?SERVICE=WFS=GetFeature=2.0.0=ms:layername=0=100=urn:ogc:def:crs:EPSG::27700=%3Cfes:Filter
>  xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22 
> xmlns:gml%3D%22http://www.opengis.net/gml/3.2%22%3E%0A %3Cfes:And%3E%0A  
> %3Cfes:BBOX%3E%0A   
> %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A   
> %3Cgml:Envelope srsName%3D%22urn:ogc:def:crs:EPSG::27700%22%3E%0A
> %3Cgml:lowerCorner%3E448535 197714%3C/gml:lowerCorner%3E%0A
> %3Cgml:upperCorner%3E448849 197791%3C/gml:upperCorner%3E%0A   
> %3C/gml:Envelope%3E%0A  %3C/fes:BBOX%3E%0A  %3Cfes:Intersects 
> xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3E%0A   
> %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A   
> %3Cfes:Function xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22 
> name%3D%22geomFromWKT%22%3E%0A%3Cfes:Literal 
> xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3EPOLYGON((447915.652115244
>  195673.1860001606531, 449272.4820001816079 195673.1860001606531, 
> 449272.4820001816079 200345.652186265, 447915.652115244 
> 200345.652186265, 447915.652115244 
> 195673.1860001606531))%3C/fes:Literal%3E%0A   %3C/fes:Function%3E%0A  
> %3C/fes:Intersects%3E%0A %3C/fes:And%3E%0A%3C/fes:Filter%3E%0A
> 
> The same request, with obvious changes of server name, works on Geoserver. 
> This request is generated by Qgis so I don't if I can fix it via Mapserver or 
> via QGIS.
> Any ideas?
> 
> Kind regards
> 
> *Carlos Padrón, MRes *| Geomatics Team Lead
> 
>  
> 
> D: 01865 664120  W: www.gigaclear.com
> 
>  
> 
>  
> 
> signature_261337870
> 
> Gigaclear ltd, Building 1, Wyndyke Furlong, Abingdon, Oxfordshire, OX14 1UQ
> 
> Gigaclear plc is registered in England and Wales with company number 07476617
> 
>  
> 
> ___
> 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] Pass time range in WCS 1.0.0 request GetCoverage

2024-02-17 Thread Seth G via MapServer-users
Hi Michał,

Looking at the code, I think this is an error in the documentation - time 
ranges in WCS 1.0 do not seem to be supported. There are no tests that cover 
time ranges either. 

You could use runtime substitution to create your own queries with custom 
parameters e.g. START_DATE=2022-03-10_DATE=2022-04-10 

The section at 
https://mapserver.org/ogc/wcs_server.html#spatio-temporal-indexes recommends 
using a TILEINDEX for the layer. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Fri, Feb 16, 2024, at 4:31 PM, Michał Bojko via MapServer-users wrote:
> Hello,
> I am trying to build WCS service with usage of postgis database, but now I am 
> unable to pass timerange in request to server. In my postgis database I have 
> specified column for geometry and timestamp and request that use BBOX and 
> TIME (single value) work fine. The problem is I cannot pass multiple dates or 
> date range. When providing TIME in such manner, I receive this error message: 
> "WCS server error. Temporal ranges are not supported, only individual 
> values". In official documentation it is stated that it's possible to pass at 
> least two TIME parameters at once in version 1.0.0, but it doesn't work for 
> me 
> (https://mapserver.org/pl/ogc/wcs_server.html#test-with-a-getcoverage-request).
>  Is there specified way to pass timeranges/timelist (I didn't find any 
> information about it)? Or maybe it isn't possible to pass multiple values? 
> But when I look into mapserver logs I see that postgis query searches for 
> records that are between selected one day, so why wouldn't it be possible to 
> pass two days and search for records between them? Below I will paste some 
> request and queries:
> Request with single TIME value that's working for me:
> http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10
>  
> 
> 
> Request with two TIME values that isn't working for me and error message:
> http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10,2022-03-15
> WCS server error. Temporal lists are not supported, only individual values.
> 
> Request with TIME range that also isn't working for me and error message:
> http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10/2022-03-15
> WCS server error. Temporal ranges are not supported, only individual values.
> 
> Postgis query from mapserver logs when request contains only one TIME value:
> select 
> "timestamp"::text,"cloudless_10"::text,"epsg"::text,ST_AsBinary(("geometry"),'NDR')
>  as geom,"unique_id"::text from (select * from mrc where maxcc <= 100 AND 
> (pid  = '-1' OR '-1' = '-1') AND (tile  = '-1' OR '-1' = '-1') order by maxcc 
> desc) as subquerry where ST_Intersects("geometry", 
> ST_GeomFromText('POLYGON((3572710 6277224,3572710 6334334,3637738 
> 6334334,3637738 6277224,3572710 6277224))',3857)) and ("timestamp" between 
> date_trunc('day',date '2022-03-10') and date_trunc('day',date '2022-03-10') + 
> interval '1 day' - interval '1 second')
> 
> So, is there any possibility to use multiple TIME values in one GetCoverage 
> request?
> Best regards,
> Michał
> 
> *Michał Bojko*
> Trainee 
> CloudFerro S.A.
> office: Fabryczna 5  *m:* 502 705 120
> 00-446 Warszawa, Poland    *e:* mbo...@cloudferro.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] CGI variable "map" fails to validate

2024-02-07 Thread Seth G via MapServer-users
Hi Matthew,

The CONFIG file I think is only reloaded when IIS or the Application Pool is 
restarted, so some changes to the regex may have been ignored. 
Do you have a sample request with the = parameter? Is there anything in a 
web.config file that could be stripping these out or modifying them?

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote:
> MS_MAP_PATTERN '.' also results in the same failed validation error, 
> which is what makes me think the issue may be with another config 
> setting. '.' should match any input, right?
>
> Just to make sure my config file was being loaded, I commented out the 
> MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web 
> application error. Required configuration value MS_MAP_PATTERN not set."
>
> Matt
>
> -Original Message-
> From: MapServer-users  On 
> Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users
> Sent: Wednesday, February 7, 2024 3:24 AM
> To: mapserver-users@lists.osgeo.org
> Subject: Re: [MapServer-users] CGI variable "map" fails to validate
>
> [You don't often get email from mapserver-users@lists.osgeo.org. Learn 
> why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi,
>
> I'm not sure whether the pattern is correct. Shouldn't ist start with ^?
>
> Have yout tried
> MS_MAP_PATTERN '.'? (not for production, just as a test)
>
> Jörg
>
> Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapServer-users:
>> Hi,
>>
>> Having trouble making requests since updating to 8.0.1 from 7.6.2.
>> Mapserver is running in IIS using FastCGI and the configuration steps
>> from:
>> https://maps/
>> erver.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40stan
>> tec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4d
>> 80281e7%7C0%7C0%7C638428910243090792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM
>> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C
>> =dh%2BpgGwk5996f0GEMeX7O8rcv5J81TnPzeFNZ9XoVLs%3D=0
>> > server.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40sta
>> ntec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4
>> d80281e7%7C0%7C0%7C638428910243098246%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
>> MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7
>> C=OIoWHSlKZJrXWspqwVfY5jhX4lzBcQuI%2Bw5IeOVtXBA%3D=0>
>>
>> A new config file was added to the filesystem and server Environment
>> variables as per documented requirements added since 7.6.3, but having
>> trouble validating any map arguments. All requests return the error
>> "CGI variable "map" fails to validate" even though regexp should pass
>> based on expression tests.
>>
>> Here is the full config file in use:
>>
>> CONFIG
>>ENV
>>  MS_MAP_PATTERN "\.map$"
>>  PROJ_LIB "F:/MapServer/bin/proj7/SHARE"
>>  CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt"
>>END
>>
>>
>>PLUGINS
>>  "mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll"
>>  "oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll"
>>END
>> END
>>
>> The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1
>> working before I update to the real regexp, and my understanding is it
>> should map anything that ends in .map? But every map argument I throw
>> in (including verified working arguments for 7.6.2) result in a
>> failure to validate. Are there other crucial configurations missing
>> that are necessary to pass validation?
>>
>> Thanks,
>>
>> Matt
>>
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://list/
>> s.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users=05%7C02%7Cmatt
>> .lernout%40stantec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c21
>> 9a469297d3f2b4d80281e7%7C0%7C0%7C638428910243105153%7CUnknown%7CTWFpbG
>> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
>> 3D%7C0%7C%7C%7C=c%2BjBl2NTy%2BIZxCYZmp0CLwa2ujlD%2BC%2BfzzIQgXKw
>> lyI%3D=0
>
> --
> Viele Grüße,
> Jörg Thomsen
>
> **
> Aufwind durch Wissen!
> Web-Seminare und Online-Schulungen
> bei der http://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
> http://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
>  Caution: This email originated from outside of Stantec. Please take 
> extra precaution.
>
>  

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-06 Thread Seth G via MapServer-users
Hi Rob,

Are you using the same MapServer machine to make the queries?
If the MapServer version, and dependencies are all identical then the generated 
SQL queries should also be identical.
You wrote about "hitting the web page" - but if the requested extents are 
different then it is likely the client requests are different. Are you using 
WMS services? What do these requests look like?
Also you mention 4 different layers, so I'd try testing them one by one - are 
they all generating different SQL and response times?

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Tue, Feb 6, 2024, at 8:53 PM, Rob Dennett via MapServer-users wrote:
> Both DBs are hosted on AWS Aurora.  The old one is serverless v1 and the new 
> one is serverless v2.  We were thinking that perhaps the geom column for my 
> table needed a spatial index even though the old db doesn't have one.  Is 
> that possible?  Also, would it make sense that the same query run on both 
> should take the same amount of time (roughly)?
> 
> Thanks,
> Rob
> 
> 
> 
> 
> ___
> 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] option to use sld in mapfile to configure layer styling

2024-01-18 Thread Seth G via MapServer-users
Hi Paul,

I think all the code functions are in place to do the bulk of this work, and 
this would be a nice addition to MapServer. Sharing SLD between applications is 
a huge benefit. If it is possible to apply SLD from a URL it should also be 
possible to apply SLD from disk. 

I wouldn't be a huge fan of embedding SLD directly in a Mapfile (although the 
CONNECTION parameter can accept large chunks of OGRVRTDataSource XML as long as 
quotes are escaped). 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Tue, Jan 16, 2024, at 6:11 PM, Paul via MapServer-users wrote:
> mapserver has capability to use SLD to style a layer, by appending sld to 
> request
> 
> unfortunately there is currently no option to use sld as part of mapfile to 
> style a layer
> 
> what do you think to add this as a new feature to next version?
> 
> syntax could be something like this:
> 
> LAYER
> 
>   STYLEITEM "sld://mysldfile.xml" # relative path
> 
>   CLASS
> 
>   END
> 
> END
> 
> Alternative to introduce it also as embedded SLD, but the mix of ms syntax 
> and xml is not very nice.
> ___
> 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] filtering the data based on postgis attributes

2023-11-28 Thread Seth G via MapServer-users
Hi Marcin,

In these cases previously I've used a SQL trick to implement this, by setting a 
default value for the parameter (of a non-existent ID) and adding an OR clause 
to the SQL. E.g;

VALIDATION
"default_pid" "-1"
..

WHERE (pid  = %pid% OR %pid% = -1)

If no value is provided then the SQL will be WHERE (pid  = -1 OR -1 = -1) which 
will always return True so all records will return.

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Tue, Nov 28, 2023, at 3:32 PM, Marcin Niemyjski via MapServer-users wrote:
> Hello, 
> I would like to define several dimensions for filtering my WMS (Web Map 
> Service). They are based on a PostGIS table from which the service is 
> exposed. Here lies my problem because among the required information to 
> expose, I need to provide the following to the map server:
> 
>  • wms_dimensionlist: (Mandatory)
>  • wms_[dimensionname]_item: (Mandatory)
>  • wms_[dimensionname]_units: (Mandatory)
>  • wms_[dimensionname]_extent: (Mandatory)
>  • wms_[dimensionname]_default: (Optional)
> My issue arises because I want to filter my data based on the "product_id" 
> column containing a string. The table is large, so it's not possible to 
> provide all the ID values to "wms_productid_extent."
> 
> So, I thought about using 
> https://mapserver.org/cgi/runsub.html#table-of-contents, but the problem 
> arises with the implementation in the query. I would like to lead to a 
> situation where if I don't provide any filtering parameters (product_id, 
> cloud_cover), the entire data set is returned.
> 
> I do not want to use this:
> DATA 'geometry from (select * from mrc order by maxcc desc) where pid = 
> '%pid%' as subquerry using unique unique_id using srid=3857'
> because if I do not provide pid, my query wiill not work.
> 
> 
> 
> So, to summarize I'm looking for something like this:
> 
> DATA 'geometry from (select * from mrc order by maxcc desc) as subquerry 
> using unique unique_id using srid=3857'
> 
> VALIDATION
> 'maxCC' '^[0-9](1, 3)$'
> 'tile' '^.{6}$'
> 'pid' '^.{65}$'
> END
> 
> No default values (except time), if none is provided Mapserver does not 
> filter the data (except time).
> 
> 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] PHP Mapscript: how to clone layers

2023-11-26 Thread Seth G via MapServer-users
Hi Jan,

I'm not a PHP MapScript user but you should be able to use:

$l2 = $l1->cloneLayer();

As per the note at the following link - "In the Java & PHP modules this method 
is named cloneLayer. "
https://mapserver.org/mapscript/mapscript-api/stub/mapscript.layerObj.html#mapscript.layerObj.clone

I'm guessing there is a clash with the a reserved keyword in PHP so the method 
needs a different name.

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Sun, Nov 26, 2023, at 7:38 PM, Jan Hartmann via MapServer-users wrote:
> Hi,
>
> In previous versions of PHP MapScript a new layer was defined as:
>
> $l2 = new layerObj($oMap,$l1);
>
> $l1 is the base layer from which $l2 is copied.
>
> In MapScript SWIG the second parameter has disappeared. $l2 has to be 
> cloned from $l1, and then inserted into the map. With PHP-MapScript this 
> should be:
>
> $l2 = $l1->clone();
> $oMap->insertLayer($l2);
>
> But there is no PHP-MapScript function layerObj::clone. What do I miss?
>
> 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] Python MapScript - GEOS

2023-11-23 Thread Seth G via MapServer-users
Hi,

Testing the code here and the following line: shpObjBuffer = shpObj.buffer( 
0.0005 ) returns a valid buffered polygon:

>>> shpObjBuffer
 >
>>> shpObjBuffer.toWKT()
'POLYGON ((49.965857800020 8.16013072, 49

The buffer method [1] rerturns a new shape, so I'm not sure your check for a 
True value makes sense in this line:

 if shpObjBuffer == mapscript.MS_SUCCESS:

Are you sure the buffer isn't working?

Seth

[1] 
https://mapserver.org/mapscript/mapscript-api/stub/mapscript.shapeObj.html#mapscript.shapeObj.buffer

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Nov 23, 2023, at 7:16 PM, Nicol Hermann via MapServer-users wrote:
> Hello all,
>
> it there a way to verify that GEOS Support is properly working with
> Python mapscript.
> The below buffer method fails but the msGetVersion claims
> 'SUPPORTS=GEOS'. Anything else im overlooking?
>
>
> Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
> [GCC 10.2.1 20210110] on linux
> Type "help", "copyright", "credits" or "license" for more information.
 import mapscript
 pktObj= mapscript.pointObj( 49.9653578, 8.1601308, 100 )
 shpObj= pktObj.toShape()
 shpObjBuffer= shpObj.buffer( 0.0005 )
 if shpObjBuffer == mapscript.MS_SUCCESS:
> ...rectObj = shpObjBuffer['bounds']
> ...print( rectObj )
> ... else:
> ...print('Error')
> ... 
> Error
 print(mapscript.msGetVersion())
> MapServer version 8.0.1 PROJ version 7.2 GDAL version 3.2 OUTPUT=PNG
> OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER
> SUPPORTS=OGCAPI_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF
>
>
> Thanks for any help
>
> Nicol
>
>
>
> ___
> 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 to format labels on contours

2023-10-21 Thread Seth G via MapServer-users
Hi,

The MapScript API docs are back online - see 
https://mapserver.org/mapscript/mapscript-api/stub/mapscript.classObj.html#mapscript.classObj

The setText() method should give you what you need. Example (using Python):

s = mapscript.classObj(layer)
# other style and label stuff
s.setText('(tostring(([SQKM]),"%.0f")+" km2")')
# check the output using 
print(s.convertToString())

When using updateFromString it will replace everything in the classObj hence 
the error.

Seth


--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Fri, Oct 20, 2023, at 9:16 PM, Trygve Aspenes via MapServer-users wrote:
> Hi
>
> So I have made a contour plot from a raster. Works nicely.
> Then I added labels to give context to the contours. Fine.
> Now I want to format the labels.
>
> I have found this post 
> https://gis.stackexchange.com/questions/350089/round-number-for-label-in-mapserver
>  
> suggesting a syntax:
> TEXT (tostring(([SQKM]),"%.0f")+" km2")
>
> Nice, but I use mapscript. And I do not understand nor find any examples 
> how I could do this with mapscript
> I tried with:
> s = mapscript.classObj(layer)
> 
> s.updateFromString('TEXT (tostring(([SQKM]),"%.0f")+" km2")')
>
> But I get:
> EOFError: loadClass(): Premature End-of-File.
>
> So obviously not correct.
>
> Is there someone who could suggest what could be wrong here or what else 
> to look at and try?
>
> Trygve Aspenes
> ___
> 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] Inconsistent support for template substitution

2023-10-19 Thread Seth G via MapServer-users
Hi,

This seems like a bug - there is a check to see if the Map projection is a 
geographic coordinate system [1], and if it is then it skips all the [maplon], 
[maplat], [minlon] etc. substitutions. If it is in another projection then the 
point and extent are reprojected to latlon and included in the template. 

Seth


[1] https://github.com/MapServer/MapServer/blob/main/src/maptemplate.c#L4273

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Oct 19, 2023, at 3:50 PM, Andrew Harfoot via MapServer-users wrote:
> Hi list,
> 
> I am setting up a WMS server using Mapserver 7.6.2 and want to return a html 
> response to a GetFeatureInfo request where the response contains the 
> coordinates of the GFI click. The WMS supports multiple coordinate systems, 
> so ideally I'd like to have the coordinates in a CRS that I can predetermine.
> 
> I have a test template file as follows:
> 
>  
> 
> Map X/Y : [mapx],[mapy]
> Map LL : [maplon],[maplat]
> 
> If I configure an 'old style' TEMPLATE in the map file, directly referencing 
> the html template as follows:
> 
> LAYER
>   TEMPLATE "coord_comp.html"
> With a GFI request specifying a CRS of EPSG:27700:
> 
> ...=WMS=1.3.0=GetFeatureInfo
>   
> =379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
>   
> =EPSG:27700=649=899=test==image/jpeg_LAYERS=test
>   _FORMAT=text/html=268=647_COUNT=50
> 
> 
> 
> the output of is as follows:
> 
> 
> Map X/Y : 390428.846605,68589.162768
> Map LL : 50.516415,-2.135015
> 
> When a similar requests are made specifying a CRS of EPSG:4326:
> 
> ...=WMS=1.3.0=GetFeatureInfo
>   
> =50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
>   
> =EPSG:4326=649=899=test==image/jpeg_LAYERS=test
>   _FORMAT=text/html=298=579_COUNT=50
> 
> the output is as follows:
> 
> 
> 
> 
> Map X/Y : 50.514437,-2.120136
> Map LL : [maplon],[maplat]
> 
> The maplat and maplon templates are not substituted.
> 
> Mapserver has been compiled with PROJ support and a PROJECTION has been 
> defined for the layer in the map file.
> 
> The CRS of the source data is EPSG:27700
> 
> I was hoping that the maplat and maplon templates would provide me with a 
> consistent source of coordinate information, independent of the request CRS. 
> Can anybody shed any light on the observed behaviour?
> 
> Thanks,
> Andy
> 
> -- 
> Andy Harfoot
> 
> Skype: gdi_ajph
> Teams: a...@soton.ac.uk
> Phone: +44 2380 590566
> 
> GeoData Institute
> University of Southampton
> Southampton
> SO17 1BJ
> 
> www.geodata.soton.ac.uk
> ___
> 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] creating a layer with PHP MapScript - shapes do not use classindex

2023-10-16 Thread Seth G via MapServer-users
Hi,

You could probably achieve this with the new SWIG MapScript. 

Alternatively how about creating an individual LAYER for each set of features 
with a single CLASS (I'm not sure how the CLASS is determined if the features 
have no attributes in the first place), and adding features to the relevant 
layer. 

If you then want to combine these into a single layer you could try a UNION 
LAYER [1], and use the STYLEITEM AUTO to pick up the styles from the layers.

Seth

[1] https://mapserver.org/mapfile/union.html
[2] https://mapserver.org/mapfile/union.html#classes-and-styles


--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Mon, Oct 16, 2023, at 2:57 PM, Worth Lutz wrote:
> Hi,
> 
> I had thought of trying that but the attributes in the values are read-only. 
> Since i created the shapeObj from WTK there are no values.
> 
> I'm using v7 of MapServer and the old PHP mapscript. There does not appear to 
> be a way for me to set attributes on these shapes which are being passed down 
> from an OpenLayers client app.
> 
> I had thought of setting a single class and putting the different colors, 
> etc, in as attribute values in the shapeObj but cannot find a way to write 
> them to the object.
> 
> I'll try any suggestions given.
> 
> Thanks,
> 
> *Worth Lutz*
> 
> On 10/16/23 03:59, Seth G wrote:
>> Hi,
>> 
>> The rendering code could be reassigning the classindex for the shapes based 
>> on their attributes. You will probably need to make sure the CLASS is 
>> assigned based on an attribute of the feature - e.g. add a CLASSITEM to the 
>> layer and add a value to the feature that will match the correct CLASS.
>> 
>> Seth
>> 
>> --
>> web:https://geographika.net & https://mapserverstudio.net
>> twitter: @geographika
>> 
>> On Sun, Oct 15, 2023, at 3:12 PM, Worth Lutz via MapServer-users wrote:
>>> HI,
>>> 
>>> I'm trying to create a layer to insert into a map. I have shapes in WKT and 
>>> am trying to insert them into a layer and draw it to a pdf.
>>> 
>>> It works fine if I only have one class for the shapes. I am trying to add 
>>> several classes to the layer to draw in different colors. I cannot get the 
>>> shapes to use the proper class.
>>> 
>>> Here is what I'm doing.
>>> 
>>> After creating a layer and adding all the classes, I add the shapes.
>>>> for (i = 0, ii = count($features); $i < $ii; i++) {
>>>> $shape = ms_shhapeObjFrom Wkt($features[$i]->geometry);
>>>> $shape->set('classindex', $features[$i]->classindex);
>>>> $success = $layer->addFeature($shape);
>>>> }
>>> The shapes draw but all use $class[0].
>>> 
>>> If I add this line in before the draw,
>>> 
>>> $layer-moveclassup(1);
>>> 
>>> all the shapes are drawn with that class.
>>> 
>>> I have been able to verify that the classes exist in the layerObj and that 
>>> the classindex in the shapeObj points to the proper class.
>>> 
>>> Does anyone have any ideas why the drawing code is not using the classindex 
>>> to draw these shapes in different colors?
>>> 
>>> What am I doing wrong?
>>> --
>>> *Worth Lutz*
>>> 
>>> ___
>>> 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] creating a layer with PHP MapScript - shapes do not use classindex

2023-10-16 Thread Seth G via MapServer-users
Hi,

The rendering code could be reassigning the classindex for the shapes based on 
their attributes. You will probably need to make sure the CLASS is assigned 
based on an attribute of the feature - e.g. add a CLASSITEM to the layer and 
add a value to the feature that will match the correct CLASS.

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Sun, Oct 15, 2023, at 3:12 PM, Worth Lutz via MapServer-users wrote:
> HI,
> 
> I'm trying to create a layer to insert into a map. I have shapes in WKT and 
> am trying to insert them into a layer and draw it to a pdf.
> 
> It works fine if I only have one class for the shapes. I am trying to add 
> several classes to the layer to draw in different colors. I cannot get the 
> shapes to use the proper class.
> 
> Here is what I'm doing.
> 
> After creating a layer and adding all the classes, I add the shapes.
>> for (i = 0, ii = count($features); $i < $ii; i++) {
>> $shape = ms_shhapeObjFrom Wkt($features[$i]->geometry);
>> $shape->set('classindex', $features[$i]->classindex);
>> $success = $layer->addFeature($shape);
>> }
> The shapes draw but all use $class[0].
> 
> If I add this line in before the draw,
> 
> $layer-moveclassup(1);
> 
> all the shapes are drawn with that class.
> 
> I have been able to verify that the classes exist in the layerObj and that 
> the classindex in the shapeObj points to the proper class.
> 
> Does anyone have any ideas why the drawing code is not using the classindex 
> to draw these shapes in different colors?
> 
> What am I doing wrong?
> 
> -- 
> *Worth Lutz*
> 
> ___
> 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] symbol minsize/maxsize in mapServer 8

2023-10-11 Thread Seth G via MapServer-users
Hi Jörg,

I've been playing around with the MINSCALE etc. When using an OUTLINECOLOR you 
also need to set the MINWIDTH and MAXWIDTH on the SYMBOL to change sizes with 
resolution. I think this is the issue you were seeing in your example. 
For example to keep a constant outline width of 1 you can use the following:

STYLE
SYMBOL "circle"
SIZE 100
MAXSIZE 200
MINSIZE 12
COLOR "#F9A03F"
OUTLINECOLOR "#813405"
MINWIDTH 1
MAXWIDTH 1
END

There is a working example at https://app.mapserverstudio.net/#akyRvQvW - if 
you zoom in you will notice the circles get bigger (up to 200 pixels) but the 
outline width remains at 1 pixel. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Oct 11, 2023, at 5:06 PM, Jörg Thomsen (WhereGroup) via MapServer-users 
wrote:
> Hello,
>
> I am curious about min- an maxsize in MS 8.
>
> I found in the docs:
>> MAXSIZE [double]
>> Removed in version 8.0.
>
> And I know don't now how to determine the maxsize of a point Symbol.
>
> maxsize still works, but not as expected. There is no error-message and 
> the maxsize auf the point-symbol is set, but when I zoom in more than 
> the scale of SYMBOLSCALEDENOM the outline of the symbol ist getting and 
> bigger.
>
> Here are two layers I tested with and you can test the WMS with
> https://schulung.foss.academy/cgi-bin/mapserv?map=minmaxsize=browse=openlayers=all
> (you have to zoom in to see what happens)
>
> LAYER
>NAME 'point'
>TYPE POINT
>DATA 'pois_p.shp'
>
>METADATA
>  'ows_title' 'Points'
>END
>
>SYMBOLSCALEDENOM 10
>CLASS
>  NAME 'points'
>  STYLE
>SYMBOL 'circle'
>SIZE 20
>COLOR 218 247 195
>OUTLINECOLOR 250 250 0
>  END
>END
>  END
>
>  LAYER
>NAME 'pointmaxsize'
>TYPE POINT
>DATA 'pois_p.shp'
>
>METADATA
>  'ows_title' 'Pointsmaxsize'
>END
>
>SYMBOLSCALEDENOM 10
>CLASS
>  NAME 'points'
>  STYLE
>SYMBOL 'circle'
>SIZE 20
>MAXSIZE 30
>COLOR 100 100 250
>OUTLINECOLOR 0 0 250
>  END
>END
>  END
>
> -- 
> 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] symbol minsize/maxsize in mapServer 8

2023-10-11 Thread Seth G via MapServer-users
Hi Jörg,

The STYLE MINSIZE and MAXSIZE are still valid Mapfile keywords - this was an 
error in the docs (and also came up on the dev list yesterday. This has now 
been corrected and the online docs fixed. 

I'm equally as confused as how exactly to use these. In your example what is 
your SYMBOL definition for "circle"?

I've not seen the OpenLayers template used for awhile - if could do with an 
upgrade to OL7!

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Oct 11, 2023, at 5:06 PM, Jörg Thomsen (WhereGroup) via MapServer-users 
wrote:
> Hello,
>
> I am curious about min- an maxsize in MS 8.
>
> I found in the docs:
>> MAXSIZE [double]
>> Removed in version 8.0.
>
> And I know don't now how to determine the maxsize of a point Symbol.
>
> maxsize still works, but not as expected. There is no error-message and 
> the maxsize auf the point-symbol is set, but when I zoom in more than 
> the scale of SYMBOLSCALEDENOM the outline of the symbol ist getting and 
> bigger.
>
> Here are two layers I tested with and you can test the WMS with
> https://schulung.foss.academy/cgi-bin/mapserv?map=minmaxsize=browse=openlayers=all
> (you have to zoom in to see what happens)
>
> LAYER
>NAME 'point'
>TYPE POINT
>DATA 'pois_p.shp'
>
>METADATA
>  'ows_title' 'Points'
>END
>
>SYMBOLSCALEDENOM 10
>CLASS
>  NAME 'points'
>  STYLE
>SYMBOL 'circle'
>SIZE 20
>COLOR 218 247 195
>OUTLINECOLOR 250 250 0
>  END
>END
>  END
>
>  LAYER
>NAME 'pointmaxsize'
>TYPE POINT
>DATA 'pois_p.shp'
>
>METADATA
>  'ows_title' 'Pointsmaxsize'
>END
>
>SYMBOLSCALEDENOM 10
>CLASS
>  NAME 'points'
>  STYLE
>SYMBOL 'circle'
>SIZE 20
>MAXSIZE 30
>COLOR 100 100 250
>OUTLINECOLOR 0 0 250
>  END
>END
>  END
>
> -- 
> 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] Call to StoredQuery successful as GET, but fails as POST request

2023-10-06 Thread Seth G via MapServer-users
Hi,

Are you able to log the SQL sent to Postgres and see the difference between the 
GET and POST request? Or maybe the query doesn't get to the database at all 
looking at that error. 
It looks like the filter is failing to convert to a Postgres query. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Fri, Oct 6, 2023, at 4:45 PM, Froehlich, Dominik via MapServer-users wrote:
> Dear *
> 
> 
> I'm stuck for some time experiencing a strange behavoiur with WFS POST 
> requests to stored querys on our mapserver (v.8.0.1/ubuntu 22.04) and can't 
> seem to find anythin helpful in the logs or on the web. The server is public, 
> so you can see for yourselves. To describe the issue I'll stick to our 
> address service providing the addresses in Freiburg im Breisgau, Southwest 
> Germany. 
> 
> https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFS=2.0.0=GetCapabilities
> 
> The service is supposed to answer both GET and POST requests. This does work 
> just fine for "normal" GetFeature requests. However, there seems to be an 
> issue with stored queries. E.g. we set up some stored query for searching 
> addresses taking a street name and a house number as an argument. It can be 
> easily queried by calling e.g.
> 
> https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFS=2.0.0=GetFeature_ID=findeStrasseHnr=fehren=12
> 
> wheras "strassenname" is the street name and "hausnummer" the house number.
> The GET call will return one matching feature as expected.
> 
> 
> The same request as POST to 
> https://geoportal.freiburg.de/wfs/gdm_address/gdm_address
> 
> http://www.opengis.net/wfs; service="WFS" version="2.0.0" 
> maxFeatures="3" xsi:schemaLocation="http://www.opengis.net/wfs 
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
> http://www.opengis.net/wfs; 
> typeName="ms:addresses" srsName="urn:ogc:def:crs:EPSG::25832" 
> xmlns:ms="http://mapserver.gis.umn.edu/mapserver;>
> fehren
> 12
> 
> 
> 
> however will only return 
> 
> 
> xmlns:ms="http://mapserver.gis.umn.edu/mapserver;
>xmlns:gml="http://www.opengis.net/gml/3.2;
>xmlns:wfs="http://www.opengis.net/wfs/2.0;
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver 
> https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFSVERSION=2.0.0REQUEST=DescribeFeatureTypeTYPENAME=ms:addressesOUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2
>  http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd 
> http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd;
>timeStamp="2023-10-05T16:10:00" numberMatched="unknown" numberReturned="0">
> 
> 
> 
> Strange enough, it will also log some weired error at DEBUG 5:
> 
> [Fri Oct  6 14:59:29 2023].546904 msWFSParseRequest(): WFS post request: 
> http://www.opengis.net/wfs; service="WFS" 
> version="2.0.0" maxFeatures="200" 
> xsi:schemaLocation="http://www.opengis.net/wfs 
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsdhttp://www.opengis.net/wfs%20http:/schemas.opengis.net/wfs/1.1.0/wfs.xsd;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> id="findeStrasseHnr" xmlns="http://www.opengis.net/wfs; 
> typeName="ms:addresses" srsName="EPSG::25832"> name="strassenname">fehren name="hausnummer">12
> [Fri Oct  6 14:59:29 2023].622878 FLTLayerApplyPlainFilterToLayer(): 
> (("[strassenname]" ~* "^.*feh.*$") AND (([hausnummer] =* 12) AND 
> ("[hausnummernzusatz]" = ""))), rect=399550,5305350,420740,5325690
> [Fri Oct  6 14:59:29 2023].689509 msPostGISLayerTranslateFilter(): General 
> error message. Translation to native SQL failed.
> [Fri Oct  6 14:59:30 2023].110714 msQueryByFilter(): No matching record(s) 
> found.[Fri Oct  6 14:59:30 2023].110799 mapserv request processing time 
> (msLoadMap not incl.): 0.564s
> 
> 
> The stored query itself is defined as
> 
> 
> 
> https://www.w3.org/2001/XMLSchema;
> xmlns:gml="https://www.opengis.net/gml/3.2;
> id="search_street_nr">
> 
> Straßen- und Hausnummernsuche
> Suche nach einem Straßenname und einer Hausnummer im 
> Adress-WFS
> 
> 
> 
> 
>  
> language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
> 
> xmlns:ms="https://geoportal.freiburg.de/wfs/gdm_address/gdm_address_gaz;
> returnFeatureTypes="ms:addresses">
>  xmlns:ogc="https://www.opengis.net/ogc;
> typeNames="ms:addresses">
> 
> 
> 
> 
> 
>  singleChar="?" escape="\">
> ms:strassenname
> *${strassenname}*
> 
> 
>  singleChar="?" escape="\">
> ms:hausnummer
> 

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

2023-09-28 Thread Seth G via MapServer-users
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


Re: [MapServer-users] Silent error running mapserver

2023-09-18 Thread Seth G
Hi,

Mapfiles are very portable between operating systems, with some possible edge 
cases as dependencies such as the regex library may vary, or a different code 
path is used on Windows which may render something slightly differently, or 
produce different line endings. 
It is more likely something changed between MapServer 7 and 8 which would cause 
this to break, possibly the change here [1]. It does sound like a bug though if 
an invalid SQL statement is created, and if a test case can be created it would 
be good to open an issue. 
In any case it is best to update to the new PROCESSING 'NATIVE_FILTER=id=234' 
format for Mapfiles in MapServer 8.0.

Seth

[1] 
https://github.com/MapServer/MapServer/blob/6991fd2d2b21270e9368b52526a89a0204c2399b/src/mappostgis.cpp#L2012

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Mon, Sep 18, 2023, at 5:30 PM, Troels Arvin wrote:
> Hello,
>
> Seth G wrote:
>> Are you able to share a Mapfile? Maybe try with a cut-down version
>
> I found out things seem to fail due to a FILTER expression in the map 
> file which result in an "... AND ()" clause to be added to the SQL being 
> sent to the database (which is a syntax error, at least in Postgres).
>
> My issue seems to have to do with the change from 6 to 7 where:
>
> " Note Until MapServer 6, native filters could be specified as:
>    FILTER 'where id=234'.
>    But this is no longer supported."
>
> (From https://mapserver.org/mapfile/layer.html )
>
> The odd thing is we have Windows Mapserver 7 where the map files are 
> still working. Mapserver would be completely similar regarding map file 
> rules, regardless of operating system, I'd assume.
>
> -- 
> Troels
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Silent error running mapserver

2023-09-15 Thread Seth G
Hi,

How are you setting your "PROJ_LIB" path? It looks like it can't find the Proj 
SHARE directory. 
Are you able to share a Mapfile? Maybe try with a cut-down version - there are 
lots of custom parameters in your querystring (that shouldn't affect things, 
but a simpler test case would be easier to debug). 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Sep 14, 2023, at 4:05 PM, Troels Arvin wrote:
> Hello,
> 
> I'm struggling to find out why my newly compiled Mapserver 8 exits without 
> any output and without any error messages.
> 
> Using Mapserver 6, the following command resulted in PNG output.
> 
> /usr/local/bin/mapserv 
> QUERY_STRING="map=/foo/my.map_x_wc=545984_y_wc=6283731.2_x_wc=547622.4_y_wc=6285369.60001=theme1=----=''=WMS=EPSG:25832=66ddb06f-0527-4dc8-89db-d8ed3edf10b3=----&_olsalt=0.5323379383513367=256=XXX,XXX,XXX,XXX=256=TRUE=GetMap=1.1.1=image/png=----=bar"
> 
> But using Mapserver 8, nothing happens. On the command line, the result code 
> of the command is 0.
> 
> Using strace, the last activities look like this:
> 
> 
> 
> 710989 read(3, "ass\n  name \"9.26_0\"\n  expression 
> ('[elementtypekey]' = '9.26_0' )\n\n  style\n symbo"..., 8192) = 8192
> 710989 access("/home/f...@bar.org", W_OK) = 0
> 710989 openat(AT_FDCWD, "/home/f...@bar.org/.local/share/proj/epsg", 
> O_RDONLY) = -1 ENOENT (No such file or directory)
> 710989 openat(AT_FDCWD, "/usr/share/proj/epsg", O_RDONLY) = 5
> 710989 close(5) = 0
> 710989 close(3) = 0
> 710989 newfstatat(AT_FDCWD, "/usr/share/proj/proj.db", {st_mode=S_IFREG|0644, 
> st_size=7921664, ...}, 0) = 0
> 710989 newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=7921664, ...}, 
> AT_EMPTY_PATH) = 0
> 710989 newfstatat(AT_FDCWD, "/usr/share/proj/proj.db", {st_mode=S_IFREG|0644, 
> st_size=7921664, ...}, 0) = 0
> 710989 close(4) = 0
> 710989 munmap(0x7fc8a3d03000, 135168)   = 0
> 710989 munmap(0x7fc8a3d24000, 258048)   = 0
> 710989 exit_group(0)= ?
> 710989 +++ exited with 0 +++
> 
> 
> 
> Output from "mapserv -v":
> 
> MapServer version 8.0.1 PROJ version 6.3 GDAL version 3.4 OUTPUT=PNG 
> OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO 
> SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER 
> SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS 
> SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE 
> INPUT=FLATGEOBUF
> 
> Any ideas?
> 
> -- 
> Kind regards,
> Troels Arvin
> 
> 
> ___
> 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: styling multiple stop colorrange for raster data

2023-08-28 Thread Seth G
A good question and it doesn't seem to be clearly documented. 
I've always tried values listed at 
https://mapserver.org/el/input/raster.html#raster-query even though that 
section appears to be written for MapScript. 
Each band has a value based on index, so you should get results using 
"value_0", "value_1", and "value_2" in RANGEITEM.
gdalinfo should peobably provide details on the value ranges in each band. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Mon, Aug 28, 2023, at 2:50 PM, Trygve Aspenes via MapServer-users wrote:
> Thanks Seth for your quick reply
>
> Yes I have multiple bands. gdalinfo tells me I have bands like this:
> Band 1 Block=949x1069 Type=Float32, ColorInterp=Undefined
> Band 2 Block=949x1069 Type=Float32, ColorInterp=Undefined
> Band 3 Block=949x1069 Type=Float32, ColorInterp=Undefined
> .
> .
> .
> Band n Block=949x1069 Type=Float32, ColorInterp=Undefined
>
> So, how could I figure out how the various bands are named in mapserver 
> for the RANGEITEM?
>
> I have looked at the documentation for STYLE/RANGEITEM but I still don't 
> get it.
>
> I have tried various values for RANGEITEM ( like "value_0", "0", "1", 
> "pixel", "Band 1" etc), but I dont get it.
>
> It must be something that I'm missing.
>
> By the way, thanks for the mapserverstudio link. Most helpful!
> Trygve Aspenes
>
>
> Den 2023-08-28 13:14, skrev Seth G:
>> Hi Trygve,
>> 
>> You can have multiple start/stop values and your syntax looks correct. 
>> Maybe you have multiple bands in your raster and you are symbolising on 
>> the incorrect value? Try explicitly setting the RANGEITEM.
>> 
>> See working example at https://app.mapserverstudio.net/#9JBVADFh
>> 
>> CLASS
>> NAME "colorramp"
>> STYLE
>> COLORRANGE "#e3edfc" "#287593" # a color gradient from 
>> light grey to a shade of blue
>> # a pixel value of -20 will be light grey, and values 
>> from -20 to 0 will be
>> # assigned a color from the colour gradient of light 
>> grey to blue
>> DATARANGE -20 0
>> RANGEITEM "value_0" # this is the name of the value 
>> band in the raster, the datasets used in the Mapfile have a single band
>> END
>> STYLE
>> COLORRANGE "#29497b" "#759387"
>> DATARANGE 0 20
>> RANGEITEM "value_0"
>> END
>> STYLE
>> COLORRANGE "#bfa96d" "#480d26"
>> DATARANGE 20 50
>> RANGEITEM "value_0"
>> END
>> END
>> 
>> Seth
>> 
>> 
>> --
>> web:https://geographika.net & https://mapserverstudio.net
>> twitter: @geographika
>> 
>> On Mon, Aug 28, 2023, at 12:06 PM, Trygve Aspenes via MapServer-users 
>> wrote:
>>> Hi all
>>> 
>>> I'm looking into creating a styling for a raster of float32 data.
>>> The data describes temperature in kelvin and I want to have a 
>>> colorrange
>>> from blue to white for data up to 273 deg kelvin(0 deg C). And from
>>> white to red for warmer data.
>>> 
>>> I see here
>>> https://mapserver.org/output/kerneldensity.html#raster-color-ramping 
>>> how
>>> this is used for heatmap hoping that this will work for a raster also.
>>> 
>>> I try with something like this:
>>> 
>>>  CLASS
>>>STYLE
>>>  COLORRANGE "#" "#"
>>>  DATARANGE 200 273
>>>END # STYLE
>>>STYLE
>>>  COLORRANGE "#" "#ffff"
>>>  DATARANGE 273 315
>>>END # STYLE
>>>  END # CLASS
>>> 
>>> but as far as I can see this gives me only white.
>>> 
>>> If I try to use one style like this:
>>> 
>>>  CLASS
>>>STYLE
>>>  COLORRANGE "#" "#ffff"
>>>  DATARANGE 200 315
>>>END # STYLE
>>>  END # CLASS
>>> 
>>> it works but the color range goes directly from red to blue.
>>> 
>>> Am I doing something wrong or can I not use multiple stops for these
>>> kind of data?
>>> 
>>> Trygve Aspenes
>>> ___
>>> 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: styling multiple stop colorrange for raster data

2023-08-28 Thread Seth G
Hi Trygve,

You can have multiple start/stop values and your syntax looks correct. Maybe 
you have multiple bands in your raster and you are symbolising on the incorrect 
value? Try explicitly setting the RANGEITEM. 

See working example at https://app.mapserverstudio.net/#9JBVADFh

CLASS
NAME "colorramp"
STYLE
COLORRANGE "#e3edfc" "#287593" # a color gradient from light 
grey to a shade of blue
# a pixel value of -20 will be light grey, and values from -20 
to 0 will be 
# assigned a color from the colour gradient of light grey to 
blue
DATARANGE -20 0
RANGEITEM "value_0" # this is the name of the value band in the 
raster, the datasets used in the Mapfile have a single band
END
STYLE
COLORRANGE "#29497b" "#759387"
DATARANGE 0 20
RANGEITEM "value_0"
END
STYLE
COLORRANGE "#bfa96d" "#480d26"
DATARANGE 20 50
RANGEITEM "value_0"
END
END

Seth


--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Mon, Aug 28, 2023, at 12:06 PM, Trygve Aspenes via MapServer-users wrote:
> Hi all
>
> I'm looking into creating a styling for a raster of float32 data.
> The data describes temperature in kelvin and I want to have a colorrange 
> from blue to white for data up to 273 deg kelvin(0 deg C). And from 
> white to red for warmer data.
>
> I see here 
> https://mapserver.org/output/kerneldensity.html#raster-color-ramping how 
> this is used for heatmap hoping that this will work for a raster also.
>
> I try with something like this:
>
>  CLASS
>STYLE
>  COLORRANGE "#" "#"
>  DATARANGE 200 273
>END # STYLE
>STYLE
>  COLORRANGE "#" "#ffff"
>  DATARANGE 273 315
>END # STYLE
>  END # CLASS
>
> but as far as I can see this gives me only white.
>
> If I try to use one style like this:
>
>  CLASS
>STYLE
>  COLORRANGE "#" "#ffff"
>  DATARANGE 200 315
>END # STYLE
>  END # CLASS
>
> it works but the color range goes directly from red to blue.
>
> Am I doing something wrong or can I not use multiple stops for these 
> kind of data?
>
> Trygve Aspenes
> ___
> 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 to handle NoData in WCS Request? Continuation of [Speed of WMS vs Speed of WCS; How to speed up WCS service?]

2023-08-19 Thread Seth G
HI Marcin,

For setting NODATA values in WCS I made a test repository showing the various 
options at https://github.com/geographika/wcs-test, it may provide some ideas. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Aug 17, 2023, at 10:41 AM, Marcin Niemyjski via MapServer-users wrote:
> Hello,
> 
> Regarding the topic discussed in 
> https://marc.info/?l=mapserver-users=169049275409489=2, I have 
> implemented Jukka's suggestions. I created two new attributes, "start" and 
> "stop." Here's the improved mapfile:
> 
> https://pastecode.io/s/myjemd1r
> As you can see, there are 4 layers served from two tile indexes. The first 
> layer consists of preprocessed OCGs with burned NoData, while the remaining 
> three are served through VRT targeting different spatial resolutions 
> depending on the requested zoom level, with the alpha channel set as a cloud 
> mask. Here's an example of such a VRT (the others are similar):
> https://pastecode.io/s/af2tiwsj
> What is the problem?
> 
>  1. When I try to create a cloudless mosaic using this request for data 
> stored in COGs for a single day and there is data available for the requested 
> area, the raster is returned. However, instead of transparent NoData, a value 
> of 0 is burned in the place of transparent NoData, and I need NoData 
> transparency (it's a must-have).
> 
> http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map=WCS=1.0.0=GetCoverage=test3=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158=EPSG:3857=771=944=GTiff=2023-07-01=2023-07-01
> 
>  2. When I try to create a cloudless mosaic using this request for data 
> stored in COGs for multiple days(!), a black tile filled with values of 0 is 
> returned. This happens because there were no S2 revisions over that area for 
> those days, except for 2023-07-01, but data from that day were covered with 
> NoData from other days - this is an undesired effect :(
> 
> http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map=WCS=1.0.0=GetCoverage=test3=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158=EPSG:3857=771=944=GTiff=2023-07-01=2023-07-0
>  
> 5
> 
>  3. When I try to request data stored in VRT for a single day using this 
> request, data is returned, but the alpha channel is not taken into account, 
> so once again, transparency information is omitted.
> 
> http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map=WCS=1.0.0=GetCoverage=test=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158=EPSG:3857=771=944=GTiff=2023-07-01=2023-07-01
> 
> also, WCS seems to ignore MAXSCALEDENOM and MINSCALEDENOM 
> 
> Last time, I received a lot of good advice that greatly pushed and improved 
> my service. This time, I hope my message will initiate an interesting 
> discussion.
> 
> 
> 
> Best,
> 
> 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] Speed of WMS vs Speed of WCS; How to speed up WCS service?

2023-07-26 Thread Seth G
Hi Marcin,

As a first test I'd recommend adding in EXTENTs to all your layers (and 
ensuring they are correct):

EXTENT 1334552.857598 5342648.587634 4715044.821842 7547620.486088

If these are missing MapServer will often try and calculate these from the 
datasource automatically. Depending on the request type this calculation could 
be made multiple times.

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Jul 26, 2023, at 11:53 AM, Marcin Niemyjski via MapServer-users wrote:
> Hello,
> 
> I have a problem, Namely, I have created a WCS and here is its mapfile:
> https://pastecode.io/s/6v3qfssb
> 
> For a better understanding, here is a view of the tileindex through which the 
> data is served:
> https://pasteboard.co/ydgvDiqxz4lf.png
> 
> I am connecting to files located in a private bucket, so I am using vsis3.
> 
> The WMS loads quite fast, but the issue arises with the time it takes to 
> generate a requested WCS tile:
>  https://pasteboard.co/8G8uF41jqgHc.png
> 
> It takes almost 5 minutes to generate the tile, and the received data is 1.5 
> MiB (which is it's actual size).
> 
> Additionally, I am sending you URLs to sample data:
> https://s3.waw3-1.cloudferro.com/swift/v1/Julien/Data/T34UFD_20230708T093549_TCI_60m.jp2
> https://s3.waw3-1.cloudferro.com/swift/v1/Julien/Data/T37TCN_20220605T083559_TCI_60m.jp2
> 
> The case is - how to speed it up? Am I making any goofy mistakes?
> I would be grateful for any recommendations or if you notice any errors, I 
> might be making :)
> 
> Best,
> 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] Some remote SVG files doesn't in 8.1

2023-07-20 Thread Seth G
Adding a width and height to the SVG also works, without having to remove the 
viewBox:

http://www.w3.org/2000/svg; width="10pt" height="10pt" 
viewBox="0 0 396.85 396.85">

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Jul 19, 2023, at 11:54 PM, Seth G wrote:
> Hi Martin,
> 
> The issue seems to be related to the viewBox property in the SVG file.
> If you save the SVG source from 
> view-source:https://raw.githubusercontent.com/NordjyllandsTrafikselskab/gisimages/ca64d7a849c7cf0290ec41ec263a97b9195d0ff8/01.01.01.Bus.svg
>  and remove the following text in a text editor the symbols display correctly:
> 
> viewBox="0 0 396.85 396.85"
> 
> Maybe it could be an upstream issue, or something has changed upstream that 
> breaks symbol size calculations.
> 
> Seth
> 
> 
> --
> web:https://geographika.net & https://mapserverstudio.net
> twitter: @geographika
> 
> On Tue, Jul 18, 2023, at 1:59 AM, Steve Lime wrote:
>> 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
>> 
> 
> ___
> 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-19 Thread Seth G
Hi Martin,

The issue seems to be related to the viewBox property in the SVG file. 
If you save the SVG source from 
view-source:https://raw.githubusercontent.com/NordjyllandsTrafikselskab/gisimages/ca64d7a849c7cf0290ec41ec263a97b9195d0ff8/01.01.01.Bus.svg
 and remove the following text in a text editor the symbols display correctly:

viewBox="0 0 396.85 396.85"

Maybe it could be an upstream issue, or something has changed upstream that 
breaks symbol size calculations. 

Seth


--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Tue, Jul 18, 2023, at 1:59 AM, Steve Lime wrote:
> 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
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] FW: Unable to build mapserver 8 on WIndows with v8 support

2023-06-08 Thread Seth G
Hi,

I've not used this functionality myself, and I remember at a MapServer 
codesprint there were problems trying to compile this over 5 years ago. In 
answer to your question about getting it working with MapServer 8 - I doubt 
this is possible without updating the source code. 

As Jeff wrote it will need someone to attempt to update this to work with newer 
versions. It would require experience of the v8 engine and its API changes in 
the last 10 years to get this working again. A few links that may be useful to 
get started:

- the code - 
https://github.com/MapServer/MapServer/tree/4b7ad75eda030eca919b7f7d06de8a8e95ca52f3/mapscript/v8
- the RFC about its implementation - 
https://mapserver.org/development/rfc/ms-rfc-106.html
- the original pull request - https://github.com/MapServer/MapServer/pull/4827

Just to note this support is to allow shapes to be manipulated with JS 
functions in a Mapfile, and unrelated to MapScript. Adding MapScript JS support 
is probably easier as it is one of the SWIG target languages. 

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Jun 8, 2023, at 6:22 PM, Сухно Николай wrote:
> in this case the situation is different  
> https://github.com/MapServer/MapServer/issues/5484
> The author of the topic tried to use the compiled libraries from 
> version 3.14, although 3.20 is needed
> Version 7.0.4 is also discussed there.
> I have a positive experience building a mapserver 7.0.0 with v8 support 
>  for windows and Linux(centos 7). 
> If someone needs it, I can give instructions on this.
>
> But my original question is about mapserver 8. 
>
> -Original Message-
> From: MapServer-users  On 
> Behalf Of Jeff McKenna
> Sent: Thursday, June 8, 2023 6:32 PM
> To: mapserver-users@lists.osgeo.org
> Subject: Re: [MapServer-users] FW: Unable to build mapserver 8 on 
> WIndows with v8 support
>
> I honestly don't think that any love has been given to V8 support in 
> many years (see the discussion at
> https://github.com/MapServer/MapServer/issues/5484 )
>
> Might be good to give that issue a ping, and for you to post your exact 
> errors there, and maybe even a pull request if possible.
>
> PS. as MS4W distributes all mapscripts, V8 is not yet included, and I'm 
> willing to add itbut it seems it will take some effort, a community 
> effort...
>
> -jeff
>
>
>
> --
> Jeff McKenna
> GatewayGeo: Developers of MS4W, MapServer Consulting and Training 
> co-founder of FOSS4G http://gatewaygeo.com/
>
>
>
> On 2023-06-08 12:09 p.m., nikolay...@outlook.com wrote:
>> Good day to all!
>> 
>> I'm trying to compile a mapserver with v8 support for windows
>> 
>> as written in the docs 
>> https://mapserver.org/installation/v8.html#obtaining-compiling-and-installing-v8-and-v8-mapscript
>>  
>> 
>>  «you have to use v8 3.20»
>> 
>> The problem in v8, that  is a very old version and it can't be built for 
>> MSVC versions higher than 2013
>> 
>> At the same time, the SDK  mapserver 8 is only available for 2022 
>> https://gisinternals.com/sdk.php 
>> 
>> Previously I built v8 under MSVC 2013, but this lib’s  not work with 
>> MSVC 2022 due to binary incompatibility
>> 
>> 
>> ___
>> 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] Qgis layer style file in mapfile

2023-05-19 Thread Seth G
Hi Steve,

I've so far only experimented with simple styles, but attempting to convert 
more complex examples from QGIS styles should highlight what type of style 
properties are missing in MapServer.

Seth

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Mon, May 15, 2023, at 5:53 PM, Steve Lime wrote:
> 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
>>> 
>>> 
>>> 
>>> 
>>> 
 
<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
>>> 
>>> Book time to meet with me 
>>> <https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
>>> 
>>> 
>>> ___
>>> 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] MapServer 8.0.1 release overview

2023-05-19 Thread Seth G
Hi all,

I've put together a summary of the changes introduced in the MapServer 8.0.1 
release from last month at 
https://mapserverstudio.net/posts/mapserver-8.0.1.html that could be of 
interest to MapServer users. 

Seth

--
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


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

2023-05-11 Thread Seth G
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


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

2023-02-22 Thread Seth G
Hi,

I think OPACITY should still work at the STYLE level: 
https://mapserver.org/mapfile/style.html#mapfile-style-opacity
If you are using WMS then you could setup different styles with different 
OPACITY values, and then use named styles to select the appropriate style (with 
the STYLES= added to the WMS request). 

Seth


--
web:https://geographika.net
twitter: @geographika

On Wed, Feb 22, 2023, at 4:46 PM, Steve Lime wrote:
> 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
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Using getMetadata with xml file

2023-02-07 Thread Seth G
Hi,

Did you set the metadata at the LAYER level?

LAYER
  NAME "testlayer"
  METADATA
'ows_metadataurl_href' "https://mapservice.test.org/data/Test.XML;
  END
END

Then a request to 
https://mapservice.test.org/cgi-bin/mapserv?map=/data/ows/maps/metatest.map=GetMetadata=testlayer
 should return the following HTTP response:

Status: 301 Moved Permanently
Location: D:\TFS\PublicLighting\Main\Python\plpy\mapfiles\generated\test.xml


Seth

--
web:https://geographika.net
twitter: @geographika

On Tue, Feb 7, 2023, at 3:08 PM, Gerhard Völkl wrote:
> 
> Hello,
> __
> _I am looking for an getMetadata example_
> __
> _I want to call mapserver to get metadata xml file_
> __
> _Example:_
> __
> _https://mapservice.test.org/cgi-bin/mapserv?map=/data/ows/maps/metatest.map=GetMetadata=testlayer_
> __
> _In the map file I used this_
>  
>  'ows_metadataurl_href' "_https://mapservice.test.org/data/Test.XML_;
> 
> But it does not work.
> 
> Any examples. Perhaps with example xml file
> 
>  
>  
> Best Regards Gerhard
> 
> Von meinem iPad gesendet
> ___
> 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] GetMap request inside python script; measuring speed of WMS?

2023-01-24 Thread Seth G
Hi Marcin,

Sorry I thought you wanted to do this within MapScript without a web server. 
If you want to simply make WMS requests to any WMS server over HTTP I'd 
recommend the Python library OWSLib, see for example 
https://geopython.github.io/OWSLib/notebooks/examples/wms.html

Seth

--
web:https://geographika.net
twitter: @geographika

On Tue, Jan 24, 2023, at 12:02 PM, Marcin Niemyjski wrote:
> Seth,
> 
> do I understand it correctly? I need to provide WMS's mapfile to perform 
> request? I assume that I should be mainly interested in code part between 16 
> and 36 line.
> 
> Thank you for quick response,
> Marcin
> 
> 
> 
> 
> 
 
<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
> 
> Book time to meet with me 
> <https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
> 
> 
> 
> *From:* Seth G 
> *Sent:* Tuesday, January 24, 2023 11:39 AM
> *To:* Marcin Niemyjski ; MapServer Users 
> 
> *Subject:* Re: [MapServer-users] GetMap request inside python script; 
> measuring speed of WMS?
>  
> Hi Marcin,
> 
> Have a look at the example Python script at 
> https://github.com/MapServer/MapServer/blob/main/mapscript/python/examples/wxs.py
>  - this shows creating and calling a WMS request.
> 
> Seth
> 
> --
> web:https://geographika.net
> twitter: @geographika
> 
> On Tue, Jan 24, 2023, at 11:36 AM, Marcin Niemyjski via MapServer-users wrote:
>> Hello,
>> 
>> I want to measure how long does it takes for my WMS to response to GetMap 
>> request. I have prepared list of extents in form of python list for example:
>> ['38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628',
>>  
>> '38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628'...]
>> 
>> I'm aiming into itterating over this list and passing it's elements into 
>> GetMap request inside python script and then request GetMap and measure how 
>> long does it takes to perfome it.
>> 
>> Here starts my question: How to do GetMap request inside python script, is 
>> it possible? The question is not about creating the url but about function 
>> wich does request.
>> Maybe somebody can recommend me some other way of measuring speed of WMS?
>> 
>> I would like show my k8s cluster service as use-case at FOSS4G 2023 and i 
>> need some statistics for presentation 
>> 
>> Best,
>> Marcin
>> 
>> 
>> 
>> 
 
<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
>> 
>> Book time to meet with me 
>> <https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
>> 
>> ___
>> 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] GetMap request inside python script; measuring speed of WMS?

2023-01-24 Thread Seth G
Hi Marcin,

Have a look at the example Python script at 
https://github.com/MapServer/MapServer/blob/main/mapscript/python/examples/wxs.py
 - this shows creating and calling a WMS request.

Seth

--
web:https://geographika.net
twitter: @geographika

On Tue, Jan 24, 2023, at 11:36 AM, Marcin Niemyjski via MapServer-users wrote:
> Hello,
> 
> I want to measure how long does it takes for my WMS to response to GetMap 
> request. I have prepared list of extents in form of python list for example:
> ['38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628',
>  
> '38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628'...]
> 
> I'm aiming into itterating over this list and passing it's elements into 
> GetMap request inside python script and then request GetMap and measure how 
> long does it takes to perfome it.
> 
> Here starts my question: How to do GetMap request inside python script, is it 
> possible? The question is not about creating the url but about function wich 
> does request.
> Maybe somebody can recommend me some other way of measuring speed of WMS?
> 
> I would like show my k8s cluster service as use-case at FOSS4G 2023 and i 
> need some statistics for presentation 
> 
> 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] Symbol image on s3 bucket?

2023-01-05 Thread Seth G
Hi Marcin,

This is not currently possible (fopen is used to read these files [1]), but it 
would be a very nice feature to allow the GDAL virtual filesytems to be used 
for symbols (and maybe also fonts).

Seth

[1] 
https://github.com/MapServer/MapServer/blob/5dbbf8a19abb2f30b4852b72c8661faac14ae4c9/mapimageio.c#L1099

--
web:https://geographika.net
twitter: @geographika

On Thu, Dec 22, 2022, at 12:01 PM, Marcin Niemyjski via MapServer-users wrote:
> Hello,
> 
> is it possible to keep my symbols images on S3 bucket and connect to them via 
> vsis3?
> 
> This way doesn't work:
> 
> SYMBOL 
> NAME "fuel"
> TYPE pixmap
> IMAGE "/vsis3/Cyprus/fuel.png"
> END
> 
> Mapserver returns "msLoadMSRasterBufferFromFile(): General error message. 
> unable to open file /vsis3/Cyprus/fuel.png for reading"
> 
> Best, 
> 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] WMS in 16bit depth?

2022-10-12 Thread Seth G
Hi Marcin,

Are you trying to display raster images with more colours?

You can play around with the OUTPUTFORMAT options - see details at 
https://mapserver.org/mapfile/outputformat.html
IMAGEMODE might be what you are looking for?

I've normally used these to reduce image sizes where possible. 

Seth


--
web:https://geographika.net
twitter: @geographika

On Wed, Oct 12, 2022, at 9:49 AM, Marcin Niemyjski via MapServer-users wrote:
> Hello,
> 
> Is it possible to exhibit WMS in 16bit depth? The goal is to provide more 
> depth in the scale. Could I ask for a hint?
> 
> 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] WMS: Not all features show, depending on how I zoom and pan

2022-09-28 Thread Seth G
Hi,

Is there any change if you update the layer to have a single class with a 
simple line (no EXPRESSION, LABEL, MAXSCALEDENOM)?

E.g.

CLASS
STYLE
COLOR 0 0 255
WIDTH 6
END

Seth

--
web:https://geographika.net
twitter: @geographika

On Wed, Sep 28, 2022, at 1:03 PM, Antonis Christofides wrote:
> Hello,
> 
> I have a problem that has already been discussed in stackexchange 
> (https://gis.stackexchange.com/questions/440902/mapserver-wms-not-all-features-show-depending-on-how-i-zoom-and-pan),
>  but without solution so far.
> 
> I'm repeating the full text here, but if there's any problem with the images 
> it might be better to go to stackexchange to read it.
> 
> Here is how QGIS shows an irrigation network, received by MapServer via WMS 
> and superimposed on OpenStreetMap:
> 
> enter image description here
> 
> Here is the same thing, but slightly panned to the right:
> 
> enter image description here
> 
> Several items are obviously missing. In fact there are items missing in the 
> top picture as well. Different items become visible as I zoom and pan 
> differently.
> 
> Since this pretty much tells the whole story, I'm not going into more 
> details. MapServer version is 7.6.2 (prepackaged for Debian). The base URL is 
> https://poros.irmasys.com/cgi-bin/mapserv?map=/opt/aira-poros/aira-poros/mapserver/extralayers.map.
>  Finally, below I paste the interesting parts of the mapfile.
> 
> Thanks!
> 
> Antonis
> 
> 
> 
> 
> 
> 
> `MAP
> NAME "aira-poros"
> STATUS ON
> SIZE 9040 7731
> EXTENT 103986.57 3850796.18 1007945.14 4623933.00
> UNITS meters
> PROJECTION
> "init=epsg:2100"
> END
> CONFIG MS_ERRORFILE "/var/log/mapserver/extralayers.log"
> 
> # [Omitting some OUTPUTFORMAT sections]
> 
> WEB
> IMAGEPATH "/var/cache/mapserver/"
> IMAGEURL "/mapserver_tmp/"
> METADATA
> "wms_title" "Aira Poros"
> "wms_onlineresource" 
> "https://poros.irmasys.com/cgi-bin/mapserv?map=/opt/aira-poros/aira-poros/mapserver/extralayers.map&;
> "wms_srs" "EPSG:4326 EPSG:2100 EPSG:3857"
> "wms_enable_request" "*"
> "wms_feature_info_mime_type" "text/html"
> 
> "wfs_title" "Aira Poros"
> "wfs_onlineresource" 
> "https://poros.irmasys.com/cgi-bin/mapserv?map=/opt/aira-poros/aira-poros/mapserver/extralayers.map&;
> "wfs_srs" "EPSG:2100 EPSG:4326 EPSG:3857"
> "wfs_enable_request" "*"
> END
> END
> 
> LAYER
> NAME "irrigation-network" 
> TYPE LINE
> CONNECTIONTYPE OGR
> CONNECTION "irrigation-network.gml"
> METADATA
> "wms_title" "Irrigation network"
> "wfs_title" "Irrigation network"
> "gml_include_items" "all"
> "gml_featureid" "id"
> END
> STATUS ON
> PROJECTION
> "init=epsg:2100"
> END
> CLASSITEM 'category'
> CLASS
> EXPRESSION '1'
> STYLE
> COLOR 0 0 255
> OPACITY 50
> WIDTH 6
> END
> LABEL
> COLOR 0 0 255
> ANGLE FOLLOW
> OFFSET 5 99
> MAXSCALEDENOM 1
> TEXT "[irri_code]"
> END
> LABEL
> COLOR 0 0 255
> ANGLE FOLLOW
> OFFSET -8 99
> MAXSCALEDENOM 1
> EXPRESSION (NOT('[Diameter]' = ''))
> TEXT "D=[Diameter] mm"
> END
> END
> 
> # [Omitting three more classes]
> END
> 
> # [Omitting four more layers]
> 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] Swig Mapscript Still Fails to Build with PHP 8

2022-09-27 Thread Seth G
Hi,

The CI setup for MapServer doesn't test Homebrew/Mac, so that could be one 
possible issue.

MapServer 8 and PHP 8 however is tested on Linux - see 
https://github.com/MapServer/MapServer/blob/main/.travis.yml and the most 
recent log for PHP 8 - 
https://app.travis-ci.com/github/MapServer/MapServer/jobs/583600218
Lots of the install logic run on Travis is contained in 
https://github.com/MapServer/MapServer/blob/main/ci/travis/before_install.sh
Check for differences with your own logs to see what might be causing the 
errors.
Good luck!

Seth

--
web:https://geographika.net
twitter: @geographika

On Tue, Sep 27, 2022, at 5:39 PM, b g wrote:
> Good morning,
> 
> I have been trying to build the MapServer 8.0 release using PHP 8. I am a new 
> user having only been working with MapServer for just a couple of months, 
> please forgive me I don't ask questions in the appropriate way.
> 
> I have seen posts on the Github referring to the new release as supporting 
> PHP 8 as mentioned here: https://github.com/MapServer/MapServer/pull/6430* 
> *and here: https://github.com/MapServer/MapServer/issues/6632. However, I 
> fail to see a post mentioning the steps of what I need to change in the build 
> process. My process is as follows: I install Homebrew and then install the 
> dependencies -- httpd php@8.0 cmake pkg-config swig fcgi gd gdal geos giflib 
> postgresql proj protobuf-c proj@7. After this I clone MapServer from Github 
> and checkout rel-8-0-0. Next, I run cmake with the following options: 
> 
> cmake ..  -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_FIND_FRAMEWORK=LAST 
> -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DWITH_CLIENT_WFS=ON 
> -DWITH_CLIENT_WMS=ON -DWITH_CURL=ON -DWITH_FCGI=ON -DWITH_FRIBIDI=OFF 
> -DWITH_GDAL=ON -DWITH_GEOS=ON -DWITH_HARFBUZZ=OFF -DWITH_KML=ON -DWITH_OGR=ON 
> -DWITH_POSTGIS=ON -DWITH_PROJ=ON -DWITH_PYTHON=OFF -DWITH_SOS=ON 
> -DWITH_WFS=ON -WITH_CAIRO=ON -DCMAKE_SKIP_RPATH=ON -DWITH_PHPNG=ON 
> -DCMAKE_INCLUDE_PATH="/usr/local/Cellar/postgresql"
> 
> And then make. However, make fails with errors referring to bindings needing 
> PHP 7. The error log is listed below:
> 
> https://pastebin.com/99xWFcpE
> 
> 
> Clearly, I must be missing something or doing something wrong during the 
> build process since others have stated that version 8.0.0 works with PHP 8. 
> Could anyone be so kind to point out my error so that I could get this to 
> work? Any help is much appreciated. Thank you so much.
> ___
> 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] MapServer at FOSS4G 2022

2022-08-29 Thread Seth G
Hi all,

FOSS4G was held in Florence/Firenze last week [1], and included a "State of 
MapServer 2022" talk [2]. 
The slides for this can be seen online [3]. The source HTML for this 
presentation is available on GitHub [4] - please feel free to reuse and adapt 
this content for any MapServer related talks. 

The MapServer ecosystem is wide and growing, so if there are new tools and 
systems that would be of interest to MapServer users please raise awareness of 
them on this user's list, and via the MapServer Wiki, and they can be mentioned 
in any future MapServer updates. 

7 members of the PSC (Project Steering Committee) were present, and from 
general discussions MapServer is widely used across many countries and 
organisations. Please add to the MapServer Site Gallery [5] if possible! 

Below is a selection of other MapServer related presentations - I believe the 
slides and audio for these will be published on YoutTube later this year:

+ MapServer - Make beautiful maps - 
https://talks.osgeo.org/foss4g-2022/talk/SQMVXH/ (slides at 
https://github.com/LarsSchy/FOSS4G-2022)
+ Mapserver layer handling, production, and management in larger scale 
environment - https://talks.osgeo.org/foss4g-2022/talk/CXXKVU/
+ A crawler for spatial (meta)data as a base for Mapserver configuration - 
https://talks.osgeo.org/foss4g-2022/talk/QW3NYC/
+ EVRYMAP - An extensible web mapping framework based on Angular, NodeJS, 
Leaflet and Mapserver - https://talks.osgeo.org/foss4g-2022/talk/Q9G7EH/

Last year's online talk "State of Mapserver 2021" is also available on YouTube 
[6] and covers many of the new features arriving in MapServer 8.0.

Seth

[1] https://2022.foss4g.org/
[2] https://talks.osgeo.org/foss4g-2022/talk/CBVAT9/
[3] https://geographika.github.io/mapserver-state-2022/
[4] https://github.com/geographika/mapserver-state-2022
[5] https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery
[6] https://www.youtube.com/watch?v=me5UyqG03Pg

--
web:https://geographika.net
twitter: @geographika
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [SURVEY] Publishing of Twin Cities, OSGeo Local Chapter Meeting Recordings

2022-07-26 Thread Seth G
Hi Bob,

There is an OSGeo YouTube channel at 
https://www.youtube.com/channel/UCDvJEf8hXbyeVqaYaS8sLvw that could be used?
I'd like to highlight a couple of the MapServer related talks at the MapServer 
summary talk next month at FOSS4G if possible. As you mention, the 
presentations linked to at 
https://www.osgeo.org/local-chapters/twin-cities-mn-usa-chapter/ are currently 
offline, so +1 from myself. 

Seth

--
web:https://geographika.net
twitter: @geographika


On Wed, Jul 13, 2022, at 6:48 PM, Basques, Bob (CI-StPaul) wrote:
> All,
>  
> I’ve been publishing our past meeting recording  links on my own, but the 
> hardware it’s on is nearing end of life. It’s been down for a couple of weeks 
> now, and I was pondering publishing our presentations to a You-Tube Channel.  
> I think this will make things easier on the maint. and publishing, and also 
> allow for a little better handling, of metadata aspects.  This should also 
> make it easier for everyone in our groups to direct people to our 
> presentations in the past, present, and future to promote our efforts to 
> date.  I also have some old presentations that I did, saved from meetings way 
> back in the day (When we were TCMUG) that I would like to park somewhere, 
> probably as a retrospective.
>  
> So,  can you reply to this Email with a +1 if in favor or -1 if not.   Go 
> ahead and add any comments as well for reasoning.  Even if it’s decided that 
> it’s a good idea, I’ll still get an individual signoff from each presenter 
> before posting anything.
>  
> Bobb
>  
>  
>  
> Get me in Teams 
> 
> *PW19-S295-C024*
>  
>  
> ___
> 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] Fwd: MapServer 7 arithmetic expressions do not work on STYLE attributes?

2022-06-16 Thread Seth G
Hi,

Couldn't you just add a new field to the DATA clause and use that?

`DATA "geom from (select pk, geom, size, (size * 2) as mycolor from 
sizes_of_thing) USING srid 3788 version 11g" `
`CLASS `
`MAXSCALEDENOM 5001 `
`STYLE `
`COLOR [`mycolor`]`

Or maybe this is a cut-down example.

`Seth`
``
--
web:https://geographika.net
twitter: @geographika


On Thu, Jun 16, 2022, at 11:04 AM, Andi p3 Domi wrote:
> I am trying to port my code from MapServer 5 (Oracle) to MapServer 7 
> (PostgreSQL), but I am encountering an issue when trying to apply arithmetic 
> expressions in the style class. So previously in MapServer 5 I would have 
> something like:
> 
> `DATA "geom from (select pk, geom, size from sizes_of_thing) USING srid 3788 
> version 11g"
> CLASS
> MAXSCALEDENOM 5001
> STYLE
> COLOR [size*2]
`
> Which worked perfectly fine: But if I convert it to MapServer 7 and 
> PostgreSQL like:
> 
> `DATA "geom from (select pk, geom, size from sizes_of_thing sot) USING unique 
> pk USING srid=3788"
> CLASS
> STYLE
> COLOR [size*2]
`
> Throws an error such as:
> 
> `msPostGISLayerWhichShapes(): Error (ERROR:  column "size*2" does not exist
`
> By any chance are these expressions not supported anymore in MapServer 
> 7/PostGIS or am I doing something wrong?
> 
> What I have tried so far is to write something like
> 
> `SIZE [size]*2
> SIZE ([size]*2)
`
> create an expression like:
> 
> `EXPRESSION ("size2" "[size]*2")
`
> And use it in something like:
> 
> `SIZE [size2]
`
> create a validation variable such as:
> 
> `VALIDATION
> "size2" '[size]*2'
`
> and then
> 
> `SIZE [size2]
`
> But it seems like none of them work.
> 
> ___
> 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 field type errors on FES filter

2022-05-04 Thread Seth G
Hi,

In the LAYER METADATA set:

"gml_types"   "auto"

See https://mapserver.org/ogc/wfs_server.html#layer-object

Seth


--
web:https://geographika.net
twitter: @geographika


On Wed, May 4, 2022, at 3:28 PM, PE Lord via MapServer-users wrote:
> Hi there!
> 
> I've got a lot of fields stored as character/text but their contents are 
> integers/numbers.
> 
> Ex: In my DB (postgresql), I have tableA with fieldA. FieldA is declared as a 
> character(2) but the content of rows are numbers... i.e. 71
> 
> The issue here is when I filter my data (QGIS or my web app) :
> 
> ...?
> SERVICE=WFS&
> REQUEST=GetFeature&
> VERSION=2.0.0&
> TYPENAMES=ms:tableA&
> STARTINDEX=0=1000&
> SRSNAME=urn:ogc:def:crs:EPSG::4326&
> FILTER=
> http://www.opengis.net/fes/2.0; 
> xmlns:gml="http://www.opengis.net/gml/3.2;>
>  
>   
>geometry
>
> 40.778399776 
> -87.964200528
> 51.889699771 
> -68.372100321
>
>   
>   http://www.opengis.net/fes/2.0;>
>FieldA
>http://www.opengis.net/fes/2.0;>71
>   
>  
> 
> 
> 
> 
> Mapserver return this error 
> 
> msWFSGetFeature(): WFS server error. 
> FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. 
> Error executing query. Check server logs
>  
> To fix this issue, I know that I must declare gml_fieldA_type "Character".
> 
> Here the question: There is a method to automatically declare the type of all 
> of thems?
> 
> The real issue about this question is that I have to handle near a thousand 
> of layers, each of them containning a lot of fields! It's a scale issue!
> 
> Thanks
> 
> Pierre
> 
> 
> 
> 
> 
> ___
> 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 import errors (Module not found) in Python venv with global install

2022-05-02 Thread Seth G
Glad it's working for you, and good to know it can work alongside QGIS. 
The GISInternal Python MapScripts I think are built with SWIG 2.0, whereas I 
compiled those wheels with the latest version of SWIG 4.0.2/master build. That 
may explain why the GISInternals don't work with more recent Python versions. 

Seth

--
web:https://geographika.net
twitter: @geographika


On Mon, May 2, 2022, at 3:38 PM, maëlle lapriel wrote:
> Hi Seth,
> 
> It is working fine with Python 3.6 and the corresponding GISInternals build 
> until I try it in a venv, however it's not working on any other Python 
> version (and matching GISInternals) regardless of venv or not. Regarding venv 
> and env variables, it doesn't seem that anything gets wiped when activating a 
> venv.
> 
> Interestingly, I got it working on all tested Python versions (3.6, 3.7, 3.9) 
> by installing MapScript using your wheels instead of using the MapScript that 
> ships with MapServer, both in venv and outside, and together with QGIS 
> loaded. I have no idea what exactly the difference is ultimately, but at 
> least I have a working environment now, so many thanks!
> 
> On Fri, 29 Apr 2022 at 10:15, Seth G  wrote:
>> __
>> Hi,
>> 
>> As you wrote, the version of Python needs to match the version of Python 
>> used by GISInternals (which is different dependent on the package) e.g. 
>> https://www.gisinternals.com/packageinfo.php?file=release-1928-x64-gdal-3-4-2-mapserver-7-6-4.zip
>>  - "python - Python37-AMD64"
>> 
>> Is everything working fine until you setup a virtual environment? This could 
>> be because activating a Python virtual environment on Windows seems to wipe 
>> out any previously set environment variables in the session. Try activating 
>> the virtual environment, and then running SDKShell.bat (or simply setting 
>> the environment variables you need from that file).
>> 
>> SET PATH=C:\MapServer\bin;%PATH%
>> SET PROJ_LIB=C:\MapServer\proj7\SHARE
>> SET MAPSERVER_DLL_PATH=C:\MapServer\bin
>> 
>> I have some experimental MapScript Wheels [1] built for various versions of 
>> Python with a recent MapServer development build, which could work with a 
>> release-1930-x64 development build [2]. 
>> 
>> Seth
>> 
>> [1] https://github.com/geographika/python-mapscript/tree/main/wheels
>> [2] 
>> https://www.gisinternals.com/query.html?content=filelist=release-1930-x64-gdal-mapserver.zip
>> --
>> web:https://geographika.net
>> twitter: @geographika
>> 
>> 
>> On Fri, Apr 29, 2022, at 9:08 AM, maëlle lapriel wrote:
>>> Hi Seth,
>>> 
>>> I've considered this to be the problem, however I can rule out any 
>>> dependency conflicts already since I also tried to simply just get 
>>> MapScript running in a Python env without any other imports.
>>> Am I assuming right that for just using MapScript alone, I can just run the 
>>> SDKShell.bat to have all the variables set, then take a Python version that 
>>> matches the GISInternals build and I'm good to go? Because that already 
>>> yields mentioned import errors, with every possible build or Python version 
>>> except 3.6 and MapServer 7.6.1, which also stops working as soon as I set 
>>> up a venv. 
>>> 
>>> Thank you very much for your help.
>>> 
>>> Cheers
>>> 
>>> On Thu, Apr 28, 2022, 18:25 Seth G  wrote:
>>>> __
>>>> Hi Maëlle,
>>>> 
>>>> MapScript (and MapServer) use many of the same dependent DLLs as QGIS - 
>>>> GDAL, Proj, GEOS etc. which would then get loaded into memory by Python. 
>>>> For everything to work correctly, all these dependencies would have to be 
>>>> the same version, and (I think this is still the case), compiled with the 
>>>> same version of Microsoft Visual C (the 1928, 1931 etc. use when naming 
>>>> the GISInternals zips). 
>>>> It probably would be possible to get everything build and working, but 
>>>> you'd likely have to compile everything yourself. 
>>>> Is it possible to modify your workflow so a PyQGIS environment dumps out 
>>>> data to disk and then a MapScript environment works on this data? 
>>>> I'd imagine PyQGIS can probably do everything MapScript can, except for 
>>>> manipulate Mapfiles - you could take a look at mappyfile for this, which 
>>>> is Python only has has no dependent DLLs.
>>>> 
>>>> Seth
>>>> 
>>>> --
>>>> web:https://geographika.net
>>>> twitter: @geographika
>>>> 
&g

Re: [mapserver-users] MapScript import errors (Module not found) in Python venv with global install

2022-04-29 Thread Seth G
Hi,

As you wrote, the version of Python needs to match the version of Python used 
by GISInternals (which is different dependent on the package) e.g. 
https://www.gisinternals.com/packageinfo.php?file=release-1928-x64-gdal-3-4-2-mapserver-7-6-4.zip
 - "python - Python37-AMD64"

Is everything working fine until you setup a virtual environment? This could be 
because activating a Python virtual environment on Windows seems to wipe out 
any previously set environment variables in the session. Try activating the 
virtual environment, and then running SDKShell.bat (or simply setting the 
environment variables you need from that file).

SET PATH=C:\MapServer\bin;%PATH%
SET PROJ_LIB=C:\MapServer\proj7\SHARE
SET MAPSERVER_DLL_PATH=C:\MapServer\bin

I have some experimental MapScript Wheels [1] built for various versions of 
Python with a recent MapServer development build, which could work with a 
release-1930-x64 development build [2]. 

Seth

[1] https://github.com/geographika/python-mapscript/tree/main/wheels
[2] 
https://www.gisinternals.com/query.html?content=filelist=release-1930-x64-gdal-mapserver.zip
--
web:https://geographika.net
twitter: @geographika


On Fri, Apr 29, 2022, at 9:08 AM, maëlle lapriel wrote:
> Hi Seth,
> 
> I've considered this to be the problem, however I can rule out any dependency 
> conflicts already since I also tried to simply just get MapScript running in 
> a Python env without any other imports.
> Am I assuming right that for just using MapScript alone, I can just run the 
> SDKShell.bat to have all the variables set, then take a Python version that 
> matches the GISInternals build and I'm good to go? Because that already 
> yields mentioned import errors, with every possible build or Python version 
> except 3.6 and MapServer 7.6.1, which also stops working as soon as I set up 
> a venv. 
> 
> Thank you very much for your help.
> 
> Cheers
> 
> On Thu, Apr 28, 2022, 18:25 Seth G  wrote:
>> __
>> Hi Maëlle,
>> 
>> MapScript (and MapServer) use many of the same dependent DLLs as QGIS - 
>> GDAL, Proj, GEOS etc. which would then get loaded into memory by Python. 
>> For everything to work correctly, all these dependencies would have to be 
>> the same version, and (I think this is still the case), compiled with the 
>> same version of Microsoft Visual C (the 1928, 1931 etc. use when naming the 
>> GISInternals zips). 
>> It probably would be possible to get everything build and working, but you'd 
>> likely have to compile everything yourself. 
>> Is it possible to modify your workflow so a PyQGIS environment dumps out 
>> data to disk and then a MapScript environment works on this data? 
>> I'd imagine PyQGIS can probably do everything MapScript can, except for 
>> manipulate Mapfiles - you could take a look at mappyfile for this, which is 
>> Python only has has no dependent DLLs.
>> 
>> Seth
>> 
>> --
>> web:https://geographika.net
>> twitter: @geographika
>> 
>> 
>> On Thu, Apr 28, 2022, at 11:42 AM, maëlle lapriel wrote:
>>> I'm trying to write a PyQGIS standalone script which utilizes MapScript for 
>>> certain tasks. In a first attempt, I basically did this:
>>> 
>>> - I installed MapScript globally with pip and using the Python 3.9.5 
>>> interpreter which ships with QGIS 3.22.6 (also includes wheel)
>>> - Created a venv with --system-site-packages
>>> - Downloaded the appropriate Windows binary build of MapServer from 
>>> GISInternals (release-1928-x64-gdal-3-4-mapserver-7-6) and extracted into 
>>> C:\MapServer\
>>> - Set the MAPSERVER_DLL_PATH to C:\MapServer\bin
>>> 
>>> However, whenever I try to load MapScript, it yields the following:
>>> 
>>> Traceback (most recent call last):
>>>   File "", line 1, in 
>>>   File "C:\QGIS\apps\Python39\lib\site-packages\mapscript\__init__.py", 
>>> line 2, in 
>>> from .mapscript import *
>>>   File "C:\QGIS\apps\Python39\lib\site-packages\mapscript\mapscript.py", 
>>> line 13, in 
>>> from . import _mapscript
>>> ImportError: DLL load failed while importing _mapscript: The specified 
>>> module could not be found.
>>> 
>>> As to where the README over at github indicates that this means 
>>> MapServer.dll can't be found.
>>> 
>>> In order to rule out possible issues, I also tried the following:
>>> 
>>> - Not creating a venv, but using it with the QGIS python version directly
>>> - Installing MapScript into normal installations of python 3.7, 3.8, 3.9, 
>>> 3.10
>>> - Using it together

Re: [mapserver-users] MapScript import errors (Module not found) in Python venv with global install

2022-04-28 Thread Seth G
Hi Maëlle,

MapScript (and MapServer) use many of the same dependent DLLs as QGIS - GDAL, 
Proj, GEOS etc. which would then get loaded into memory by Python. 
For everything to work correctly, all these dependencies would have to be the 
same version, and (I think this is still the case), compiled with the same 
version of Microsoft Visual C (the 1928, 1931 etc. use when naming the 
GISInternals zips). 
It probably would be possible to get everything build and working, but you'd 
likely have to compile everything yourself. 
Is it possible to modify your workflow so a PyQGIS environment dumps out data 
to disk and then a MapScript environment works on this data? 
I'd imagine PyQGIS can probably do everything MapScript can, except for 
manipulate Mapfiles - you could take a look at mappyfile for this, which is 
Python only has has no dependent DLLs.

Seth

--
web:https://geographika.net
twitter: @geographika


On Thu, Apr 28, 2022, at 11:42 AM, maëlle lapriel wrote:
> I'm trying to write a PyQGIS standalone script which utilizes MapScript for 
> certain tasks. In a first attempt, I basically did this:
> 
> - I installed MapScript globally with pip and using the Python 3.9.5 
> interpreter which ships with QGIS 3.22.6 (also includes wheel)
> - Created a venv with --system-site-packages
> - Downloaded the appropriate Windows binary build of MapServer from 
> GISInternals (release-1928-x64-gdal-3-4-mapserver-7-6) and extracted into 
> C:\MapServer\
> - Set the MAPSERVER_DLL_PATH to C:\MapServer\bin
> 
> However, whenever I try to load MapScript, it yields the following:
> 
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "C:\QGIS\apps\Python39\lib\site-packages\mapscript\__init__.py", line 
> 2, in 
> from .mapscript import *
>   File "C:\QGIS\apps\Python39\lib\site-packages\mapscript\mapscript.py", line 
> 13, in 
> from . import _mapscript
> ImportError: DLL load failed while importing _mapscript: The specified module 
> could not be found.
> 
> As to where the README over at github indicates that this means MapServer.dll 
> can't be found.
> 
> In order to rule out possible issues, I also tried the following:
> 
> - Not creating a venv, but using it with the QGIS python version directly
> - Installing MapScript into normal installations of python 3.7, 3.8, 3.9, 3.10
> - Using it together with the latest builds of MapServer (1930)
> - Not installing MapScript with pip but copying over mapscript.py and 
> _mapscript.pyd from the respective MapServer builds
> - Adding C:\MapServer\bin to PATH instead of the new env variable
> 
> All with the same result. The only ever combination I got it working is when 
> installing the MapScript globally using python3.6/pip and the old MapServer 
> release-1911 (7.6.1), where I sadly can't import PyQGIS in the version I need.
> 
> What could be the issue here? 
> 
> Kind regards, Maëlle
> ___
> 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 Python module version 7.6.0 not working with Python 3 > 3.6

2022-04-14 Thread Seth G
Hi,

The wheels at https://pypi.org/project/mapscript/ are only available for 
Windows [1]. There is also a source distribution, but it would also require the 
MapServer soource and dependencies to build. 

Universal Wheels for Linux would only be possible by using manylinux [2], but 
I've not been able to compile MapServer with this. 
For other options (including creating your own Linux Wheels for your MapServer 
builds that can be installed in a virtual environment) see the sections 
"Installation on Unix" and "Building the Mapscript Module" at 
https://pypi.org/project/mapscript/

Seth


[1] https://pypi.org/project/mapscript/#files
[2] https://github.com/pypa/manylinux
--
web:https://geographika.net
twitter: @geographika


On Thu, Apr 14, 2022, at 10:39 AM, Marco Beri wrote:
> Dear Mapserver Users,
> I was not able to find a way to open an issue with this project 
> https://pypi.org/project/mapscript/7.6.0/
> 
> If you try to import the current mapserver module with Python 3 version major 
> than 3.6 (which already reached his end of life) you encounter this error:
> 
>> ImportError: cannot import name '_mapscript' from partially initialized 
>> module 'mapscript' (most likely due to a circular import) 
> 
> Would you help me find a way to open a ticket or to do a pull request or 
> whatever is the best way to help the developers to fix this problem?
> 
> Thanks a lot.
> 
> Ciao.
> Marco.
> P.S. You can easily reproduce it with these 3 simple steps (and a Python 
> version 3.8 or greater):
> 
>> pip install mapscript
>> python
>> >>> import mapscript
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File 
>> "/home/marcob/.virtualenvs/mapscript/lib/python3.9/site-packages/mapscript/__init__.py",
>>  line 2, in 
>> from .mapscript import *
>>   File 
>> "/home/marcob/.virtualenvs/mapscript/lib/python3.9/site-packages/mapscript/mapscript.py",
>>  line 13, in 
>> from . import _mapscript
>> ImportError: cannot import name '_mapscript' from partially initialized 
>> module 'mapscript' (most likely due to a circular import) 
>> (/home/marcob/.virtualenvs/mapscript/lib/python3.9/site-packages/mapscript/__init__.py)
>> >>> 
> ___
> 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-13 Thread Seth G
Hi Paul,

The runtime substitution and setting a querystring on the server is a good 
approach - have you found any drawbacks to this? Most web servers can set/add 
querystrings without any need for further software. 

As Steve mentioned the alternative would be to generate Mapfiles for specific 
environments from a template.
I use mappyfile for this, with a Python script that can be run as part of 
continuous deployment:

import mappyfile
mapfile = mappyfile.open("original.map")
# update the web metadata settings
mapfile["web"]["metadata"]["ows_onlineresource"] = 
"https://example.com/cgi-bin/mapserv?map={}.map".format("test") 

mappyfile.save(mapfile, "new.map")

Typical other settings I'd change are connection strings, DEBUG level, and 
EXTENTs for different Mapfiles.

Seth

--
web:https://geographika.net
twitter: @geographika


On Wed, Apr 13, 2022, at 3:52 AM, Steve Lime wrote:
> 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 
>>  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 
>>> 
>>> ```
>>> WEB
>>> VALIDATION
>>>   "ows_url" 
>>> "(\b(https?|ftp|file)://)?[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"
>>> END
>>> 
>>> METADATA
>>>   "ows_onlineresource"   "%ows_url%"
>>> END
>>> END
>>> ```
>>> 
>>> 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
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Securing MapServer Deployments

2022-04-01 Thread Seth G
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


Re: [mapserver-users] Cannot read shp file from database

2022-03-28 Thread Seth G
Hi,

The following 3 lines should all be in your LAYER...END block (and replacing 
the current DATA line):

  CONNECTIONTYPE postgis 
  CONNECTION "user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp 
host=127.0.0.1 port=5432"
  DATA "geom from sample.admintable using unique gid using srid=9000913"


Seth
--
web:https://geographika.net
twitter: @geographika


On Mon, Mar 28, 2022, at 8:29 PM, Jeremy JK wrote:
> Hello all,
> On my virtualbox linuxmint machine I can view a shp file with MapServer when 
> the shp file is on filesystem.
> When I put it into the database, the browser returns an error message
> but ogrinfo program can read the database well.
> See below 
> 
> And thanks for your assistance 
> J
> 
> *Error*: msLoadMap(): Unknown identifier. Parsing error near 
> (CONNECTIONTYPE):(line 9)
> *Petition*: 
> http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mapserver_quickstart.map=WMS=Getmap=1.1.1=Countries=EPSG:4326=-137,29,-53,88=PNG=800=600
> 
> 
> *ogrinfo *PG:"host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd 
> dbname=news_test_shp port=5432" sample.admintable -summary
> INFO: Open of `PG:host=127.0.0.1 user=postgres password=StrongAdminP@ssw0rd 
> dbname=news_test_shp port=5432'
>   using driver `PostgreSQL' successful.
> 
> Layer name: sample.admintable
> Geometry: Multi Polygon
> Feature Count: 258
> Extent: (-180.00, -90.00) - (180.00, 83.634101)
> Layer SRS WKT:
> GEOGCRS["WGS 84",
> DATUM["World Geodetic System 1984",
> ELLIPSOID["WGS 84",6378137,298.257223563,
> LENGTHUNIT["metre",1]]],
> PRIMEM["Greenwich",0,
> ANGLEUNIT["degree",0.0174532925199433]],
> CS[ellipsoidal,2],
> AXIS["geodetic latitude (Lat)",north,
> ORDER[1],
> ANGLEUNIT["degree",0.0174532925199433]],
> AXIS["geodetic longitude (Lon)",east,
> ORDER[2],
> ANGLEUNIT["degree",0.0174532925199433]],
> ID["EPSG",4326]]
> Data axis to CRS axis mapping: 2,1
> ...
> 
> +++
> *MAP*
>   NAME "MAPSERVER_QUICKSTART"
>   EXTENT -137 29 -53 88
>   UNITS DD
>   SHAPEPATH "/opt/mapfile"
>   SIZE 800 600
>   
>   IMAGETYPE PNG24
>   CONNECTIONTYPE postgis 
>   CONNECTION "user=postgres password=StrongAdminP@ssw0rd dbname=news_test_shp 
> host=127.0.0.1 port=5432"
>   DATA "geom from sample.admintable using unique gid using srid=9000913"
> 
> 
>   PROJECTION
> "init=epsg:4326"
>   END
> 
>   WEB
> METADATA
>   ows_title "MapServer Quickstart"
>   ows_enable_request "*"
>   ows_srs "EPSG:4326 EPSG:25832 EPSG:25833"
> END
>   END
> 
>   LAYER
> NAME "Countries"
> STATUS ON
> TYPE POLYGON
> DATA "ne_10m_admin_0_countries"
> CLASS
>   STYLE
> COLOR 246 241 223
> OUTLINECOLOR 0 0 0
>   END
> 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] How to avoid reading unneeded Features from PostGIS when displaying by map scale ranges?

2022-02-20 Thread Seth G
Hi Kyle,

Take a look at LAYER SCALETOKEN - 
https://mapserver.org/mapfile/layer.html#mapfile-layer-scaletoken
and the RFC https://mapserver.org/development/rfc/ms-rfc-86.html#rfc86 

You should be able to add a filter directly to the DATA clause based on the 
scale that would filter the data directly at source.

Seth
--
web:https://geographika.net
twitter: @geographika


On Sun, Feb 20, 2022, at 12:59 AM, Kyle Qian wrote:
> Hi, I know that MapServer will determine the CLASS of a Feature based on the 
> expression and scale range when drawing, but what if I want to avoid reading 
> data that is not needed under the current scale? FILTER can filter LAYER data 
> at the same time as spatial query, but do I have to create a separate LAYER 
> for each scale range? 
> Thanks.
> ___
> 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 Seth G
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


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

2022-02-06 Thread Seth G
Ah ok I was looking at the mapfile. Passing =1976 in from the command line 
should work fine.
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%")

Also maybe try with a different parameter name e.g. MYYEAR just in case YEAR is 
treated differently as it is used for various OGC services. 

Seth

--
web:https://geographika.net
twitter: @geographika


On Sun, Feb 6, 2022, at 9:50 AM, andy wrote:
> Hi Seth,
> 
> On Sun, 6 Feb 2022 at 09:35, Seth G  wrote:
>  
>> Shouldn't the variable be wrapped in percentage signs?
>> 
>> EXPRESSION (%year% < 1976)
> 
> my goal is another one. My hardcorded expression is "EXPRESSION ([year] < 
> 1976)".
> 
> I want to use run-time substitution to use "EXPRESSION ([year] < '%year%')", 
> in the same way described here:
> https://mapserver.org/el/mapfile/validation.html#test-with-commandline
> 
> Thank you
>  
> -- 
> ___
> 
> 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


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

2022-02-06 Thread Seth G
Hi,

Shouldn't the variable be wrapped in percentage signs?

EXPRESSION (%year% < 1976)

Seth

--
web:http://geographika.net
twitter: @geographika


On Sat, Feb 5, 2022, at 6:13 PM, 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] WFS bbox/intersect etc query from custom projection to EPSG:4326

2021-11-24 Thread Seth G
Hi Sander,

Does adding a PROJECTION block to your LAYER have an effect?
Even if the layer projection is the same as the MAP I think I've run into a few 
combinations where setting explicitly on the layer helped.

Seth


--
web:http://geographika.co.uk
twitter: @geographika


On Wed, Nov 24, 2021, at 2:01 PM, Sander Pukk wrote:
> Hi there!
> 
> We have been running into an issue with WFS, EPSG:4326 and a filter (namely 
> bbox) query.
> We have been using MapServer for years and the current version we have is 
> 7.6.4.
> WMS and WFS are both enabled and WFS is configured for gml and geojson.
> 
> Our MapServer's main output is in EPSG:3301 projection and most of our 
> clients use it like that.
> The bbox OGC WFS filters work in that projection and another more "robust" 
> approach by limiting bbox into a 20x20 pixel square in the request.
> 
> Our MapServer can also function in the regular 4326 and 3857 in WMS and WFS.
> But one of our clients is doing their things in 4326 and we noticed an issue 
> when querying WFS with a bbox/intersect filter in that projection.
> 
> *Main problem:
*Trying to reverse geocode from WFS service (capable of 3301, 4326 and 3857) 
where underlying data is in EPSG:3301 and request comes in 4326.
> The response should be in 4326, but the transformation does not work. 
> (Obvious from the database SQL).
> Everything works in EPSG:3301.
> 
> I have obscured some URL and Layer names. 
> Our map file with a sample layer looks like this:
> MAP
> 
>   LEGEND
> LABEL
>   TYPE truetype
>   FONT "Arial"
>   SIZE 10
>   POSITION AUTO
> END
>   END
> 
>   NAME   "<%NAME%>_keskkond"
>   STATUS ON
>   EXTENT <%= node['mapserver']['extent'] %>
>   FONTSET"<%= URL %>/fonts/current/fonts.list"
>   IMAGETYPE  "png"
>   DEFRESOLUTION 96
>   RESOLUTION96
>   CONFIG "MS_ERRORFILE" "infolayer.log"
>   DEBUG 0
>   MAXSIZE 1
>   OUTPUTFORMAT
> NAME "png"
> DRIVER AGG/PNG
> MIMETYPE "image/png"
> IMAGEMODE RGB
> EXTENSION "png"
> FORMATOPTION "QUANTIZE_FORCE=on"
>   END
> 
>   OUTPUTFORMAT
> NAME "geojson"
> DRIVER "OGR/GEOJSON"
> MIMETYPE "application/json; subtype=geojson; charset=utf-8"
> FORMATOPTION "STORAGE=filesystem"
> FORMATOPTION "FORM=SIMPLE"
>   END
> 
>   WEB
>   METADATA
> "wfs_title" "infolayer"
> "wfs_enable_request""*"
> "wfs_encoding"  "UTF-8"
> "wms_title" "infolayer"
> "wms_encoding"  "UTF-8"
> "wms_onlineresource"
> "/mapserv?map=/app/gis/infokihid/infolayer.map&"
> "wfs_onlineresource"
> "/mapserv?map=/app/gis/infokihid/infolayer.map&"
> "ows_srs"   "EPSG:3301 EPSG:3857 EPSG:4326"
> "ows_enable_request""*"
> "wfs_getfeature_formatlist" "gml,geojson"
> "wms_feature_info_mime_type""application/json,application/json; 
> subtype=geojson,application/vnd.ogc.gml,text/plain"
>   END
>   END
> 
>   PROJECTION
>   "init=epsg:3301"
>   END
> 
> LAYER
>   TEMPLATE "dummy"
> NAME "omavalitsus"
> STATUS off
> TYPE polygon
> CONNECTIONTYPE   POSTGIS
> INCLUDE "postgis.inc"
> DATA "geom from omavalitsus using unique gid using srid=3301"
> LABELITEM   "nimetus"
> TYPEpolygon
> MAXSCALEDENOM   200
> 
> METADATA
> "gml_msGeometry_type"   "polygon"
> "wfs_title" "omavalitsus"
> "wms_title" "omavalitsus"
> "wfs_srs"   "EPSG:3301"
> "wms_srs"   "EPSG:3301"
> "wms_extent""355000 636 754000 666"
> "gml_include_items" "all"
> "ows_include_items" "all"
> "wfs_srs"   "EPSG:3301"
> "gml_featureid" "id"
> "ows_featureid" "id"
> END
> 
> CLASS
> NAME omavalitsus
> STYLE
> COLOR   234 123 43
> OPACITY 15  
> END
> STYLE
> WIDTH 2
> OUTLINECOLOR 80 80 80
> OPACITY 15
> END
> END
> END
> 
> 
> If we do a query without a bbox and want all the features, it works.
> 
> Example: 
> https://URL/mapserv?map=/app/gis/infokihid/infolayers_other.map=WFS=GetFeature=1.1.0={{LAYER}}=gml3=EPSG:4326
>  
> 
> 
> WFS version 1.3.0 and 2.0.0
> But if we add a bbox in OGC filter format or bbox, then it does not work 
> anymore:
> 
> Example:
> 
> https://URL/mapserv?map=/app/gis/infokihid/infolayers_other.map=WFS=GetFeature=1.1.0={{LAYER}}=gml3=EPSG:4326=24.753586,59.29725,24.773586,59.31725,urn:x-ogc:def:crs:EPSG:4326
>  
> 

Re: [mapserver-users] Corrupted PNG issue

2021-11-19 Thread Seth G
Yes apologies John for hijacking the thread, I thought it could be related to 
your issue but looking less and less likely.
Steve's suggestion to use the commandline mapserv -nh "QUERY..." approach 
should rule out a few more issues. 

Even - the same zip cannot be opened on Linux either (using Ark and unzip): 
"9487 extra bytes at begging or within zipfile". 
The GDAL within the build (3.3.3) creates a zip of the WFS just fine for the 
same layer/WFS service using ogr2ogr:

ogr2ogr -f "ESRI Shapefile" "H:/Temp/test.shp.zip" 
WFS:"https://server/mapserver/?service=WFS=GetFeature=2.0.0 
<https://plmonaghandev.compass.ie/mapserver/?service=WFS=GetFeature=2.0.0>"
 LayerName -overwrite -skipfailures

GDAL 2.4.4 doesn't create zips so it must be MapServer doing the zipping in 
this version at least?
I'm guessing this points to a MapServer issue, so I'll carry on debugging.

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Fri, Nov 19, 2021, at 4:11 PM, Even Rouault wrote:
> Ah, GDAL also changed... Zipping is done by GDAL, so could be a GDAL related 
> change (there were adjustments in the past regarding ZIP64 that could result 
> in some bytes being different). Did you try opening the zip with another 
> utility (like 'unzip' on Linux) ?
> 
> This might be then a completely different issue than the one reported by John.
> 
> Le 19/11/2021 à 16:01, Seth G a écrit :
>> Thanks Even, I'll give that a go (the bisect worked well for another issue a 
>> few months ago). 
>> 
>> I presume the zipping issue is more likely to be in the MapServer codebase 
>> than in GDAL?
>> The GISInternals did switch from GDAL 2.4.4 to GDAL 3.3.3 from the 7.4.3 to 
>> 7.6.4 branches.
>> 
>> The zip exports work fine over a web browser rather than command line which 
>> is strange. Maybe its related to modifications to the -nh switch. 
>> 
>> Seth
>> 
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> 
>> 
>> On Fri, Nov 19, 2021, at 2:07 PM, Even Rouault wrote:
>>> Could be a msIO_needBinaryStdout() missing somewhere. Seth, if you've the 
>>> chance to run a git bisect session, that could probably give a strong hint 
>>> of how to fix that.
>>> 
>>> Le 19/11/2021 à 09:43, Seth G a écrit :
>>>> Possibly unrelated but I ran into a similar issue exporting WFS to zipped 
>>>> shapefiles.
>>>> Working fine in 7-4-3 but broken in 7-6-4 (and current master) - the zip 
>>>> files are corrupt, although they have an identical size. 
>>>> 
>>>> 7-zip reports "Headers Error Unconfirmed start of archive"
>>>> 
>>>> The same command is used for both versions:
>>>> 
>>>> mapserv -nh 
>>>> "QUERY_STRING=map=my.map=WFS=GetFeature=LayerName=2.0.0=shapezip=EPSG:3857"
>>>>  > output.zip
>>>> 
>>>> I had a look with a hex editor but the start of the working and corrupt 
>>>> zips seem identical. 
>>>> 
>>>> On the other hand all PNGs / WMS services are fine. 
>>>> 
>>>> Seth
>>>> 
>>>> 
>>>> --
>>>> web:http://geographika.co.uk
>>>> twitter: @geographika
>>>> 
>>>> 
>>>> On Thu, Nov 18, 2021, at 3:53 PM, Steve Lime wrote:
>>>>> 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 
>>>>>  wrote:
>>>>>> I’m attempting to upgrade f

Re: [mapserver-users] Corrupted PNG issue

2021-11-19 Thread Seth G
Thanks Even, I'll give that a go (the bisect worked well for another issue a 
few months ago). 

I presume the zipping issue is more likely to be in the MapServer codebase than 
in GDAL?
The GISInternals did switch from GDAL 2.4.4 to GDAL 3.3.3 from the 7.4.3 to 
7.6.4 branches.

The zip exports work fine over a web browser rather than command line which is 
strange. Maybe its related to modifications to the -nh switch. 

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Fri, Nov 19, 2021, at 2:07 PM, Even Rouault wrote:
> Could be a msIO_needBinaryStdout() missing somewhere. Seth, if you've the 
> chance to run a git bisect session, that could probably give a strong hint of 
> how to fix that.
> 
> Le 19/11/2021 à 09:43, Seth G a écrit :
>> Possibly unrelated but I ran into a similar issue exporting WFS to zipped 
>> shapefiles.
>> Working fine in 7-4-3 but broken in 7-6-4 (and current master) - the zip 
>> files are corrupt, although they have an identical size. 
>> 
>> 7-zip reports "Headers Error Unconfirmed start of archive"
>> 
>> The same command is used for both versions:
>> 
>> mapserv -nh 
>> "QUERY_STRING=map=my.map=WFS=GetFeature=LayerName=2.0.0=shapezip=EPSG:3857"
>>  > output.zip
>> 
>> I had a look with a hex editor but the start of the working and corrupt zips 
>> seem identical. 
>> 
>> On the other hand all PNGs / WMS services are fine. 
>> 
>> Seth
>> 
>> 
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> 
>> 
>> On Thu, Nov 18, 2021, at 3:53 PM, Steve Lime wrote:
>>> 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 
>>>  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
>>>>  
>>>&g

Re: [mapserver-users] Corrupted PNG issue

2021-11-19 Thread Seth G
Possibly unrelated but I ran into a similar issue exporting WFS to zipped 
shapefiles.
Working fine in 7-4-3 but broken in 7-6-4 (and current master) - the zip files 
are corrupt, although they have an identical size. 

7-zip reports "Headers Error Unconfirmed start of archive"

The same command is used for both versions:

mapserv -nh 
"QUERY_STRING=map=my.map=WFS=GetFeature=LayerName=2.0.0=shapezip=EPSG:3857"
 > output.zip

I had a look with a hex editor but the start of the working and corrupt zips 
seem identical. 

On the other hand all PNGs / WMS services are fine. 

Seth


--
web:http://geographika.co.uk
twitter: @geographika


On Thu, Nov 18, 2021, at 3:53 PM, Steve Lime wrote:
> 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 
>  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.
>> 

Re: [mapserver-users] Apply styling for MVT from using .map file

2021-11-08 Thread Seth G
Hi,

You should be able to use GeoStyler to do style conversions:

https://github.com/geostyler/geostyler-mapfile-parser - MapFile to GeoStyler
and then https://github.com/geostyler/geostyler-openlayers-parser - GeoStyler 
to OpenLayers

There are a couple of FOSS4G talks on GeoStyler that might be a useful 
introduction:

https://www.youtube.com/watch?v=1vI5CEtgaO8
https://www.youtube.com/watch?v=xts-o3BjmKo

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, Nov 8, 2021, at 1:44 PM, Никита Щипков wrote:
> Hello everyone!
> Is it possible to serve an MVT layer in Openlayers, but using a style from a 
> .map file?
> Thank you!
> ___
> 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] State of MapServer 2021 Slides

2021-10-01 Thread Seth G
Hi all,

For those who weren't able to attend FOSS4G this year the slides of the State 
of MapServer 2021 presentation can be found at 
https://geographika.github.io/mapserver-state-2021/

Also of interest to MapServer users are:

Mapserver – Labeling and Circles – my best tips and tricks [1]
Geostyler Mapfile Parser [2]

I believe the talks will all be published online in around a month.

Seth

[1] https://2021-foss4g.venueless.events/schedule/talks/M8JCVH
[2] https://2021-foss4g.venueless.events/schedule/talks/FG7PBN
--
web:http://geographika.co.uk
twitter: @geographika
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapscript C# and OWSRequest parameters

2021-05-31 Thread Seth G via mapserver-users
Actually as there are no URL limits with MapScript you should be able to add 
your filter as a WFS GET parameter and skip using POST requests altogether. 

https://www.mapserver.org/fr/ogc/filter_encoding.html#tests


--
web:http://geographika.co.uk
twitter: @geographika


On Mon, May 31, 2021, at 10:45 AM, Jelmer Baas wrote:
> Hi all,

>  

> Well, that route was a short one. Yes, I can call installStdinFromBuffer, but 
> actually reading something via bufferRead:

>  

> int msIO_bufferRead( void *cbData, void *data, int byteCount )

>  

> {

>   (void)cbData;

>   (void)data;

>   (void)byteCount;

>   /* not implemented yet. */

>   return 0;

> }

>  

> Unless I’m missing something, this isn’t possible, yet. I find it hard to 
> believe no-one uses MapServer to handle WFS Post requests, so I’m pretty sure 
> I’m missing something?

>  

> Regards,

> Jelmer Baas

>  

> *From:* mapserver-users  *On Behalf 
> Of *Seth G
> *Sent:* donderdag 27 mei 2021 20:35
> *To:* mapserver-users@lists.osgeo.org
> *Subject:* Re: [mapserver-users] Mapscript C# and OWSRequest parameters

>  

> Hi Jelmer,

>  

> I think you'd have to use mapscript.msIO_installStdinFromBuffer to read data 
> in.

> See https://mapserver.org/development/rfc/ms-rfc-16.html#io-hooking although 
> I'm not sure if the approach works or was fully implemented.

> Let us know how you get on,

>  

> Seth

>  

> --

> web:http://geographika.co.uk

> twitter: @geographika

>  

>  

> On Thu, May 27, 2021, at 10:39 AM, Jelmer Baas wrote:

>> Hello,

>>  

>> For a new project, I’ve decided to pickup MapScript again to function as an 
>> internal (back-end) WFS server. I use the OWSRequest class, which works fine 
>> when I fill it with loadParamsFromURL() – in the case of Get requests.

>>  

>> I can’t seem to figure out a way to get my POST data into this object, 
>> though. It has a loadParams method, but because I’m not running as a CGI 
>> application (back-end app without a webserver), this doesn’t do anything. I 
>> also tried setting postrequest property and then calling the loadParams, 
>> setting Environment variables, etc. No error, no exception, just -1 value 
>> from NumParams.

>>  

>> Any suggestions on how to proceed?

>>  

>> Regards,

>> Jelmer Baas

>>

>>  

>> ___

>> mapserver-users mailing list

>> mapserver-users@lists.osgeo.org <mailto:mapserver-users%40lists.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 C# and OWSRequest parameters

2021-05-31 Thread Seth G via mapserver-users
Hi Jelmer,

There is no issue using MapServer to handle WFS POST requests, but it seems as 
though this functionality was never implemented for the MapScript bindings. 

See links:

https://github.com/MapServer/MapServer/issues/1788#issuecomment-42658553

> To implement this, we would need to actually implement the msIO_bufferRead()
> function in mapio.c, and add a function to push data into this buffer
> (something roughly like msIO_getStdoutBufferString() and
> msIO_getStdoutBufferBytes() from mapscript/swiginc/msio.i but in the
> opposite direction).
> 
And also https://github.com/MapServer/MapServer/issues/2681#issue-3960720

So two options - 1) add in the functionality for msIO_bufferRead (which would 
be a nice addition to MapServer), or 2) use the other MapScript querying 
mechanisms as documented at 
https://geographika.github.io/MapServer-documentation/mapscript/querying.html

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, May 31, 2021, at 10:45 AM, Jelmer Baas wrote:
> Hi all,

>  

> Well, that route was a short one. Yes, I can call installStdinFromBuffer, but 
> actually reading something via bufferRead:

>  

> int msIO_bufferRead( void *cbData, void *data, int byteCount )

>  

> {

>   (void)cbData;

>   (void)data;

>   (void)byteCount;

>   /* not implemented yet. */

>   return 0;

> }

>  

> Unless I’m missing something, this isn’t possible, yet. I find it hard to 
> believe no-one uses MapServer to handle WFS Post requests, so I’m pretty sure 
> I’m missing something?

>  

> Regards,

> Jelmer Baas

>  

> *From:* mapserver-users  *On Behalf 
> Of *Seth G
> *Sent:* donderdag 27 mei 2021 20:35
> *To:* mapserver-users@lists.osgeo.org
> *Subject:* Re: [mapserver-users] Mapscript C# and OWSRequest parameters

>  

> Hi Jelmer,

>  

> I think you'd have to use mapscript.msIO_installStdinFromBuffer to read data 
> in.

> See https://mapserver.org/development/rfc/ms-rfc-16.html#io-hooking although 
> I'm not sure if the approach works or was fully implemented.

> Let us know how you get on,

>  

> Seth

>  

> --

> web:http://geographika.co.uk

> twitter: @geographika

>  

>  

> On Thu, May 27, 2021, at 10:39 AM, Jelmer Baas wrote:

>> Hello,

>>  

>> For a new project, I’ve decided to pickup MapScript again to function as an 
>> internal (back-end) WFS server. I use the OWSRequest class, which works fine 
>> when I fill it with loadParamsFromURL() – in the case of Get requests.

>>  

>> I can’t seem to figure out a way to get my POST data into this object, 
>> though. It has a loadParams method, but because I’m not running as a CGI 
>> application (back-end app without a webserver), this doesn’t do anything. I 
>> also tried setting postrequest property and then calling the loadParams, 
>> setting Environment variables, etc. No error, no exception, just -1 value 
>> from NumParams.

>>  

>> Any suggestions on how to proceed?

>>  

>> Regards,

>> Jelmer Baas

>>

>>  

>> ___

>> mapserver-users mailing list

>> mapserver-users@lists.osgeo.org <mailto:mapserver-users%40lists.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 C# and OWSRequest parameters

2021-05-27 Thread Seth G
Hi Jelmer,

I think you'd have to use mapscript.msIO_installStdinFromBuffer to read data in.
See https://mapserver.org/development/rfc/ms-rfc-16.html#io-hooking although 
I'm not sure if the approach works or was fully implemented.
Let us know how you get on,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Thu, May 27, 2021, at 10:39 AM, Jelmer Baas wrote:
> Hello,

>  

> For a new project, I’ve decided to pickup MapScript again to function as an 
> internal (back-end) WFS server. I use the OWSRequest class, which works fine 
> when I fill it with loadParamsFromURL() – in the case of Get requests.

>  

> I can’t seem to figure out a way to get my POST data into this object, 
> though. It has a loadParams method, but because I’m not running as a CGI 
> application (back-end app without a webserver), this doesn’t do anything. I 
> also tried setting postrequest property and then calling the loadParams, 
> setting Environment variables, etc. No error, no exception, just -1 value 
> from NumParams.

>  

> Any suggestions on how to proceed?

>  

> Regards,

> Jelmer Baas

>

>  

> ___
> 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-users Digest, Vol 160, Issue 28

2021-05-25 Thread Seth G
If you add =gml do you get a different result?

--
web:http://geographika.co.uk
twitter: @geographika


On Tue, May 25, 2021, at 11:20 AM, Marcin Grudzień wrote:
> Hi Seth,
> 
> It is very basic WFS GetFeature request 
> http://localhost/cgi-bin/mapserv?map=/srv/lc/LC_wfs.map=WFS=GetFeature=2.0.0=10=LC.LandCoverUnit
> 
> On Tue, 25 May 2021 at 11:03,  wrote:
>> Send mapserver-users mailing list submissions to
>> mapserver-users@lists.osgeo.org
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> or, via email, send a message with subject or body 'help' to
>> mapserver-users-requ...@lists.osgeo.org
>> 
>> You can reach the person managing the list at
>> mapserver-users-ow...@lists.osgeo.org
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of mapserver-users digest..."
>> 
>> 
>> Today's Topics:
>> 
>>1. Re:  Setting up a template for custom WFS GetFeature response
>>   (Seth G)
>> 
>> 
>> --
>> 
>> Message: 1
>> Date: Tue, 25 May 2021 11:02:52 +0200
>> From: "Seth G" 
>> To: mapserver-users@lists.osgeo.org
>> Subject: Re: [mapserver-users]  Setting up a template for custom WFS
>> GetFeature response
>> Message-ID: 
>> Content-Type: text/plain; charset="utf-8"
>> 
>> Hi Marcin,
>> 
>> What does your GetFeature request look like?
>> 
>> Seth
>> 
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> 
>> 
>> On Tue, May 25, 2021, at 10:55 AM, Marcin Grudzie? wrote:
>> > Hello,
>> 
>> >  
>> 
>> > I have been trying to set up INSPIRE WFS service publishing data in GML 
>> > that validates against INSPIRE GML application schemas. To achieve that I 
>> > use template-driven output, basically following 
>> > https://mapserver.org/fr/output/template_output.html. However, I am not 
>> > able to force MapServer to use my GetFeature response template. GetFeature 
>> > response always returns ?standard? MapServer GML, which of course, is not 
>> > INSPIRE compliant. 
>> 
>> >  
>> 
>> > Below you can find my configuration details.
>> 
>> > I am using 7.6.3 version build on Ubuntu 20.04 LTR
>> 
>> > mapserv -v returns 
>> 
>> > MapServer version 7.6.3 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
>> > SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI 
>> > SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER 
>> > SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG 
>> > INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>> 
>> >  
>> 
>> > My mapfile looks like this
>> 
>> > MAP
>> 
>> > NAME "LandCover"
>> 
>> > STATUS ON
>> 
>> > EXTENT 160828.34326572 98928.8977745594 876029.97009323 796521.669409553
>> 
>> > UNITS meters
>> 
>> > SIZE 100 100
>> 
>> > MAXSIZE 4000
>> 
>> > FONTSET "/srv/Fonts/Fontset.txt"
>> 
>> > CONFIG "MS_ERRORFILE" "/srv/lc/error_lc_wfs.txt"
>> 
>> > DEBUG 5
>> 
>> > 
>> 
>> > PROJECTION
>> 
>> > "init=epsg:2180"
>> 
>> > 
>> 
>> > END
>> 
>> >  
>> 
>> > OUTPUTFORMAT
>> 
>> > NAME "gml"
>> 
>> > DRIVER "TEMPLATE"
>> 
>> > #MIMETYPE "text/xml; subtype=gml/3.2.1"
>> 
>> > FORMATOPTION "FILE=LC_template.gml"
>> 
>> > END
>> 
>> >  
>> 
>> > WEB
>> 
>> > METADATA
>> 
>> > "ows_inspire_capabilities" "url"
>> 
>> > "ows_languages" "pol,eng"   
>> 
>> > "ows_title" "Title PL"
>> 
>> > "ows_title.eng" "WFS service with INSPIRE Land Cover"
>> 
>> > "ows_abstract" "Abstract PL"
>> 
>> > "ows_abstract.eng" "WMS service publishes harmonised INSPIRE Land Cover 
>> > data set derrived from BDOT10k as-is data set "
>> 
>> > &q

Re: [mapserver-users] Setting up a template for custom WFS GetFeature response

2021-05-25 Thread Seth G
Hi Marcin,

What does your GetFeature request look like?

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Tue, May 25, 2021, at 10:55 AM, Marcin Grudzień wrote:
> Hello,

>  

> I have been trying to set up INSPIRE WFS service publishing data in GML that 
> validates against INSPIRE GML application schemas. To achieve that I use 
> template-driven output, basically following 
> https://mapserver.org/fr/output/template_output.html. However, I am not able 
> to force MapServer to use my GetFeature response template. GetFeature 
> response always returns “standard” MapServer GML, which of course, is not 
> INSPIRE compliant. 

>  

> Below you can find my configuration details.

> I am using 7.6.3 version build on Ubuntu 20.04 LTR

> mapserv -v returns 

> MapServer version 7.6.3 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
> SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI 
> SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI 
> SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS 
> INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

>  

> My mapfile looks like this

> MAP

> NAME "LandCover"

> STATUS ON

> EXTENT 160828.34326572 98928.8977745594 876029.97009323 796521.669409553

> UNITS meters

> SIZE 100 100

> MAXSIZE 4000

> FONTSET "/srv/Fonts/Fontset.txt"

> CONFIG "MS_ERRORFILE" "/srv/lc/error_lc_wfs.txt"

> DEBUG 5

> 

> PROJECTION

> "init=epsg:2180"

> 

> END

>  

> OUTPUTFORMAT

> NAME "gml"

> DRIVER "TEMPLATE"

> #MIMETYPE "text/xml; subtype=gml/3.2.1"

> FORMATOPTION "FILE=LC_template.gml"

> END

>  

> WEB

> METADATA

> "ows_inspire_capabilities" "url"

> "ows_languages" "pol,eng"   

> "ows_title" "Title PL"

> "ows_title.eng" "WFS service with INSPIRE Land Cover"

> "ows_abstract" "Abstract PL"

> "ows_abstract.eng" "WMS service publishes harmonised INSPIRE Land Cover data 
> set derrived from BDOT10k as-is data set "

> "ows_fees" "Brak opłat"

> "ows_fees.eng" "No fee applies"

>  WFS_ONLINERESOURCE "http://localhost/cgi-bin/LC_WFS;

> "wfs_getfeature_formatlist" "gml"

> "wfs_inspire_metadataurl_href""someurl"

> "wfs_inspire_metadataurl_format"  
> "application/vnd.ogc.csw.GetRecordByIdResponse_xml"

>  

> "ows_inspire_dsid_code" "LC "

> "ows_inspire_dsid_ns" "LC.3.2"

>  

> "wfs_enable_request"   "*"

> "wfs_srs" "EPSG:2180 EPSG:4326 EPSG:3857 EPSG:4528"

> END

>  

> END #WEB

>  

> LAYER

> NAME "LC.LandCoverUnit"

> STATUS ON

> CONNECTIONTYPE POSTGIS

> CONNECTION "host=localhost dbname=postgis_db user=user 
> password=password port=5432"

> DATA "geom from bdot.landcoversurface using unique objectid using 
> srid=2180"

> 

> PROJECTION

> "init=epsg:2180"

> END

>  

> TYPE POLYGON

> PROCESSING "CLOSE_CONNECTION=DEFER"

> TEMPLATE "LC_template.gml"

> METADATA

> "ows_title.pol" "LC.LandCoverUnit"

> "ows_title.eng" "LC.LandCoverUnit"

> WFS_EXTENT "160828.34326572 98928.8977745594 
> 876029.97009323 796521.669409553"

> "gml_include_items" "all" 

> "gml_featureid" "objectid" 

> "wfs_getfeature_formatlist" "gml"

>  "wfs_enable_request" "*"

> "wfs_connectiontimeout" "120"

> "wfs_maxfeatures"   "1"

> "wfs_srs" "EPSG:2180 EPSG:4326 EPSG:3857 EPSG:4528"

> "wfs_metadataurl_href" "someurl"

> "wfs_inspire_metadataurl_format" "application/xml"

> "wfs_metadataurl_type" "TC211"

>   END #METADATA 

>  

> END #LAYER 

>  

> END #MAP

>  

> I tried different OUTPUTFORMAT configurations with different NAME, MIMETYPE 
> parameter values. And nothing has worked.

> On the same machine, I successfully published WMS service returning HTML 
> GetFeatureInfo response customized utilizing the very same template-driven 
> output concept.

> I suspect that I may be missing something in the configuration file. I would 
> be grateful for any suggestions.

>  

> 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


[mapserver-users] Embedded LEGEND Transparency

2021-05-24 Thread Seth G
Hi all,

The LEGEND TRANSPARENT keyword [1] has been deprecated since version 4.6 of 
MapServer and was planned to be removed for version 8.0.

However, there is a use case which I can't recreate using the OUTPUTFORMAT 
TRANSPARENT ON setting. 

The MAP itself has an IMAGECOLOR e.g. 255 200 0 (yellow), however an embeded 
LEGEND should be TRANSPARENT. 
Setting TRANSPARENT ON in the OUTPUTFORMAT makes both map and legend 
transparent. Leaving it off and the map and legend both have yellow 
backgrounds, and the area under the legend is no longer visible. 
This is one of the test cases [2] in msautotest. A similar issue seems to apply 
to SCALEBAR. 

Does anyone have a way to recreate this?
If not then it probably makes sense to un-deprecate the TRANPARENT keywork for 
LEGEND and SCALEBAR. 

Seth

[1] https://mapserver.org/mapfile/legend.html#mapfile-legend-transparent
[2] 
https://github.com/MapServer/MapServer/blob/main/msautotest/renderers/embed_legend_tr.map



--
web:http://geographika.co.uk
twitter: @geographika
___
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 Seth G
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 list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] differing image size with different mapserver versions

2021-05-17 Thread Seth G
Hi Richard,

In your OUTPUTFORMAT declaration maybe try setting the DRIVER to *AGG/PNG8*
Also  IMAGEMODE PC256 was only for GD support that was removed in 7.0. Try 
IMAGEMODE RGB (or RGBA if you want transparency). 

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Sat, May 15, 2021, at 8:00 PM, Richard Greenwood wrote:
> I built from main and tested with ANTIALIAS ON and ANTIALIAS OFF. Assuming 
> that my mapfile syntax below is correct, there is no difference in size and 
> the resulting PNG is still approximately 3x larger than the MapServer 6.4 
> one. 
>   CLASS
> STYLE
>   COLOR 255 255 208
>   ANTIALIAS ON
> END
>   END
> Again, thank you for your suggestions.
> Rich
> 
> On Sat, May 15, 2021 at 11:21 AM Even Rouault  
> wrote:
>> Actually, I just tried to open mapserv64.png with gimp, and export it as a 
>> non-interlaced or interlaced PNG. And the non-interlaced version is 60 kB vs 
>> 96 kB for interlaced. So interlacing vs non-interlacing isn't the cause 
>> here. 
>> Looking more closely at mapserv64.png  vs mapserv76.png , they are visually 
>> different. I suspect the rendering to be of higher quality in 7.6 due to 
>> anti-aliasing and perhaps better quantization to 8-bit. You could perhaps 
>> try to turn off antialiasing in your CLASS.STYLE. This has been re-vived 
>> very recently for AGG line rendering. It is master only however.

>> Le 15/05/2021 à 19:07, Richard Greenwood a écrit :
>>> Even, 
>>> 
>>> Thank you. I had ignored the difference in the interlacing of the two 
>>> images because I didn't think it would have affected the size. 
>>> 
>>> The maprgbapng.c file no longer exists in MapServer 6.4 or 7.6. There is an 
>>> "if ( interlaced ..." code block in mapoutput.c that is the same in 6.4 and 
>>> 7.6. I tried forcing it ON and rebuilding 7.6 but the output image still is 
>>> not interlaced. Maybe that code is just a left over. Or maybe AGG doesn't 
>>> support interlacing as https://www.mapserver.org/mapfile/outputformat.html 
>>> seems to suggest. 
>>> 
>>> In any case, thanks again.
>>> Rich
>>> 
>>> 
>>> 
>>> On Sat, May 15, 2021 at 9:59 AM Even Rouault  
>>> wrote:
 Richard,

 your 6.4 image is a interlaced PNG, whereas the 7.6 is a non-interlaced 
 one.

 I see in the git history a relevant commit:

 

 $ git show 9984b39cc8f74d60eb240728df660a172a118aad
 commit 9984b39cc8f74d60eb240728df660a172a118aad
 Author: Thomas Bonfort 
 Date:   Sun Oct 5 15:59:44 2008 +
 
 rgba_png: don't interlace by default
 
 
 git-svn-id: http://svn.osgeo.org/mapserver/trunk@7960 
 7532c77e-422f-0410-93f4-f0b67bdd69e2
 
 diff --git a/maprgbapng.c b/maprgbapng.c
 index 105d8d61..c3615edd 100644
 --- a/maprgbapng.c
 +++ b/maprgbapng.c
 @@ -357,10 +357,13 @@ int msSaveImageRGBAQuantized(gdImagePtr img, gdIOCtx 
 *ctx, outputFormatObj *form
  int bot_idx, top_idx;
  int remap[256];
  int reqcolors = atoi(msGetOutputFormatOption( format, 
 "QUANTIZE_COLORS", "256"));
 +const char *interlace;
  ms_png_info info;
  info.width = gdImageSX(img);
  info.height = gdImageSY(img);
 -if( strcasecmp("ON", msGetOutputFormatOption( format, "INTERLACE", 
 "ON" )) == 0 )
 +interlace = msGetOutputFormatOption( format, "INTERLACE", "OFF" );
 +if( strcasecmp("ON", interlace) == 0 || strcasecmp("YES", interlace) 
 == 0
 +|| strcasecmp("1", interlace) == 0)
  info.interlaced=1;
  else
  info.interlaced=0;
 

 But this predates 6.4 release by several years, so this doesn't explain 
 why you see a different behavior, unless something in 6.4 still turned on 
 interlacing on in that configuration.

 From what I can see in the doc, the interlacing mode was removed in the 
 7.0 release when GD went off, so I don't think you can do much. I guess 
 that could be re-added but would require some coding.

 Even

 

 Le 15/05/2021 à 17:43, Richard Greenwood a écrit :
> I get significantly different image sizes between MapServer 6.4 and 7.6 
> with the same output format definition. I've tried many variations of the 
> following. 
> 
> OUTPUTFORMAT
>   NAME "png-test"
>   DRIVER "AGG/PNG"  # GD driver is same (6.4 only)
>   MIMETYPE "image/png; mode=8bit"
>   IMAGEMODE PC256
>   FORMATOPTION "QUANTIZE_FORCE=on"
>   FORMATOPTION "QUANTIZE_COLORS=256"
>   EXTENSION "png"
>   # TRANSPARENT on or off makes little difference
> END
> 
> MapServer 6.4  is 90kB, MapServer 
> 7.6  is 320kB. Any suggestions as 
> to how I can get my MapServer 7.6 image sizes down closer to what I'm 
> getting in MapServer 6.4?
> 
> Thanks,
> Rich
> 
> -- 
> 
> 

[mapserver-users] Mapfile syntax changes and XML support

2021-05-02 Thread Seth G
Hi all,

The MS RFC 133: Mapfile Syntax Cleanup [1] proposes the removal of a number of 
deprecated Mapfile keywords. Once in place these keywords will no longer be 
valid and will throw errors in the Mapfile parser. Some of these keywords no 
longer have an effect, and the others have a better alternative. 

We are interested in finding out how much usage there is of the Mapfile XML 
support [2], introduced via RFC 51 in MapServer 6.0 [3], and whether the 
Mapfile XSD [4] and Mapfile XSL [5] files need continued maintenance. 

There is also a Mapfile DTD [5] which is likely to be removed, and has not been 
keep up to date over the years. 

Seth

[1] https://mapserver.org/development/rfc/ms-rfc-133.html
[2] https://mapserver.org/mapfile/xml_mapfile.html
[3] https://mapserver.org/development/rfc/ms-rfc-51.html
[4] https://github.com/MapServer/MapServer/blob/main/xmlmapfile/mapfile.xsd
[5] https://github.com/MapServer/MapServer/blob/main/xmlmapfile/mapfile.xsl
[6] https://github.com/MapServer/MapServer/blob/main/mapfile.dtd
--
web:http://geographika.co.uk
twitter: @geographika
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapserver installation in cloud environments (kubernetes)

2021-04-23 Thread Seth G
There was an interesting talk on running MapServer on Amazon Lambda - 
https://www.youtube.com/watch?v=g_WMDxsuCfk=2s
The CGI approach of MapServer scales well as each request can be run separately 
(at a slight overhead for database connections, PROJ startup etc). 

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Fri, Apr 23, 2021, at 5:20 PM, Andreas Neumann wrote:
> Hi,
> 
> For a small project as part of the Swiss National Geodata Infrastructure 
> (grant project) several people worked on a study document called 
> "Cloud-optimized OGC WMS Server" where we analyzed problems that can arise 
> when you install an OGC web server in the cloud (e.g. docker image deployed 
> via Kubernetes, OpenShift or the likes). This work had a focus on QGIS Server 
> with it's own set of problems - but some of the issues studied in this 
> document also matter for other OGC WMS servers, such as UMN Mapserver or 
> Geoserver, such as the load balancing problem, how to share resources, etc.
> 
> Here is the link to the document (not in final form yet, but close to being 
> final): 
> https://docs.google.com/document/d/1cOUWgzalRx7CHWTFgHz6-uyScsCcoaEmYC0VBHdZShQ/edit#heading=h.c7gq4lie7ys2
> 
> I wonder if any similar work has been done specifically around problems, 
> challenges and solutions when you deploy UMN Mapserver in cloud environments? 
> Do you know of any work?
> 
> One major problem that probably all installations of an OGC WMS server have 
> is how to deploy a more intelligent load balancing system? Often, the default 
> load balancer is some kind of round robin load balancer system, but often 
> this leads to inferior results where "cheap and short" requests (such as a 
> simple GetFeatureInfo or GetLegendGraphics request) can be queued behind a 
> long-running GetMap request (potentially with many layers, many features and 
> a high-dpi, such as 600dpi, where the request can take several seconds to 
> process.
> 
> In our production system we are currently separating the requests to 
> dedicated instances for short requests and potentially long requests, to 
> avoid the above mentioned scenario, but we are not so satisfied with the 
> solution, as it is  a bit inflexible and also a bit harder to maintain. 
> Ideally, we would like to have a more intelligent load balancer with incoming 
> queue that holds back requests as long as all WMS server instances are busy. 
> This would avoid the situation where a "less intelligent" load balancer would 
> simply forward the requests to instances based on Round-Robin principle.
> 
> Do you know of any work in the UMN Mapserver community regarding cloud 
> deployment, cloud optimization, load balancing and resource sharing?
> 
> In our study document I'd like to also include the perspective of other WMS 
> servers besides QGIS server, so any input would be welcome.
> 
> Thanks,
> Andreas
> 
> --
> Andreas Neumann
> QGIS.ORG  board member (treasurer)
> ___
> 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] GeoJSON Date Anomalies

2021-04-23 Thread Seth G
Hi,

I'm getting some strange date formatting anomalies when returning GeoJSON from 
MapServer. It might be more of a GDAL issue than MapServer. 

Using MapServer from the main branch (7-7) and gdal302.dll - the exact same 
MapServer setup returns dates with different formatting dependent on the 
machine. 

Dates on a local machine have T, dates on the server do not:

- Windows 10 local: "LastUpdatedDateUtc": "2021-04-20T10:33:31.626"
- Windows 2019 Server: "LastUpdatedDateUtc": "2021-04-20 10:33:31.6259376" 

Data is coming from the MSSQL Driver and database requests are identical. WFS 
requests are also identical for the test. 

OUTPUTFORMAT block below:

OUTPUTFORMAT
NAME "geojson"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json; subtype=geojson; charset=utf-8"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "STORAGE=memory"
FORMATOPTION "LCO:NATIVE_MEDIA_TYPE=application/vnd.geo+json"
END

Has anyone else experienced this? Does a machine locale affect date formats?


Seth
--
web:http://geographika.co.uk
twitter: @geographika
___
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 Seth G
Hi Steve,

The output would look something like the output in 
https://inspire.ec.europa.eu/schemas/au/4.0/AdministrativeUnits.xsd




-- Name -- upper level unit -- Definition -- A unit established at a higher 
level of national administrative hierarchy that this administrative unit 
administers. -- Description -- NOTE Administrative units at the highest level 
of national hierarchy (i.e. the country) do not have upper level units. 
CONSTRAINT Each administrative unit at the level other than '1st order' (i.e. 
nationalLevel <> '1st order') shall refer their upper level unit.


au:AdministrativeUnit
au:lowerLevelUnit




Maybe this is part of the ISO standard used by GetLayerMetadata - 
https://mapserver.org/ogc/layer_metadata.html ?
WFS GetFeatureType doesn't seem to have a description field - 
http://schemas.opengis.net/wfs/2.0/examples/DescribeFeatureType/DescribeFeatureType_Example01_Response.xsd

It seems a missed opportunity not to be able to document fields alongside 
autogenerated type/nillable information from the source. 

Seth



--
web:http://geographika.co.uk
twitter: @geographika


On Tue, Mar 30, 2021, at 8:36 PM, Steve Lime wrote:
> 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] Layer Attribute Metadata

2021-03-27 Thread Seth G
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


Re: [mapserver-users] How to use MS_ENCRYPTION_KEY with AWS connection

2021-03-02 Thread Seth G
Hi Jaime,

I believe the encryption key can only be used for some connection types (I know 
for example it is not implemented currently for SQL Server). Docs report the 
following as supported:

OGR
Oracle Spatial
PostGIS
SDE

https://mapserver.org/utilities/msencrypt.html#purpose


Regards,

Seth
--
web:http://geographika.co.uk
twitter: @geographika


On Tue, Mar 2, 2021, at 10:26 PM, Jaime Valdez wrote:

> Hi,
> I'm trying to setup a mapfile by using and encrypting AWS credentials into 
> CONFIG parameters, but it is not working.


> `CONFIG "AWS_ACCESS_KEY_ID" "{ ... }"`
> `CONFIG "AWS_SECRET_ACCESS_KEY" "{ ... }"`
> `CONFIG "AWS_DEFAULT_REGION" "{ ... }"`

> When I change into plain AWS credentials works. I have use MS_ENCRYPTION_KEY 
> in the past when connecting to PostGIS.

> Kind regards.

> ---
>  Jaime E. Valdez  ☎  + 52 442 168 8006 
> ___
> 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 circular import error inside Python-Flask Docker

2021-02-09 Thread Seth G
Hi Aditya,

Are you building MapScript yourself or using "sudo apt-get install 
python-mapscript" - see notes under "Installation on Unix" at 
https://pypi.org/project/mapscript/

"This happens only when I have the Python VENV activated when running outside 
Docker" - do you mean the exact same approach works outside of Docker? Is 
MapServer installed on Docker (this is required along with mapscript)?

Python 3.9 is as yet untested/supported, but this may not be the cause issue.

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, Feb 8, 2021, at 10:19 AM, aditya kudekar wrote:
> I have a simple flask app and I am trying to run in Docker

> `import mapscript
> from flask import Flask
> import json

app = Flask(__name__)
port = 5000

> @app.route("/hello")
> def geocoder():


epsg = mapscript.pointObj(1, 1)
return json.dumps(epsg)

test()

> if __name__ == '__main__':
app.run(host="0.0.0.0", port=port)
`
> My Dockerfile is:

> `FROM python

WORKDIR /opt/demo/
COPY /app .

RUN pip install -r requirements.txt

ENTRYPOINT python test.py
`
> But I get the following error when I run `docker run -p 5000:5000 
> test:latest`:

> `Traceback (most recent call last):
  File "/opt/demo/test.py", line 1, in 
import mapscript
  File "/usr/local/lib/python3.9/site-packages/mapscript/__init__.py", line 2, 
in 
from .mapscript import *
  File "/usr/local/lib/python3.9/site-packages/mapscript/mapscript.py", line 
13, in 
from . import _mapscript
ImportError: cannot import name '_mapscript' from partially initialized module 
'mapscript' (most likely due to a circular import) 
(/usr/local/lib/python3.9/site-packages/mapscript/__init__.py)
`
> This happens only when I have the Python VENV activated when running outside 
> Docker but I don't know why I am getting this error inside Docker.

> Warm Regards
> 
> Aditya Rajendra Kudekar
> ___
> 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] Please add your site/services to the MapServer gallery

2021-02-06 Thread Seth G
Good to push this Jeff. 

One question - are non-public sites desired/eligible for this list?
There are plenty of internal/Intranet systems relying on MapServer, but without 
a public URL we may not want them on the wiki. 

Seth

--
web:http://geographika.co.uk
twitter: @geographika

On Sat, Feb 6, 2021, at 4:18 PM, Jeff McKenna wrote:
> Reminder:
> 
> New and potential MapServer users really like to see working examples
> of MapServer applications (and MapServer-driven WMS/WFS/OGC services) 
> listed on our map gallery.  Please take a minute to add your site and 
> specs (respecting the syntax and alphabetical order) at:
> https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery
> 
> (this is also good timing as we work towards an 8.0 release)
> 
> Thank you everyone!
> 
> -jeff
> 
> 
> 
> 
> -- 
> Jeff McKenna
> GatewayGeo: 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] PHP MapScript request handling gives seg fault error in libgdal

2020-10-12 Thread Seth G
Hi Rob,

More details on the PROJ6 performance implications at 
https://www.mapserver.org/development/rfc/ms-rfc-126.html#performance-implications

As Jeff wrote if you can recreate with shp2img or mapserv then it can rule out 
MapScript. A minimal MAP file and dataset would then be required to debug 
further. 

Do you create a new mapscript.OWSRequest() object for each request?

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, Oct 12, 2020, at 7:24 PM, Rob Marjot wrote:
> Yes, I will.
> 
> Any additional background information you can share on the adviced PROJ<6  
> (or PROJ<=6, e.g. the current 6.3.2)
> 
> Thanks,
> Rob
> 
> Op ma 12 okt. 2020 om 19:17 schreef Jeff McKenna 
> :
>> Hi Rob,
>> 
>> Next I would remove the ECW support/reliance and try to trigger the 
>> error without ECW data (yes with a local mapfile called from shp2img).
>> 
>> Maybe others have ideas.
>> 
>> -jeff
>> 
>> 
>> 
>> -- 
>> Jeff McKenna
>> MapServer Consulting and Training Services
>> co-founder of FOSS4G
>> http://gatewaygeo.com/
>> 
>> 
>> 
>> On 2020-10-12 2:11 p.m., Rob Marjot wrote:
>> > Hi Jeff, all,
>> > 
>> > Thank you for your thoughts on this. Can you elaborate on the PROJ<6 
>> > remark; serious performance hits?
>> > 
>> > Indeed, I am on the NG (SWIG) MapScript. Trying with shp2img and mapserv 
>> > -nh will require to have the equivalent .map file on disk; I will work 
>> > on that soon.
>> > 
>> > Taking a complete different approach, I have been able to reproduce the 
>> > same problem by:
>> > 1. Installing *binaries* for MapServer 7.6.1, GDAL 3.1.3 and PROJ 7.1.1 
>> > from UbuntuGIS Unstable
>> > 2. Add ECW support through compiling the simple GDAL-plugin (tested: 
>> > gdal_translate from ECW to GTiff works brilliantly)
>> > 3. Configured this to run in the context of 7.4 PHP-FPM
>> > 
>> > Again the seg fault. Connecting to PHP-FPM from either Apache or NGINX 
>> > does not make a difference, but that's no surprise.
>> > 
>> > Rob
>> > 
>> > Op ma 12 okt. 2020 om 15:38 schreef Jeff McKenna 
>> > mailto:jmcke...@gatewaygeomatics.com>>:
>> > 
>> > Hi Rob,
>> > 
>> > I'm not sure what is happening in your case, but make sure that you are
>> > using the recommended PHP SWIG MapScript in your build
>> > (-DWITH_PHPNG=1),
>> > as the old PHP MapScript is unmaintained.
>> > 
>> > Some other thoughts:
>> > 
>> > - can you trigger this with shp2img at the commandline? (this will
>> > remove MapScript/Apache/WMS from the equation)
>> > https://mapserver.org/utilities/shp2img.html
>> > 
>> > - also, try your GetMap request at the commandline with:
>> > 
>> >   mapserv -nh
>> > 
>> > "QUERY_STRING=map=/ms4w/apps/local-demo/local-demo.map=WMS=1.1.1=GetMap&..."
>> > 
>> >   > ttt.png
>> > 
>> > But if I can speak openly here, I believe most production instances are
>> > still running PROJ<6, so everyone is beginning to experiment with
>> > settings of FCGI/PHP-FPM for GDAL3+PROJ7 (as there is a noticeable
>> > performance hit with the new PROJ).
>> > 
>> > In other words, keep us posted here on your testing and configuration;
>> > also, do consider documenting your configuration and workaround on the
>> > MapServer wiki, so others can follow:
>> > https://github.com/MapServer/MapServer/wiki
>> > 
>> > Thanks Rob!
>> > 
>> > -jeff
>> > 
>> > 
>> > 
>> > -- 
>> > Jeff McKenna
>> > MapServer Consulting and Training Services
>> > co-founder of FOSS4G
>> > http://gatewaygeo.com/
>> > 
>> > 
>> > 
>> > On 2020-10-09 9:44 p.m., Rob Marjot wrote:
>> >  > Hi All,
>> >  >
>> >  > I am running latest MapServer 7.6.1 compiled from source on
>> > Ubuntu 20.04
>> >  > with (also from source):
>> >  > - proj-7.1.0
>> >  > - gdal-3.1.2
>> >  >
>> >  > Using the ppa:ondrej/php repo, I installed the following PHP
>> > packages:
>> >  > php7.4 php7.4-fpm php7.4-dev
>> >  > Apache/2.4.41 proxies into the FPM over unix socket
>> >  >
>> >  > Compiling MapServer went smoothly and through the configuration
>> > of the
>> >  > extension in PHP, MapScript is available. When I call (HTTP GET)
>> > my PHP
>> >  > script to handle a WMS-formatted request [ OWSDispatch() ], the
>> > first 2
>> >  > requests are handled fine (returns a rendered map image), but the
>> > next
>> >  > two make the PHP-FPM crash:
>> >  > /var/log/syslog:
>> >  > Oct 10 01:59:25 as02 kernel: [3663532.034251] php-fpm7.4[1260175]:
>> >  > segfault at 28 ip 7fbce21fb3eb sp 7ffe87f600e0 error 6 in
>> >  > libgdal.so.27.0.2[7fbce152e000+d5]
>> >  > Oct 10 01:59:25 as02 kernel: [3663532.034262] Code: 8b 15 81 de
>> > 56 00 e9
>> >  > 24 2d 38 ff 0f 1f 40 00 f3 0f 1e fa 41 54 49 89 f4 55 48 89 d5 53
>> > 89 fb
>> >  > 48 89 cf e8 e8 f0 ff ff 48 63 fb <4c> 89 24 f8 48 89 ac f8 00 01
>> > 00 00
>> > 

[mapserver-users] Layer Metadata Questions

2020-10-01 Thread Seth G
Hi all,

I've been looking at using the Layer Metadata as described at 
https://mapserver.org/ogc/layer_metadata.html

"MapServer’s layer API supports the ISO 19115:2003 geospatial standard" - 
although looking at https://www.iso.org/standard/26020.html this has now been 
withdrawn and replaced with ISO 19115-1:2014 - 
https://www.iso.org/standard/53798.html
I presume there is not much difference between these 2 schemas? There is a ~180 
EUR charge to get a copy of the PDF. 
The source code has a comment "Generate an ISO 19139:2007 representation of 
layer metadata " [1] - so maybe the docs need an update?

The second question regards the mapping of the LAYER METADATA block to the ISO 
output. There is a good test and expected output at [2] and [3]. 
Looking at the code it appears the "contact" metadata can only be retrieved at 
the MAP rather than LAYER level [2]. 
Is this something that should be available at LAYER level also, perhaps using 
"wms_attribution_title"?

Any comments appreciated,

Seth


[1] 
https://github.com/MapServer/MapServer/blob/e0f3ae291598abe8196d47a98723f702d9ee025f/mapmetadata.c#L694
[2] 
https://github.com/MapServer/MapServer/blob/master/msautotest/wxs/ows_metadata.map
[3] 
https://github.com/MapServer/MapServer/blob/master/msautotest/wxs/expected/ows_metadata_layer_raster.xml



--
web:http://geographika.co.uk
twitter: @geographika
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Setting a connection host from ENV

2020-08-01 Thread Seth G
Hi Ben,

The only environment variables used by MapServer are listed here [2]
For updating other parameters I think you only have 2 choices:

1. Use runtime substitution 
https://mapserver.org/cgi/runsub.html#parameters-supported
2. Create deployment specific Mapfiles. There are a few choices for this - sed 
as you mentioned, but also MapScript. For a similar situation I use mappyfile 
[1] (a Python Mapfile parser). 

Seth

[1] https://mappyfile.readthedocs.io/en/latest/#modifying-values
[2] https://mapserver.org/environment_variables.html

--
web:http://geographika.co.uk
twitter: @geographika


On Wed, Jul 29, 2020, at 4:44 PM, Ben Madin wrote:
> G'day all,
> 
> I am migrating a number of systems onto containers, and have hit a blocker 
> with a solution with over 100 mapfiles, all of which refer to a database that 
> is tucked away in a vpc in the cloud, with an a record for the connection 
> host (ie host.cloud.com)
> 
> I also have a copy of the database on a development machine (ie 
> host.docker.internal)
> 
> For most everything else in the docker world (our web interfaces etc), I can 
> set use env variables in the container system, but I'm really struggling with 
> how best to do this in this case. I can do a url variable for the connection 
> parameter, and specify the database in every call... seems pretty clumsy, and 
> not good practice really. but my attempts to reference environment variables 
> in the mapfile have been very unsuccessful.
> 
> Could I ask :
> 
> a) is there actually a simpler way to achieve the same outcome, that I have 
> completely missed, or 
> 
> b) does someone have an example of how to do it?
> 
> c) is this actually just not possible, and I should just get my sed out 
> before every deployment commit?
> 
> cheers
> 
> Ben
> 
> 
> -- 
> 
> Ausvet Logo 
> 
> Dr Ben Madin
>  
> BVMS MVPHMgmt PhD MANZCVS GAICD
> 
> Managing Director
> Mobile:
> +61 448 887 220 
> E-mail:
> b...@ausvet.com.au
> Website:
> www.ausvet.com.au
> Skype: benmadin
> Address: 
> 5 Shuffrey Street
> Fremantle, WA 6160
> Australia
> ___
> 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 query problem

2020-06-25 Thread Seth G
Hi,

What client are you using?
How long does the query take to complete?
It is likely the client stops waiting for a response.

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Thu, Jun 25, 2020, at 10:16 PM, Fernando Martins Pimenta wrote:
> Hi,
> 
> I am using the query below to return a hydrograph of a region (using 
> POSTGIS). This query works perfectly when I use it in pgadmin. With the 
> mapserver, the connection with the client is lost. It records a query that 
> shows no errors in SQL, just shows that the connection has lost. Why is that?
> 
> DATA "geom FROM (
>  SELECT
>  hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) AS geom
>  FROM
>  vector.hidrography AS hidro, 
>  vector.gcc AS gcc
>  WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = 'GRANDE' 
>  ) as subquery USING UNIQUE fid USING SRID=4326"
> 
> Thanks in advance
> 
> *Fernando Martins Pimenta *
> Graduando em Engenharia de Agrimensura e Cartográfica - UFV
> Bacharel em Engenharia de Biossistemas - UFSJ
> 
> www.biosfera.dea.ufv.br
> 
> ___
> 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-25 Thread Seth G
Hi,

I'm not sure if you have a custom template for each layer already, or if this 
something you want to avoid?

I'm guessing ideally you want to be able to change the LAYER - TEMPLATE via the 
URL?
Although this is not listed in the docs at 
https://mapserver.org/cgi/runsub.html#parameters-supported looking at the 
source I think it can be replaced via a URL. 

You can also set a CLASS TEMPLATE via the URL, and maybe have a different CLASS 
for each INFO_FORMAT and select it with GetStyles. 

Changing the format filename for each layer might be a possibility?
https://mapserver.org/cgi/runsub.html#parameters-supported
OUTPUTFORMAT: FORMATOPTION: FILENAME (must have a MAP VALIDATION pattern)

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Thu, Jun 25, 2020, at 2:12 PM, jorge.mendesdeje...@isric.org 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 mailto:soil.is...@wur.nl>

> **
> ___
> 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] Implementing a WMS ORDERBY Parameter

2020-04-10 Thread Seth G
Hi list,

Following on from a discussion on implementing a SORTBY parameter for WMS 
requests on the dev lists [1], I have a workaround that may be useful to some. 

This resolves WMS image requests producing different results if a consistent 
feature order isn't applied. A sort order can be hardcoded into a LAYER DATA 
clause, but this then means sorting using a WFS SORTBY parameter to the same 
layer is ignored. 

My current solution is to add a new runtime-substitution parameter (with 
validation to check for a single word) and then add this dynamically to an 
ORDER BY clause. The trick is to add a ORDER BY (SELECT NULL) as the default 
value for any requests to the layer not using the parameter. I'm not sure how 
different database drivers implement this in the DATA clause so it may need 
some tweaking. The example below works with the MSSQL driver. 

DATA "GEOM FROM (
SELECT *
FROM myview
) 
AS tbl USING UNIQUE fid USING SRID=3857 ORDER BY %ORDERBY%"

VALIDATION
"ORDERBY" "(^[A-Za-z]+$)"
"default_ORDERBY" "(SELECT NULL)"
END

A client WMS can then simply add ORDERBY=MyFieldName to ensure consistent 
results. 

Seth

[1] https://lists.osgeo.org/pipermail/mapserver-dev/2020-February/016071.html

--
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] Filter could not be translated to OGR filter

2020-03-16 Thread Seth G
Hi all,

I've run into a strange issue when using a WFS filter with spaces and an 
OGRCONNECTION. 
I think I've narrowed it down to involving the following:

1. Using OGR CONNECTION (the filter is fine when using MapServer Shapefile 
connection) with a shapefile
2. Via a web server (I'm using IIS)

The following WFS filter:

http://www.opengis.net/fes/2.0 
http://schemas.opengis.net/filter/2.0/filterAll.xsd 
http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd; 
xmlns:fes="http://www.opengis.net/fes/2.0; 
xmlns:gml="http://www.opengis.net/gml/3.2; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>name*Old
 T*

Returns this error:


msWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msOGRFileNextShape(): OGR error. OGR GetNextFeature() error'd. Check 
logs.
  

Within the filter it is the Literal tag that has a problem - whenever the 
literal tag is greater than a certain number of characters. 

The following work:

* R*
* O*
*Old*
*Fic*

The following breaks the filter:

*Ficc*
*Oldt
Old (a strange one as it is fewer characters than 
others)

I cannot recreate the issue using the command line passing in the exact same 
content, so I think it could relate to encoding of the filter in the POST 
request. I'm using "Content-Type: application/x-www-form-urlencoded; 
charset=UTF-8" other types give parsing errors e.g. msOWSPreParseRequest(): OWS 
error. XML parsing error: Start tag expected,  not found

Perhaps the encoding makes the literal tag too long somewhere in OGR?

Any insights appreciated,

Seth

--
web:http://geographika.co.uk
twitter: @geographika
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] wfs_features_cache_count and GeoJSON output

2020-01-15 Thread Seth G
Thanks Even!
I've tried the test case locally and I get the same error (for both WFS 1.0.0 
and 2.0.0), so it looks like it could be a Windows issue. Default GML output is 
fine. I'll do some debugging and post any findings.

Seth

--
web:http://geographika.co.uk
twitter: @geographika

On Wed, Jan 15, 2020, at 12:26 AM, Even Rouault wrote:
> Seth,
> 
> The commit you pointed didn't include testing for OGR output, which was 
> clearly lacking. So I've just added one per https://github.com/mapserver/
> mapserver/pull/5973 and things seems to work, at least in that case. So might 
> be a configuration issue or another problem.
> 
> Even
> 
> -- 
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] wfs_features_cache_count and GeoJSON output

2020-01-14 Thread Seth G
Hi all,

Has anyone any experience of using the "wfs_features_cache_count" setting as 
documented at https://mapserver.org/ogc/wfs_server.html#index-20 ? Related 
commit at [1]. 
This works fine with the default GML output, but I get the following error 
using GeoJSON output:


http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows="http://www.opengis.net/ows/1.1; version="2.0.0" xml:lang="en-US" 
xsi:schemaLocation="http://www.opengis.net/ows/1.1 
http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd;>
  


Output format block in the Mapfile:

OUTPUTFORMAT
NAME "geojson"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json; subtype=geojson; charset=utf-8"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "STORAGE=memory"
FORMATOPTION "LCO:NATIVE_MEDIA_TYPE=application/vnd.geo+json"
END

I'm just wondering if this is expected when using a non-standard output, a 
configuration problem, or an issue.
Thanks for any insights,

Seth

[1] 
https://github.com/mapserver/mapserver/commit/3c39c9114f513a4db54f5c38c4326e176f781594

--
web:http://geographika.co.uk
twitter: @geographika
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Question about python mapscript and point style.

2019-11-23 Thread Seth G
Hi,

The following example works for me - 2 styles are in the output Mapfile. Maybe 
there is an issue elsewhere?
Is there a Python error, or is the output not what you are expecting?

import mapscript

m = mapscript.fromstring("""
MAP
 LAYER
 NAME "test"
 TYPE POINT
 CLASS
 NAME "0"
 STYLE
 COLOR 0 0 0
 SYMBOL 1
 SIZE 13
 END
 END
 END
END
""")
lyr = m.getLayerByName('test')
cls = lyr.getClass(0)
style = mapscript.styleObj()
style.color.setRGB(0, 0, 0)
style.symbol = 1
style.size = 3
cls.insertStyle(style)
print(m.convertToString())

For Mapfile manipulation in Python you could also try 
https://pypi.org/project/mappyfile/
Regards,

Seth


--
web:http://geographika.co.uk
twitter: @geographika


On Sat, Nov 23, 2019, at 2:44 PM, Vladimir wrote:
> Hi all again!
> 
> Seth, thank you for response.
>  I tried this way with a single Point layer, unfortunately this also does not 
> work.
> 
>  --
>  Regards, Vladimir.
>> 23 2019, 2:41 +06:00 от Seth G :
>> 
>> Hi Vladimir,
>> 
>> Could you try the following syntax?
>> 
>> new_style = new mapscript.styleObj()
>> new_style.symbolname = 'circle'
>> new_style.size = 10
>> the_class.insertStyle(new_style)

>> 
>> 
>> Also make sure your variables aren't overriding the class names - e.g. maybe 
>> use different variable names than classObj.
>> 
>> Regards,
>> 
>> Seth
>> 
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> 
>> 
>> On Fri, Nov 15, 2019, at 6:12 PM, Vladimir wrote:
>>> Hi all!
>>> 
>>> I unsuccessfully try to style ‘Point’ layer with following code:
>>> (first)
>>>  style = mapscript.styleObj(classObj)
>>>  style.symbolname = 'circle'
>>>  style.size = 10
>>>  style.color = mapscript.colorObj(255, 0, 0)
>>> 
>>> No error, no picture as result of using this method.
>>> But similar approach works for ‘Line’ and ‘Polygon’ layers.
>>> 
>>> Also I figured out working method for the ‘Point’ layer:
>>> (second)
>>> classObj.updateFromString("CLASS STYLE COLOR 255 0 0 SIZE 10 SYMBOL 
>>> 'circle' END END")
>>> 
>>> Output of ‘layer.convertToString()’ is the same for both methods:
>>> LAYER
>>>  CONNECTION \"dbname='db' host='db' user='user' password='1'\"
>>>  CONNECTIONTYPE POSTGIS 
>>>  DATA \"value FROM (SELECT value FROM points WHERE ST_Intersects(value, 
>>> !BOX!)) AS subquery USING UNIQUE id USING srid = 3857\"
>>>  LABELITEM \"name\"
>>>  NAME \"points\"
>>>  STATUS ON
>>>  TYPE POINT
>>>  UNITS METERS
>>>  CLASS
>>>  NAME \"points\"
>>>  STYLE 
>>>  COLOR 255 0 0
>>>  SIZE 10 
>>>  SYMBOL \"circle\"
>>>  END # STYLE
>>>  END # CLASS
>>> END # LAYER
>>> 
>>> How to get working ‘Point’ style using first method?
>>> MapServer version: 7.2.1
>>> 
>>> Thanks!
>>> 

>>> --
>>> Regards, Vladimir.
>>> 

>>> 

>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org 
>>> <https://www.fastmail.com/compose?To=mapserver%2dus...@lists.osgeo.org>
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
>> ___
>>  mapserver-users mailing list
>> mapserver-users@lists.osgeo.org 
>> <https://www.fastmail.com/compose?To=mapserver%2dus...@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] Question about python mapscript and point style.

2019-11-22 Thread Seth G
Hi Vladimir,

Could you try the following syntax?

new_style = new mapscript.styleObj()
new_style.symbolname = 'circle'
new_style.size = 10
the_class.insertStyle(new_style)


Also make sure your variables aren't overriding the class names - e.g. maybe 
use different variable names than classObj. 

Regards,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Fri, Nov 15, 2019, at 6:12 PM, Vladimir wrote:
> Hi all!
> 
> I unsuccessfully try to style ‘Point’ layer with following code:
> (first)
>  style = mapscript.styleObj(classObj)
>  style.symbolname = 'circle'
>  style.size = 10
>  style.color = mapscript.colorObj(255, 0, 0)
> 
> No error, no picture as result of using this method.
> But similar approach works for ‘Line’ and ‘Polygon’ layers.
> 
> Also I figured out working method for the ‘Point’ layer:
> (second)
> classObj.updateFromString("CLASS STYLE COLOR 255 0 0 SIZE 10 SYMBOL 'circle' 
> END END")
> 
> Output of ‘layer.convertToString()’ is the same for both methods:
> LAYER
>  CONNECTION \"dbname='db' host='db' user='user' password='1'\"
>  CONNECTIONTYPE POSTGIS 
>  DATA \"value FROM (SELECT value FROM points WHERE ST_Intersects(value, 
> !BOX!)) AS subquery USING UNIQUE id USING srid = 3857\"
>  LABELITEM \"name\"
>  NAME \"points\"
>  STATUS ON
>  TYPE POINT
>  UNITS METERS
>  CLASS
>  NAME \"points\"
>  STYLE 
>  COLOR 255 0 0
>  SIZE 10 
>  SYMBOL \"circle\"
>  END # STYLE
>  END # CLASS
>  END # LAYER
> 
> How to get working ‘Point’ style using first method?
> MapServer version: 7.2.1
> 
> Thanks!
> 

> --
>  Regards, Vladimir.
> 

> 

> ___
> 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 Rest API

2019-10-02 Thread Seth G
Hi Damien,

So the REST API is more for modifying Mapfiles rather than accessing data?
The latter looks like it will gradually happen with the implementation of the 
OGC Features API.
See https://github.com/geopython/pygeoapi for an example. 

I've not heard of https://github.com/neogeo-technologies/mra before. Looks like 
there was a recent bug fix so maybe still active? I'm unaware of any others. 

I sometimes make dynamic maps by storing a Python dict object and manipulating 
it based on requests and using https://mappyfile.readthedocs.io to write back 
to a Mapfile.

Seth


--
web:http://geographika.co.uk
twitter: @geographika


On Tue, Oct 1, 2019, at 1:26 PM, Damien Mulder wrote:
> Hi all,
> 
> I'm currently looking if it is possible to dynamically create a MapServer 
> configuration, preferably through a REST API.
> This was previously discussed in: 
> http://osgeo-org.1560.x6.nabble.com/REST-config-API-td4257211.html.
> 
> A MapServer Rest API (MRA) does exist on 
> https://github.com/neogeo-technologies/mra, but I can't find much mention of 
> this by other users.
> Does anyone have experience using this API?
> Or is anyone familiar with another way to dynamically create/update mapserver 
> mapfiles?
> 
> Kind regards,
> Damien Mulder
> ___
> 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] Lost the transparency after a SO Update

2019-09-30 Thread Seth G
Actually that does remind me of a recent issue I had when updating from 7.2 to 
7.4. I have the following diff:

 STYLE
 # add an almost fully translucent colour
 # setting the aa value to 00 in the rrggbbaa setting causes any masked layers 
to no
 # longer display
 COLOR "#FF01"
 END

The above no longer worked and I updated to:

 STYLE
 # add an almost fully translucent colour - if no colour then no MASK
 COLOR "#ff"
 OPACITY 1
 END


--
web:http://geographika.co.uk
twitter: @geographika


On Mon, Sep 30, 2019, at 4:56 PM, Andrea Peri wrote:
> Hi,
> 
> this is the class I use
> 
> The transparenc is used if RGBA hex.
>  COLOR "#e1cc4f7f"
> 
>  CLASS
>  NAME ' '
>  GROUP 'avorio'
>  MAXSCALEDENOM 500
>  MINSCALEDENOM 1
>  STYLE
>  COLOR "#e1cc4f7f"
>  ANTIALIAS false
>  MAXSCALEDENOM 500
>  MINSCALEDENOM 1
>  END
>  STYLE
>  WIDTH 2.0
>  OUTLINECOLOR "#e1cc4f"
>  ANTIALIAS false
>  MAXSCALEDENOM 500
>  MINSCALEDENOM 1
>  END
>  END
> 
> 
> Il giorno lun 30 set 2019 alle ore 15:31 Seth G  ha 
> scritto:
>> __
>> Hi Andrea,
>> 
>> Do you have a cut-down Mapfile to reproduce this?
>> Are you using the COMPOSITE block to set OPACITY?
>> https://mapserver.org/mapfile/composite.html#parameters
>> Setting OPACITY on the layer directly is deprecated since 7.0
>> 
>> Seth
>> 
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> 
>> 
>> On Mon, Sep 30, 2019, at 2:49 PM, Andrea Peri wrote:
>>> Hi,
>>> 
>>> seem the issue is due to a more recent trunk of mapserver.
>>> I try with an older trunk version and it work . The transparency is ok.
>>> 
>>> So the issue is in the last trunk.
>>> 
>>> A.
>>> 
>>> 
>>> Il giorno lun 30 set 2019 alle ore 14:14 Andrea Peri  
>>> ha scritto:
>>>> Hi,
>>>> 
>>>> After update the Linux Debian to last Burst version , and recompile gdal 
>>>> and mapserver, I see the mapserver was no more capable to produce png 
>>>> images with transparency.
>>>> 
>>>> I guess there is some library wrong. 
>>>> I try also to set gdal to recmpile using the internal version of png but 
>>>> don't seem to have any result.
>>>> 
>>>> Any help is welcome.
>>>> 
>>>> Thx,
>>>> 
>>>> -
>>>> -
>>>> Andrea Peri
>>>> . . . . . . . . . 
>>>> qwerty àèìòù
>>>> -
>>> 
>>> 
>>> -- 
>>> -
>>> Andrea Peri
>>> . . . . . . . . . 
>>> qwerty àèìòù
>>> -
>>> ___
>>> mapserver-users mailing list
>>> mapserver-users@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> 
> 
> 
> -- 
> -
> Andrea Peri
> . . . . . . . . . 
> qwerty àèìòù
> -
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Lost the transparency after a SO Update

2019-09-30 Thread Seth G
Hi Andrea,

Do you have a cut-down Mapfile to reproduce this?
Are you using the COMPOSITE block to set OPACITY?
https://mapserver.org/mapfile/composite.html#parameters
Setting OPACITY on the layer directly is deprecated since 7.0

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, Sep 30, 2019, at 2:49 PM, Andrea Peri wrote:
> Hi,
> 
> seem the issue is due to a more recent trunk of mapserver.
> I try with an older trunk version and it work . The transparency is ok.
> 
> So the issue is in the last trunk.
> 
> A.
> 
> 
> Il giorno lun 30 set 2019 alle ore 14:14 Andrea Peri  ha 
> scritto:
>> Hi,
>> 
>> After update the Linux Debian to last Burst version , and recompile gdal and 
>> mapserver, I see the mapserver was no more capable to produce png images 
>> with transparency.
>> 
>> I guess there is some library wrong. 
>> I try also to set gdal to recmpile using the internal version of png but 
>> don't seem to have any result.
>> 
>> Any help is welcome.
>> 
>> Thx,
>> 
>> -
>> -
>> Andrea Peri
>> . . . . . . . . . 
>> qwerty àèìòù
>> -
> 
> 
> -- 
> -
> Andrea Peri
> . . . . . . . . . 
> qwerty àèìòù
> -
> ___
> 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] Highly inefficient MakeValid statement in Mapserver-generated spatial queries

2019-09-08 Thread Seth G
Hi Istvan,

Unfortunately you won't be able to turn it off without recompiling the MSSQL 
driver. 
I've added a pull request removing these at 
https://github.com/mapserver/mapserver/pull/5856
This will be merged into master assuming there are no objections. 
I assume you are using ms4w as you mention a 4.0.1 release? You'll need to see 
when a new release of that may be available with the update. 
Thanks for reporting this issue,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Sun, Sep 8, 2019, at 12:30 AM, Istvan Keszei wrote:
> 
> We have real large geospatial tables. Not having an option to turn MakeValid 
> off will kill our applications’ performance as indexes are essential. 
> 
> For a simple query, the disk reads are 100x more for a query including the 
> MakeValid. Hence, the cpu resources required are multifold too.
> 
> Yes, please turn it off or make it optional. Can this be done manually 
> somehow? We have waited long months for 4.0.1 to come out (with the opacity 
> fix) and now this issue prevents the upgrade. 
> 
> I see the invalid geometries more of a data maintenance responsibility rather 
> than a query-side-responsibility. I understand for some people this is 
> convenient, so that is why I suggest to make this optional. 
> 
> Any help is appreciated!
> 
> Thank you,
> Istvan
> 
> 
> On 2019. Sep 7., at 23:55, Tamas Szekeres  wrote:
>> I think we can remove MakeValid from the queries entirely. 
>> The problem is that if the table contains invalid geometries, the entire 
>> query will fail.
>> 
>> Best regards,
>> 
>> Tamas
>> 
>> 
>> Seth G  ezt írta (időpont: 2019. szept. 7., Szo, 
>> 21:35):
>>> __
>>> Hi,
>>> 
>>> Good question. This is a fairly new change as part of 
>>> https://github.com/mapserver/mapserver/issues/5781 from April this year. 
>>> In SQL Profiler I seem to get GEOM.STIntersects for WFS requests and 
>>> GEOM.MakeVaid().STIntersects for WMS. 
>>> MakeValid does appear to stop the index being used. Do you have a link 
>>> which says this definitively?
>>> 
>>> Seth
>>> 
>>> --
>>> web:http://geographika.co.uk
>>> twitter: @geographika
>>> 
>>> 
>>> On Sat, Sep 7, 2019, at 12:02 PM, ikes...@yahoo.com wrote:
>>>> Hello,

>>>> 

>>>> I noticed that when MapServer issues the query to MS SQL Server, it 
>>>> appends a .MakeValid() tag to the geometry field, which makes data access 
>>>> highly inefficient as no spatial indexes can be used when the MakeValid() 
>>>> is used. Here is the query that is being produced:

>>>> 

>>>> SELECT

>>>> convert(nvarchar(max), [label]),

>>>> [ogr_geometry],

>>>> convert(varchar(36), [ogr_fid])

>>>> FROM

>>>> section

>>>> WHERE

>>>> ogr_geometry.*MakeValid()*.STIntersects(geometry::STGeomFromText('POLYGON((-10973271.1167343
>>>>  5605636.0681215,-10963019.0003155 5605636.0681215,-10963019.0003155 
>>>> 5614459.76757417,-10973271.1167343 5614459.76757417,-10973271.1167343 
>>>> 5605636.0681215))',3857)) = 1

>>>> 

>>>> Here is the data access string from the map file:

>>>> 

>>>> *DATA "ogr_geometry from section USING UNIQUE ogr_fid USING SRID=3857"*

>>>> 

>>>> Earlier I was using a specific HINT for index usage:

>>>> 

>>>> *DATA "ogr_geometry from section WITH (INDEX(section_ogr_geometry_idx)) 
>>>> USING UNIQUE ogr_fid USING SRID=3857"*

>>>> 

>>>> But since MapServer adds the MakeValid automatically, I am getting the 
>>>> following error:

>>>> 

>>>> Msg 8635, Level 16, State 9, Line 1

>>>> The query processor could not produce a query plan for a query with a 
>>>> spatial index hint. Reason: Could not find required binary spatial method 
>>>> in a condition. Try removing the index hints or removing SET FORCEPLAN.

>>>> 

>>>> How do I configure mapserver to NOT ADD the MakeValid to every single one 
>>>> of its queries ?

>>>> 

>>>> Any response is much appreciated !

>>>> 

>>>> Thanks,

>>>> Istvan

>>>> 

>>>> 

>>>> ___
>>>> 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] Highly inefficient MakeValid statement in Mapserver-generated spatial queries

2019-09-07 Thread Seth G
Hi,

Good question. This is a fairly new change as part of 
https://github.com/mapserver/mapserver/issues/5781 from April this year. 
In SQL Profiler I seem to get GEOM.STIntersects for WFS requests and 
GEOM.MakeVaid().STIntersects for WMS. 
MakeValid does appear to stop the index being used. Do you have a link which 
says this definitively?

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Sat, Sep 7, 2019, at 12:02 PM, ikes...@yahoo.com wrote:
> Hello,

> 

> I noticed that when MapServer issues the query to MS SQL Server, it appends a 
> .MakeValid() tag to the geometry field, which makes data access highly 
> inefficient as no spatial indexes can be used when the MakeValid() is used. 
> Here is the query that is being produced:

> 

> SELECT

> convert(nvarchar(max), [label]),

> [ogr_geometry],

> convert(varchar(36), [ogr_fid])

> FROM

> section

> WHERE

> ogr_geometry.*MakeValid()*.STIntersects(geometry::STGeomFromText('POLYGON((-10973271.1167343
>  5605636.0681215,-10963019.0003155 5605636.0681215,-10963019.0003155 
> 5614459.76757417,-10973271.1167343 5614459.76757417,-10973271.1167343 
> 5605636.0681215))',3857)) = 1

> 

> Here is the data access string from the map file:

> 

> *DATA "ogr_geometry from section USING UNIQUE ogr_fid USING SRID=3857"*

> 

> Earlier I was using a specific HINT for index usage:

> 

> *DATA "ogr_geometry from section WITH (INDEX(section_ogr_geometry_idx)) USING 
> UNIQUE ogr_fid USING SRID=3857"*

> 

> But since MapServer adds the MakeValid automatically, I am getting the 
> following error:

> 

> Msg 8635, Level 16, State 9, Line 1

> The query processor could not produce a query plan for a query with a spatial 
> index hint. Reason: Could not find required binary spatial method in a 
> condition. Try removing the index hints or removing SET FORCEPLAN.

> 

> How do I configure mapserver to NOT ADD the MakeValid to every single one of 
> its queries ?

> 

> Any response is much appreciated !

> 

> Thanks,

> Istvan

> 

> 

> ___
> 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] PHP_Mapscript swig issue on macOS.

2019-08-31 Thread Seth G
Do you get the same error if you use the full path to FONTSET  in your Mapfile?

FONTSET "/Volumes/Data/WebServer/newswc/mapfiles/fonts.list"


On Mon, Aug 26, 2019, at 11:45 PM, Paul Moen wrote:
> I am running into an error after trying Mapserver 7.4.1 on macOS 10.14 
> mojave with the php swig version of mapscript.
> 
> Here is the output from php -i when I am using php_mapscriptng.so
> 
> PHP Version => 7.3.8
> 
> mapscript
> 
> MapServer Version => MapServer version 7.4.1 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=PBF 
> INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> 
> I have a simple mapfile called test.map as follows.
> 
> MAP
>   NAME TEST
>   EXTENT 1026879.6641881098 54774.288373764844 2999091.3458675575 
> 1331032.7378794178
>   SIZE 978 517
>   MAXSIZE 3072
>   UNITS FEET
>   SHAPEPATH ""
>   IMAGECOLOR 240 240 240
>   IMAGETYPE png
>   CONFIG "MS_ERRORFILE" "stderr"
>   # DEBUG 5
>   SYMBOLSET "symbols.dat"
>   FONTSET "fonts.list"
> 
>   PROJECTION
>   "init=epsg:2266" # ND State Plane - South Zone - NAD83 - feet
>   END
> 
>   LAYER
>   NAME "Counties"
>   STATUS ON
>   TYPE POLYGON
>   DATA counties
>   CLASS
>   NAME "County Boundaries"
>   STYLE
>   WIDTH 4.0
>   MAXWIDTH 6.0
>   OUTLINECOLOR 0 0 0
>   END
>   END
>   
>   END # Counties - Lines
> 
>   LAYER
>   NAME "a_Counties"
>   STATUS ON
>   TYPE POLYGON
>   DATA counties
>   LABELITEM "name_caps"
>   CLASS
>   NAME "Label"
>   LABEL
> COLOR  150 150 150
> OUTLINECOLOR 255 255 255
> FONT mon
> TYPE TRUETYPE
> SIZE 10
> POSITION AUTO
>   END
>   END
>   END
> END 
> 
> I create 3 pngs using 3 methods.
> 
> 1. shp2img -m test.map > shp.png
> 
> For the next 2 I have enable_dl = On in my php.ini file so I can 
> dynamically load the 
> php_mapscript of my choice in the scripts.
> 
> 2. To test php_mapscript, no swig, I use the following in a script 
> called testOrig.php.
>dl('php_mapscript.so');
>   $map= new mapObj('test.map');
>   $name = "orig.png";
>   $img = $map->draw();
>   $img->saveImage($name);
> ?>
> I call with the following,
> php -f testOrig.php
> It outputs the png file named orig.png
> 
> Both methods 1 and 2 output png files that are exactly the same.
> 
> 3. To test php_mapscript via swig, I use the following in a script 
> called testSwig.php.
> 
>dl('php_mapscriptng.so');
>   require('mapscript.php');
>   $map= new mapObj('test.map');
>   $name = "swig.png";
>   $img = $map->draw();
>   $img->save($name);  
> ?>
> I call with the following,
> php -f testSwig.php
> It should output swig.png, but gives the following error.
> 
> msGetFontFace(): General error message. Freetype was unable to load 
> font file 
> "/Volumes/Data/WebServer/newswc/mapfiles/././Montserrat-Regular.ttf" 
> for key "mon"
> PHP Fatal error:  Uncaught Error: Call to a member function save() on 
> null in /Volumes/Data/WebServer/newswc/mapfiles/testSwig.php:7
> Stack trace:
> #0 {main}
>   thrown in /Volumes/Data/WebServer/newswc/mapfiles/testSwig.php on 
> line 7
> 
> Fatal error: Uncaught Error: Call to a member function save() on null 
> in /Volumes/Data/WebServer/newswc/mapfiles/testSwig.php:7
> Stack trace:
> #0 {main}
>   thrown in /Volumes/Data/WebServer/newswc/mapfiles/testSwig.php on 
> line 7
> 
> My fonts.list is a one liner, shown below with the font in the same 
> directory as the mapfile.
> 
> mon   Montserrat-Regular.ttf
> 
> The map draws fine and the png is created if I take out the label.  The 
> map will not work with any truetype font I have tried.  
> How can I get more information regards to the freetype error that only 
> happens with the swig version of mapscript?  
> 
> Thanks,
> 
> 
> 
> ___
> 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] State of MapServer 2019 FOSS4G Presentation

2019-08-31 Thread Seth G
And with many thanks to The Chaos Computer Club [1] the recording of the 
presentation is available at 
https://media.ccc.de/v/bucharest-269-state-of-mapserver

[1] https://www.ccc.de/en/

--
web:http://geographika.co.uk
twitter: @geographika

On Thu, Aug 29, 2019, at 3:05 PM, Seth G wrote:
> Hi all,
> 
> The State of MapServer presentation from FOSS4G 2019 in Bucharest 
> yesterday has been uploaded to 
> http://geographika.net/presentations/mapserver-foss4g2019/index.html
> There should be plenty of links to click on and follow up. 
> Hopefully there are a few new subscribers to this mailing list since 
> yesterday - if so welcome!
> 
> Seth
> ___
> 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] State of MapServer 2019 FOSS4G Presentation

2019-08-29 Thread Seth G
Hi all,

The State of MapServer presentation from FOSS4G 2019 in Bucharest yesterday has 
been uploaded to 
http://geographika.net/presentations/mapserver-foss4g2019/index.html
There should be plenty of links to click on and follow up. 
Hopefully there are a few new subscribers to this mailing list since yesterday 
- if so welcome!

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

[mapserver-users] FOSS4G 2019 MapServer Talks

2019-08-23 Thread Seth G
Hi all,

Next week in Bucharest FOSS4G 2019 is taking place. On Wednesday 28th of August 
(16:30-18:00 in the Opera room) we have a whole session of MapServer talks!

- State of MapServer: Seth Girvin, Daniel Morissette, Michael Smith
- MapServer, Optimize for performance: Lars Schylberg
- MapML: The (new) "map" HTML element, now in MapServer, GDAL and OGR: Daniel 
Morissette, Peter Rushforth

See https://2019.foss4g.org/schedule/full-schedule/ for details. 
I believe the sessions will also be recorded (and possible live-streamed) if 
you won't be there in person. 

After the talks we have booked the room for a "Birds of a Feather" meeting as 
an opportunity for users and devs to get together for a general discussions 
about MapServer's past, present and future, so please join us. 

Please feel free to add your names to the wiki page at 
https://wiki.osgeo.org/wiki/FOSS4G_2019_BirdsOfAFeather#Opera or reply on this 
list. 

Seth


--
web:http://geographika.co.uk
twitter: @geographika
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Forward time and other parameters to a layer defined as wms client

2019-08-08 Thread Seth G
A related approach to the one suggested by Trond is the one mentioned in 
https://github.com/mapserver/mapserver/issues/4797

MAP->WEB: METADATA (values only, not keys) are supported as runtime 
substitution parameters - see 
https://mapserver.org/cgi/runsub.html#parameters-supported

So if hardcoding wms_time works then in theory this could be replaced with a 
dynamic value from a URL. 
I'm unsure if TIME would need to be added to the VALIDATION block as it is 
already a standard WMS parameter. 

Seth


--
web:http://geographika.co.uk
twitter: @geographika

On Thu, Aug 8, 2019, at 2:19 AM, Trond Michelsen wrote:
> Hi.
> 
> I made a workaround for this a while ago (I think we were using
> Mapserver 4.10 at the time). It's possible there are better ways to
> solve this now, but it still works :)
> 
> I can give more details tomorrow, but the gist of it is that I've made
> an Apache handler (mod_perl) that modifies the incoming request, and
> adds the TIME, LEVEL and all DIM_* parameters to an environment
> variable I've called MS_PASSTHROUGH, and then I add %MS_PASSTHROUGH%&
> to the connection parameter in the layer configuration.
> 
> I can send you a copy of my Apache handler and config tomorrow, if you
> like.
> 
> On Wed, Aug 07, 2019 at 05:49:20PM +, Søren Laursen wrote:
> > We have been using mapserver to display static layers, and are now
> > in progress of using it to display dynamic (time bound) layers.
> 
> > We have a wms server that serve forecast, and we use a shape file to
> > mask out areas, for example cut a forecast so it follow landmass.
> 
> > This works perfect, but when we want to include the TIME parameter
> > to show a forecast at a specific point in time, we cannot get
> > mapserver to forward the parameter.
> 
> > Later on we will have the same problem with forecast that are bound
> > by for example attitude and time.
> 
> > We are using mapserver with apache, and in production we have a
> > varnish in front (and banning urls when new forecast are ready).
> 
> > I have look at time documentation of both the time wms settings and
> > the runtime subtitionen but cannot figure out how we can make a
> > solution.
> 
> > When we hardcode a wms_time parameter in the layer definition
> > everything works.
> 
> -- 
> 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] Forward time and other parameters to a layer defined as wms client

2019-08-07 Thread Seth G
Hi Søren,

Just to clarify you are using MapServer as a WMS Client as outlined here 
https://mapserver.org/ogc/wms_client.html
With "CONNECTIONTYPE WMS"?

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Wed, Aug 7, 2019, at 7:55 PM, Søren Laursen wrote:
> Hi,
> 
> We have been using mapserver to display static layers, and are now in 
> progress of using it to display dynamic (time bound) layers.
> 
> We have a wms server that serve forecast, and we use a shape file to mask out 
> areas, for example cut a forecast so it follow landmass.
> 
> This works perfect, but when we want to include the TIME parameter to show a 
> forecast at a specific point in time, we cannot get mapserver to forward the 
> parameter. 
> 
> Later on we will have the same problem with forecast that are bound by for 
> example attitude and time.
> 
> We are using mapserver with apache, and in production we have a varnish in 
> front (and banning urls when new forecast are ready).
> 
> I have look at time documentation of both the time wms settings and the 
> runtime subtitionen but cannot figure out how we can make a solution.
> 
> When we hardcode a wms_time parameter in the layer definition everything 
> works.
> 
> Best regards
> 
> Søren
> 
> 
> 
> 
> *Joint GeoMETOC Support Center* 
> FMI logo 
> Lautrupbjerg 1-5 - 2750 Ballerup
> Danish Defence Acquisition and Logistics Organisation
>  TLF: +45 7281 5627
> FIIN: FMI-MA-OPD07
>  http://WWW.FCOO.DK/  
> ___
> 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] Combining WMS Filter and Style Parameters

2019-08-01 Thread Seth G
Hi Daniel,

Probably good news it is a bug rather than an unsupported option which didn't 
fit with the current MapServer codebase. 
The WMS filtering is an excellent feature - it also provides a method for 
filtering vector tiles via a WMS interface,

Seth

--
web:http://geographika.co.uk
twitter: @geographika

On Thu, Aug 1, 2019, at 3:16 PM, Daniel Morissette wrote:
> Thank you for looking into this Seth. I confirm that I had not tested 
> that combination when I implemented RFC-118, so it is definitely a bug.
> 
> Daniel
> 
> On 2019-07-29 18:07, Seth G wrote:
> > Hi list,
> > 
> > As part of "MS RFC 118: Support Vendor-Specific OGC FILTER parameter in WMS 
> > requests" WMS requests can now pass in an OGC filter.
> > A WMS can also accept a STYLE parameter to switch between CLASSGROUPs in a 
> > layer.
> > Both work fine independently, but when combined the STYLE seems to be 
> > ignored and the layer is filtered but displayed with the default style (set 
> > in the Mapfile's CLASSGROUP).
> > Has anyone encountered this, or know if this is unsupported or a bug?
> > 
> > Seth
> > 
> > --
> > web:http://geographika.co.uk
> > twitter: @geographika
> > ___
> > 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

Re: [mapserver-users] Combining WMS Filter and Style Parameters

2019-08-01 Thread Seth G
I've added a test case to the likely-related issue at 
https://github.com/mapserver/mapserver/issues/5744#issuecomment-517277267

Seth

--
web:http://geographika.co.uk
twitter: @geographika

On Wed, Jul 31, 2019, at 9:25 PM, Seth G wrote:
> Thanks for the confirmation. I'll try and create a simple test case to 
> reproduce this. 
> 
> --
> web:http://geographika.co.uk
> twitter: @geographika
> 
> On Wed, Jul 31, 2019, at 7:49 PM, pe_lord wrote:
> > Yes I encounter the same issue as you mentioned.
> > 
> > 
> > 
> > 
> > --
> > 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

  1   2   >