[geotk] WKT and TemporalCRS
Aaron Braeckel
braeckel at ucar.edu
Tue Nov 16 12:36:13 EST 2010
Hello,
just following up on a conversation with Martin today. I am building a
4-D temporal CRS, writing it out to WKT, and trying to read it back in.
I need to go both ways for my client/server app. It sounds like the
TemporalCRS is not standardized, and there is not currently any WKT
reading support for it. I can think of two options:
1) Decide on a format and implement TemporalCRS support
2) I change courses and use another standardized format (GML or
something else) for CRS representations
Any thoughts?
Aaron
Code:
===============
CoordinateReferenceSystem crs2D = CRS.decode ( " EPSG:27582 " );
System.out.println( crs2D );
System.out.println( "======================" );
TemporalCRS temporalAxis = DefaultTemporalCRS.JULIAN;
VerticalCRS verticalAxis = DefaultVerticalCRS.GEOIDAL_HEIGHT;
CompoundCRS crs4D = new DefaultCompoundCRS( " MyCRS4D " , crs2D,
temporalAxis, verticalAxis);
String crs4DWKT = crs4D.toString();
System.out.println( crs4DWKT );
System.out.println( "======================" );
Parser wktParser = new ReferencingParser();
CoordinateReferenceSystem crs =
(CoordinateReferenceSystem)wktParser.parseObject( crs4DWKT );
===============
java.text.ParseException: Error in "COMPD_CS": Type "TEMPORALCRS" is
unknown in this context.
at
org.geotoolkit.io.wkt.ReferencingParser.parseCoordinateReferenceSystem(ReferencingParser.java:293)
at
org.geotoolkit.io.wkt.ReferencingParser.parseCompdCS(ReferencingParser.java:987)
at
org.geotoolkit.io.wkt.ReferencingParser.parse(ReferencingParser.java:326)
at org.geotoolkit.io.wkt.Parser.parseObject(Parser.java:131)
More information about the Geotoolkit
mailing list