2017 © Pedro PelĂĄez
 

library geometry

Geometry library for PHP.

image

nasumilu/geometry

Geometry library for PHP.

  • Monday, July 30, 2018
  • by nasumilu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 53 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

nasumilu/geometry Build Status codecov

Description

nasumilu\geometry mostly provides an implementation of the OpenGISÂź standards for geographic information, common architecture for PHP., (*1)

This component only provides a common framework used to develop platform specific implementation., (*2)

Basic usage


$options = [ '3d' => true, 'measured' => true, 'srid' => 3857 ]; $factory = new GeometryFactoryAdapter($options); $point = $factory->createPoint([ -93957413244860, -89692863500304, 58.464, 9863321.35 ]); echo $point->asText(); echo $point->asBinary(['hex_str' => true, 'endianness' => 'XDR']);

Output, (*3)

POINTZM(-93957413244860 -89692863500304 58.464 9863321.35)
0000000bb9c2d55d0a8f63ef00c2d464cfd1240400404d3b645a1cac084162d0132b333333

Creating geometry from WKT, (*4)

$point = $factory->create('POINTZM(-93957413244860 -89692863500304 58.464 9863321.35)');

echo $point->output('json', ['json_encode_options' => \JSON_PRETTY_PRINT]);

Output, (*5)

{
    "type": "point",
    "binary_type": 1,
    "crs": {
        "srid": 3857,
        "3d": true,
        "measured": true,
        "dimension": 4
    },
    "coordinates": [
        -93957413244860,
        -89692863500304,
        58.464,
        9863321.35
    ]
}

Download and Test

$ git clone git@github.com:nasumilu/geometry.git
$ cd geometry
$ composer update
$ cp phpunit.dist.xml phpunit.xml
$ vendor/bin/phpunit

The Versions

30/07 2018

dev-master

9999999-dev

Geometry library for PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Lucas

30/07 2018

v1.1.4

1.1.4.0

Geometry library for PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Lucas

30/07 2018

v1.1.3

1.1.3.0

Geometry library for PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Lucas

28/07 2018

v1.1.2

1.1.2.0

Geometry library for PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Lucas

28/07 2018

v1.1.1

1.1.1.0

Geometry library for PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Lucas

28/07 2018

v1.1

1.1.0.0

Geometry library for PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Lucas

13/07 2018

v1.0

1.0.0.0

Geometry library for PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Lucas