Subscribe to this thread
Home - General / All posts - csv - table- kml?? help
Ninjalandpirate31 post(s)
#29-Dec-14 20:20

Hi I'm trying to convert a CSV of UK repeater mast locations into a kml file so i can use with google maps on the move. I've tried all kinds of things.

I am able to import into manifold as a table, then copy, pasting as a drawing but cannot successfully export as kml as presumably location information needs to be identified. i.e columns containing long/lat/

I've used GPS visualiser to sucsesfully convert the csv to kml with the wpts for each mast appearing in the correct location however all atribute information is stripped out.

So in manifold i have two problems, I am unable to define the columns containing location information and i then need to know how to, when exporting specify multiple values in teh description field of the export box.

i kinda feel like i have half an idea about whats going on, would love some guidance. I have included the csv if anyone w=ants to take a look.

thanks in advance.

O

Attachments:
repeaterlist.csv

cartomatic

905 post(s)
#29-Dec-14 21:14

When you paste the imported csv table as a drawing you should specify the lon/lat columns and tick the lon/lat checkbox.

Then when exporting, your kml will be just fine.

During the kml export you have to specify the name & description columns and heights if needed. Then when naming the file you should explicitly specify whether it's gonna be kml or the compressed kmz - give the extension to the file.

Kml description is html, so you can customise the way it's displayed. In order to combine many fields into one description field you can use active column, sql, etc.

See the attached for an example of the active column based solution (right click the column and choose recompute).

Attachments:
rptr.kml
rptr.map


maps made easy - www.cartomatic.pl || www.cartoninjas.net

Ninjalandpirate31 post(s)
#29-Dec-14 21:42

Thankyou, I'm looking at your example now to help me try to include the attribute fields in the KML description.

thankyou

Also just massive fail in posting in the wrong section. ADMIN please move and apologies.

Ninjalandpirate31 post(s)
#29-Dec-14 21:49

Would i adapt your script as follows

using Manifold.Interop.Scripts;

class Script {

static object Func() {

return

"<h5>" +

Context.Record.get_Data("repeater") +

"</h5>" +

"<p>" +

Context.Record.get_Data("band") + ("tx1") + ("rx1") and so on

" " +

"<i>" +

Context.Record.get_Data("channel") +

"</i>" +

"</p>";

}

}

Im kinda way out of my depth here as ive never gone this deep with manifold.

O

cartomatic

905 post(s)
#30-Dec-14 08:20

Context.Record.get_Data("band") + ("tx1") + ("rx1") and so on

will not work

Context.Record.get_Data("columnName")

will

so

Context.Record.get_Data("band") + Context.Record.get_Data("tx1") + Context.Record.get_Data("rx1")

and perhaps some white space between


maps made easy - www.cartomatic.pl || www.cartoninjas.net

Ninjalandpirate31 post(s)
#31-Dec-14 15:43

ok thank you! really helpfull. I'm kind of getting somewhere now i understand what you have done, you have created an additional (active)column in the attributes table and somehow its linked to the script. i have modified the script and got everything i need on there as well as getting to appear just about how i like it but for some reason the text is shrinking progressively with each return? why would this be?

I've also tried to add titles, it may be simpler if it was presented in a table but i think that may be a little far away from what i am capable of.

I have attached the files for your review.

cheers

Attachments:
Manifold.exe
Repeaterlist.kml

Ninjalandpirate31 post(s)
#31-Dec-14 15:43

ok thank you! really helpfull. I'm kind of getting somewhere now i understand what you have done, you have created an additional (active)column in the attributes table and somehow its linked to the script. i have modified the script and got everything i need on there as well as getting to appear just about how i like it but for some reason the text is shrinking progressively with each return? why would this be?

I've also tried to add titles, it may be simpler if it was presented in a table but I think that may be a little far away from what i am capable of.

I have attached the files for your review.

cheers

Attachments:
Manifold.exe
Repeaterlist.kml

jkelly


1,234 post(s)
#01-Jan-15 22:15

I'd say you are pretty close, but without seeing your code, I'd take a guess that there is something funny with your html, maybe a missing bracket?

Perhaps try just putting each individual value between <p></p> to start off with, then gradually add the other stylings (<h4>,<i>) etc.

HTML Tables aren't too hard, have a look at w3 schools and play around, you may be able to get something more like what you want.

Attachments:
rptr.map


James Kelly

http://www.locationsolve.com

Ninjalandpirate31 post(s)
#02-Jan-15 16:05

ha, im such a plonker, first i list my thread in the forum section! then i try to upload manifold.exe!

I'll have a go, fyi here is what i meant to originally attach.

Attachments:
Repeater-project.map

cartomatic

905 post(s)
#02-Jan-15 16:14

indeed. you've got some tags messed up.

- not closed hading <h5> tag

- closing for italic <i> and paragraph <p> but you never open them.

So you can either remove them or quickly read through the suggested w3 schools ;)


maps made easy - www.cartomatic.pl || www.cartoninjas.net

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.