You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sis.apache.org by Martin Desruisseaux <ma...@geomatys.fr> on 2012/10/23 14:32:23 UTC

Committed AngleFormat

A worthy class just committed:

https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/measure/AngleFormat.html

This a java.text.Format implementation for parsing and formatting 
angles, longitude or latitude values. The AngleFormat takes a pattern 
(same idea than NumberFormat pattern or DateFormat pattern) which allow 
to specify "degrees", "degrees/minutes" or "degrees/minutes/seconds" 
formats with various precision and various symbols. The default pattern 
uses the Unicode symbols for minutes and seconds (′ and ″), but still 
recognizes the ASCII symbols (' and ") while parsing.

This AngleFormat should be robust to patterns without degrees, minutes 
or seconds symbols. For example it is legal to specify a "DDMM" pattern 
for parsing "1030" as 10°30' (10.5°).

Later, I will port a CoordinateFormat which is basically an aggregate of 
AngleFormat, NumberFormat and DateFormat for spatio-temporal coordinates.

Martin


Re: Committed AngleFormat

Posted by Martin Desruisseaux <ma...@geomatys.fr>.
Le 24/10/12 00:07, Mattmann, Chris A (388J) a écrit :
> Yayyy our first 100% spatial class -- awesome milestone here Martin!

Thanks!

     Martin


Re: Committed AngleFormat

Posted by "Mattmann, Chris A (388J)" <ch...@jpl.nasa.gov>.
Yayyy our first 100% spatial class -- awesome milestone here Martin!

Cheers,
Chris

On Oct 23, 2012, at 5:32 AM, Martin Desruisseaux wrote:

> A worthy class just committed:
> 
> https://builds.apache.org/job/sis-jdk7/site/apidocs/org/apache/sis/measure/AngleFormat.html
> 
> This a java.text.Format implementation for parsing and formatting angles, longitude or latitude values. The AngleFormat takes a pattern (same idea than NumberFormat pattern or DateFormat pattern) which allow to specify "degrees", "degrees/minutes" or "degrees/minutes/seconds" formats with various precision and various symbols. The default pattern uses the Unicode symbols for minutes and seconds (′ and ″), but still recognizes the ASCII symbols (' and ") while parsing.
> 
> This AngleFormat should be robust to patterns without degrees, minutes or seconds symbols. For example it is legal to specify a "DDMM" pattern for parsing "1030" as 10°30' (10.5°).
> 
> Later, I will port a CoordinateFormat which is basically an aggregate of AngleFormat, NumberFormat and DateFormat for spatio-temporal coordinates.
> 
> Martin
>