com.kpouer:wktparser

WKT Parser is a simplified parser for Well Known Text geometry syntax

License

License

GroupId

GroupId

com.kpouer
ArtifactId

ArtifactId

wktparser
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

com.kpouer:wktparser
WKT Parser is a simplified parser for Well Known Text geometry syntax
Project URL

Project URL

https://github.com/kpouer/WKTParser
Source Code Management

Source Code Management

https://github.com/kpouer/WKTParser

Download wktparser

Dependencies

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.6.0
org.junit.jupiter : junit-jupiter-engine jar 5.6.0

Project Modules

There are no modules declared in this project.

Java CI with Maven CodeQL

WKTParser

A simple WKT (Well Know Text) parser grammar written for JavaCC.

The goal was to use it in a jEdit plugin, but you can use it for any other purpose

It doesn't not support all WKT syntax but might be extended in the future.

Supported structures

  • POINT
  • LINESTRING
  • POLYGON
  • MULTIPOINT
  • MULTIPOLYGON
  • MULTILINESTRING
  • GEOMETRYCOLLECTION

Example

Start start = new WKT(new StringReader("LINESTRING(30 10,-3.2011243453   -101.12124240)"))
    .Start();
LineString linestring = (LineString) start.jjtGetChild(0);
Point point1 = (Point) linestring.jjtGetChild(0);
Point point2 = (Point) linestring.jjtGetChild(1);

Licence

WKT Parser is open source and licensed under the MIT License.

Versions

Version
1.0.0