Comments (10)
Given that our interface has changed, it is probably related to our side. I will check it.
from geotables.jl.
After some investigation. I noted that the error occurs when trying to write a Multi
Rope to GeoJSON.jl
. For example, when writing a MultiRope
is saved as a Polygon
and then there is an error when loading it used in GeoTables.jl
.
There has been a change on April about those lines. It might be related to that, but I am not completely sure. I will try to make some time to check it in more detail.
from geotables.jl.
Thank you @ErickChacon for nailing down the issue. So apparently we discovered a bug in GeoJSON.jl?
I am really enjoying our new Rope/Ring types. They are helping with the identification of bugs downstream already.
from geotables.jl.
@ErickChacon any chance you can take a look at this? I've commented some tests that are failing and am not sure if they are failing because of an issue in our side or an issue in one of the backend packages (Shapefile.jl, GeoJSON.jl, ...).
from geotables.jl.
We replaced Chain by Rope + Ring. I modified the tochain and topolygon function in conversion.jl. Moving forward we have the "closedness" of a chain as part of the type.
from geotables.jl.
@ErickChacon I replaced the check first(points) == last(points)
in our tochain
function by GI.isclosed(geom)
to make sure that we are not missing anything. The issue remains.
@eliascarv pointed out that this issue may be related to the fact that GeoJSON.jl saves as Float32 and then coordinates that used to be different in Float64 became equal in single precision.
from geotables.jl.
I do not think it is a problem related to the float type. I think is the design of saving multilinestrings as Polygons in GeoJSON.jl
. I just want to check why this was not a problem before, so I am completely sure and open a issue in GeoJSON.jl
from geotables.jl.
I think I know what's happening:
- It was already an existing bug, we were not able to catch it because before we were reading lazily our saving data, we did not need to transform the geometries to
Meshes.jl
, so we were not checking if the geometries were valid. - We starting to see the bug when introducing the lazy argument. Now, by default, we already convert the geometries, so we get errors for invalid geometries.
- The previous
PolyArea
implementation used to send clear messages when the chains were not valid thanks to the lines: https://github.com/JuliaGeometry/Meshes.jl/blob/7e9ee079d0581e4b1f2f6f4772170a9b00ad46fe/src/polytopes/polyarea.jl#L29-L30
For example, the previous implementation would show the following message:
# ERROR: AssertionError: invalid outer chain
# Stacktrace:
# [1] PolyArea{2, Float32, Chain{2, Float32, Vector{Point2f}}}(outer::Chain{2, Float32, Vector{Point2f}}, inners::Vector{Any}, fix::Bool)
I will create a MWE and start a issue in GeoJSON.jl.
from geotables.jl.
Continuing with the previous explanation. The error is clear now:
ERROR: MethodError: no method matching PolyArea(::Rope{2, Float64, Vector{Point2}})
Meaning that Meshes.jl
can not construct the polygon saved by GeoJSON
because first and last points are not the same. Again, this is definitely an issue with GeoJSON.jl
because is saving an invalid polygon.
from geotables.jl.
Hi @ErickChacon any advance on the GeoJSON.jl side?
from geotables.jl.
Related Issues (19)
- TagBot trigger issue HOT 132
- GeoTable from GADM HOT 1
- VS Code View HOT 3
- Load a GeoPackage dataset HOT 48
- Fix build on GitHub Actions HOT 1
- create GeoTable from GeoDataFrame HOT 8
- Use GDAL to write other formats to disk HOT 1
- Precompile typical workloads with PrecompileTools.jl HOT 1
- Fix incorrect rings in load
- Fix save issues in test suite HOT 1
- Add *.parquet support with GeoParquet.jl
- Add tests for geoparquet HOT 1
- More fixes to show HOT 4
- `show` failing with missing value columns
- `push!` and `append!` of GeoTable HOT 1
- Possible problem in the `Tables.subset` API HOT 3
- Add performance tests with feature and geometric transforms
- Replacement for gadm() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geotables.jl.