Comments (7)
I just noticed that epsg:4326
is the CRS for all GeoJSON: https://datatracker.ietf.org/doc/html/rfc7946#section-4
from mesa-geo.
I just noticed that
epsg:4326
is the CRS for all GeoJSON: https://datatracker.ietf.org/doc/html/rfc7946#section-4
Yes, this was the reason I originally hardcoded it to epsg:4326
. However, from re-reading the spec and looking around on the internet this is a bit unclear. I mean if there is no crs
attribute it is correct to use epsg:4326
, but if it is set we should respect it. Currently GeoDataFram.from_features
is used, which does not seem to check the crs, but I am not sure
from mesa-geo.
BTW I really like your diagram!
But I think this boils a lot down to #48.
I might totally misrember that, but I think currently the CRS of the GeoSpace is only used for setting up the transformation inside MapModule. So it should probably removed from GeoSpace and the transformation inside MapModule (which should be renamed to LeafletMapModule) should transform from the agents CRS to epsg:4326
from mesa-geo.
Thanks a lot for your comments! I really need some opinions on how to design the GIS functionalities moving forward.
Yes, this was the reason I originally hardcoded it to
epsg:4326
. However, from re-reading the spec and looking around on the internet this is a bit unclear. I mean if there is nocrs
attribute it is correct to useepsg:4326
, but if it is set we should respect it. CurrentlyGeoDataFram.from_features
is used, which does not seem to check the crs, but I am not sure
After reading more about GeoJSON, I am in fact thinking to honor the epsg:4326
gcs in its spec, as this might be the case in most other python packages. Thereafter we can use GeoJSON as the interfacing protocol between backend python modules and frontend js elements, much like what you were already doing, but probably with a few small changes.
I might totally misrember that, but I think currently the CRS of the GeoSpace is only used for setting up the transformation inside MapModule.
Yup this is correct.
So it should probably removed from GeoSpace and the transformation inside MapModule (which should be renamed to LeafletMapModule) should transform from the agents CRS to
epsg:4326
If like I mentioned above, GeoJSON is still going to be used as the interface between backend & frontend, then the transformation of GeoAgent and GeoSpace into epsg:4326
can be done in their own __geo_interface__
functions respectively.
I am considering adding a crs
attribute for GeoAgent
objects, so that they can transform by themselves. When being added into GeoSpace
, they will be transformed into the crs of GeoSpace
. In this way we don't need the implicit constraint that AgentCreator
and GeoSpace
should have the same crs.
This is one of the things I'm working on at the moment. Will add you into the PR for your feedback when it's ready.
from mesa-geo.
After reading more about GeoJSON, I am in fact thinking to honor the
epsg:4326
gcs in its spec, as this might be the case in most other python packages. Thereafter we can use GeoJSON as the interfacing protocol between backend python modules and frontend js elements, much like what you were already doing, but probably with a few small changes.
For writing GeoJSON we should definitely stick to epsg:4326
, for reading (if crs present) - I have no idea how this is usually handled. But yeah, this was the originally idea of the geo_interface
If like I mentioned above, GeoJSON is still going to be used as the interface between backend & frontend, then the transformation of GeoAgent and GeoSpace into
epsg:4326
can be done in their own__geo_interface__
functions respectively.
True.
I am considering adding a
crs
attribute forGeoAgent
objects, so that they can transform by themselves. When being added intoGeoSpace
, they will be transformed into the crs ofGeoSpace
. In this way we don't need the implicit constraint thatAgentCreator
andGeoSpace
should have the same crs.
That sounds like a sane approach.
This is one of the things I'm working on at the moment. Will add you into the PR for your feedback when it's ready.
Great! Really happy to see work being done on mesa-geo!
from mesa-geo.
Happy to hear some feedback from you too! We should have more conversations in the future : )
from mesa-geo.
Closed via #58.
from mesa-geo.
Related Issues (20)
- Zoom to GeoSpace automatically HOT 1
- Spatial indexing of GeoAgents HOT 3
- Missing ModularVisualization in rainfall example? HOT 14
- Add citation information about Mesa-Geo
- Implement simpler Mesa-Geo namespace HOT 1
- v0.4.0 release HOT 3
- Improving `RasterLayer` HOT 4
- Add test for python 3.11
- Move mesa-geo examples into mesa-examples repo HOT 6
- ci: Replace flake8 with Ruff HOT 1
- cookiecutter for mesa-geo
- Uncaught ReferenceError in examples HOT 4
- automatically adjusting/zoomable map?
- v0.5.0 release HOT 1
- Update for Mesa v2.1 HOT 1
- v0.3.0 release HOT 8
- ValueError when adding vector layers into GeoSpace
- Convenient methods in RasterLayer HOT 2
- Add scale to Leaflet map HOT 1
- Add legend to Leaflet map
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 mesa-geo.