Permalink
Browse files

fix readme

  • Loading branch information...
1 parent c053edd commit f48fe3c749d20a983c6f6d7d998cc835ac613f2e @filonenko-mikhail committed Jun 2, 2011
Showing with 17 additions and 24 deletions.
  1. +16 −23 README
  2. +1 −1 cl-ewkb/ewkb.lisp
View
@@ -1,13 +1,12 @@
cl-ewkb is a geospatial library, based on cl-wkb, that implements the OGC Well-Known Binary geographic geometry data model with PostGIS 3d, 4d extensions, and provides WKB and EWKB encoding and decoding functionality. cl-wkb author is J.P. Larocue.
Depends on:
- ieee-floats (built-in)
+ ieee-floats
flexi-streams
PostGIS extension WKB described in postgis-1.5/doc/ZMSgeoms.txt
All extensions are supported: 3dz, 3dm, 4d, embedded SRID.
-
Exported structs
point-primitive x y
@@ -17,20 +16,19 @@ pointzm-primitive x y z m
point-primtive structs contain coordinates (2d, 3d, 4d)
-linear-ring points
+linear-ring points-primitive
linear-ring struct contains array of point-primitive
+geometry type srid
+geometry parent struct for other types and also contains "GEOMETRYCOLLECTION"
-gisgeometry type srid object
-gisgeometry parent struct for other types and also contains "GEOMETRYCOLLECTION"
-
-point type srid (object as pointXX-primitive)
-line-string type srid (object as linear-ring)
-polygon type srid (object as (array of linear-ring))
-multi-point type srid (object as (array of point))
-multi-line-string type srid (object as (array of linestring))
-multi-polygon type srid (object as (array of polygon))
-geometry-collection type srid (object as (array of other objects))
+point type srid point-primitive
+line-string type srid points-primitive
+polygon type srid linear-rings
+multi-point type srid points
+multi-line-string type srid line-strings
+multi-polygon type srid polygons
+geometry-collection type srid geometries
Exported functions
@@ -94,26 +92,21 @@ Draw pointXX-primitive
(pointz-primitive-z point)
(pointzm-primitive-m point)))))
-Drawing linear-ring
-
-(defun draw-linear-ring (line)
- (map 'nil (lambda (point) (draw-point-primitive point))
- (linear-ring-points line)))
-
Drawing objects
(defun draw-point (point)
(gl:with-primitives :points
- (draw-point-primitive (gisgeometry-object point))))
+ (draw-point-primitive (point-primitive point))))
-(defun draw-line-string (line)
+(defun draw-points (line-string)
(gl:with-primitives :line-strip
- (draw-linear-ring (gisgeometry-object line))))
+ (map 'nil (lambda (point) (draw-point-primitive point))
+ (line-string-points-primitive line-string))))
General drawing function
(defun draw-gisobject (object)
(cond
((point-p object) (draw-point object))
- ((line-string-p object) (draw-linestring object))))
+ ((line-string-p object) (draw-points object))))
View
@@ -392,7 +392,7 @@ endianness designator: :BIG-ENDIAN or :LITTLE-ENDIAN."
(:geometry-collection
(dotimes (i (decode-uint32-from endianness in))
(vector-push-extend (decode-from in) data))
- (make-gisgeometry type srid data)))))
+ (make-geometry-collection type srid data)))))
(defun decode (octets)
"Function to decode geoobject from WKB/EWKB representation from sequence."

0 comments on commit f48fe3c

Please sign in to comment.