I am geocoding a list of addresses and would like to write them directly to a ov2 file. I have a php script that does the job, but have no idea how to convert it to applescript.
$csv=file(“File.csv”);
$nbcsv=count($csv);
$file=“POI.ov2”;
$fp = fopen($file, “w”);
for ($i = 0; $i < $nbcsv; $i++) {
$table = split(“,”,chop($csv[$i])); // Every ligne in this type: longitude,latitude,description
$lon = $table[0];
$lat = $table[1];
$des = $table[2];
$TT = chr(0x02).pack(“V”,strlen($des)+14).pack(“V”,round($lon100000)).pack(“V”,round($lat100000)).$des.chr(0x00);
@fwrite ($fp, “$TT”);
}
fclose($fp);
Many thanks and Happy new year!
Todd
update: I mistyped the title of this thread it should be exporting to binary