hdam99@hotmail.com (2) [Avatar] Offline
#1
Hi,

I'm using OpenJump 1.4.1 and try to display the arc/circles in listing 2.4. I got the "Array Index Out of Bound Exception". The sql command was taken from the book as well:

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;

1. Did I miss anything?
2. What tool did you use to generate Figure 2.13?

Thanks - H
regina.leo (265) [Avatar] Offline
#2
Re: Get error when trying to display circular string using OpenJump
H,

Used OpenJump. You need to use ST_AsBinary with the column -- see chapter 12 of the book.

I think in the very latest version of OpenJump though, the ST_AsBinary wrapper is no longer needed. I aslo assume that is not the query you ran.

Try:

SELECT name, ST_AsBinary(ST_CurveToLine(my_circular_strings)) As geom
FROM my_geometries
WHERE my_cicular_strings IS NOT NULL;
hdam99@hotmail.com (2) [Avatar] Offline
#3
Re: Get error when trying to display circular string using OpenJump
Hi,

Thank you, it works.

Note: you don't need to use ST_AsBinary() in the latest OpenJump (1.4.1).

Thx - H