obsidian-map-view icon indicating copy to clipboard operation
obsidian-map-view copied to clipboard

Allow for KML parsing

Open mofosyne opened this issue 6 months ago • 5 comments

I noticed that in google earth you can copy locations as KML, it typically looks like this

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Placemark id="1.2.1">
	<name>44 Martin Pl</name>
	<address>44 Martin Pl, Sydney NSW 2000</address>
	<snippet>44 Martin Pl, Sydney NSW 2000</snippet>
	<description><![CDATA[<!DOCTYPE html><html><head></head><body><script type="text/javascript">window.location.href="https://www.google.com/earth/rpc/entity?lat=-33.8673204&lng=151.20955569999998&fid=0x6b12ae402314345f:0xbbdef08fbbf2089&hl=en&gl=au&client=earth-client&cv=7.3.6.9345&useragent=GoogleEarth/7.3.6.9345(X11;Linux (5.15.0.0);en;kml:2.2;client:Pro;type:default)";</script></body></html>]]></description>
	<styleUrl>#geocode</styleUrl>
	<ExtendedData>
		<Data name="placepageUri">
			<value>https://www.google.com/earth/rpc/entity?lat=-33.8673204&amp;lng=151.20955569999998&amp;fid=0x6b12ae402314345f:0xbbdef08fbbf2089&amp;hl=en&amp;gl=au&amp;client=earth-client&amp;cv=7.3.6.9345&amp;useragent=GoogleEarth/7.3.6.9345(X11;Linux (5.15.0.0);en;kml:2.2;client:Pro;type:default)</value>
		</Data>
	</ExtendedData>
	<MultiGeometry>
		<Point>
			<coordinates>151.2095557,-33.8673204,0</coordinates>
		</Point>
		<LinearRing>
			<coordinates>
				151.205922688165,-33.8700451588762,0 151.205922688165,-33.8645956411238,0 151.213188711835,-33.8645956411238,0 151.213188711835,-33.8700451588762,0 151.205922688165,-33.8700451588762,0 
			</coordinates>
		</LinearRing>
	</MultiGeometry>
</Placemark>
</kml>

Might be worth being able to parse this to generate a front matter or geolink

mofosyne avatar Dec 08 '23 07:12 mofosyne