Problems with Positioning Names from MapInfo TAB file {Scanned} {Scanned}

Siki Zoltan siki at AGT.BME.HU
Tue Sep 28 14:20:15 EDT 2004


Hi,

I had the same problem some weeks ago.
I failed to use auto styling for mapinfo text elements, so i
convert the text to line item and the text is an attribute of the
line element. Then i created a annotation layer in mapserver with
angle auto.

I wrote the program in mapbasic, if you have mapinfo i send it to you.

bye
Zoltan

On Tue, 28 Sep 2004, Bob Bruce wrote:

> Hi:
>     I am trying to use a TAB file that has names positioned on blockfaces.
> In the MapInfo ProViewer (a free viewer from MapInfo) I can view the file
> and see the street annotation positioned at the various angles that they run
> along the streets. But when I try and display this in MapServer I only get
> them positioned horizontally. I tried using the LABEL object but it wouldn't
> display them at all so I reverted to the STYLEITEM "AUTO" command and it put
> the labels out but only horizontally.
>
>    Does anyone know how to get MapServer to use the angles stored with the
> text in the file? My map file is included below. The blckface file has both
> lines for blockfaces and text elements in it. Here is some same output from
> the OGRINFO program:
>
> OGRFeature(ST_VITAL_BONIFACE_BLKFACE):4532
>   ID (Integer) = 6152
>   Style = PEN(w:1px,c:#d9bb15,id:"mapinfo-pen-2.ogr-pen-0")
>   LINESTRING (634272.418 5523967.692,634279.402 5523966.363)
>
> OGRFeature(ST_VITAL_BONIFACE_BLKFACE):4533
>   ID (Integer) = 6209
>   Style = LABEL(t:"KINGSTON",a:358.700000,s:15.996744g,c:#000000,p:1,f:"Arial")
>   POINT (634312.023 5524049.501)
>
> OGRFeature(ST_VITAL_BONIFACE_BLKFACE):4534
>   ID (Integer) = 6498
>   Style = PEN(w:1px,c:#d9bb15,id:"mapinfo-pen-2.ogr-pen-0")
>   LINESTRING (634214.639 5524099.705,634218.473 5524099.606,634229.861
> 5524098.786)
>
> OGRFeature(ST_VITAL_BONIFACE_BLKFACE):4535
>   ID (Integer) = 6640
>   Style = PEN(w:1px,c:#d9bb15,id:"mapinfo-pen-2.ogr-pen-0")
>   LINESTRING (634211.638 5523974.631,634214.078 5523973.711,634223.050
> 5523971.702,634226.793 552397
> 1.362)
>
> OGRFeature(ST_VITAL_BONIFACE_BLKFACE):4536
>   ID (Integer) = 1893
>   Style = LABEL(t:"VICTORIA
> GR",a:333.600000,s:15.996744g,c:#000000,p:1,f:"Arial")
>   POINT (634252.281 5522621.452)
>
> here you can see both text and lines.
>
> thanks,
>        Bob Bruce
>
> NAME St_Boniface_Vital_s2ex1
> # EXTENT 632862.444326 5510719.468992 642031.781954 5529899.634924
> # EXTENT 633000 5521000 641000 5528000
> EXTENT 633850 5525850 635050 5527050
> SIZE 400 400
>
> LAYER # Polling Subdivision
>   NAME "Polling Subdivision"
>   CONNECTIONTYPE OGR
>   CONNECTION
> "C:/Apache/htdocs/MapserverTutorial/StBonifaceStVital/St_Boniface_Vital_Data/PollingSubDivision.tab"
>   STATUS DEFAULT
>   TYPE POLYGON
>   CLASS # Polling Subdivision <= 250
>     NAME "Polling Subdivision <= 250"
>     EXPRESSION ([Population] <= 250)
>     COLOR 255 204 204
>     OUTLINECOLOR 0 0 0
>   END # end of Whole DLS Parcel class object
>   CLASS # Polling Subdivision <= 500
>     NAME "Polling Subdivision <= 500"
>     EXPRESSION ([Population] <= 500)
>     COLOR 250 128 128
>     OUTLINECOLOR 0 0 0
>   END # end of Part DLS Parcel class object
>   CLASS # Polling Subdivision <= 750
>     NAME "Polling Subdivision <= 750"
>     EXPRESSION ([Population] <= 750)
>     COLOR 255 40 40
>     OUTLINECOLOR 0 0 0
>   END # end of Part DLS Parcel class object
>   CLASS # Polling Subdivision <= 1000
>     NAME "Polling Subdivision <= 1000"
>     EXPRESSION ([Population] <= 1000)
>     COLOR 200 0 0
>     OUTLINECOLOR 0 0 0
>   END # end of Part DLS Parcel class object
> END # end of layer object
>
> LAYER # Street Lines
>   NAME "Street Lines"
>   CONNECTIONTYPE OGR
>   CONNECTION
> "C:/Apache/htdocs/MapserverTutorial/StBonifaceStVital/St_Boniface_Vital_Data/st_Vital_Boniface_blkface.tab"
>   STATUS DEFAULT
>   TYPE LINE
> # STYLEITEM "AUTO"
>   CLASS
>     STYLE
> #     COLOR 255 146 36
>       COLOR 255 255 0
>     END
>   END
> END
>
> LAYER # Street Names
>   NAME "Street Names"
>   CONNECTIONTYPE OGR
>   CONNECTION
> "C:/Apache/htdocs/MapserverTutorial/StBonifaceStVital/St_Boniface_Vital_Data/st_Vital_Boniface_blkface.tab"
>   STATUS DEFAULT
>   TYPE ANNOTATION
>   STYLEITEM "AUTO"
>   CLASS
> #   LABEL
> #     ANGLE AUTO
> #     COLOR 0 0 0
> #     COLOR 43 255 177
> #     SIZE SMALL
> #     TYPE BITMAP
> #   END
>   END
> END
>
> END # end of map file
>



More information about the mapserver-users mailing list