0

I am trying for a way to get a variable geo transformation of a few line strings from a shapefile:

VALIDATION
  'TIME' '^[0-9\-]*T[0-9:]*\.0Z$'
  'SMOOTH' '^[0-9]*$'
  'SMOOTHITER' '^[0-9]*$'
END
GEOMTRANSFORM (smoothsia([shape], %SMOOTH%, %SMOOTHITER%))
LABELITEM "value"
CLASS
  EXPRESSION ([value] <= 100)
  STYLE
    WIDTH 2
    COLOR 203 35 5
  END
  LABEL
    PRIORITY 1
    PARTIALS FALSE
    ...

As I finally found in the documentation this does not seem possible as I want. I would be fine with defining the layers several times but then I need to copy the whole color table and all the info over and over and over in the mapfile. So it would be nice to get this done with a parameter a user can give to the WMS.

Is there an easier way then copy paste of the full layer just changing the two parameters? Also this would make a hard coded selection which I would like to avoid.

  • 1
    You could write the colour table (and other content) once and have it as a separate map file, then just include it wherever you needed it. That way if you need to change something, you only need to change it once. – nmtoken Mar 21 at 13:09
  • That is a good tip for sure seems like I need to do some refactoring ;) – Dennis Ich Mar 21 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.