You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the matter of performance, I don't want to create a new Geohash object within a large for loop encoding thousands of coordinates to their respective geohashes. But as far as I can see, it's methods are not meant to be called twice.
Example:
useLeague\Geotools\Geohash\Geohash;
$Hash = newGeohash();
echo$Hash->encode(newCoordinate(array(0, 0)), 12); // prints "7zzzzzzzzzzz" as expectedecho$Hash->encode(newCoordinate(array(49, 7)), 12); // still prints "7zzzzzzzzzzz" instead of "u0syz21jxy43"
Looking at the code, that's quite obvious. First of all, latitude and longitude interval are used from the previous encoding (see Geohash.php#L134-L135) and the geohash is never set back to an empty string.
Is there any reason for that?
The text was updated successfully, but these errors were encountered:
For the matter of performance, I don't want to create a new Geohash object within a large for loop encoding thousands of coordinates to their respective geohashes. But as far as I can see, it's methods are not meant to be called twice.
Example:
Looking at the code, that's quite obvious. First of all, latitude and longitude interval are used from the previous encoding (see Geohash.php#L134-L135) and the geohash is never set back to an empty string.
Is there any reason for that?
The text was updated successfully, but these errors were encountered: