Download the PHP package daandesmedt/phpwktadapter without Composer

On this page you can find all versions of the php package daandesmedt/phpwktadapter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpwktadapter

PHPWKTParser

Well-known text (WKT) is a text markup language for representing vector geometry objects on a map, spatial reference systems of spatial objects and transformations between spatial reference systems.

EWKT (Extended Well-Known Text), a PostGIS-specific format that includes the spatial reference system identifier (SRID) and up to 4 ordinate values (XYZM), is also supported (ex: SRID=31370;POINT(44 60)).

PHPWKTParser provides a simple usage helper class to read WKT and EWKT and parse this text representation to a workable PHP array holding the parsed WKT/EWKT definition. Read and parse 2D, 3D and 4D WKT (Well Known Text) / EWKT (Extended Well-Known Text) object strings into geometry objects with this simple WKT PHP adapter library.

Installation

Install the package through composer:

Make sure, that you include the composer autoloader somewhere in your codebase.

Supported geometry

Geometry Type Example
POINT POINT(30 10)
LNESTRING LINESTRING(30 10, 10 30, 40 40)
POLYGON POLYGON((0 0,10 0,10 10,0 10,0 0))
MULTIPOINT MULTIPOINTZM(0 0 10 10,10 0 0 0,10 10 0 0,20 20 0 10)
MULTILINESTRING MULTILINESTRING((0 0,10 0,10 10,0 10))
MULTIPOLYGON MULTIPOLYGON(((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))
GEOMETRYCOLLECTION GEOMETRYCOLLECTION(POINT(10 20),LINESTRING(0 0,10 0))

PHPWKTParser parsed and returned geometry array response

The read($wkt) function of the PHPWKTParser adapter will return a associative array as representation of the parsed WKT/EWKT (in case of valid).

Working examples

Working examples can be found in the examples folder.

Sample usage

Handling exceptions

Invalid format in the specified WKT / EWKT will result in a UnexpectedValueException thrown by the WKTAdapter .


All versions of phpwktadapter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
doctrine/lexer Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daandesmedt/phpwktadapter contains the following files

Loading the files please wait ....