[mapserver-users] OGR - ArcInfo Coverage Help
Lowell Filak
lfilak at medinaco.org
Fri Aug 9 05:58:01 PDT 2002
Currently the routine in the wiki only reads in the first and last definition point for the text and creates a two-point line based on that. It can definitely be modified to read in all the points but currently would not be rendered using all of them. By using a truetype font and angle auto the text should follow the line.
Lowell
The following message was sent by Matthew Archer <ma at t-kartor.se> on Fri, 09 Aug 2002 14:37:45 +0200.
> Hi,
>
> Converting to lines works for some texts, however:
>
> How do i get the text to follow the line?
>
> Unfortunately, converting to lines does not work well for 3+ point lines
> (ie curved text) and multi-row text where each row is set specifically
> (wordposition in ArcInfo).
>
> /Matthew
>
> At 08:35 2002-08-09 -0400, you wrote:
> >Alternately you could convert the annotations to two-point lines and label
> >the lines without drawing them (thanks to Steven L. & Daniel M.).
> >http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex10
> >Lowell F.
> >
> >The following message was sent by Matthew Archer <ma at t-kartor.se> on Fri,
> >09 Aug 2002 12:38:25 +0200.
> >
> > > Hi,
> > >
> > > I am trying to draw ArcInfo annotation via OGR, using MapServer v3.6.1
> > > (windows binary) on Windows NT.
> > > I cannot get MapServer to draw the actual annotation text. Is this
> > > possible, have i got a syntax error somewhere.
> > >
> > > regards
> > > /Matthew
> > >
> > > Extract from arc DESCRIBE command on cover:
> > >
> > > Description of DOUBLE precision coverage anno15b
> > >
> > > FEATURE CLASSES
> > >
> > > Number of Attribute Spatial
> > > Feature Class Subclass Features data (bytes) Index?
> > > ------------- -------- --------- ------------ -------
> > > ANNOTATIONS SDE 2188 524 Yes
> > >
> > > Extract from arc ITEMS anno15b.tatsde command on cover:
> > >
> > > ITEM NAME WIDTH OUTPUT TYPE
> > > SDE# 4 5 B
> > > SDE-ID 4 5 B
> > > OBJECT_ID 4 10 B
> > > ANNOTYPE 30 30 C
> > > NAME 250 250 C
> > >
> > > ---------------------------------------------------------
> > > Using the following syntax with TYPE=Point:
> > >
> > > LAYER
> > > NAME anno15
> > > TYPE POINT
> > > CONNECTIONTYPE OGR
> > > CONNECTION "C:\apache\htdocs\gt2\data\anno15b,0"
> > > STATUS default
> > > CLASS
> > > COLOR 0 0 0
> > > END
> > > END
> > >
> > > Mapserver draws points at the start of where each annotation string
> > should be.
> > >
> > > ---------------------------------------------------------
> > > Using the following syntax with TYPE=Annotation:
> > >
> > > LAYER
> > > NAME anno15
> > > TYPE ANNOTATION
> > > CONNECTIONTYPE OGR
> > > CONNECTION "C:\apache\htdocs\gt2\data\anno15b,0"
> > > STATUS default
> > > CLASS
> > > COLOR 0 0 0
> > > END
> > > END
> > >
> > > Mapserver draws nothing for this layer, but gives no error either. The
> > > rest of the layers still draw.
> > >
> > > ---------------------------------------------------------
> > > Using the following syntax with TYPE=Annotation and with a TEXT fixed
> > label:
> > >
> > > LAYER
> > > NAME anno15
> > > TYPE ANNOTATION
> > > CONNECTIONTYPE OGR
> > > CONNECTION "C:\apache\htdocs\gt2\data\anno15b,0"
> > > STATUS default
> > > CLASS
> > > COLOR 0 0 0
> > > TEXT "hello"
> > > LABEL
> > > COLOR 0 0 0
> > > END
> > > END
> > > END
> > >
> > > Mapserver draws the default text where each annotation string should
> > have been.
> > >
> > > ---------------------------------------------------------
> > > Using the following syntax with TYPE=Annotation and with a LABELITEM:
> > >
> > > LAYER
> > > NAME anno15
> > > TYPE ANNOTATION
> > > CONNECTIONTYPE OGR
> > > CONNECTION "C:\apache\htdocs\gt2\data\anno15b,0"
> > > STATUS default
> > > LABELITEM "NAME"
> > > CLASS
> > > COLOR 0 0 0
> > > END
> > > END
> > >
> > > MapServer gives the error:
> > > msOGRLayerInitItemInfo(): OGR error. Invalid Field name: NAME
> > > I have tried both NAME,name,Name without success
> > >
> > >
More information about the MapServer-users
mailing list