Referencing local image storage in KML

1,581 views
Skip to first unread message

rfrank5356

unread,
Jun 8, 2009, 10:15:51 AM6/8/09
to KML Developer Support - Advanced Support for KML
Hi - I have an app that locates targets in urban areas from hi-res
aerial photos that I take. I then create a kml file of these targets,
including tabular data and references to image snippet extracts from
the master images, and give the kml to my customers.

Everything works - except that I have to store the images on a web
server - instead of a local mapped drive at the customer location. As
there are now 30,000 (and climbing) targets and 50-ish customers, it
is getting to be a challenge to host all of these image files on my
web server instead of having the customer use their local copy of the
files,

This is identical to a prior post that was never answered - see Local
File references in KML
http://groups.google.com/group/kml-support-getting-started/browse_thread/thread/3240ee844d0755e2/d5e0f0a1ccbe9f6a?q=%22Referencing+local%22+OR+%22local+image%22+OR+%22image+storage%22+OR+%22storage+in%22+OR+%22in+KML%22&lnk=sbp#d5e0f0a1ccbe9f6

Thanks for the assistance !

Roman N

unread,
Jun 12, 2009, 7:21:33 PM6/12/09
to KML Developer Support - Advanced Support for KML
Hi rfrank5356,

You can package up everything into a KMZ file, which is just a zip
file containing a KML file and folders of resources. You can then use
relative paths in your KML.

Another option is to have your users turn on the 'Allow placemark
balloons to access local files...' option in the Options/Preferences >
General tab, after which you should be able to use relative paths
outside of KMZ files.

Hope that helps,
Roman

On Jun 8, 7:15 am, rfrank5356 wrote:
> Hi - I have an app that locates targets in urban areas from hi-res
> aerial photos that I take. I then create a kml file of these targets,
> including tabular data and references to image snippet extracts from
> the master images, and give the kml to my customers.
>
> Everything works - except that I have to store the images on a web
> server - instead of a local mapped drive at the customer location. As
> there are now 30,000 (and climbing) targets and 50-ish customers, it
> is getting to be a challenge to host all of these image files on my
> web server instead of having the customer use their local copy of the
> files,
>
> This is identical to a prior post that was never answered - see Local
> File references in KMLhttp://groups.google.com/group/kml-support-getting-started/browse_thr...

rfrank5356

unread,
Jun 20, 2009, 3:54:09 PM6/20/09
to KML Developer Support - Advanced Support for KML
Hi Roman

Thanks for the response.

The KMZ option is not feasable, as the compressed file sizes would be
large - and the data in the kml changes while the image set remains
static.

I have looked on both the Pro version and the free version and have
set the option (in the pro version) - 'Allow placemark balloons to
access local files...

I still get an error that the file cannot be found - the KML string
for the file location is

<tr><td>Snippet File </td><td><b><A HREF="J:\AerialSurvey
\MosquitoDistricts\Coachella Valley\CVMVCD20090111\Snippets
\1E3V0147A.jpg">1E3V0147A</a></b></td></tr>

The error message seems sort of like a mal-formed unix string

Cannot Find File
file:///J:%255CAerialSurvey/%255CMosquito . . . etc.

What am I doing wrong?

Thanks
Bob

StarTraX

unread,
Jun 22, 2009, 2:42:47 AM6/22/09
to KML Developer Support - Advanced Support for KML
Have you tried the URL format:
HREF="file:///J:/AerialSurvey/MosquitoDistricts/Coachella Valley/ ....
" using the forward slash instead of the (DOS) backslash?

rfrank5356

unread,
Jul 20, 2009, 3:45:07 PM7/20/09
to KML Developer Support - Advanced Support for KML
Hi – Apologies for the long cycle time – here are the results.



On the system where the J drive is mounted (and also mapped as the J:
drive – the link works.

On the adjacent system, where I have a mapped J: drive, this does not
work.

Starting with the google.com page displayed at the bottom of the
screen, clicking on the link in the placemark box gives no detectable
results. The iGoogle page is still there, no errors reported (I do
have the “show Prompt for All Errors” turned on.

The issue seems to be that GE is defeating the drive mapping
capability in XP – or is the problem with IE?

Thanks for the help

Bob

Here is the text from the Properties display

<br>
<a href="file:///J:/AerialSurvey/MosquitoDistricts/
SantaClaraCountyMVCD/SCMAD20090516/Snippets/1E3V7841C.jpg"> Empty
Pool</a><br>
<br><br>
<table border="1" cellpadding="0" cellspacing="0">
<tr><td>Data Set</td><td><b>SCMAD20090516</b></td></tr>
<tr><td>Serviced</td><td><b> , </b></td></tr>
<tr><td>Approx Address</td><td><b>1618 Butano Dr, Milpitas, CA, 95035
</b></td></tr>
<tr><td>Snippet File </td><td><b><a href="file:///J:/AerialSurvey/
MosquitoDistricts/SantaClaraCountyMVCD/SCMAD20090516/Snippets/
1E3V7841C.jpg"> </a></b></td></tr>
</table>

Here is the kml . . .

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>Aerial Services Pool Survey</name>
<open>1</open>


<Style id="EmptyPoolStyle">
<IconStyle id="EmptyPoolIcon">
<Icon>
<href>http://maps.google.com/mapfiles/kml/paddle/wht-
circle.png</href>

</Icon>
</IconStyle>
</Style>

<Style id="Photo">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>root://icons/palette-4.png</href>
<x>32</x>
<y>128</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>

<Folder>
<name>SCMAD20090516</name>
<open>1</open>
<Folder>
<name>Empty Pool</name>
<Placemark>

<name>1E3V7841C:Empty Pool</name>
<Snippet maxLines="2"></Snippet>
<styleUrl>EmptyPoolStyle</styleUrl>
<description><![CDATA[
<br>
<a href="file:///J:/AerialSurvey/MosquitoDistricts/
SantaClaraCountyMVCD/SCMAD20090516/Snippets/1E3V7841C.jpg"> Empty
Pool</a><br>
<br><br>
<table border="1" cellpadding="0" cellspacing="0">
<tr><td>Data Set</td><td><b>SCMAD20090516</b></td></tr>
<tr><td>Serviced</td><td><b> , </b></td></tr>
<tr><td>Approx Address</td><td><b>1618 Butano Dr, Milpitas, CA, 95035
</b></td></tr>
<tr><td>Snippet File </td><td><b><A HREF="file:///J:/AerialSurvey/
MosquitoDistricts/SantaClaraCountyMVCD/SCMAD20090516/Snippets/
1E3V7841C.jpg"> </a></b></td></tr>
</table>
]]></description>
<TimeStamp>
<when>118</when>
</TimeStamp>
<Point>
<altitudeMode>clampedToGround</altitudeMode>
<coordinates>-121.8686857,37.42035067,5862.032</coordinates>
</Point>
</Placemark>

</Folder>
</Folder>
</Document>
</kml>
> > Bob- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages