Cumberland update

I have implemented some cool stuff recently in Cumberland:

  • The SQL Server 2008 Shapefile loader which I blogged about previously
  • There are now two data source backends: Shapefiles and PostGIS.
  • Point symbology has been extended to allow external images and both circles and squares as shape symbols.
  • Theming is now possible. By this I mean data in a layer can be rendered based on metadata associated with individual features instead of one constant set of symbology. Take this image:

theming in cumberland

theming in cumberland

Here, the states of Mexico are colored based on their area. Larger states are more red. The rivers are themed so that only rivers in the 'Rio Grande de Santiago' system are shown (the blue lines). Finally, the cities of mexico are drawn by size: small cities are green squares, medium size cities are blue circles, and big cities are drawn with an external image.

Map persistence

Finally, I have created a serialization class for saving/loading maps. It's pretty straightforward xml:

<?xml version="1.0" encoding="utf-8"?>
<Map>
    <Width>400</Width>
    <Height>400</Height>
    <Extents>-107,18,-95,28</Extents>
    <Projection>+init=epsg:4326</Projection>
    <Layers>
        <Layer>
            <Styles>
                <Style>
                    <LineWidth>1</LineWidth>
                    <LineColor>255,165,105,125</LineColor>
                    <LineStyle>Solid</LineStyle>                   
                </Style>
            </Styles>
            <Projection>+init=epsg:4326</Projection>
            <Id>roads</Id>
            <Data sourceType="Cumberland.Data.IFileFeatureSource" sourceInstance="Cumberland.Data.Shapefile.Shapefile">
                <FilePath>../shape_eg_data/mexico/roads.shp</FilePath>
            </Data>
        </Layer>
        ...

You can test this out with the included Cumberland.DrawMap.exe (which created the above image).

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>