[Mapserver-users] Deriving TIGER extents

Marvin Humphrey marvin at rectangular.com
Fri May 21 17:55:45 EDT 2004


On May 19, 2004, at 9:38 PM, Frank Warmerdam wrote:

> First, don't you need a CLASS statement in your line layer to define
> how to draw the lines?  Something like:
>
> LAYER
>     NAME "tigertest"
>     TYPE line
>     CONNECTIONTYPE OGR
>     CONNECTION "../TGR26049"
>     DATA "CompleteChain"
>     STATUS ON
>     CLASS
>       COLOR 255 0 0
>     END
> END
>
> Perhaps there is some reasonable default I don't know about.

There does not seem to be a default value for the CLASS statement, by 
my testing.

The missing CLASS statement was a problem, albeit one that I'd 
discovered and addressed shortly after posting my faulty .map file to 
the list. The main problem that bedeviled me and burned a few hours of 
my life away lay elsewhere: I did not realize that turning a layer "ON" 
doesn't turn a layer on.  That STATUS statement has some crazy 
counter-intuitive conventions, no?

-- if you want a layer to disappear, turn it "ON".*
-- if you want a layer to appear, set it to "DEFAULT".
-- If you want a layer to use the default value... there is no default 
value, AFAICT.

Now that I know how it works, I won't make the same mistake again. And 
I'll stop wondering why a typo in the path to my datasource provoked no 
complaint.

I don't imagine I'm the first or the last person to get burned by this 
"on is off" issue.  Too bad changing the behavior for STATUS to 
something less Orwellian would require jettisoning backwards 
compatibility.

> Second, I don't have any problem getting extents from ogrinfo when
> I specify a spatial layer (such as CompleteChain).  For example:
>
> warmerda at gdal2200[108]% ogrinfo -ro -summary . CompleteChain

It appears that I never used the -summary flag while specifying an 
individual layer without the -q flag in addition.  Once I started using 
the exact command you issue above, I got the desired behavior.

Thank you for your reply and for your excellent software, Frank.

-- Marvin Humphrey 

* Note to fellow newbies and others who may find this email in the 
archive: I'm deliberately skewing my characterization of the STATUS 
statement for rhetorical purposes.  For the real story, check 
http://mapserver.gis.umn.edu/wilma/mapserver-dev/0404/msg00077.html




More information about the mapserver-users mailing list