[tei-council] surfaces and zones. (long)
Lou Burnard
lou.burnard at retired.ox.ac.uk
Sat Nov 19 18:49:26 EST 2011
I've now drafted a new section for PH to introduce some of the more
abstruse aspects we've been discussing recently. Not quite sure where it
fits in the already bloated body of this chapter, but thought Council
members might like to give it a quick readthrough before I try to find a
home for it.
Here goes:
> <div xml:id="PH-surfzone"><head>Advanced uses of surface and zone</head>
>
> <p>The function of the <gi>surface</gi> element is both to identify a
> specific area containing writing and to provide a two dimensional set
> of coordinates which can be used to position and dimension sub-parts
> of it. Furthermore, surfaces may nest within other surfaces, as in the
> case of <q>patches</q> or other written materials attached to the main
> writing surface. In the general case, the position and dimensions of
> such nested surfaces will be defined using the same co-ordinate system
> as that supplied by the parent <gi>surface</gi> element. It is also
> possible, however, that a different coordinate system is required for
> such a nested surface, perhaps because it requires a more complex
> granularity. We consider both possibilities.</p>
>
> <p>In the earlier examples showing nested examples we did not provide
> any coordinate information, for simplicity of presentation. Suppose
> however, that we wish to indicate the position and sizes of the
> newspaper scraps in figure <ptr target="#sleeprs"/> relative to the whole
> page. The four attributes <att>ulx</att>, <att>uly</att>,
> <att>urx</att> and <att>ury</att> when given on the <gi>surface</gi>
> element define the co-ordinate scheme, rather than specifying the
> location of that surface; we must therefore introduce an additional
> <gi>zone</gi> element, as in the following revised encoding for the
> example given in section <ptr target="#PHZLAB"/> above:
>
> <egXML xmlns="http://www.tei-c.org/ns/Examples">
> <surface ulx="0" uly="0" lrx="50" lry="50">
> <zone ulx="1" uly="1" lrx="10" lry="10">
> <line>Poem</line>
> <line>As in Visions of — at</line>
> <line>night —</line>
> <line>All sorts of fancies running through</line>
> <line>the head</line>
> </zone>
> <zone ulx="4" uly="4" lrx="20" lry="20">
> <surface type="newsprint" attachment="glue" flipping="false">
> <zone>Spring has
> just set in here, and the weather.... a
> steamer </zone>
> <metamark function="sequence">2</metamark>
> </surface>
> </zone>
> </surface></egXML>
>
> In this version of the encoding, the inner surface, corresponding with
> the first piece of newsprint, inherits locational information from
> the <gi>zone</gi> element that contains it. This zone, and the
> preceding one, which contains a sequence of <gi>line</gi> elements,
> are both positioned in terms of the coordinates specified on the
> outermost <gi>surface</gi> element, which defines a scale running from
> 0 to 50 in either direction. On that scale, the <gi>line</gi> elements
> occupy a rectangle with coordinates (1,1,10,10), while the nested
> surface occupies a rectangle with coordinates (4,4,20,20).</p>
> <p>Now suppose that we wish to define a finer scale grid for the
> newspaper patch, perhaps because we wish to localize zones within it
> with greater accuracy. To do this we will need to specify the
> position of the nested surface as in the previous example, but also to
> define the new coordinate system. We accomplish this as follows:
>
> <egXML xmlns="http://www.tei-c.org/ns/Examples">
> <surface ulx="0" uly="0" lrx="50" lry="50">
> <zone ulx="1" uly="1" lrx="10" lry="10">
> <line>Poem</line>
> <!-- ... -->
> <line>the head</line>
> </zone>
> <zone ulx="4" uly="4" lrx="20" lry="20">
> <surface ulx="0" uly="0" lrx="100" lry="100">
> <zone ulx="10" uly="10" lrx="90" lry="95">
> Spring has just set in here, and the weather
> .... a steamer </zone>
> </surface>
> </zone>
> </surface></egXML>
>
> As before, the second zone defines the position and size of the
> newspaper patch itself in terms of a coordinate system running from
> 0 to 50 on both X and Y axes. The nested <gi>surface</gi> element
> however defines a new scale for all of its components, running from 0
> to 100 on both X and Y axes. The position of the nested zone
> containing the text <mentioned>Spring ... steamer</mentioned> is now
> given in terms of this scale.</p>
>
> <p>All of the examples so far given have involved rectangular zones,
> for clarity of exposition. As noted above, the <att>points</att>
> attribute may be used to define non rectangular zones as a series of
> points. For example, in the last of the Whitman examples discussed in
> section <ptr target="PH-meta"/> above, we might wish to record the
> exact shape of the zone containing the metamark
> <mentioned>Entered</mentioned>. Since this is not a rectangular zone,
> we use the <att>points</att> attribute to indicate the points defining
> a polygon which contains it. The values used are expressed in terms of
> a coordinate space running from 0 to 229 in the X dimension, and 0 to
> 160 in the Y dimension. </p>
>
>
> <egXML
> xmlns="http://www.tei-c.org/ns/Examples">
> <surface xml:id="w2" ulx="229" uly="160" lrx="0" lry="0">
> <graphic url="whitman-02.jpg"/>
> <zone xml:id="entered"
> points="142.625,122.19 155.024,113.736 178.133,122.754
> 208.569,144.172 198.988,154.881 178.133,139.663"/>
> </surface>
> </egXML>
>
> <p>In exactly the same way, we may wish to identify the curved zone
> in the following image containing the word
> <mentioned>Northamptonshire</mentioned>:
> <figure><graphic url="../Images/mouldstone.jpg"/>
> <head>Gravestone of Private Mould in the Protestant Cemetery in
> Rome</head>
> </figure>
> This curved zone might be encoded in the following way:
>
> <egXML
> xmlns="http://www.tei-c.org/ns/Examples">
> <surface xml:id="badge" ulx="14.54" uly="16.14" lrx="0" lry="0">
> <graphic url="stone.jpg"/>
> <zone xml:id="county" points="4.6,6.3 5.25,5.85 6.2,6.6
> 8.19222,7.4125 9.89222,6.5875 10.9422,6.1375 11.4422,6.7125
> 8.21722,8.3125 6.2,7.65"/>
> </surface>
> </egXML>
> </p>
>
>
> </div>
>
>
More information about the tei-council
mailing list