In PostGIS I created the following table with a 3D point the 3rd dimension to represent altitude.
create table airports(
id serial not null,
icao char(4) UNIQUE,
iata char(4) UNIQUE);
SELECT AddGeometryColumn ('airports','location',4326,'POINT',3, false);
INSERT INTO airports(ICAO, IATA, location) VALUES('KLAX', 'LAX', ST_SetSRID(ST_MakePoint(45.0,55.0,65.0), 4326));
This works fine.
In order to do in memory Junit testing of the above using GeoDB and H2 I had to make a couple of tweaks as follows:
SELECT AddGeometryColumn (NULL,'AIRPORTS','LOCATION',4326,'POINT',3);
But then I receive an error due to:
Caused by: org.h2.jdbc.JdbcSQLException: Method ST_MakePoint (geodb.GeoDB, parameter count: 3) not found;
INSERT INTO airports(ICAO, IATA, location) VALUES('KLAX', 'LAX', ST_SetSRID(ST_MakePoint(45.0,55.0), 4326));
If I remove the the 3rd altitude parameter as in the above statement the test does not error, however, I seem to be at a standstill as I can't easily work with 3D points now in Junit tests. I will be forced to use a combination of mock frameworks and integration tests against a live postgres DB.
Point data is certainly the most simplistic data we would work with. I have to assume that areas and polygons will each have their own issues in terms of finding compatible syntax and methods. Is there any type of guide that would cover some of these issues. Is there a work around for the ST_MakePoint issue I am having?
Thanks...