[Gdal-dev] Converting style info to attributes
Frank Warmerdam
warmerdam at pobox.com
Tue Dec 16 14:03:08 EST 2003
Tyler Mitchell wrote:
>
>
>
> Using OGR, I want to take a DGN file and convert it to another format
> (shape or postgis). I want to take the styling information from DGN and
> store it as attributes in the output format. Are these exposed anywhere
> that I can get at with Python? I see that Mapserver gets access to them,
> but I assumes it through the c api. I also assume I can't do this with the
> ogr2ogr utility. Any thoughts?
Tyler,
I haven't tested it, but I see there is a GetStyleString() and SetStyleString()
method on the ogr.Feature() in Python. So you can use the GetStyleString()
to fetch the style, but you will need to put it in a regular attribute yourself
if you are writing to PostGIS or Shapefile. Also, I don't think there is any
mechanism to tell MapServer to use a regular attribute as the source of
the style string, though I can see that this would be very useful.
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
More information about the Gdal-dev
mailing list