[mapserver-users] strange mapinfo layer

Daniel Morissette morissette at dmsolutions.ca
Wed Jul 24 18:17:32 EDT 2002


Alex Rice wrote:
> 
> Is it possible to render this layer with mapserver? OGRinfo says
> it's a style with embedded string:
> 
> OGRFeature(Esloclbl):1
>    id (String) =
>    Style =
> LABEL(t:"Marie\nHughes",a:0.000000,s:0.001286g,c:#000000,p:2,f:"Arial"
> )
>    POINT (-106.71142900 35.15584200)
> 
> The id (String) slot is totally unused in this layer. It seems as
> if the label text should have been in there instead. Any
> suggestions?
> 

This MapInfo object seems normal to me.  "id" is a regular attribute of
type string and can be emtpy, like any attribute.

If you exported your file to MIF/MID which is MapInfo's interchange
format then you would see something like this in the .MIF file:

TEXT "Marie\nHughes"
  -106.71142900 35.15584200  ... ...
  FONT("Arial", 0, ... ,...)  

The label text of a text object is not stored in a regular attribute in
MapInfo, it is a property specific to a text object as you can see here,
and OGR returns the label text via the Style value applied to a Point
object since pure text objects do not exist in the Simple Feature data
model.  If you setup this layer as TYPE ANNOTATION and using STYLEITEM
"AUTO" then you should see this labels on your map.

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.



More information about the mapserver-users mailing list