Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

How to export figure like Post In Action demonstrate?

$
0
0

I am reading the book “PostGIS In Action”

and now I follow the listing 2.4 here

SELECT AddGeometryColumn ('public','my_geometries',
'my_circular_strings',-1,'CIRCULARSTRING',2);
INSERT INTO my_geometries(name,my_circular_strings) 
VALUES ('Circle',
ST_GeomFromText('CIRCULARSTRING(0 0,2 0, 2 2, 0 2, 0 0)')), 
('Half Circle',
ST_GeomFromText('CIRCULARSTRING(2.5 2.5,4.5 2.5, 4.5 4.5)')), 
('Several Arcs',
ST_GeomFromText('CIRCULARSTRING(5 5,6 6,4 8, 7 9, 9.5 9.5,
11 12, 12 12)'));

And out put as

SELECT name,ST_NPoints(my_circular_strings) As cnpoints, 
ST_NPoints(ST_CurveToLine(my_circular_strings)) As lnpoints 
FROM my_geometries 
WHERE my_circular_strings IS NOT NULL;

and postgresql give me a table

                        name                        | cnpoints | lnpoints 
----------------------------------------------------+----------+----------
 Circle                                             |        5 |      129
 Half_Circle                                        |        3 |       65
 Several Arcs                                       |        7 |      113
(3 rows)

My question is the book also give me a figure as result like below

book's example

I want to make a picture like that ,how to do it??


Viewing all articles
Browse latest Browse all 1138

Latest Images

Trending Articles



Latest Images