-
Notifications
You must be signed in to change notification settings - Fork 77
Generate lexicographically ordered IDs for writeGeojson features #1640
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| package org.jetbrains.kotlinx.dataframe.geo.io | ||
|
|
||
| import org.geotools.referencing.CRS | ||
| import org.jetbrains.kotlinx.dataframe.api.dataFrameOf | ||
| import org.jetbrains.kotlinx.dataframe.geo.GeoDataFrame | ||
| import org.jetbrains.kotlinx.dataframe.geo.toGeo | ||
|
|
@@ -35,17 +36,18 @@ class IOTest { | |
| assert(geodf.crs == null) | ||
| } | ||
|
|
||
| /* | ||
| TODO: doesn't work for now - writers adds ids that breaks order when read features | ||
| @Test | ||
| fun writeGeoJson() { | ||
| val tempFile = Files.createTempFile("simple_points", ".json").toFile() | ||
| simplePointsGeoDf.writeGeoJson(tempFile) | ||
|
|
||
| assertEquals(simplePointsGeoDf, GeoDataFrame.readGeoJson(tempFile.toURI().toURL())) | ||
| val loadedGeoDataFrame = GeoDataFrame.readGeoJson(tempFile.toURI().toURL()) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to add more IO overloads ;) |
||
| assertEquals(simplePointsGeoDf.df, loadedGeoDataFrame.df) | ||
| // TODO: Doesn't work because of how equality between CRS is checked by geotools | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The proper way to check CRS equality in Geotools is But there, shouldn't they be equal?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait, then there's problem here! In GeoDataFrame (as in GeoJson specification) longitude should always go first! That's important!
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to |
||
| // assertEquals(simplePointsGeoDf, loadedGeoDataFrame) | ||
|
|
||
| tempFile.deleteOnExit() | ||
| }*/ | ||
| } | ||
|
|
||
| @Test | ||
| fun readShapefile() { | ||
|
|
||




Uh oh!
There was an error while loading. Please reload this page.