Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3918 closed defect (fixed)

LIBKML: units for style should be set to pixel

Reported by: assefa Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc: winkey


When using the libxml driver some style elements (such as the width in a Pen tool) should have the units set to pixel (instead of the default, which I believe is mm). Something like this should be the expected result: PEN(c:#FF00007F,w:4.000000px)

Without the unit element, I run into issues when trying to use MapServer with OGR (and auto styling).

Attachments (1)

bug_3918.patch (553 bytes ) - added by assefa 12 years ago.
patch for the pen tool (partial patch)

Download all attachments as: .zip

Change History (7)

by assefa, 12 years ago

Attachment: bug_3918.patch added

patch for the pen tool (partial patch)

comment:1 by assefa, 12 years ago

Component: defaultOGR_SF

I have applied the partial patch to allow unit settings on pen tools. With that change I was able to dsiplay the my kml properly in MapsServer. I believe it also make sense to do it on the symbol tool but I have not yet tested it.

comment:2 by Even Rouault, 12 years ago

Cc: winkey added

comment:3 by winkey, 12 years ago

pen style is supposed to default to pixel width, but apparently this is not the case?

Pen Width - Expressed in a valid unit type (g, px, pt, mm, cm, in) Suggested default: 1 pixel Examples: PEN(c:#FF0000,w:5px), PEN(w:3pt), PEN(w:50g)

comment:4 by winkey, 12 years ago

Resolution: fixed
Status: newclosed

change applied to svn

rush@octopi ~ $ LIBKML_RESOLVE_STYLE=yes ogrinfo -al testy.kml INFO: Open of `testy.kml'

using driver `LIBKML' successful.

Layer name: testy Geometry: Unknown (any) Feature Count: 1 Extent: (-112.265697, 36.079550) - (-112.254928, 36.086496) Layer SRS WKT: GEOGCS["WGS 84",


SPHEROID["WGS 84",6378137,298.257223563,


TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]],






Name: String (0.0) description: String (0.0) timestamp: DateTime (0.0) begin: DateTime (0.0) end: DateTime (0.0) altitudeMode: String (0.0) tessellate: Integer (0.0) extrude: Integer (0.0) visibility: Integer (0.0) OGRFeature(testy):1

Name (String) = Absolute Extruded description (String) = Transparent green wall with yellow outlines timestamp (DateTime) = (null) begin (DateTime) = (null) end (DateTime) = (null) altitudeMode (String) = absolute tessellate (Integer) = 1 extrude (Integer) = 1 visibility (Integer) = -1 Style = PEN(c:#FFFF007F,w:4.000000px);BRUSH(fc:#00FF007F) LINESTRING (-112.255078533779098 36.079549521456471 2357,-112.254927703973806 36.081170834921217 2357,-112.255250506906293 36.082607613072788 2357,-112.256454015837605 36.083956605885056 2357,-112.258023897644904 36.08511401044813 2357,-11

2.259521848902196 36.085843552393939 2357,-112.260821634755203 36.086126345485887 2357,-112.262073428655995 36.086260190851469 2357,-112.263320492849502 36.086215198600911 2357,-112.264496384644403 36.086278979452743 2357,-112.26569695545890 7 36.086495990906442 2357)

comment:5 by winkey, 12 years ago

assefa I would be interested in seeing what you come up with for point style

if your tests are decent please file another ticket

Thanks Brian

comment:6 by assefa, 12 years ago

Thanks. I will report on symbols or other things as I continue using the driver.

Note: See TracTickets for help on using tickets.