[Geomoose-users] best way of creating a .map file to display many classes inside a layer

Jim Klassen klassen.js at gmail.com
Tue Jul 17 09:01:06 PDT 2012


When I have repetitive tasks like this, I usually whip up a script to generate the Mapfile from a template.  I've used M4, ruby, python, perl, awk, ... Anything that can take a template and fill in values will work.  You could maybe even use Mapserver and mode=nquery to generate a mapfile.

(Although I agree, 50+ classes seems a bit much to visualize unless it is really a color range.  And even then, it would be easier to add a "color" column to the data/view and use one class with the color substituted from the data.) 

On Jul 17, 2012, at 10:36, Brent Fraser <bfraser at geoanalytic.com> wrote:

> I think Mapserver's impending (v6.2?) addition of COLORRANGE to STYLE may ease the rendering specification problem in the long term..
> 
> Best Regards,
> Brent Fraser
> 
> On 7/17/2012 8:35 AM, Bistrais, Bob wrote:
>> Hello Nico,
>> 
>> I think you have a more fundamental problem here.  I suggest that 50 classes are too many for any layer, from a cartographic standpoint.  The human eye can only discern so many colors easily.  On top of that, you will probably have background data on your map, which will only add to this cartographic nightmare.
>> 
>> Unfortunately, customers think they want everything, and they don't realize that "more" isn't always better.
>> 
>> My suggestion is to meet with your clients, tell them that 50 classes are too many.  Work with them to simplify it to no more than maybe 8-12 classes.  Users will still be able to use the identify and query tools to get the exact attributes of features, if they want to.
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: geomoose-users-bounces at lists.osgeo.org [mailto:geomoose-users-bounces at lists.osgeo.org] On Behalf Of NicoTek
>> Sent: Tuesday, July 17, 2012 10:07 AM
>> To: geomoose-users at lists.osgeo.org
>> Subject: [Geomoose-users] best way of creating a .map file to display many classes inside a layer
>> 
>> Hello,
>> 
>> I received a folder with all the files needed for mapping such as DBF, SHP, PRJ...etc
>> 
>> I don't have a ".map" file and I usually create that in notepad.
>> This time I would have to create about 50 classes inside a layer where each class has an "expression" and a "color" and for the color I go to a site that creates a gradient scale that I then copy and paste the color codes.
>> 
>> My question: Is there a more direct or even automatic way of doing this?
>> I prefer not to have to create 50 or more layers and copy paste colors into it. My fear is that in the near future I will have to map layers with one hundred or more classes
>> 
>> Thanks!
>> Nico
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>> 
> 
> 
> 
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users


More information about the Geomoose-users mailing list