MerginMaps / geodiff

Library for handling diffs for geospatial data
https://merginmaps.com
MIT License
150 stars 17 forks source link

API to extract WKB from geometry value (fix #162) #170

Closed alexbruy closed 2 years ago

alexbruy commented 2 years ago

Add new function createWkbFromGpkgHeader() to extract geometry in WKB format from the geometry encoded according to GPKG spec.

Fix #162.

alexbruy commented 2 years ago

Not sure where is the right place for it, so I have put it in the same file where other functions related to geometry handling are located. As I have no prior experience with exposing and using C API in Python new function is not public yet.

PeterPetrik commented 2 years ago

You need to add C - wrapper to https://github.com/lutraconsulting/geodiff/blob/master/geodiff/src/geodiff.h and Python-wrapper in https://github.com/lutraconsulting/geodiff/blob/master/pygeodiff/main.py

please add tests too

alexbruy commented 2 years ago

Tried to add wrappers. Not sure if this is the correct way of doing it, but I have never worked with a such low-level stuff before.

PeterPetrik commented 2 years ago

looks good. can you add python test here? : https://github.com/lutraconsulting/geodiff/tree/master/pygeodiff/tests

PeterPetrik commented 2 years ago

can you rebase please from master and also add Geodiff context to the new function in this PR?

alexbruy commented 2 years ago

Tried to address comments. I have no idea whether this is correct way of doing it or not.