Package net.postgis.jdbc.geometry

# Class GeometryBuilder

java.lang.Object
net.postgis.jdbc.geometry.GeometryBuilder

public class GeometryBuilder extends Object
Builds geometry instances. Note: This class contains the word "builder" but does NOT implement the builder pattern (yet).

Author:
  Phillip Ross

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SRIDPREFIX`
The prefix that indicates SRID presence

## Constructor Summary

Constructors
Constructor
Description
`GeometryBuilder()`

## Method Summary

Modifier and Type
Method
Description
`static Geometry`
`geomFromString(String value)`
`static Geometry`
`geomFromString(String value, boolean haveM)`
`static Geometry`
`geomFromString(String value, BinaryParser bp)`
Maybe we could add more error checking here?
`static Geometry`
`geomFromString(String value, BinaryParser bp, boolean haveM)`
`static String[]`
`splitSRID(String whole)`
Splits a String at the first occurrence of border character.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### SRIDPREFIX

public static final String SRIDPREFIX
The prefix that indicates SRID presence

See Also:
  - Constant Field Values

## Constructor Details

### GeometryBuilder

public GeometryBuilder()

## Method Details

### geomFromString

public static Geometry geomFromString(String value) throws SQLException

Throws:
  `SQLException`

### geomFromString

public static Geometry geomFromString(String value, boolean haveM) throws SQLException

Throws:
  `SQLException`

### geomFromString

public static Geometry geomFromString(String value, BinaryParser bp) throws SQLException
Maybe we could add more error checking here?

Parameters:
  `value` - String representing the geometry
  `bp` - BinaryParser to use whe parsing
Returns:
  Geometry object parsed from the specified string value
Throws:
  `SQLException` - when a SQLException occurs

### geomFromString

public static Geometry geomFromString(String value, BinaryParser bp, boolean haveM) throws SQLException

Throws:
  `SQLException`

### splitSRID

public static String[] splitSRID(String whole) throws SQLException
Splits a String at the first occurrence of border character. Poor man's String.split() replacement, as String.split() was invented at jdk1.4, and the Debian PostGIS Maintainer had problems building the woody backport of his package using DFSG-free compilers. In all the cases we used split() in the net.postgis package, we only needed to split at the first occurence, and thus this code could even be faster.

Parameters:
  `whole` - the String to be split
Returns:
  String array containing the split elements
Throws:
  `SQLException` - when a SQLException occurrs