Changeset: bf344a4d0b84 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bf344a4d0b84
Added Files:
        geom/monetdb5/geom.c
        geom/monetdb5/geom.mal
Removed Files:
        geom/monetdb5/geom.mx
Modified Files:
        geom/monetdb5/Makefile.ag
Branch: default
Log Message:

De-mx geom module.


diffs (truncated from 1657 to 300 lines):

diff --git a/geom/monetdb5/Makefile.ag b/geom/monetdb5/Makefile.ag
--- a/geom/monetdb5/Makefile.ag
+++ b/geom/monetdb5/Makefile.ag
@@ -31,7 +31,7 @@ INCLUDES = ../lib \
 lib__geom = {
        MODULE
        DIR = libdir/monetdb5
-       SOURCES = geom.mx
+       SOURCES = geom.c
        LIBS = ../lib/libgeom \
                   ../../gdk/libbat \
               ../../common/stream/libstream \
@@ -42,7 +42,7 @@ lib__geom = {
 headers_mal = {
        HEADERS = mal
        DIR = libdir/monetdb5
-       SOURCES = geom.mx
+       SOURCES = geom.mal
 }
 
 headers_autoload = {
@@ -51,4 +51,4 @@ headers_autoload = {
        SOURCES = 30_geom.mal
 }
 
-EXTRA_DIST = 30_geom.mal
+EXTRA_DIST = 30_geom.mal geom.mal
diff --git a/geom/monetdb5/geom.mx b/geom/monetdb5/geom.c
rename from geom/monetdb5/geom.mx
rename to geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.mx
+++ b/geom/monetdb5/geom.c
@@ -1,269 +1,26 @@
-@/
-The contents of this file are subject to the MonetDB Public License
-Version 1.1 (the "License"); you may not use this file except in
-compliance with the License. You may obtain a copy of the License at
-http://www.monetdb.org/Legal/MonetDBLicense
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+ * Copyright August 2008-2012 MonetDB B.V.
+ * All Rights Reserved.
+ */
 
-Software distributed under the License is distributed on an "AS IS"
-basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-License for the specific language governing rights and limitations
-under the License.
-
-The Original Code is the MonetDB Database System.
-
-The Initial Developer of the Original Code is CWI.
-Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
-Copyright August 2008-2012 MonetDB B.V.
-All Rights Reserved.
-@
-
-@f geom
-
-@c
 /*
  * @a Wouter Scherphof, Niels Nes
  * @* The simple geom module
  */
-@mal
-module geom;
-
-# @' overwrite lng needed for fixed size! Sizes are fixed in geom.prelude
-atom mbr:lng;
-
-command tostr() :str           address mbrTOSTR;
-command fromstr() :mbr         address mbrFROMSTR;
-command hash() :int            address mbrHASH;
-command null() :int            address mbrNULL;
-command cmp() :int             address mbrCOMP;
-command read()                 address mbrREAD;
-command write()                        address mbrWRITE;
-
-command mbr(v:str) :mbr address mbrFromString;
-
-atom wkb;
-
-command tostr() :str           address wkbTOSTR;
-command fromstr() :wkb         address wkbFROMSTR;
-command hash() :int            address wkbHASH;
-command null() :int            address wkbNULL;
-command cmp() :int             address wkbCOMP;
-command read()                 address wkbREAD;
-command write()                        address wkbWRITE;
-
-command put() :int             address wkbPUT;
-command del() :int             address wkbDEL;
-command length() :int          address wkbLENGTH;
-command heap() :int            address wkbHEAP;
-
-command wkb{unsafe}(v:str) :wkb address wkbFromString;
-command FromText{unsafe}(w:str, type:int) :wkb address wkbFromText;
-
-module geom;
-
-@= types
-function @1FromText{unsafe}( wkt:str, srid:sht ) :wkb;
-       x := wkb.FromText(wkt,@3);
-       return x;
-end @1FromText;
-
-@
-@mal
-@:types(Point,point,1)@
-@:types(Curve,curve,2)@
-@:types(Line,linestring,2)@
-@:types(Surface,surface,3)@
-@:types(Poly,polygon,3)@
-@:types(MultiPoint,multipoint,4)@
-@:types(MultiCurve,multicurve,5)@
-@:types(MultiLine,multilinestring,5)@
-@:types(MultiSurface,multisurface,6)@
-@:types(MultiPoly,multipolygon,6)@
-@:types(Geom,geometry,7)@
-@:types(GeomCollection,geomcollection,7)@
-
-command mbroverlaps(a:mbr, b:mbr) :bit
-address mbroverlaps
-comment "Returns true if the two mbrs overlap";
-
-
-command AsText(w:wkb) :str     address wkbAsText;
-command mbr(:flt,:flt,:flt,:flt) :mbr
-address ordinatesMBR
-comment "Creates the mbr for the given (xmin,ymin) and (xmax,ymax).";
-
-command mbr(:wkb) :mbr
-address wkbMBR
-comment "Creates the mbr for the given wkb.";
-
-# @+
-# command mbr(:bat[:any_1,:wkb]) :bat[:any_1,:mbr]
-# address bat_wkbMBR
-# comment "Creates the mbr's for the given wkb's.";
-#
-# @+ ogc basic methods
-command Dimension(w:wkb) :int
-address wkbDimension
-comment "The inherent dimension of this geometry object, which must be less 
than or equal to the coordinate dimension. This specification is restricted to 
geometries in two-dimensional coordinate space.";
-
-command GeometryTypeId(w:wkb) :int
-address wkbGeometryTypeId
-comment "Returns the name of the instantiable subtype of Geometry of which 
this Geometry instance is a member. The name of the instantiable subtype of 
Geometry is returned as string.";
-
-command SRID(w:wkb) :int
-address wkbSRID
-comment "Returns the Spatial Reference System ID for this Geometry.";
-
-command Envelope(w:wkb) :wkb
-address wkbEnvelope
-comment "The minimum bounding box for this Geometry, returned as a Geometry. 
The polygon is defined by the corner points of the bounding box 
((MINX,MINY),(MAXX,MINY),(MAXX,MAXY),(MINX,MAXY)).";
-
-command IsEmpty(w:wkb) :bit
-address wkbIsEmpty
-comment "Returns true if this Geometry is the empty geometry. If true, then 
this Geometry represents the empty point set, for the coordinate space.";
-
-command IsSimple(w:wkb) :bit
-address wkbIsSimple
-comment "Returns true if this Geometry has no anomalous geometric points, such 
as self intersection or self tangency. The description of each instantiable 
geometric class will include the specific conditions that cause an instance of 
that class to be classified as not simple.";
-
-command Boundary(w:wkb) :wkb
-address wkbBoundary
-comment "Returns the closure of the combinatorial boundary of this Geometry.";
-
-# @+ ogc spatial relation methods
-
-command Equals(a:wkb, b:wkb) :bit
-address wkbEquals
-comment "Returns true if these Geometries are 'spatially equal'";
-
-command Disjoint(a:wkb, b:wkb) :bit
-address wkbDisjoint
-comment "Returns true if these Geometries are 'spatially disjoint'";
-
-command Intersect(a:wkb, b:wkb) :bit
-address wkbIntersect
-comment "Returns true if these Geometries 'spatially intersect'";
-
-command Touches(a:wkb, b:wkb) :bit
-address wkbTouches
-comment "Returns true if these Geometries 'spatially touch' each other";
-
-command Crosses(a:wkb, b:wkb) :bit
-address wkbCrosses
-comment "Returns true if the Geometry a 'spatially crosses' Geometry b";
-
-command Within(a:wkb, b:wkb) :bit
-address wkbWithin
-comment "Returns true if the Geometry a 'spatially within' Geometry b";
-
-command Contains(a:wkb, b:wkb) :bit
-address wkbContains
-comment "Returns true if the Geometry a 'spatially contains' Geometry b";
-
-command Overlaps(a:wkb, b:wkb) :bit
-address wkbOverlaps
-comment "Returns true if the Geometry a 'spatially overlaps' Geometry b";
-
-command Relate(a:wkb, b:wkb, intersectionPatternMatrix:str) :bit
-address wkbRelate
-comment "Returns true if the Geometry a 'spatially related' to Geometry b, by 
testing for intersection between the Interior, Boundary and Exterior of the two 
geometries as specified by the values in the intersectionPatternMatrix.";
-
-# @+ ogc constructor functions
-command point(x:dbl,y:dbl) :wkb
-address wkbcreatepoint
-comment "Construct a point from two geometries";
-
-module batgeom;
-command point(x:bat[:oid,:dbl],y:bat[:oid,:dbl]) :bat[:oid,:wkb]
-address wkbcreatepoint_bat
-comment "Construct a point-BAT from two geometry-BATs";
-module geom;
-
-# @+ ogc information methods
-command X(g:wkb) :dbl
-address wkbgetcoordX
-comment "Returns the x-coordinate of a point geometry.";
-
-command Y(g:wkb) :dbl
-address wkbgetcoordY
-comment "Returns the y-coordinate of a point geometry.";
-
-# @+ ogc Spatial Analysis methods
-
-command Area(g:wkb) :dbl
-address wkbArea
-comment "Returns the area of the geometry.";
-
-command Length(g:wkb) :dbl
-address wkbLength
-comment "Returns the length of the geometry.";
-
-command Distance(a:wkb, b:wkb) :dbl
-address wkbDistance
-comment "Returns the shortest distance between any two points in the two 
geometries as calculated in the spatial reference system of this Geometries.";
-
-command Buffer(a:wkb, distance:dbl) :wkb
-address wkbBuffer
-comment "Returns a geometry that represents all points whose distance from 
this geometry is less than or equal to distance. Calculations are in the 
Spatial Reference System of this Geometry.";
-
-command ConvexHull(a:wkb) :wkb
-address wkbConvexHull
-comment "Returns a geometry that represents the convex hull of this geometry.";
-
-command Intersection(a:wkb, b:wkb) :wkb
-address wkbIntersection
-comment "Returns a geometry that represents the point set intersection of 
Geometry a with b.";
-
-command Union(a:wkb, b:wkb) :wkb
-address wkbUnion
-comment "Returns a geometry that represents the point set union of Geometry a 
with b.";
-
-command Difference(a:wkb, b:wkb) :wkb
-address wkbDifference
-comment "Returns a geometry that represents the point set difference of 
Geometry a with b.";
-
-command SymDifference(a:wkb, b:wkb) :wkb
-address wkbSymDifference
-comment "Returns a geometry that represents the point set semmetric difference 
of Geometry a with b.";
-
-
-command prelude():void address geom_prelude;
-command epilogue():void address geom_epilogue;
-
-geom.prelude();
-
-module calc;
-
-command mbr{unsafe}(v:str) :mbr address mbrFromString;
-command mbr(v:mbr) :mbr address mbrFromMBR;
-command wkb{unsafe}(v:str) :wkb address wkbFromString;
-command wkb(v:wkb) :wkb address wkbFromWKB;
-
-@= ctypes
-function @2{unsafe}( wkt:str ) :wkb;
-       x := wkb.FromText(wkt,@3);
-       return x;
-end @2;
-@
-@mal
-@:ctypes(Point,point,1)@
-@:ctypes(Curve,curve,2)@
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to