Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write mapserver mapfile support #252

Open
pvgenuchten opened this issue Oct 26, 2023 · 8 comments
Open

write mapserver mapfile support #252

pvgenuchten opened this issue Oct 26, 2023 · 8 comments

Comments

@pvgenuchten
Copy link

seems geostyler currently does not support writing (grid styles) to mapfiles

we would love to see support for writing mapserver (grid) style elements by geostyler

npx geostyler-cli --output grid.map grid-5class.qml

would render

  CLASSITEM "[pixel]"
  CLASS
    EXPRESSION "0"
    STYLE
      COLOR 0 0 0
    END
  END
  CLASS
    EXPRESSION ([pixel] >= 64 AND [pixel] < 128)
    STYLE
      COLOR 255 0 0
    END
  END
  CLASS
    NAME "near white"
    EXPRESSION ([red] > 200 AND [green] > 200 AND [blue] > 200)
    STYLE
      COLOR 0 255 0
    END
  END
  CLASS
    EXPRESSION /*1/
    STYLE
      COLOR 0 0 255
    END
  END
@mwjsanders
Copy link

I agree with @pvgenuchten that this would be a nice feature to have

@pvgenuchten
Copy link
Author

Be aware that mapserver recently added support to use sld to configure layer style, so maybe this issue is not relevant anymore

@mwjsanders
Copy link

I see there is support for SLD styling on GetMap requests, but you cannot use sld styling information in you mapfile configuration.

@jansule
Copy link
Contributor

jansule commented Mar 25, 2024

@geographika could you take a look at this? You are probably the one with the biggest knowledge here.

@geographika
Copy link

@mwjsanders @jansule - SLD support in Mapfiles has been added to the main branch and will be available in the upcoming 8.2 release - see https://mapserver.org/development/rfc/ms-rfc-138.html

It will allow the following syntax to be used:

LAYER
  STYLEITEM "sld://mysldfile.xml"
  ...
END

In theory, this would replace a need to write to Mapfile format, and allow focus on the translation to SLD for MapServer.
GeoStyler could write the SLD file and add a reference to this to a LAYER.

@mwjsanders
Copy link

Thanks for the heads up @geographika !! This would make our life so much more easier ;)

@KaiVolland
Copy link
Contributor

@geographika do you think it still would make sense to add support for the grid styles to this parser? If not feel free to close this issue.

@Arnebius
Copy link

I still support developing the capability to export styles such as SLD to MapFile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Todo
Development

No branches or pull requests

6 participants