Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: 2.7-M0
-
Component/s: unsupported
-
Labels:None
Description
Currently MIFDataStore does not support MapInfo Text objects.
A MapInfo text object, rather that being a label attached to a point, is like a text written (often with a very large brush) on the earth's surface, so that the rendering size is affected by the current map zoom.
A Text object has the following attributes:
Text string (label)
boundary (x1, y1, x2, y2) (which is not an MBR thus)
Angle (label rotation)
can have a line with x,y coordinates of the arrow point
style info: font, size, spacing etc...
Given that MIFDataStore does not support style at the feature level, we should at least save the text and a Geometry to which we should attach it, maybe a point or a rect.
MIFDataStore could either:
1. Define a Text class derived from Geometry which could behave like a
point or rect, and offer storage for text attributes; this could cause
compatibility problems with other GeoTools components, but I'm not sure
about this;
or
2. Read text objects as if they were points (or rects) storing the
text string and angle in Feature attributes. The Feature could have
TEXT_ANGLE, TEXT_LABEL, TEXT_SPACING attributes. This could make
difficult implementing a write support for this kind of objects, which would be written as point or polygon in MIF format.
This could allow for mantaining MapInfo specific types which are not mappable to JTS types, as well as MapInfo style information "as is". Both issues are useful for saving data back to the MIF file without loosing the original structure.
The following properties could optionally be saved, (all have string values):
# SYMBOL = shape,color,size
# PEN = width, pattern, color
# BRUSH=pattern,forecolor,backcolor
# CENTER=x,y (polygon centroid)
# SMOOTH=yes|no
# FONT=
# SPACING=1|1.5|2
# JUSTIFY=l|r|c
# TEXT_ANGLE=...
# ROUNDING=... (for roundrect)
# LABEL_LINE={simple|arrow},x,y
# ARC_BEGANGLE=...
# ARC_ENDANGLE=...
# MAPINFO_TYPE=line,arc,text,rect,roundrect,ellipse (for unsupported geom types)