Opened 13 years ago
Closed 13 years ago
#3633 closed enhancement (fixed)
Patch to read elevation for KML export from feature attribute
Reported by: | mhugent | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | Output-KML | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: | marco@… |
Description
Recently, I needed an option to take the z-Value for KML export from a feature attribute (and not from the vertex z-Coordinate). This is often useful in combination with the kml option 'relative to ground'. Looking into the source, I couldn't find such an option, thus added a few lines of code that adds this capability. I'm complete beginer in mapserver programming, but maybe the attached patch is of interest for others too.
The mapfile option to enable attribute driven elevation values is: METADATA
'kml_elevation_attribute' '<Name of attribute>'
END
Attachments (2)
Change History (8)
by , 13 years ago
Attachment: | 101207_umn_mapserver_kml_elevation.diff added |
---|
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | 101208_umn_mapserver_kml_elevation.diff added |
---|
comment:2 by , 13 years ago
Thanks, Assefa. Uploaded is an improved patch version (does more safety checking in case a field does not exist)
comment:3 by , 13 years ago
comment:4 by , 13 years ago
Hi Assefa
Sorry the long delay. There is one problem with the commited code. KmlRenderer::mCurrentElevationValue needs to be float, not double. Otherwise, there will be a segfault.
With current trunk, I also have the problem that there are no coordinates generated for some of my KML layers. However, I was not able to find the reason for it so far.
Marco
comment:5 by , 13 years ago
Milestone: | → 6.0 release |
---|
Hi Marco,
I am cleaning up bugs for the upcoming 6.0 release. Reading this, I am not sure why the there would be a segfault. The lineBuf size seems to be enough to accommodate both types or am I missed something?
As for the 2nd issue, I can look into if it make sense, provided a file/map.
Thanks
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
please reopen if there is a problem.
Hi Marco,
Thanks a lot. I will review/commit this tonight or tomorrow.
best regards,