Hi,
I'm trying to find the nearest match between two columns of numbers, e.g.
1,1
10,8
30,50
20,100
and the search could be e.g. 20,20
returning 10,8 - i.e. 20-10 = 10 and 20-8 = 12 totalling 22, and hence being the nearest match.
any ideas?
thanks a lot, (1 Reply)
Hi Guys,
I am generating a statistical report , below is the snippet of the code :
Now, $nSlices stands for the time duration,meaning,the statistics will be displayed for that particular time duration. Trouble is, for certain values of $totalTime (which is the end time - start time ), i... (9 Replies)
All
i am struggling to raplace some text in a line between two (closest) patterns ,
line="/home/usr/bin/:/home/usr/devuser,n1.9/bin:/home/usr/root/bin"
i want to replace "devuser,n1.9" with "NEWVAL", basically all teh text from "devuser" until nearest '/' with some new text.
i tried teh... (1 Reply)
Hi Guys,
Please help me out in my situation of writing a shell script
Exampl:I have a output like
asnapply 1 2 3 apply_server=1 apply_schema=ASN
asnapply 1 2 3 apply_server=2 apply_schema=ASN
Now i need output like
asnacmd applysever=1 applyschema=ASN stop
asnacmd applysever=2... (16 Replies)
Hi all of you,
Would be great if you help me with how to round up to whole number from my input values like
2.99996,2.17890,3.00002,-2.3456,-2.7890
o/p should be like 3,2,3,-2,-3
thnks in adv!!!!
regards (3 Replies)
I have a number, which I want to convert into the nearest floating number upto two places after the decimal point.
E.g.
1.2346 will become 1.23
but
1.2356 will become 1.24 .
Similarly
0.009 will be 0.01
and
0.001 will be 0.00 or 0.0 (not 0, wnat to keep the decimal... (1 Reply)
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
I'm looking to match an error code against a list of possible codes and get the nearest match. The code would be a 6 character hexadecimal string.
I have a file of error codes all of which have a specific first 3 characters, however, after that the last 3 characters may be specific or generic as... (3 Replies)
Hello,
I have a file with below content - Example
3
6
69
139
210
345
395
418
490
492
I would like the result as - Multiple of 70 or nearest number in the file less than the multiple of 70
69
139 (5 Replies)
Discussion started by: Mannu2525
5 Replies
LEARN ABOUT DEBIAN
geo::osm::tiles
Geo::OSM::Tiles(3pm) User Contributed Perl Documentation Geo::OSM::Tiles(3pm)NAME
Geo::OSM::Tiles - Calculate tile numbers for OpenStreetMap
SYNOPSIS
use Geo::OSM::Tiles qw( :all );
$zoom = 13;
$lat = 49.60055;
$lon = 11.01296;
$tilex = lon2tilex($lon, $zoom);
$tiley = lat2tiley($lat, $zoom);
$path = tile2path($tilex, $tiley, $zoom);
$tileurl = "http://tile.openstreetmap.org/$path";
DESCRIPTION
This module provides functions for calculating the path to a map tile at OpenStreetMap out of geographic coordinates. The path of a tile
at OSM has the form "$zoom/$tilex/$tiley.png". The numbering scheme is documented in the OSM wiki, see the link below.
"lon2tilex($lon, $zoom)"
Returns $tilex for the tile at longitude $lon and zoom level $zoom. The longitude must be in the range "-180.0 <= $lon < 180.0". The zoom
level must be a non-negative integer.
"lat2tiley($lat, $zoom)"
Returns $tiley for the tile at latitude $lat and zoom level $zoom. The latitude must be in the range "-85.0511 <= $lat <= 85.0511". The
zoom level must be a non-negative integer.
"tile2path($tilex, $tiley, $zoom)"
Composes the path to the tile at $tilex, $tiley, and $zoom at the OSM server. $tilex and $tiley must be integers in the range
"0..2**$zoom-1". The supported range of zoom levels depends on the tile server. The maximum zoom for the Osmarender layer is 17, it is 18
for the Mapnik layer.
"checklonrange($lonmin, $lonmax)"
Checks whether $lonmin and $lonmax are within the allowed range of the longitude argument to "lon2tilex". Returns "($lonmin, $lonmax)"
unchanged if they are ok or corrected values if not.
"checklatrange($latmin, $latmax)"
Checks whether $latmin and $latmax are within the allowed range of the latitude argument to "lat2tiley". Returns "($latmin, $latmax)"
unchanged if they are ok or corrected values if not.
SEE ALSO
<http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames>
AUTHOR
Rolf Krahl <rotkraut@cpan.org>
COPYRIGHT AND LICENCE
Copyright (C) 2008-2010 by Rolf Krahl
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2010-05-15 Geo::OSM::Tiles(3pm)