2

I have two vector layers in my map file that are at very different resolutions, and overlap somewhat. This is causing me some issues, and I would be happy if the higher resolution layer simply ended at the beginning of the lower resolution layer.

Here's the layer I'd like to crop (I've removed a bunch of class definitions):

LAYER
NAME "DEPCNT_CA276800"
TYPE LINE
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT -65.4994451 42.6667472 -65.243000 44.6667528
DATA "DEPCNT"
METADATA
  'ows_title' 'DEPCNT_CA276800'
END #metadata"
STATUS ON
CONNECTIONTYPE OGR
CONNECTION "./s57/CA276800.000"
TRANSPARENCY 100
PROJECTION
  'proj=longlat'
  'datum=WGS84'
  'no_defs'
END #projection

CLASSITEM 'VALDCO'
CLASS
  EXPRESSION ( (0 < [VALDCO]) AND ([VALDCO] <= 10) )
  NAME 'DEPCNT'
  STYLE
    WIDTH 0.91
    COLOR 0 170 255
  END #style
  LABEL
    TEXT "0"
    SIZE 10
    ANGLE FOLLOW
    POSITION AUTO
    FORCE TRUE
    ANTIALIAS TRUE
  END #label
END #class

....

    CLASS
  EXPRESSION ( (200 < [VALDCO]) AND ([VALDCO] <= 210) )
  NAME 'DEPCNT'
  STYLE
    WIDTH 0.91
    COLOR 0 170 255
  END #style
  LABEL
    TEXT "200"
    SIZE 10
    ANGLE FOLLOW
    POSITION AUTO
    FORCE TRUE
    ANTIALIAS TRUE
  END #label
END #class

END #layer DEPCNT_CA276800

No matter what I set the maxx of EXTENT to it draws the entire X range of the layer. Is what I'm trying to do even possible, or is there some other method I could try?

  • What do you mean with resolution of vector layers? One is more detailed than the other, or? And I do not quite understand your description about the desired result. Could you make an image to illustrate it? – user30184 May 25 '18 at 14:51
  • One is more detailed, and has more points... they overlap by about 0.5 degrees of longitude. I want the higher resolution one to be cropped so it doesn't extend into that 0.5 degrees. – Almaniac May 25 '18 at 16:13
  • And you seem to have S-57 nautical charts. What you tried should work with PostGIS layers but now it gets tricky. If you use WMS and you do not need transparency in your maps you could try to use image/jpeg as outputformat. Put layers in correct order into the &LAYERS= parameter. The first one is rendered first and the next one on top of that. – user30184 May 25 '18 at 17:02

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.