Giter Club home page Giter Club logo

cc-shapefiles's Introduction

cc-shapefiles

These are utilities for performing in-memory geometry computations on countries and timezones.

There are three libraries that are pushed to maven.

timezone_revgeo

@ http://mvnrepository.com/artifact/com.foursquare/timezone_revgeo_2.10

given a lat,lng - return the olson timezone that contains it. based on http://efele.net/maps/tz/world/

usage:

scala> com.foursquare.geo.quadtree.TimeZoneRevGeo.getNearestTZ(40.74, -74.0)
res1: Option[String] = Some(America/New_York)

country_revgeo

@ http://mvnrepository.com/artifact/com.foursquare/country_revgeo_2.10

given a lat,lng - return the country that contains it. Currently assigns golan heights to syria, need to fix that. Based on quattroshapes countries.

usage:

scala> com.foursquare.geo.quadtree.CountryRevGeo.getNearestCountryCode(40.74, -74.0)
res3: Option[String] = Some(US)

timezone_lookup

@ https://oss.sonatype.org/content/repositories/releases/com/foursquare/timezone_lookup_2.10/ - coming soon to maven

given an olson timezone, return the geometry of the timezone polygon. based on http://efele.net/maps/tz/world/.

scala> com.foursquare.geo.quadtree.TimeZoneLookup.getTimeZoneGeometry("America/New_York")
res0: Option[com.vividsolutions.jts.geom.Geometry] = Some(MULTIPOLYGON (((-75.10046386615377 19.89988803775289, -75.08932966584179 19.60234481426834, -75.18104879659076 19.60234481357291, -75.23610687355463 19.889681816012217, -75.22768020652941 19.8909950266109, -75.22363662751913 19.89228725528046, -75.21430969648974 19.895650863229406, -75.24825286868851 19.90054607290844, -75.24827957146195 19.90054416556748, -75.24827957248903 19.900544166858886, -75.23229217629297 19.903871537068184, -75.23229217629297 19.904035568219594, -75.2323226938709 19.904897689838798, -75.23230743508203 19.905681610116662, -75.23

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.