|
|
Sponsor |
Re: Re: fehlerhafte gradausgabe der geoclass???: msg#00070gis.opengeodb
grad war ich dabei, die funktion umzuschreiben =:o) scon komisch, was fuer einen aufwand fuer das runden der sekunden betreiben muss... die ausgabe sieht jetzt aber gut aus, besten dank!!! ist diese version der Geo.php eigentlich bestandteil des offiziellen GeoClass version? rainer "Thomas Mack" <mack-c2wOA+Pc/kHquOJu9mQKZg@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag news:4131F895.mailP3O112DL7@xxxxxxx >leider liefert die so gepatchte version auch fehlerhafte resultate, die >anzeige der sekunden werte stimmt meistens nicht (1 zuviel) > Der Bugreport war damit noch zu Ende. Ich hatte DIESE Version mal schnell zusammengestrickt gehabt, aber dann fiel mir auf, dass das nicht korrekt war. Der hoffentlich richtige Code stand dann im Kommentar zum Bugreport auf sourceforge.net: function deg2dms($degFloat, $decPlaces = 0) { $deg = abs($degFloat) + 0.5 / 3600 / pow(10, $decPlaces); $degree = floor($deg); $deg = 60 * ($deg - $degree); $minutes = floor($deg); $deg = 60 * ($deg - $minutes); $seconds = floor($deg); $subseconds = ($deg - $seconds); for($i=1;$i<=$decPlaces;$i++) { $subseconds = 10 * $subseconds; } $subseconds = floor($subseconds); if ($decPlaces > 0) { $seconds = $seconds.".".sprintf("%0${decPlaces}s",$subseconds); } return $degree."° $minutes' $seconds''"; } Ich hoffe, dieser Code ist jetzt "wirklich" richtig. Grüße, Thomas
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: fehlerhafte gradausgabe der geoclass???, Thomas Mack |
|---|---|
| Next by Date: | Frage zur Ausnutzung von OpenGeoDB, Alexander Manhart |
| Previous by Thread: | Re: Re: fehlerhafte gradausgabe der geoclass???, Thomas Mack |
| Next by Thread: | Frage zur Ausnutzung von OpenGeoDB, Alexander Manhart |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|