User:Afernandez

From OpenStreetMap Wiki
Jump to navigation Jump to search

Comandos útiles

Una lista de comandos utiles relacionados con OSM que yo utilizo, para tener aquí como referencia y por si a alguien le pueden ser de utilidad

Ejecutar el ultimo josm

#!/bin/sh
cp josm-latest.jar josm-latest.jar.0
wget -N http://josm.openstreetmap.de/download/josm-latest.jar
java -Djava.net.preferIPv4Stack=true -jar -Xmx2048M josm-latest.jar

Convertir nmea a gpx y googleearth simplificando la traza

#!/bin/bash
if [ -z "$1" ] ; then
echo "Takes a list of inout NMEA files, converts to GPX files."
echo  "usage: ./convert <nmea_input_files>"
exit 0
fi
mkdir -p gpx
mkdir -p kml
for file in "$@"; do
if [ ! -e "$file" ]; then
 echo "$file input file doesn't exist, Skipping."
else
 base=`basename $file .txt`
  gpsbabel -t -i nmea -f "$file" -x track,pack -x simplify,error=0.001k -x position,distance=1m -x discard,hdop=10 -o kml,units=m -F "kml/$base.kml" -o gpx -F "$base.gpx"
  zip -9qjm "kml/$base.kmz" "kml/$base.kml"
fi
done