Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I try to convert a mapinfo tab-file containing textobjects wich are positioned and rotated in mapinfo into a shapefile or something similar without loosing all information. All information is located in the mapfile and the attribute table is empty. Just opening the tab-file in Qgis gives a point with an id containing NULL - the text-value lies inside the geometry and the same happens when trying to open the file as an exported mid/mif(thought the point geometry is not really the same).

When opening the mif-file in a texteditor it looks like

"label"
x1 y1 x2 y2
Font (font and color info)
Angle 0.8
Justify Center

where the x1y1 and x2y2 is the bbox (bottom left and top right points) of the text, angle is the bbox rotation and the text itself is contained inside the "label".

Can I somehow create a polygon from the bbox values and the angle and attach the label and the angle as attributes somehow?

share|improve this question

2 Answers 2

QGIS doesn't label with bounding boxes. It needs one point to position the label. Therefore, you could calculate the mean between the two points.

For the angle: Does Mapinfo use radians or degrees for rotation? (It's not clear from the example at least.) If the value is in radians, you'll have to convert it to degrees.

Set the positioning to "on point". That should give quite similar results to what was originally shown in Mapinfo.

share|improve this answer

You can add two new columns to your table using Table > Maintenance > Table Structure: TEXT Char(100) and ANGLE Float

Then use Table > Update Column to read certain values from the spatial object into these columns. Angle: Use this expression: ObjectGeography(OBJ, 7) Text: Use this expression: ObjectInfo(OBJ, 3)

To change your text object into an MBR you can run this statement from the MapBasic window (Options > Show MapBasic Window): Update MYTABLE Set OBJ = MBR(OBJ)

Do remember to create a copy of your table before overwriting your text object with the MBR

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.