You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make my own python datasource (and add docs for it). All code seems to be present in the python-mapnik repository, except for the python input plugin. But it's also not present in the mapnik repository afaiks.
I made a class in geopandas_datasource.py named GeopandasDatasource and then thought I needed to register it like this:
RuntimeError: Could not create datasource for type: 'python' (searched for datasource plugins in '/home/dolfandringa/Documents/GPS tracks, /usr/local/lib/mapnik/input')
And now that I dig deeper, in /usr/local/lib/mapnik/input I only see the following:
no python.input. And in the mapnik code there is also no code for one. But I can't find any code for it either in the python-mapnik. What am I missing here?
The text was updated successfully, but these errors were encountered:
actually you would need to create a c++ plugin that wraps those. I don't know of any python plugin. All those other plugins are c++ libraries.
So you might be able to do this, but it would be a bit more complicated.
I would think of something like this:
create a c++ mapnik plugin like the others
the plugin loading of mapnik is as followed: load .input file and look for a symbol datasource_name and call it. This gets the name for the plugin under which it will be registered. Now, here it gets tricky: You would need to register e.g. a plugin called python which in turn have own bindings to load data from python calls (e.g. geopandas)
The symbols for plugins might change with upcoming mapnik v4
I am trying to make my own python datasource (and add docs for it). All code seems to be present in the python-mapnik repository, except for the python input plugin. But it's also not present in the mapnik repository afaiks.
I made a class in
geopandas_datasource.py
namedGeopandasDatasource
and then thought I needed to register it like this:but I get an error:
And now that I dig deeper, in
/usr/local/lib/mapnik/input
I only see the following:no python.input. And in the mapnik code there is also no code for one. But I can't find any code for it either in the python-mapnik. What am I missing here?
The text was updated successfully, but these errors were encountered: