Closed krishnaglodha closed 2 years ago
I think I might also be having the same issue. We have a db constraint that does not allow certain lat/long points to be crossed. I was hoping to restrict it via the bounding box.
The following error is generated via a db procedure. You can see the point generated.
couldn't project point (54 -91 0): latitude or longitude exceeded limits (-14)
This is the call
generate_random("Polygon", boundingBox=[-14, -14, 14, 14])
Hello @krishnaglodha and @Amertz08 I have not been able to reproduce this error. generate_random("Polygon", boundingBox=[-14, -14, 14, 14])
works as expected for me when I run it. If you can provide a code block that reproduces the error I will reopen this issue and investigate.
Hey,
I'm working with the generate_random
function in utils, and it's not working correctly.
python==3.9.2 (also tried with 3.10.8) geojson==2.5.0
from geojson import utils
utils.generate_random(featureType = 'Polygon', boundingBox = [-14, -14, 14, 14], numberVertices=10)
Output:
{"coordinates": [[[43, 71], [-2, 34], [-47, 50], [-42, 8], [-64, -26], [-53, -79], [2, -44], [18, -20], [117, -23], [61, 25], [43, 71]]], "type": "Polygon"}
Let me know if you need more information.
I'm trying to send custom values in boundingBox, to generate random geometry. The functions seems to be working correctly for Point and Linestring, but having problem in Polygon