Harald could also commit this fixes; Jody
On Thu, Apr 16, 2009 at 1:36 AM, Jesse Eichar <[email protected]> wrote: > Thanks Hrald I will try to get these fixes applied soon. > > On Thu, Apr 9, 2009 at 5:28 PM, Wellmann, Harald > <[email protected]> wrote: >> >> Here is a fix that works for me: >> >> public static boolean isLatLong(CoordinateReferenceSystem crs) { >> Unit<?> unit = getUnit(crs); >> boolean isLatLong = >> unit.getStandardUnit().equals(javax.measure.unit.SI.RADIAN); >> return isLatLong; >> } >> >> >> After that, I stumbled into another problem with the CursorPosition >> tool. My coordinate values are integral numbers with 8 to 10 digits, but >> the cursor position tool only displays numbers between 1 and 9. >> >> The problem is in >> n.r.u.tools.internal.CursorPosition.LineItem.getString(), where floating >> point numbers are not handled correctly. >> >> I replaced String.valueOf(doubleValue) by String.format("%f", >> doubleValue), because valueOf returns exponential represensations like >> 1.234567E8 which break the logic of the rest of this method, which looks >> a bit unclear to me anyway. >> >> I'm not sure what the statement >> >> string+="00"; >> >> is doing. I commented it out and could notice no difference, neither for >> my large integer coordinates, nor for standard WGS84. >> >> Cheers, >> >> Harald >> >> ________________________________ >> >> Von: [email protected] >> [mailto:[email protected]] Im Auftrag von >> Wellmann, Harald >> Gesendet: Donnerstag, 9. April 2009 10:25 >> An: User-friendly Desktop Internet GIS >> Betreff: AW: [udig-devel] Using a non-standard CRS >> >> >> I haven't really digged deeper into either geotools referencing >> or javax.measure so far, but my first idea was not to check if the unit >> is "degree" but to check if it is derived from "rad" and then to apply a >> scale factor. I'll have a go at that and post a patch if it works... >> >> My NDS gets converted by javax.measure to "rad*1.46...E-9" >> automatically, so that should not be a problem. >> >> Cheers, >> Harald >> >> >> ________________________________ >> >> Von: [email protected] >> [mailto:[email protected]] Im Auftrag von Jesse >> Eichar >> Gesendet: Donnerstag, 9. April 2009 09:17 >> An: User-friendly Desktop Internet GIS >> Betreff: Re: [udig-devel] Using a non-standard CRS >> >> >> The idea is there is a very simple and accurate way to >> calculate scale if the units are linear. So ScaleUtilities uses 2 ways >> to calculate the scale of the map. The method should probably called >> usesAngularUnits or something like that. But I copied the method so I >> left the name alone. If you can determine a better way to detect if the >> units are angular please let me know. >> >> JEsse >> >> >> On Thu, Apr 9, 2009 at 2:19 AM, Jody Garnett >> <[email protected]> wrote: >> >> >> Hi Harald: >> >> I am not sure what ScaleUtils is doing here; I >> expect there is a gap. >> I think the assumption is about "units" rather >> than the name "lat" or >> "long". I suspect Jesse has an optimized path >> for lat/long and this >> method is used to check what is going on before >> taking a longer more >> expensive code path involving transformations? >> >> Have a look at what calls this method? Also note >> we may need to teach >> the java units system about "NDS" in order to >> get this to work. >> >> Jody >> >> ******************************************* >> innovative systems GmbH Navigation-Multimedia >> Geschaeftsfuehrung: Edwin Summers - Michael Juergen Mauser >> Sitz der Gesellschaft: Hamburg - Registergericht: Hamburg HRB 59980 >> >> ******************************************* >> Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte >> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail >> irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und >> loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte >> Weitergabe dieser Mail ist nicht gestattet. >> This e-mail may contain confidential and/or privileged information. If you >> are not the intended recipient (or have received this e-mail in error) >> please notify the sender immediately and delete this e-mail. Any >> unauthorized copying, disclosure or distribution of the contents in this >> e-mail is strictly forbidden. >> ******************************************* >> _______________________________________________ >> User-friendly Desktop Internet GIS (uDig) >> http://udig.refractions.net >> http://lists.refractions.net/mailman/listinfo/udig-devel > > > _______________________________________________ > User-friendly Desktop Internet GIS (uDig) > http://udig.refractions.net > http://lists.refractions.net/mailman/listinfo/udig-devel > > _______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
