Skip to content

ahcarpenter/spreader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spreader Build Status Gem Version

Installation

spreader can be installed via the execution of the following command:

gem install spreader

Usage

Given an XML file containing one node formatted in the following manner:

<coordinates>longitude_in_decimal_degrees,latitude_in_decimal_degrees[, altitude_in_decimal_degrees]</coordinates>

The method call is thus:

Spreader.sow(path_to_xml, model_name, latitude_field_name, longitude_field_name)

Given an XML file containing nodes formatted in the following manner:

<name>
	<coordinates>longitude_in_decimal_degrees,latitude_in_decimal_degrees[, altitude_in_decimal_degrees]</coordinates>
	<coordinates>longitude_in_decimal_degrees,latitude_in_decimal_degrees[, altitude_in_decimal_degrees]</coordinates>
</name>

The method call is thus:

Spreader.sow(path_to_xml, model_name, latitude_field_name, longitude_field_name)

Given a newline delimited CSV file containing one or more lines formatted in the following manner:

longitude_in_decimal_degrees,latitude_in_decimal_degrees

The method call is thus:

Spreader.sow(path_to_csv, model_name, latitude_field_name, longitude_field_name)

About

Spreader is a gem which provides database-agnostic methods for facilitating the injection of coordinates into a data store.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages