Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spacing typecast to int #10

Closed
jwardbond opened this issue Nov 26, 2024 · 1 comment
Closed

spacing typecast to int #10

jwardbond opened this issue Nov 26, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@jwardbond
Copy link
Contributor

jwardbond commented Nov 26, 2024

spacing = int(0.25 * minimum_distance(gdf)) # less than 0.5? The less, the better?

Hello!

This line here changes spacing to int. This works okay for certain projected coordinate systems, but fails for others (any time spacing < 0, which happens when using e.g. buildings in EPSG:4326).

I think the code is still functional if this is taken out, and spacing is left as a float. Is there a reason for this type conversion?

@longavailable
Copy link
Owner

This line here changes spacing to int. This works okay for certain projected coordinate systems, but fails for others (any time spacing < 0, which happens when using e.g. buildings in EPSG:4326).

Exactly. int() will not work on the most case in a geometry coordinate system(GCS).

I think the code is still functional if this is taken out, and spacing is left as a float. Is there a reason for this type conversion?

No too much reason. int type is simple than float, especially in most PCS situations.

Let's see if float will work better.

@longavailable longavailable added bug Something isn't working enhancement New feature or request labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants