[mapserver-users] Any thoughts on combining 3 regional maps into one?

Basques, Bob (CI-StPaul) bob.basques at ci.stpaul.mn.us
Wed Oct 2 09:39:03 PDT 2013


Steve,

What about restructuring the three top level mapfiles, just a little bit, so that they can be used as INCLUDES in the NA mapfile.  Just separate out the laver info for each mapfile into it's own file and pull it in as an include.

You would still be able to maintain the three regions as separate MapFILEs by using the same INCLUDE (one for each region) mapfiles and then have one larger mapfile that included all three regional versions.

Seems like the least difficult to implement editing wise.  I'm making some assumption here about a master projection being used and such.

Bobb



From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Nahum Castro
Sent: Wednesday, October 02, 2013 11:31 AM
To: Stephen Woodbridge; mapserver-users
Subject: Re: [mapserver-users] Any thoughts on combining 3 regional maps into one?



--
Nahum Castro
Leon, Guanajuato, Mexico
http://www.leon-linux.com
e-mail: pedro1_72 [en] yahoo [punto] com

________________________________
De: Stephen Woodbridge <woodbri at swoodbridge.com<mailto:woodbri at swoodbridge.com>>
Para: mapserver-users <mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>>
Enviado: Miércoles, 2 de octubre, 2013 10:52:51
Asunto: [mapserver-users] Any thoughts on combining 3 regional maps into one?

Hi all,

I have 3 regional mapfiles for US, Canada and Mexico and I want to
create a single North America map. Since the data comes from separate
vendors and they refresh on different cycles, I'm trying to figure out
the best way to structure this in a mapfile. I also need to maintain
each region as a separate mapfile. (I'm ignoring issues like data
alignment over borders.)

The reginal mapfile data is structure like:

.../us/data/<shapefiles>
.../us/us.map
.../mx/data/<shapefiles>
.../mx/mx.map
.../ca/data/<shapefiles>
.../ca/ca.map

The shapepath for each mapfile is set to the local data directory. What
I would like to avoid is having to change all the paths in the mapfiles
to accomodate a change like:

.../na/us/data/
.../na/mx/data/
.../na/ca/data/
.../na/na.map

It would be cool if I can change the shapepath in the middle of the
mapfile so layers beyond the change would use the new shapepath, but I
suspect that will not work.

So it looks like my options are:

1. rewrite all the mapfile data pathes as I combine them into one new
mapfile and maintain two copies, regional and na versions.

2. maybe create a new mapfile that loads each of the regions as a WMS
client and overlays the adjacent regions. This will get served via
mapcache so that might add some options for tile assembly.

3. other ideas????

This can be done with postgis!!!
create a database with all layers you have, then create views joining the similar layers, and in your map

LAYER
    NAME "states"
    STATUS ON
    DATA "the_geom from (select * from view_from_postgis) as foo using unique gid using srid=4326"
    TYPE POLYGON
    CONNECTIONTYPE POSTGIS
    CONNECTION "user=xyz password=***** dbname=postgis_database_name host=127.0.0.1 port=5432"
    UNITS METERS
    SIZEUNITS PIXELS
    LABELITEM "name"
    LABELMINSCALE 750000
    TRANSFORM TRUE
    TEMPLATE void
    METADATA
      "LAYER_ENCODING" "UTF-8"
    END
    projection
        "init=epsg:32614"
    end
    CLASS
      NAME "estados"
      LABEL
        TYPE TRUETYPE
        FONT "trebuchet"
        SIZE 12
        POSITION cc
        FORCE true
        OUTLINECOLOR 255 255 255
        COLOR 0 0 255
        ANTIALIAS TRUE
      END
      STYLE
        OUTLINECOLOR 130 131 140
        BACKGROUNDCOLOR 0 0 0
        ANTIALIAS TRUE
      END
    END
  END

Thanks,
  -Steve
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20131002/3ab91130/attachment-0001.html>


More information about the mapserver-users mailing list