-
Notifications
You must be signed in to change notification settings - Fork 13
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
one more pass at branch/fork unification? #27
Comments
Thanks, @denvaar! |
Emilio, for odm2 rest api, you have put some comments here, ODM2/ODM2RESTfulWebServices#1. This work is still under development server to get your review. If you think it is OK, I will update current version on github, called the production version from the development version. |
Thanks, Choonhan. Yeah, I'm so sorry that I never followed up with comments and reviews on your latest version of the ODM2REST API! This has been on hold for so long, that I think you should go ahead and push to production. It's all still experimental anyway. I do want to get to it sooner rather than later, but right now I can't say when. Regarding this comment:
Thanks for those details. That's exactly the kind of information we need to get to the point where the Is that the only change you've made in your fork?? If so, we're in great shape! |
Thanks, Emilio. I will update it integrating with odm2api on github.
this import (https://github.com/ODM2/ODM2PythonAPI/blob/master/odm2api/ODM2/apiCustomType.py) tells how to compile and save the geometry data. |
(note: I'm editing/correcting what I wrote here a minute ago...) @cdesyoun, are you saying your issue is fixed in the current master branch? To ensure you've installed the correct geoalchemy1 package (our ODM2 fork), please see the new installation instructions on README.md. If you don't want to use conda to install the dependencies, try installing |
Emilio, I installed geoalchemy and odm2api packages on github into my virtual environment for python.
it was changed, commenting out the customized Geometry class. when reading the value for "FeatureGeometry" column, this current Geometry class shows this value, "0101000020E6100000DAE6C6F484014EC0D5CF9B8A54580AC0". But, the previous Geometry class in apiCustomType.py shows this value, "POINT(-55.51212 -1.94778)" as the readable text. Can we import this customized Geometry class back below?
|
@cdesyoun, I'm trying to understand the issue clearly and track what changes have been made recently. apiCustomType.py was deprecated when we switched to using geoalchemy1 (see issue#13); it relied on geoalchemy2. From those same comments, it's unclear if there was functionality in apiCustomType.py that should be brought back, but w/o using geoalchemy2. This will take more research while Stephanie is away. At the same time, in the last couple of days @denvaar made some changes to models.py, then reverted some of them (for good reasons) while making other changes. When exactly did you install the Also bear in mind that it's not obvious that FeatureGeometry should return a WKT by default, even if that was the previous behavior. For complex geometries (polygons, long lines), that may not be ideal. However, it should definitely provide easy access to the WKT! This will require a good amount of additional research. I've started poking, but I'll try to do this next week; the more you can help me with testing, the better. |
This may be somewhat of a tangent (though related to the broad code clean-up topic) ... As I mentioned in my previous comment (referencing an earlier issue discussion with @sreeder), ODM2/apiCustomType.py has been deprecated since we decided to switch from geoalchemy2 to geoalchemy1. To double check, I did a search for usage across the odm2api, and the only place where it's imported is in ODM2/models_sqlite.py; which in turn seems like a deprecated or test version. models_sqlite.py is not called from anywhere in odm2api. I think we should remove both |
Emilio, this issue was that currently, the return value of "FeatureGeometry" is wkb, not wkt when querying "SamplingFeature". for example,
When using "apiCustomType.py", the return value was wkt. And I uploaded this models_sqlite.py, https://github.com/ODM2/ODM2PythonAPI/blob/master/odm2api/ODM2/models_sqlite.py as test example, creating schema into sqlite via sqlalchemy interface. You can remove this file. |
@emiliom I merged the setup branch into master this morning and deleted the branch. There were no merge conflicts (surprising) so hopefully the merge won't have any negative repercussions. Most of my work on the setup branch was adding new things rather than changing things. @cdesyoun As for the sampling features, when I reverted the changes I made to SamplingFeature's |
@emiliom and @denvaar, I got a readable text from WKB in FeatureGeometry using these codes below:
The result is below:
so, there is no issue in odm2 REST api currently. |
@emiliom and @valentinedwv, I updated ODM2 REST API that integrates with odm2api with Emilio's review comments. Test site is http://sis-devel.cloudapp.net/docs/. |
Thanks, @denvaar!! Terrific. I didn't get a chance to test it today, but hopefully tomorrow.
Thanks for that testing, @cdesyoun. Personally, I think odm2api should provide access to the WKT text representation much more easily, and not expect users to do all the transformations you've implemented. Independent of whether or not WKT is the default BTW, you have hard-wired a point-type in your conversion. Most SamplingFeatures you'll encounter will be points, but we can't assume that in general. |
@emiliom this code example can parse WKB points, and even other geometry shapes. This example is not hard-wired point type. just load WKB format and dump it as WKT, regardless of any specific geometry types. |
The topics brought up here have been addressed, or moved elsewhere (eg, #60). So, I'm closing this issue. |
We've done a pretty significant amount of code reorganization and cleanup since mid November, and that's all now pretty stable in the master branch. But there are two possible additional loose ends that we should tackle for merging into master:
Thanks!
The text was updated successfully, but these errors were encountered: