About cl-proj:

CL-PROJ provides bindings for the Proj.4 library.

Constants, variables and function names are extremely close to the native PROJ.4 library.

A number of utility functions are provided along with bare bindings.

Other functions in cl-proj

Function dms-to-dec (deg &optional (min 0.0d0) (sec 0.0d0))
Details:
Converts a degree-minute-second representation to decimal degrees.

For example, to convert 47°7'50.09 to decimal representation, call this function with following parameters:

(dms-to-dec 47 7 50.9) => 47.130802

Function parse-degrees (pattern str &key dec)
Details:
Utility function to parse lines like: 47°7'50

If an optional key DEC is set to true converts parsed data intodecimal representation with DMS-TO-DEC function.

Function perpendicular-distance (point line1 line2)
Details:
Calculates a distance from a point to the line specified by two points.

Function pj-acquire-lock ()

No documentation string. Possibly unimplemented or incomplete.


Function pj-apply-gridshift (arg0 arg1 point_count point_offset x y z)

No documentation string. Possibly unimplemented or incomplete.


Function pj-cleanup-lock ()

No documentation string. Possibly unimplemented or incomplete.


Function pj-compare-datums (srcdefn dstdefn)

No documentation string. Possibly unimplemented or incomplete.


Function pj-dalloc (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-datum-transform (src dst point_count point_offset x y z)

No documentation string. Possibly unimplemented or incomplete.


Function pj-deallocate-grids ()

No documentation string. Possibly unimplemented or incomplete.


Function pj-free (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-fwd (arg0 arg1)
Details:
Forward cartographic projection.

Function pj-geocentric-to-geodetic (a es point_count point_offset x y z)

No documentation string. Possibly unimplemented or incomplete.


Function pj-geodetic-to-geocentric (a es point_count point_offset x y z)

No documentation string. Possibly unimplemented or incomplete.


Function pj-get-def (arg0 arg1)

No documentation string. Possibly unimplemented or incomplete.


Function pj-get-errno-ref ()

No documentation string. Possibly unimplemented or incomplete.


Function pj-get-release ()

No documentation string. Possibly unimplemented or incomplete.


Function pj-init (arg0 arg1)

No documentation string. Possibly unimplemented or incomplete.


Function pj-init-plus (arg0)
Details:
Convert a string representation of a coordinate system definition into an internal representation.

This function converts a string representation of a coordinate system definition into a projPJ object suitable for use with other API functions. On failure the function will return NULL and set pj_errno. The definition should be of the general form "+proj=tmerc +lon_0 +datum=WGS84". Refer to PROJ.4 documentation and the General Parameters notes for additional details.

Coordinate system objects allocated with PJ-INIT-PLUS should bedeallocated with PJ-FREE.
See also:

Function pj-inv (arg0 arg1)
Details:
Inverse cartographic projection.

Function pj-is-geocent (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-is-latlong (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-latlong-from-proj (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-malloc (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-pr-list (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-release-lock ()

No documentation string. Possibly unimplemented or incomplete.


Function pj-set-finder (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-set-searchpath (count path)

No documentation string. Possibly unimplemented or incomplete.


Function pj-strerrno (arg0)

No documentation string. Possibly unimplemented or incomplete.


Function pj-transform (src dst point_count point_offset x y z)
Arguments:
  • src -- source (input) coordinate system.
  • dst -- destination (output) coordinate system.
  • point_count -- the number of points to be processed (the size of the x/y/z arrays).
  • point_offset -- the step size from value to value (measured in doubles) within the x/y/z arrays - normally 1 for a packed array. May be used to operate on xyz interleaved point arrays.
Returns:
The return is zero on success, or a PROJ.4 error code.
Details:
Transform between coordinate systems.

The PJ-TRANSFORM function may be used to transform points between the two provided coordinate systems. In addition to converting between cartographic projection coordinates and geographic coordinates, this function also takes care of datum shifts if possible between thesource and destination coordinate system. Unlike PJ-FWD andPJ-INV it is also allowable for the coordinate system definitions (PJ *) to be geographic coordinate systems (defined as +proj=latlong). The x, y and z arrays contain the input values of the points, and are replaced with the output values. The point_offset should indicate the spacing the of x,y,z arrays, normally 1. The function returns zero on success, or the error number (also inpj-errno) on failure.

The z array may be passed as NULL if Z values are not available.









X/Y/Z: The array of X, Y and Z coordinate values passed as input, and modified in place for output. The Z may optionally be NULL.



Memory associated with the projection may be freed with pj-free.
See also:

Function render-point (ox oy extent size &key (src-cs +proj=latlong +ellps=WGS84 +datum=WGS84) (dst-cs +proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs) (debug nil))
Arguments:
  • extent -- specifies the geographic extents of the original surface area that is displayed within the screen with given size.

    extent is a plist with properties (:minx :maxx :miny :maxy) specifying geographic bounds in the source geographic system.
  • size -- is a plist specifying (:width and :height) of the resulting image in pixels.
  • oX -- Easting long?
  • oY -- Northing lat?
  • src-cs -- Proj.4 string specifying the source coordinate system
  • dst-cs -- Proj.4 string specifying the destination coordinate system
Returns:


In case of success returns multiple values:

pixelX pixelY relX relY pt.x pt.y

Where pixelX and pixelY are coordinates of the givenpoint in pixels within given screen; relX and relY is arelative position of the given point; pt.X and pt.Y are rendered coordinates of the given point.

Details:
Renders the point with given coordinates using the Proj API and adjusts it to be displayed within a screen with given width and height.










Function simplify (points epsilon)
Arguments:
  • points -- coordinates (x y) of points that specify the polyline
  • epsilon -- distance
Returns:
Given a curve composed of line segments, this function finds and returns a similar curve with fewer points.
Details:
Simplifies the given polyline using the Ramer–Douglas–Peucker algorithm.

Given a curve composed of line segments, this function finds and returns a similar curve with fewer points. The algorithm defines 'dissimilar' based on the maximum distance between the original curve and the simplified curve. The simplified curve consists of a subset of the points that defined the original curve.

Check the Ramer–Douglas–Peucker algorithm article on Wikipedia.






Other variables in cl-proj

Variable +deg-to-rad+

No documentation string. Possibly unimplemented or incomplete.


Variable +pj-version+

No documentation string. Possibly unimplemented or incomplete.


Variable +rad-to-deg+

No documentation string. Possibly unimplemented or incomplete.


Index of exported symbols

cl-proj:+deg-to-rad+, variable  (undocumented)
cl-proj:+pj-version+, variable  (undocumented)
cl-proj:+rad-to-deg+, variable  (undocumented)
cl-proj:dms-to-dec, function
cl-proj:parse-degrees, function
cl-proj:perpendicular-distance, function
cl-proj:pj-acquire-lock, function  (undocumented)
cl-proj:pj-apply-gridshift, function  (undocumented)
cl-proj:pj-cleanup-lock, function  (undocumented)
cl-proj:pj-compare-datums, function  (undocumented)
cl-proj:pj-dalloc, function  (undocumented)
cl-proj:pj-datum-transform, function  (undocumented)
cl-proj:pj-deallocate-grids, function  (undocumented)
cl-proj:pj-free, function  (undocumented)
cl-proj:pj-fwd, function
cl-proj:pj-geocentric-to-geodetic, function  (undocumented)
cl-proj:pj-geodetic-to-geocentric, function  (undocumented)
cl-proj:pj-get-def, function  (undocumented)
cl-proj:pj-get-errno-ref, function  (undocumented)
cl-proj:pj-get-release, function  (undocumented)
cl-proj:pj-init, function  (undocumented)
cl-proj:pj-init-plus, function
cl-proj:pj-inv, function
cl-proj:pj-is-geocent, function  (undocumented)
cl-proj:pj-is-latlong, function  (undocumented)
cl-proj:pj-latlong-from-proj, function  (undocumented)
cl-proj:pj-malloc, function  (undocumented)
cl-proj:pj-pr-list, function  (undocumented)
cl-proj:pj-release-lock, function  (undocumented)
cl-proj:pj-set-finder, function  (undocumented)
cl-proj:pj-set-searchpath, function  (undocumented)
cl-proj:pj-strerrno, function  (undocumented)
cl-proj:pj-transform, function
cl-proj:render-point, function
cl-proj:simplify, function