Re: [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

Erik Brenn
Hi,

There is one example of using libpq with PostGIS in the example directory.
It shows how to use binary cursors from a libpq program to retrieve WKB
streams.

regards,
Erik Brenn


>From: "Hisaji ONO" <[hidden email]>
>Reply-To: [hidden email]
>To: <[hidden email]>
>Subject: [postgis] About  description of  usage of C Clients (libpq) in
>PostGIS Manual
>Date: Tue, 24 Jul 2001 22:27:55 +0900
>
>Hello.
>
>  This is my first message in this mailing list.
>
>  I've tried to use PostGIS in cygwin's PostgreSQL 7.1,2 on WinNT 4.0
>Server
>SP6.0a for a month. I've been very impressed with this extension's
>performance which can handle large-scale geospatial data.
>
>  I'd like to use a function of C Clients (libpq) of PostGIS to create some
>applications, but still no description in PostGIS Manual.
>
>  When will it be available?
>
>Thanks.
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think! http://promo2.yahoo.com/sbin/Yahoo!_BusinessNewsletter/survey.cgi
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

Hisaji ONO-3
Hi,

 Thank you for answers to my question.

I'll also use PHP. Sorry I'm newbie to PHP, so please be patient to listen
to my question.

In PostGIS's manual,  there's no reference to PHP, which is very popular
used in PotgreSQL communities.

 Do PostGIS developer team plan to implement any PHP functions to handle
PostGIS geometries?

 Regards.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Secure your servers with 128-bit SSL encryption! Grab your copy of
VeriSign's FREE Guide "Securing Your Web Site for Business." Get it now!
http://www.verisign.com/cgi-bin/go.cgi?a=n094442340008000
http://us.click.yahoo.com/6lIgYB/IWxCAA/yigFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

Paul Ramsey-2


Hisaji ONO wrote:
>
> Do PostGIS developer team plan to implement any PHP functions to handle
> PostGIS geometries?

No, no plans, but then we have no idea what support in PHP would
constitute? I mean, if you select data out of a spatial column into PHP
right now, it will arrive as valid well-known text. That's not bad,
really. It's pretty easy to parse. What are you doing to do with these
geometries once you get them into PHP? If the answer is 'draw a map
using GD' I would suggest you investigate Mapserver which supports a
thing called PHP/Mapscript. PHP/Mapscript makes drawing maps very very
easy and Mapserver supports using PostGIS/PostgreSQL as a data source.
Mapserver is an open source project as well.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

Hisaji ONO-3
 Thank you for your answer, Paul.

>
> No, no plans, but then we have no idea what support in PHP would
> constitute? I mean, if you select data out of a spatial column into PHP
> right now, it will arrive as valid well-known text. That's not bad,
> really. It's pretty easy to parse. What are you doing to do with these
> geometries once you get them into PHP? If the answer is 'draw a map

 Yes. I'd like to draw a map on IE 5.5 by converting PostGIS's geometries
(WKT or WKB) to SVG instance with Adobe SVG Plug-in, HTML and JavaScripts
via Internet or Intranet.

 I know PostGIS will support GML (output?), but I'd like to diretly convert
geometries to SVG instance.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

Paul Ramsey-2
I hate to toss it back on you, but... :) The JDBC objects include some
examples of code which parses well-known text format. You could use them
as a template for PHP code to turn the well-known text into SVG.
Basically, it's just a matter of writing a well-known text parser.
Well-known text is described in the OGC 'Simple Features Specification
for SQL'.

POINT(x y z)
LINESTRING(x1 y1 z1, x2 y2 z2, x3 y3 z3)
POLYGON((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6 z6))
MULTIPOINT(x1 y1 z1, x2 y2 z2)
MULTILINESTRING((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6
y6 z6))
MULTIPOLYGON(((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6
z6)),((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6 z6)))

Hisaji ONO wrote:

>
>  Thank you for your answer, Paul.
>
> >
> > No, no plans, but then we have no idea what support in PHP would
> > constitute? I mean, if you select data out of a spatial column into PHP
> > right now, it will arrive as valid well-known text. That's not bad,
> > really. It's pretty easy to parse. What are you doing to do with these
> > geometries once you get them into PHP? If the answer is 'draw a map
>
>  Yes. I'd like to draw a map on IE 5.5 by converting PostGIS's geometries
> (WKT or WKB) to SVG instance with Adobe SVG Plug-in, HTML and JavaScripts
> via Internet or Intranet.
>
>  I know PostGIS will support GML (output?), but I'd like to diretly convert
> geometries to SVG instance.
>
>
> To unsubscribe from this group, send an email to:
> [hidden email]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] About description of usage of C Clients (libpq) in PostGIS Manual

David Blasby-3
> POINT(x y z)
> LINESTRING(x1 y1 z1, x2 y2 z2, x3 y3 z3)
> POLYGON((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6 z6))
> MULTIPOINT(x1 y1 z1, x2 y2 z2)
> MULTILINESTRING((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6
> y6 z6))
> MULTIPOLYGON(((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6
> z6)),((x1 y1 z1, x2 y2 z2, x3 y3 z3),(x4 y4 z4, x5 y5 z5, x6 y6 z6)))

Dont forget GEOMETRYCOLLECTION( <geometry >, <geometry> ...)
Where <geometry> is a POINT, LINESTRING, or POLYGON.


>From the documentation, here's some more examples.  Note; you can use
force2d(geometry) to get rid of the Z coordinate.

POINT(0 0 0)
LINESTRING(0 0,1 1,1 2)
POLYGON((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 0,1 2 0,1 1 0))
MULTIPOINT(0 0 0,1 2 1)
MULTILINESTRING((0 0 0,1 1 0,1 2 1),(2 3 1,3 2 1,5 4 1))
MULTIPOLYGON(((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 0,1 2 0,1
1 0)),((-1 -1 0,-1 -2 0,-2 -2 0,-2 -1 0,-1 -1 0)))
GEOMETRYCOLLECTION(POINT(2 3 9),LINESTRING((2 3 4,3 4 5)))


The WKT spec is in this document, page 3-24;

http://www.opengis.org/techno/specs/99-049.rtf

dave

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/