0

I am currently working on a project where I have to convert my data into kml. So, I go through this java package com.esri.arcgisruntime.ogc.kml on the developers website of ESRI.

This package basically provides interfaces and classes for working with Keyhole Markup Language (KML). KML is an XML-based data format that defines a range of geographic data structures such as placemarks, descriptions, ground overlays, paths, and polygons.

With this packages we can:

  • Determines how altitude values should be interpreted.
  • Defines a KML color mode.
  • The list of KML list item types.
  • The list of KML geometry types.
  • KML node refresh statuses.
  • The list of KML graphic types.
  • KML refresh modes.
  • KML tour execution status.
  • A KML units type.
  • The list of view types.
  • List of KML view refresh modes.

Now, I need some working example or reference of this package, so that I can modify my java project accordingly because on the ESRI website , only details of the package are there and there is no such working example that how this package works.

Rizwan
  • 103
  • 4
  • 24

2 Answers2

0

Visit the ArcGIS Runtime SDK for Java sample code page and search for KML at the top of the Table of Contents.

Nixta
  • 464
  • 2
  • 10
  • but there is no pratical example there, just a dictionary refrence –  Oct 26 '21 at 17:59
  • That link is gold, if you follow the instructions you can reach [KML](https://developers.arcgis.com/java/sample-code/create-and-save-kml-file/) and the [full runnable project](https://github.com/Esri/arcgis-runtime-samples-java/tree/main/kml/create-and-save-kml-file). – TWiStErRob Sep 10 '22 at 16:20
0

That library looks good, I reached the same conclusions, but this lib is quite complex, it needs 480 MBs of native code extracted to specific location(s) (see copyNatives in the example project) to execute this code:

val kmlDocument = KmlDocument()
// Call .get() to make sure it's synchronously saved.
kmlDocument.saveAsAsync(File("test.kmz").absolutePath).get()

additionally

  • it needs a custom maven repository reference (mavenCentral is not enough)
  • it might also need a licence

I also looked at other libraries:

TWiStErRob
  • 44,762
  • 26
  • 170
  • 254