Giter Site home page Giter Site logo

opensmock / geotools Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 64 KB

Geographic Tools as Coordinates, Kinematics and Geodesic utilities for Map Projection.

License: MIT License

Smalltalk 100.00%
cartesian-coordinates coordinates course geographic heading kinematics open-smock pharo polar-coordinates position

geotools's Introduction

License Pharo 11 CI Pharo 12 CI

GeoTools

Geographic Tools as Coordinates, Kinematics and GeodesicUtilities.

Coordinates tools

Use these classes to store informations on geographical position in different coordinates system.

Absolute coordinates

Use AbsoluteCoordinates to store an absolute coordinate.

Absolute coordinate is build by latitude (degrees or radians), longitude (degrees or radians) and altitude (meters).

Example : create absolute coordinates.

coord1 := AbsoluteCoordinates latitudeInDegrees: 48.3897 longitudeInDegrees: -4.48333 altitudeInMeters: 52. "Brest french city position"
coord2 := AbsoluteCoordinates latitudeInDegrees: 48.8667 longitudeInDegrees: 2.33333 altitudeInMeters: 79. "Paris french city position"

Cartesian coordinates

Use CartesianCoordinates to store a cartesian coordinate.

Cartesian coordinate is build by x (meters), y (meters) and z (meters).

Example : create cartesian coordinates.

coord := CartesianCoordinates xInMeters: 2 yInMeters: 5 zInMeters: 1.

Polar coordinates

Use PolarCoordinates to store a polar coordinate.

Polar coordinate is build by azimuth (radians), distance (meters) and elevation (meters).

Example : create polar coordinates.

coord := PolarCoordinates azimuthInRadians: 0 distanceInMeters: 50 elevationInMeters: 20.

Convert a polar coordinate into cartesian coordinates.

polarCoord := PolarCoordinates zero. "This constructor create a polar coordinates initialized at zero point"
cartCoord := polarCoord asCartesianCoordinates.

Common coordinates features

To know if a coordinate is valid :

coord isValid.

To know if a coordinate is empty :

coord isEmpty.

There are a lot of functionnaly to discover.

Kinematics tools

Use Kinematics to store informations on course (direction in degrees or radians), speed (m/s, knots) and heading (orientation in degrees or radians).

Example : create kinematics information.

kin := Kinematics new.
kin groundSpeedInMetersPerSeconds: 50.
kin courseInDegrees: 180.
kin headingInDegrees: 2.

Map projection

Geodesic Utilities class

Use GeodesicUtilities to compute angle and distance between Geodesic (lat/long) coordinates, taking in account the earth curve.

"Brest french city position"
coord1 := AbsoluteCoordinates latitudeInDegrees: 48.3897 longitudeInDegrees: -4.48333 altitudeInMeters: 52.
"Paris french city position"
coord2 := AbsoluteCoordinates latitudeInDegrees: 48.8667 longitudeInDegrees: 2.33333 altitudeInMeters: 79.

"Return an azimuth in Radians between the positions of these two cities depending Earth curve"
GeodesicUtilities convertGeodesicToAzimuthInRadiansFrom: coord1 to: coord2.

Installation

To install GeoTools on your Pharo image you can just execute the following script:

Metacello new
   baseline: 'GeoTools';
   repository: 'github://OpenSmock/GeoTools:main';
   load.

Dependencies

geotools's People

Contributors

labordep avatar landaisb avatar

Watchers

 avatar

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.