Hi Monks,

First of all, I am new to Perl but not so new to programming. Anyway I am loving Perl more than Java or Pascal... Is fun.

Well, to the point:

I wanna do the following script for my job:

I analyze metrics,KPIs and all that telecom stuff.

So, I want to convert all the data into a KML file to be able to see it in Google earth.

For example, I got in Melbourne 3 Base station and around them I have 50% of drops calls. so this data I have it in Excel but I am trying to make a script to be able to see it from google earth in a Choropleth Map (http://en.wikipedia.org/wiki/Choropleth_map)

So, I am trying to use Geo::KML::PolyMap but when I am running my code the following error comes up:

"Not an ARRAY reference at C:\Myperl\perl\site\lib\Geo\KML\PolyMap.pm"

So it can be a bug or I am doing something wrong.

Finnaly, the fact is that I am basically copying and pasting the code from CPAN and Testing/running to see if it works.

The code is the following:

#!/usr/bin/perl # Tratando de crear un programa que lea, realices unas condiciones y c +rea un nuevo archivo xlsx con el resultado use strict; use warnings; system qw"cls"; use Geo::KML::PolyMap qw(generate_kml_file generate_kmz_file); my $poly = "((144.9659,-37.8136),(144.9577,-37.81864),(144.9707,-37.81 +46),(144.9659,-37.8136))"; my $data = 'DCR '; my $entities = { data => $data, polygon => $poly}; # Clusters "Total Population" data for "Foobar City" in $entities into + 5 bins; # renders using colors from $startcolor to $endcolor; # generates a legend; renders output to file handle passed in $kmz_fil +ehandle generate_kmz_file(entities => $entities, placename => "Foobar City", data_desc => "Total Population", nbins => 5, kmzfh => 'C:\Myperl\data\maptest.kml', startcolor => "FFFF0000", endcolor => "FF00FF00"); # As above, but without a legend generate_kml_file(entities => $entities, placename => "Foobar City", data_desc => "Total Population", nbins => 5, kmlfh => 'C:\Myperl\data\maptest.kml', startcolor => "FFFF0000", endcolor => "FF00FF00");
Thanks you!!!!!!!!!!!!!!!!!!!!!!!

In reply to Creating a kml file by RFMonk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.