Problems showing mapInfo text layer without OGR {Scanned} {Scanned} {Scanned}

Siki Zoltan siki at AGT.BME.HU
Tue May 2 19:41:22 EDT 2006


Shape file cannot store text features. When ogr2ogr convert mapinfo text 
features to shape file it changes text to point shape features. 
My layer definition is usefull if you have line features which gives the 
insertion points and directions of texts. I usually use MapInfo Universal 
translator to create such shapes :(
Another solution could be to have point features and direction attribute
beside the text to display.

Unfortunatelly I cannot tell you how to reach that shape with ogr2ogr :(

Zoltan

On Tue, 2 May 2006, Frederico Lucca wrote:

> Thanks for the help, but I think the problem is that the text i have in my
> mapinfo file don't have a text field to display. The feature is a text.
> Maybe the problem is how to translate it to a shape file.
> I already try to use:
> 
> ogr2ogr -f "ESRI Shapefile" -nlt POINT shp/TB.shp TB.TAB
> ogr2ogr -f "ESRI Shapefile" shp/TB.shp TB.TAB
> 
> But I have always the same problem.
> 
> Using OGR everything is ok...
> 
> #STYLEITEM "auto"
> #CONNECTIONTYPE ogr
> #CONNECTION "/var/www/maps/TB.TAB"
> 
> But according to Frank, I need a thread-safe environment and OGR is not
> really threadsafe.
> 
> Thanks in advance,
> 
> Fred
> 
> On 5/2/06, Siki Zoltan <siki at agt.bme.hu> wrote:
> >
> > Hi Frederico,
> >
> > Tra something like this
> >
> > LAYER
> >         NAME "sample"
> >         DATA "path/to/your/shape"
> >         STATUS ON
> >         TYPE ANNOTATION
> >         LABELITEM "text_field_to_display"
> >         LABELMAXSCALE 8001
> >         SYMBOLSCALE 2000 # you need it for scaleable labels
> >         CLASS
> >                 LABEL
> >                         COLOR 240 150 5
> >                         SIZE 7
> >                         POSITION CC
> >                         FONT my_font    # defined in your FONTSET file
> >                         TYPE TRUETYPE
> >                         ANGLE AUTO
> >                 END
> >         END
> > END
> >
> > I hope this helps you
> >
> > Zoltan
> >
> > On Tue, 2 May 2006, Frederico Lucca wrote:
> >
> > > Hello all,
> > >
> > > I have a mapinfo text layer and i need to view it on the map.
> > > I use ogr2ogr to convert to esri shape format and put in my mapfile but
> > i
> > > can't see the layer.
> > > I have a multi-thread environment, then i don't want to use OGR, because
> > of
> > > mutex.
> > >
> > > LAYER
> > >  NAME TB
> > >  TYPE annotation
> > >  #STYLEITEM "auto"
> > >  #CONNECTIONTYPE ogr
> > >  #CONNECTION "/var/www/maps/TB.TAB"
> > >  DATA "/var/www/maps/shp/TB"
> > >  STATUS DEFAULT
> > >  MINSCALE 1
> > >  MAXSCALE 50000
> > >  CLASS
> > >   COLOR 255 0 0
> > >   OUTLINECOLOR 171 158 137
> > >  END
> > > END
> > >
> > > Thanks in advance.
> > >
> > > Fred
> > >
> > > --
> > > "Everything under the sun is in tune
> > > But the sun is eclipsed by the moon"
> > >
> >
> >
> 
> 
> --
> "Everything under the sun is in tune
> But the sun is eclipsed by the moon"
> 



More information about the mapserver-users mailing list