[gdal-dev] Point SYMBOL

Alexandre Busquets abusquets at gmail.com
Mon Oct 27 16:59:48 PDT 2014


Hi,

I'm writing  a shp to dxf converter and I have a problem with the points.
The style is not applied (I only see a small point).
I have not problem with the lines and the polygons, only with the points.

This is a sample of my code adapted for this email.

data_source = ogr.GetDriverByName('DXF').CreateDataSource(fitxer_desti,
['HEADER=header.dxf'])

lyr = None

try:
    lyr = data_source.CreateLayer('entities')
except Exception:
    raise FitxerException('Can not open')


dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn())

style = 'SYMBOL(id:ogr-sym-3,c:#FF0000,s:50px)'

dst_feat.SetStyleString(style)
dst_feat.SetGeometryDirectly(geom)
dst_feat.SetField('Layer', 'points_sample')
lyr.CreateFeature(dst_feat)


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20141028/6367d101/attachment-0001.html>


More information about the gdal-dev mailing list