[Gdal-dev] Label Styles and MapInfo Formats
L Pool
marisap at telkomsa.net
Tue May 25 17:19:20 EDT 2004
Allo Frank,
The Vector Maps I'm currently working with are indeed in MapInfo format.
This issue isn't really more than just an irritation - if you come across
this problem when next you use Style Tools and MapInfo format Vector Maps,
let me know if you get the same problem. For now I can just look for Text
and extract it directly from the OGRField.
Greets!
Louis.
-----Original Message-----
From: gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org]On Behalf Of Frank Warmerdam
Sent: 25 May 2004 10:16
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] Label Styles and MapInfo Formats
L Pool wrote:
> Hi,
>
> I've posted this question before and I'm still stuck with this problem,
> can anybody offer some advice?
>
> I'm using OGR Style String Management to manage the Styles from Vector Map
> Formats. Sofar its been going well. Because I'd like to be able to handle
a
> variety of Vector Maps, I'd like to stick to the common interface provided
> by the OGR Style Tools and Style Definitions. And not delve into the Field
> Definitions of the Vector Tables.
>
> Currently I've hit a bit of a hitch with one of the Vector Formats I've
been
> processing - the Table is defined as (below is an excerpt from the console
> output of my program):
>
> For layer 2
> Layer Schema Definition - Country_Name
> With 3 Field(s)
> Field 1 - Name: "Countries" Type: "String"
> Field 2 - Name: "Longitude" Type: "Double"
> Field 3 - Name: "Latitude" Type: "Double"
> Layer has 64 features
> Layer has a Geographic Spatial Ref
> Layer has bounds - (73.546,-42.04) to (229.78,46.77)
>
> The Geometry is OGRPoint and one would expect that the Point would the
> Lat/Long pair where the Country Name should be placed - but the Style Tool
> is not defined as a Label Tool and the Country Name Text is therefore not
> available by using the Style Tools. For the moment I'm hacking it a bit by
> looking for Fields defined as String when getting an OGRPoint Geometry and
> then extracting the Field Value from the Feature - but I would like to
know
> if there is a more eloquent and generic way to acquire the Text.
Louis,
You don't mention what format you are working with. I will warn you that
only
a few formats (MapInfo and DGN?) actually return styling information via
OGR.
Other formats operate on a pure GIS data level and you have to infer or
supply
the styling information from somewhere else. Many GIS formats have no
styling
information in the basic vector data files (eg Shapefile).
Best regards,
--
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
More information about the Gdal-dev
mailing list