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

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

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

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

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

[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

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 &

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

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

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

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.

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;

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?

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

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

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

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

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

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

Re: [MapServer-users] WMS GetFeatureInfo default FEATURE COUNT

2024-05-03 Thread Seth G via MapServer-users
Hi Andrew, It looks like this is hard-coded to be set to 1 if missing (there is a comment that it is up to the server what to do if FEATURECOUNT is not provided). You could handle this at the web server level with a URL rewrite to add FEATURECOUNT to any GetFeatureInfo request where it is

Re: [MapServer-users] zoomRectangle error image rectangle maxy >= miny

2024-05-07 Thread Seth G via MapServer-users
Hi Fernando, There is a test case for this at: https://github.com/MapServer/MapServer/blob/0cb56232d4ca0e64d747efa1db602ff08e0ea42f/src/mapscript/python/tests/cases/zoom_test.py#L99 This test has the MaxY < MinY. It looks like the rectObj represents an image rather than a map, and so the maxy

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

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

Re: [MapServer-users] Up-to-date docker image for mapserver

2024-05-20 Thread Seth G via MapServer-users
Hi Rob, As far as I'm aware, the camptocamp Docker image is the best maintained public Docker image. You could fork this and create a new Docker image with the updated Apache. I believe it would be a case of updating the versions in

Re: [MapServer-users] Mapscript access to ShapeObj of GeomTransform operation

2024-05-20 Thread Seth G via MapServer-users
Hi Nicol, The setGeomTransform method simply sets the string expression for the layer - no changes to the geometries occur until rendering (with the draw function), and temporary shapes are created and rendered. If you need to access transformed geometries you'd need to loop through the