Giter Club home page Giter Club logo

csv2map's Introduction

CSV 2 Map

This project is a collection of simple Python 2.7.x scripts designed to take a CSV file of lat/lon point data and plot it in a more geographic format.

Currently, the two geographic formats supported are KML and ESRI-formatted shapefiles. These utilities are described in more detail below.

CSV 2 KML

Purpose of this utility

This utility is not meant to be a general solution to creating KML files. Instead, it is a simple tool to create a set of point markers in Google Earth.

This tool has grown out of the need to occasionally look at geographic point data. There are obviously many ways to do that, but I found this script to be the fastest.

To the student, this file will also serve as an introductory example of object-oriented programming in Python.

Input file formatting

The only thing absolutely required by this script is that the input CSV file has at least two columns: lat and long. The script is forgiving as to the spelling of these names: Lat, lat, Latitude, Lon, long, Longitude, LongITUdE, et cetera.

As a bonus, this script will make use of the time slider in Google Earth if there is a column labeled "datetime".

Flags and Options

-i: input CSV path (default is ./locations.csv)
-o: output KML path (default is /path/to/filename.csv)
-p: map icon path (default is a circle)

CSV 2 SHP

Purpose of this utility

This utility is not meant to be a general solution to creating shapefiles. Instead, it is a simple tool to place a set of points into a shapefile.

Requirements

Because ESRI shapefiles are a proprietary, binary format, and involve projection math, some non-standard Python libraries are used. In order to run this script, you will need to install OSGEO and PYPROJ.

Input file formatting

The only thing absolutely required by this script is that the input CSV file has at least two columns: lat and long. The script is forgiving as to the spelling of these names: Lat, lat, Latitude, Lon, long, Longitude, LongITUdE, et cetera.

Flags and Options

-i: input CSV path (no defaults)
-o: output Shapefile path (default is /path/to/your_csv.shp)
-p: map projection (default is currently a California Lambert grid)

csv2map's People

Contributors

john-science avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

csv2map's Issues

pep8 and pylint

Run pep8 and pylint on this script, to check its formatting.

Make scripts more uniform

Their API, and usage statements could be more uniform.

Also... should they create their output dir, if it doesn't yet exist?

Are they both callable remotely, or do they depend on the local path?

Works with Python 3.x?

I want to re-target the Python versions > 3.2. I believe I wrote the project originally under Python 2.7, but it's so small it should be easy to update.

Classify csv2shp

This would be easier to import from another script if it were a single class, with no globals.

Path Dependent?

It would be nice if these scripts were path independent.

By which I mean... it would be nice if these scripts were easy to run from Cron, without anything in them assuming things about the local path.

csv2what?

Perhaps there are some other utilities that would fit well here:

csv2geotiff
csv2netcdf
csv2netcdf3
csv2netcdf4

Default Projection?

Perhaps the Equirectangular projection?

+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs

Rename Repo

Making something like "plotting CSV points"

csv2plots
plot_geo_csv_points
map_csv_locations
csv2map

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.