Wrapper for the locationtech JTS spatial library. Constructors for points, coordinate sequences, rings, polygons, multipolygons, and so on.
Wrapper for the locationtech JTS spatial library. Constructors for points, coordinate sequences, rings, polygons, multipolygons, and so on.
(coordinate x y)
(coordinate x y z)
Creates a Coordinate.
Creates a Coordinate.
(coordinate-sequence coordinates)
Given a list of Coordinates, generates a CoordinateSequence.
Given a list of Coordinates, generates a CoordinateSequence.
(coordinates geom)
Get a sequence of Coordinates from a Geometry
Get a sequence of Coordinates from a Geometry
(get-factory geom)
Gets a GeometryFactory for a given geometry.
Gets a GeometryFactory for a given geometry.
(get-srid geom)
Gets an integer SRID for a given geometry.
Gets an integer SRID for a given geometry.
(gf srid)
Creates a GeometryFactory for a given SRID.
Creates a GeometryFactory for a given SRID.
(linear-ring coordinates)
(linear-ring coordinates srid)
Given a list of Coordinates, creates a LinearRing. Allows an optional SRID argument at end.
Given a list of Coordinates, creates a LinearRing. Allows an optional SRID argument at end.
(linear-ring-wkt coordinates)
(linear-ring-wkt coordinates srid)
Makes a LinearRing from a WKT-style data structure: a flat sequence of coordinate pairs, e.g. [0 0, 1 0, 0 2, 0 0]. Allows an optional SRID argument at end.
Makes a LinearRing from a WKT-style data structure: a flat sequence of coordinate pairs, e.g. [0 0, 1 0, 0 2, 0 0]. Allows an optional SRID argument at end.
(linestring coordinates)
(linestring coordinates srid)
Given a list of Coordinates, creates a LineString. Allows an optional SRID argument at end.
Given a list of Coordinates, creates a LineString. Allows an optional SRID argument at end.
(linestring-wkt coordinates)
(linestring-wkt coordinates srid)
Makes a LineString from a WKT-style data structure: a flat sequence of coordinate pairs, e.g. [0 0, 1 0, 0 2, 0 0]. Allows an optional SRID argument at end.
Makes a LineString from a WKT-style data structure: a flat sequence of coordinate pairs, e.g. [0 0, 1 0, 0 2, 0 0]. Allows an optional SRID argument at end.
(multi-polygon polygons)
Given a list of polygons, generates a MultiPolygon.
Given a list of polygons, generates a MultiPolygon.
(multi-polygon-wkt wkt)
(multi-polygon-wkt wkt srid)
Creates a MultiPolygon from a WKT-style data structure, e.g. [[[0 0 1 0 2 2 0 0]] [5 5 10 10 6 2]]. Allows an optional SRID argument at end.
Creates a MultiPolygon from a WKT-style data structure, e.g. [[[0 0 1 0 2 2 0 0]] [5 5 10 10 6 2]]. Allows an optional SRID argument at end.
(point coordinate)
(point lat long)
(point x y srid)
Creates a Point from a Coordinate, a lat/long, or an x,y pair with an SRID.
Creates a Point from a Coordinate, a lat/long, or an x,y pair with an SRID.
(point-n linestring idx)
Get the point for a linestring at the specified index.
Get the point for a linestring at the specified index.
(polygon shell)
(polygon shell holes)
Given a LinearRing shell, and a list of LinearRing holes, generates a polygon.
Given a LinearRing shell, and a list of LinearRing holes, generates a polygon.
(polygon-wkt rings)
(polygon-wkt rings srid)
Generates a polygon from a WKT-style data structure: a sequence of [outer-ring hole1 hole2 ...], where outer-ring and each hole is a flat list of coordinate pairs, e.g.
[[0 0 10 0 10 10 0 0] [1 1 9 1 9 9 1 1]].
Allows an optional SRID argument at end.
Generates a polygon from a WKT-style data structure: a sequence of [outer-ring hole1 hole2 ...], where outer-ring and each hole is a flat list of coordinate pairs, e.g. [[0 0 10 0 10 10 0 0] [1 1 9 1 9 9 1 1]]. Allows an optional SRID argument at end.
(same-coords? c1 c2)
Check if two Coordinates have the same number of dimensions and equal ordinates.
Check if two Coordinates have the same number of dimensions and equal ordinates.
(same-geom? g1 g2)
Check if two geometries are topologically equal, with the same SRID. Two SRIDs of 0 are considered equal to each other.
Check if two geometries are topologically equal, with the same SRID. Two SRIDs of 0 are considered equal to each other.
(same-srid? g1 g2)
Check if two Geometries have the same SRID. If both geometries have SRIDs of 0, will also return true.
Check if two Geometries have the same SRID. If both geometries have SRIDs of 0, will also return true.
(segment-at-idx linestring idx)
LineSegment from a LineString's point at index to index + 1.
LineSegment from a LineString's point at index to index + 1.
(set-srid geom srid)
Sets a geometry's SRID to a new value, and returns that geometry.
Sets a geometry's SRID to a new value, and returns that geometry.
(transform-geom g crs)
(transform-geom g crs1 crs2)
Transform a Geometry using a proj4j transform, if needed. Returns a new Geometry if a transform occurs. When only one CRS is given, get the CRS of the existing geometry. When two are given, force the transformation to occur between those two systems.
Transform a Geometry using a proj4j transform, if needed. Returns a new Geometry if a transform occurs. When only one CRS is given, get the CRS of the existing geometry. When two are given, force the transformation to occur between those two systems.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close