[MS4W-Users] Problem using a feature attribute from an OGR file

lars.schylberg at blixtmail.se lars.schylberg at blixtmail.se
Fri Mar 17 08:43:46 EDT 2017


Hi Allan,


That is strange that it doesn't work.  


TEXT (round([VALDCO], 0.1))


works for me on my debain machine with MS 7.0.  Could it be a windows bug?
I will see if works on Windows for me tonight on my home PC.  I am not using PC on regular basis.


/Lars



-----Originalmeddelande----- 
> Från: "Gillis, Allan via MS4W-Users" <ms4w-users at lists.ms4w.com> 
> Till: ms4w-users at lists.ms4w.com 
> Kopia: "Gillis, Allan" <Allan.Gillis at drdc-rddc.gc.ca> 
> Datum: 2017-03-17 13:33 
> Ämne: Re: [MS4W-Users] Problem using a feature attribute from an OGR file 
> 
> Hi Jeff,
> 
>      That one is working, here's the original one that I think should work but doesn't.  You can see several things I've tried with the TEXT of the LABEL definition...
> 
> LAYER
>     NAME "DEPCNT_US1GC09M"
>     TYPE LINE
>     DUMP true
>     TEMPLATE fooOnlyForWMSGetFeatureInfo
>     EXTENT -98.15 17.738333 -76.083333 33.633333
>     METADATA
>       'ows_title' 'DEPCNT_US1GC09M'
>     END #metadata"
>     STATUS ON
>     CONNECTIONTYPE OGR
>     CONNECTION "./s57/US1GC09M.000"
>      DATA DEPCNT
>     TRANSPARENCY 100
>     PROJECTION
>       'proj=longlat'
>       'datum=WGS84'
>       'no_defs'
>     END #projection
>      
>      LABELITEM 'VALDCO'
>      CLASS
>        DEBUG TRUE
>       NAME 'DEPCNT'
>       STYLE
>         WIDTH 0.91
>         COLOR 0 170 255
>       END #style
>        LABEL
>           #TEXT "Hello World"
>           #TEXT tostring([VALDCO], "%f m")  #loadLabel(): Unknown identifier. Parsing error near ([VALDCO], "%f m"):(line 396)
>           #TEXT VALDCO     #prints the text 'VALDCO' on the contours
>           #TEXT [VALDCO]   #getSymbol(): Symbol definition error. Parsing error near (VALDCO):(line 398)
>         SIZE 10
>         COLOR 255 0 0
>         ANGLE FOLLOW
>         POSITION AUTO
>         FORCE TRUE
>         ANTIALIAS TRUE
>        END #label
>     END #class
> END #layer DEPCNT_US1GC09M
> 
> 
> Cheers,
> -Allan
> 
> 
> 
> -----Original Message-----
> From: MS4W-Users [mailto:ms4w-users-bounces at lists.ms4w.com] On Behalf Of Jeff McKenna via MS4W-Users
> Sent: March 17, 2017 9:11 AM
> To: ms4w-users at lists.ms4w.com
> Cc: Jeff McKenna
> Subject: Re: [MS4W-Users] Problem using a feature attribute from an OGR file
> 
> On 2017-03-17 9:03 AM, Gillis, Allan via MS4W-Users wrote:
> >
> >
> >
> > LAYER
> >
> >     NAME "DEPCNT_US1GC09M"
> >
> >     TYPE LINE
> >
> >     DUMP true
> >
> >     TEMPLATE fooOnlyForWMSGetFeatureInfo
> >
> >     EXTENT -98.15 17.738333 -76.083333 33.633333
> >
> >     METADATA
> >
> >       'ows_title' 'DEPCNT_US1GC09M'
> >
> >     END #metadata"
> >
> >     STATUS ON
> >
> >     CONNECTIONTYPE OGR
> >
> >     CONNECTION "./s57/US1GC09M.000"
> >
> >     #DATA "SELECT VALDCO FROM DEPCNT WHERE OGR_GEOMETRY='LINESTRING'"
> >
> >     DATA DEPCNT
> >
> >     #PROCESSING "NATIVE_FILTER=PRIM=2" #  Select only linestrings
> >
> >     #PROCESSING "LABEL_NO_CLIP=ON"
> >
> >     TRANSPARENCY 100
> >
> >     PROJECTION
> >
> >       'proj=longlat'
> >
> >       'datum=WGS84'
> >
> >       'no_defs'
> >
> >     END #projection
> >
> > CLASSITEM 'VALDCO'
> >
> > CLASS
> >
> >   NAME '0.000 < VALDCO < 20'
> >
> >       EXPRESSION ( ([VALDCO] >= 0.000) AND ([VALDCO] <= 20.0) )
> >
> >      DEBUG TRUE
> >
> >       NAME 'DEPCNT'
> >
> >       STYLE
> >
> >         WIDTH 0.91
> >
> >         COLOR 0 170 255
> >
> >       END #style
> >
> >                  LABEL
> >
> >                               TEXT "20"
> >
> >         SIZE 10
> >
> >         COLOR 255 0 0
> >
> >         ANGLE FOLLOW
> >
> >         POSITION AUTO
> >
> >         FORCE TRUE
> >
> >         ANTIALIAS TRUE
> >
> >                  END #label
> >
> >     END #class
> >
> >     CLASS
> >
> >                  NAME '20.000 < VALDCO < 50'
> >
> >       EXPRESSION ( ([VALDCO] > 20.000) AND ([VALDCO] <= 50.0) )
> >
> >                  DEBUG TRUE
> >
> >       NAME 'DEPCNT'
> >
> >       STYLE
> >
> >         WIDTH 0.91
> >
> >         COLOR 0 170 255
> >
> >       END #style
> >
> >                  LABEL
> >
> >                               TEXT "50"
> >
> >         SIZE 10
> >
> >         COLOR 255 0 0
> >
> >         ANGLE FOLLOW
> >
> >         POSITION AUTO
> >
> >         FORCE TRUE
> >
> >         ANTIALIAS TRUE
> >
> >                  END #label
> >
> >     END #class
> >
> >                CLASS
> >
> >                  NAME '50.000 < VALDCO < 100'
> >
> >       EXPRESSION ( ([VALDCO] > 50.000) AND ([VALDCO] <= 100.0) )
> >
> >                  DEBUG TRUE
> >
> >       NAME 'DEPCNT'
> >
> >       STYLE
> >
> >         WIDTH 0.91
> >
> >         COLOR 0 170 255
> >
> >       END #style
> >
> >                  LABEL
> >
> >                               TEXT "100"
> >
> >         SIZE 10
> >
> >         COLOR 255 0 0
> >
> >         ANGLE FOLLOW
> >
> >         POSITION AUTO
> >
> >         FORCE TRUE
> >
> >         ANTIALIAS TRUE
> >
> >                  END #label
> >
> >     END #class
> >
> > END #layer DEPCNT_US1GC09M
> >
> >
> >
> > *From:*MS4W-Users [mailto:ms4w-users-bounces at lists.ms4w.com] *On 
> > Behalf Of *Gillis, Allan via MS4W-Users
> > *Sent:* March 17, 2017 7:38 AM
> > *To:* ms4w-users at lists.ms4w.com
> > *Cc:* Gillis, Allan
> > *Subject:* Re: [MS4W-Users] Problem using a feature attribute from an 
> > OGR file
> >
> >
> 
> Thanks for now sharing your NOAA layer definition, will give it a try here.
> 
> -jeff
> 
> 
> 
> 
> --
> Jeff McKenna
> MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> https://lists.ms4w.com/mailman/listinfo/ms4w-users
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> https://lists.ms4w.com/mailman/listinfo/ms4w-users

-- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/mailman/private/ms4w-users/attachments/20170317/af32ae8d/attachment.html>


More information about the MS4W-Users mailing list