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
Add OGR.input plugin to read all OGR supported vector formats #170
Comments
[kunitoki] This is the ogr support for features. It is untested cause i have problems with manual compilation of mapnik here (but at least it compiles). What i have done so far:
What could be improved:
|
[springmeyer] I just rebuilt with this patch. Good stuff! Compile went great. Creating a layer worked!
But via python I crashed with a bus error on mac 10.5 when I specified a layer that did not exist:
And got a segmentation fault trying to call dir on the layer object:
|
[kunitoki] i've fixed the initial draft of the input plugin. the rundemo.cpp is working as expected and produces the png we want. awaiting merge into trunk for better testing and improvement. |
[kunitoki] patch here (trac is diying when uploading an attachment here): [http://www.anticore.org/tmp/ogr_input_plugin_final.patch] |
[springmeyer] Awesome, applied with minor modifications in r837 |
[springmeyer] some basic tests(via python) available here: http://mapnik-utils.googlecode.com/svn/sandbox/ogr_plugin/ |
[springmeyer] kunitoki, Okay I also applied the fixes for cairo, but not your changes to rundemo.cpp. Can you please post a separate patch for that to #197 ? Thanks! |
[springmeyer] I'm able to crash python when trying to read from a .gpx file: {{{ Thread 0 Crashed: |
[kunitoki] Replying to [comment:7 springmeyer]:
yeah sure, i can package a more detailed rundemo with all the input plugins under testing |
[kunitoki] Replying to [comment:8 springmeyer]:
The problem could be in the wkb transcode (''ogr_featureset.cpp @ line 75''): {{{ Probably not the best way to do this. Another way could be a big switch around the ogr geometry type to determine the derived class, then iterate over the points and initialize the mapnik feature from there (more longer to write but probably more faster, one less conversion). Is wkb standard in both implementations ? Anyway would be cool if you can feed '''ogr2ogr''' with the problematic file and see if it is a problem of ogr in the first place... |
[springmeyer] Replying to [comment:10 kunitoki]: Yes, feeding ogr2ogr shows some problems with the file (but it converts okay): File is this one: http://mapnik-utils.googlecode.com/svn/sandbox/ogr_plugin/data/test_point_line.gpx {{{ Warning 1: GPX driver only reads 2 links per element. Others will be ignored. This can be changed with the GPX_N_MAX_LINKS environment variable Warning 6: Field time create as date field, though DateTime requested. |
[springmeyer] Another issue is that something is going wrong with the TextSymbolizer when reading from the ogr plugin. See the new tests here: http://mapnik-utils.googlecode.com/svn/sandbox/ogr_plugin/ and the resulting map here: http://mapnik-utils.googlecode.com/svn/sandbox/ogr_plugin/maps/world_population_ogr.png which should look like: http://trac.mapnik.org/wiki/XMLGettingStarted |
[kunitoki] Ok here it is another version (4th):
|
[springmeyer] Okay, this 4th patch was applied in r841 and with that all basic tests pass, labeling, filters, feature_at_point. Closing this ticket. Thanks kunitoki! |
[springmeyer] applied 6th patch in r871 (to support the encoding parameter) |
This has been requested a number of times on the mailing list.
The text was updated successfully, but these errors were encountered: