-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Merge multiple layers in a single topojson #147
Comments
No, that is not supported. But it would be cool. I know topojson supports multiple layers with single declared arcs, but I don't know what a good approach would be to handle this usecase. Any suggestions or approaches are much welcome! |
Thanks for the quick response! Unfortunately, I wont be of much help, as I am very much a newbie wrt to topojson. I just stumbled upon it, because one data visualization tool requires it. |
One simple solution: you can first merge the geojsons / geo-dataframes together and distinguish them by adding one field. Then in the generated topojson dict, replace the single object by creating a dict based on the field you created. |
@natsuapo, simple but effective. Sounds like an idea worth trying! |
This is now supported by means of multiple geo-dataframes per #169 and is documented here: https://mattijn.github.io/topojson/example/input-types.html#list-of-geodataframes. Usage for above mentioned example can be declared as such: from topojson import Topology
topo = Topology(
data=[regions, municipalities], # can be either a GeoDataFrame or a GeoJSON FeatureCollection
object_name=['regions', 'municipalities']
) Documentation is here: |
Hey, I am trying to merge multiple geojson feature collections to a single topojson, but I cant seem to get it running.
I tried both:
and
but neither of them worked. Is this use case supported?
The text was updated successfully, but these errors were encountered: