[mapserver-users] Admin boundaries styling

Brent Fraser bfraser at geoanalytic.com
Wed Dec 18 06:18:51 PST 2013


Frank,

   The best I've been able to do (with mapserv v5.6.5) is use two STYLE 
blocks, one to render a white line and the other to render the dash:

        STYLE
          SYMBOL 0
           WIDTH 2
          OUTLINECOLOR 255 255 255
        END
        STYLE
          SYMBOL 'dashed3'
           WIDTH 2
          OUTLINECOLOR 150 150 150
        END

The white STYLE renders over top any existing dash pattern from an 
adjacent polygon.  I've tried to make the white transparent but didn't 
have any luck with that, but at least the grey dashes don't collide.

Best Regards,
Brent Fraser

On 12/18/2013 3:37 AM, Frank Broniewski wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I came up with a similar solution - I imported the shapefile into
> GRASS and exported the boundaries again as shapefile, but your
> solution is easier to handle. But I really wish there would be a
> mapserver-only solution. I am hesitatant to create files for visual
> reasons only ...
>
> Frank
>
> Am 2013-12-18 11:22, schrieb Rahkonen Jukka:
>> Hi,
>>
>> Would it be acceptable to create a new dataset for rendering the
>> borders by converting polygons into linestrings and merging the
>> overlapping segments?  With OpenJUMP you cound do it with a single
>> operation Tools - Edit Geometry - Convert - Extract Segments.
>> Select option "Merge resulting segments" and you've done it.
>>
>> -Jukka Rahkonen-
>>
>> Frank Broniewski wrote:
>>
>>> Hi,
>>>
>>> I'm trying to get the styling right for administrative
>>> boundaries. The data source is a polygon shapefile with
>>> administrative boundaries of a certain level. I want to have a
>>> dashed line style to symbolize the boundary. The layer is used as
>>> TYPE LINE.
>>>
>>>
>>> The style I'm using:
>>>
>>> STYLE Color 100 100 100 Gap 4 Linecap butt Linejoin miter
>>> Linejoinmaxsize 3 Pattern 2 6 2 6 2 6 End Symbol "circle" Width
>>> 2 END
>>>
>>> Problem is that the pattern overlaps where a boundary is drawn
>>> more than once due to the shared nature of adjacent adminstrative
>>> units. Since the source is a shapefile there's no topology that
>>> would prevent the issue and my PostGis DB doesn't support that
>>> (yet)*. Here's a screenshot that displays the issue:
>>> http://www.geometrico.lu/devel/mapserver/boundary-styling.png As
>>> you can see the styling varies greatly. So - does anyone have a
>>> clue on how to get the styling right? It should look like in the
>>> lower right corner of the screenshot ...
>>>
>>> Many thanks,
>>>
>>> Frank
>>>
>>>
>>> * BTW: can Mapserver handle PostGIS topology geometry types?
>>>
>>>
>>> - -- Frank BRONIEWSKI
>>>
>>> METRICO s.à r.l. géomètres technologies d'information
>>> géographique rue des Romains 36 L-5433 NIEDERDONVEN
>>>
>>> tél.: +352 26 74 94 - 28 fax.: +352 26 74 94 99
>>> http://www.metrico.lu -----BEGIN PGP SIGNATURE----- Version:
>>> GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird -
>>> http://www.enigmail.net/
>>>
>>> iQEcBAEBAgAGBQJSsWOfAAoJEHopqW0d1cQVUjcH+wamQP8jJo8BzrX9JYp6mn
>>> 2h
>>> rzbk4LYyH6Xf144dnJkfrt7G8eziABT0Zg/RDqE6trqkBGlPxO16wOFbIPunEAZC
>>> O+veftAYv4pyZbXKvAJF2yXW1L1P/OJNppRO3WnfkZGVDybsWecGkoowl0NdPBg
>>> L Ps4FLcVXhgNxpdOZpwgMMDOHs1VGVuZgRXx02SLm8lmzffnixSCuMUtL45Q9HB
>>> on
>>> 62SCRi/nJ1AYAMVC9+2PeRs4Uni+cIAMRS0nXeE988JcXvDmWsazKXZCwG9iuZhz
>>> WUOuIEpTg2wcH3zEemyHkxJnutW5ryUDCbF/u7cCiCgVHq+NesGEfVS6kWqGW2
>>> U= =Mm2w -----END PGP SIGNATURE-----
>>> _______________________________________________ mapserver-users
>>> mailing list mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> - -- 
> Frank BRONIEWSKI
>
> METRICO s.à r.l.
> géomètres
> technologies d'information géographique
> rue des Romains 36
> L-5433 NIEDERDONVEN
>
> tél.: +352 26 74 94 - 28
> fax.: +352 26 74 94 99
> http://www.metrico.lu
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJSsXrPAAoJEHopqW0d1cQV3RgIAIHILIrDXZ7j3lTnpPVMEx69
> +vh7eMNSWNnUp4EdJS1Ia0/xurHclijdJrZ1IN5klohsQFmv22ygdnOP+DSbN8fr
> N8bCeeZfIfbtTRGR467eFeNCdXg7A3aYEk1E1cJJitG8IP9riPh9zWWelPXk7qJP
> /r9/Of0vYowCoyxl+yu1V/V8mOD0Wp5aPe7wkGenEf2UvIp9FfmNUPSfHLzJOZKM
> x2ONp2wO7lhLj9AYHCb8h+jbIbWK4ywvLpjehxr3fS3JMRJscekbxI6hzJ32U7iF
> FpQxs2xYA0XjosZSAiMu6MnuObPnevRJVdIsycK0gkjHarcfIbeIv/E4HqBtmro=
> =ES4L
> -----END PGP SIGNATURE-----
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list