[Mapserver-users] Re: data/mapfile organization advice sought
pkishor_98
pkishor@geoanalytics.com
Tue, 13 May 2003 15:53:44 -0000
--- In mapserver-users@yahoogroups.com, "Palle Due Larsen"
<palle@m...> wrote:
> Yes, there is such a switch. It is called STATUS. If you put STATUS OFF
> in a LAYER, the DATA statement can be bogus.
ahhhh! the subtleties...
I just assumed that if the data statement was "wrong", mapserver would
croak at the time of "compiling" the script and the mapfile.
didn't even occur to me to try that, and now that you have told me, it
is so simple.
many thanks.
> Then in the URL you can set
> the data file, and turn the layer on.
>
> Best regards
>
> Palle Due Larsen
> Carl Bro GIS & IT
> -----Original Message-----
> From: "pkishor_98" <pkishor@g...>
> To: mapserver-users@l...
> Date: Tue, 13 May 2003 13:09:02 -0000
> Subject: [Mapserver-users] Re: data/mapfile organization advice sought
>
> > --- In mapserver-users@yahoogroups.com, Jan Hartmann <jhart@f...>
> > wrote:
> > ..
> > > Note that for security reasons the DATA statement is *not*
> > scriptable by
> > > default any more. You have to put "DATAPATTERN <regex>" somewhere
> > in
> > > your MapFile. <regex> is a regular expression; only DATA-pathnames
> > > agreeing with that expression are allowed after that. When you
> > leave
> > > DATAPATTERN out, all scripted DATA calls will be silently ignored.
> > ..
> >
> >
> > woo hoo! methinks this is what I want. Thank Jan.
> >
> >
> > by the way, if a data file referenced in the mapfile is not found,
> > then Mapserver usually croaks. Is there a switch to make Mapserver
> > ignore errors? As I mentioned earlier, while existing layers are all
> > named the same, there are a few layers missing for a few countries.
> > For example, layer9 might not exist for a couple of countries, etc.
> > Would be easier for me if I could simply include all the layers in my
> > mapfile, but if a particular layer didn't exist, it would be simply
> > ignored by Mapserver.
> >
> >
> >
> >
> >
> >
> > > Puneet Kishor wrote:
> > > > To ms data mavens -- please give me a piece of your mind.
> > > >
> > > > I have shapefile data of several countries, about 14 countries.
> > > >
> > > > Each country has 8 to 12 different layers, but they are all
> > called
> > the
> > > > same. For example, all countries have a layer called "layer1",
> > "layer2",
> > > > and so on, while a few countries may not have "layer8" or
> > "layer11," etc.
> > > >
> > > > If I were to draw all the countries together, they would draw
> > correctly,
> > > > that is, they are in the correct geographic space. However, their
> > data
> > > > are self-contained. That is, even though country1 and country2
> > are
> > > > contiguous, drawing country1 does not bring up country2... they
> > are in
> > > > different folders.
> > > >
> > > > How do I create and work with their mapfiles?
> > > >
> > > > I can't really have one big mongo mapfile with all the layers of
> > all the
> > > > countries... it would be unworkable, and probably very
> > inefficient.
> > > >
> > > > On the other hand, if I have 14 different mapfiles, they will be
> > almost
> > > > identical to each other except for the path to the data. If I
> > make a
> > > > tweak in any one mapfile (for example, change the color or
> > visible
> > scale
> > > > of a layer), I will have to go and change it in 14 different
> > mapfiles.
> > > >
> > > > Ideally I would like to have one master mapfile (like a
> > template),
> > and
> > > > just substitute (on the fly) the path to the data. I guess I
> > could do
> > > > some preprocessing with Perl, and swap a filter keyword using
> > regexp
> > > > search, to create a working, valid mapfile on the fly, but I
> > would
> > also
> > > > have to account for those one or two particular layers that
> > happen
> > to be
> > > > absent for a given country.
> > > >
> > > > Please share your insight.
> > > >
> > > > Many tia.
> > > >
> > > > Puneet.
> > > >
> > > > _______________________________________________
> > > > Mapserver-users mailing list
> > > > Mapserver-users@l...
> > > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> > > >
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users@l...
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users@l...
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> Få en gratis emailkonto her: www.mail-online.dk
> -----------------------------------------------
> Deltag i en lille brugerundersøgelse på
> nettet, og vind et gavekort på 50.000 kroner..!
> www.directoffice.dk/konkurrence
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users@l...
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users