[postgis-users] FW: [Psycopg] RELEASE: GeoTypes-0.1.0

Norman Vine nhv at cape.com
Thu Sep 18 05:20:10 PDT 2003


FYI

Note: this is the package "todo" file

"""
Goals for next minor release:
-----------------------------

Add types for the Postgis geometric types.
Suggestions welcome.

Goals for first major release (1.0):
-----------------------------------

Suggestions welcome.


Longer Term goals:
------------------

Suggestions welcome.
"""


> -----Original Message-----
> From: psycopg-bounces at lamu.initd.org
> [mailto:psycopg-bounces at lamu.initd.org]On Behalf Of Richard Taylor
> Sent: Thursday, September 18, 2003 7:55 AM
> To: Psycopg Mailing List
> Subject: [Psycopg] RELEASE: GeoTypes-0.1.0
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Here is a first preview release of the GeoTypes package. It implements classes 
> for the geometric types in Postgresql. 
> 
> You can get it from here: 
> 	
> 		http://people.initd.org/rjt/GeoTypes-0.1.0.tar.gz
> 
> I am not aware of any problems with the types that I have implemented but I am 
> very interested in other comments and suggestions. There is no separate 
> documentation at present but you can find some help in the __init__.py 
> comments and in the unittests in the tests directory.
> 
> I intend to extend the package to cover the types in the Postgis geometric 
> extensions to Postgresql shortly.
> 
> Richard
> 
> - From the README
> ==============
> 
> GeoTypes
> 
> A package of classes for working with basic 2d geometric types.
> 
> These classes were designed for use with the geometric functions
> supported by Postgresql (http://www.postgresql.com) although they
> do not need Postgresql to be present for them to be used.
> 
> The types implemented are those listed in the Postgresql documentation
> at http://www.postgresql.org/docs/7.3/static/datatype-geometric.html with
> the exception of 'line' which, as the documentation is says, is 'not fully
> implemented yet'.
> 
> The package exports the following classes:
> 
>     (class Point)
>     (class LineSeg)
>     (class Path)
>     (class Polygon)
>     (class Circle)
>     (class box)
> 
> In addition the following factory methods are provided to make construction
> of these classes easier:
> 
>     (func pointFromValues)
>     (func pointFromSequence)
>     (func lineSegFromPoints)
>     (func lineSegFromSequence)
>     (func pathFromPoints)
>     (func pathFromSequence)
>     (func boxFromPoints)
>     (func boxFromSequence)
>     (func circleFromCentreAndRadius)
>     (func circelFromSequence)
>     (func polygonFromPoints)
>     (func polygonFromSequence)
> 
> One final method is provided to help with linking these classes into the
> psycopg (http://initd.org/software/initd/psycopg) database wrapper:
> 
>     (func initialisePsycopgTypes)
> 
> 
> Example usage:
> 
> 
>     import psycopg
>     import GeoTypes
> 
>     GeoTypes.initialisePsycopgTypes(psycopg_module=psycopg)
> 
>     conn = psycopg.connect('dbname=schema_test user=postgres')
>     curs = conn.cursor()
> 
>     curs.execute("CREATE TABLE table_name (p1 point, b box)")
> 
>     p = GeoTypes.pointFromValues(5.0,7.0)
>     b = GeoTypes.boxFromPoints(p,GeoTypes.pointFromValues(1.0,1.0))
> 
> - -- 
> Jabber: RichardTaylor at jabber.org
> PGPKey: http://search.keyserver.net:11371/pks/lookup?op=get&search=0xA7DA9FD9
> Key fingerprint = D051 A121 E7C3 485F 3C0E  1593 ED9E D868 A7DA 9FD9
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> 
> iD8DBQE/aZ0z7Z7YaKfan9kRAoxTAJ9j1RyySWC7D+iivdOoUfVNQ+D2zQCg/FOH
> Ca6bKSBBW1c/Te4gqAHCiak=
> =ILrR
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Psycopg mailing list
> Psycopg at lists.initd.org
> http://lists.initd.org/mailman/listinfo/psycopg
> 



More information about the postgis-users mailing list