Skip to content
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

Adapter should release and callback on close #101

Closed
wants to merge 3 commits into from

Conversation

Nanonid
Copy link
Contributor

@Nanonid Nanonid commented Jan 2, 2018

All references to the DB need to be released for the destructor to be called.
Also, callback on close.
Needs more verification.
This change cleans up some EPERM errors on Win10, but not all EBUSY errors on unlink.

All references to the DB need to be released for the destructor to be called.
Also, callback on close.
Needs more verification.
This change cleans up some EPERM errors on Win10, but not all EBUSY errors on unlink.
Callback parameter was missing.
@Nanonid
Copy link
Contributor Author

Nanonid commented Jan 2, 2018

Before unlink, close on the file descriptor should be fully completed.
FD is not kept track of, so the adapters should have this functionality.

Update to readme to demonstrate feature extraction which works for current library.
@Nanonid
Copy link
Contributor Author

Nanonid commented Jan 3, 2018

Added working example to Readme for #99

@danielbarela
Copy link
Member

Why did you remove the example code for retrieving the tile tables?

@Nanonid
Copy link
Contributor Author

Nanonid commented Jan 4, 2018

Because this code is supposed to work after cut and paste.
I don't believe there are any tiles in the river.gpkg, which is one of your test geopackages.
If there is a different geopackage with both feature that will "just work", I'll change it.

@danielbarela
Copy link
Member

test/fixtures/rivers.gpkg has both features and tiles.

@Nanonid
Copy link
Contributor Author

Nanonid commented Jan 5, 2018

Then I will re-add and test for it and update the MD.

@waghmareatul8
Copy link

I was trying to run the geopackage. However I feel there is query regarding the path.
My attempt was to access the geopackage tiles. But could not manage to accomplish the task.

It would be great if it is considered to help me out.

@danielbarela
Copy link
Member

@Nanonid any update on re-adding that to the README?

@Nanonid
Copy link
Contributor Author

Nanonid commented Jan 16, 2018

@danielbarela I'm trying to make the test a bit more informative to make the example "just work". I'll work it over the next few days.

@waghmareatul8
Copy link

waghmareatul8 commented Jan 17, 2018 via email

@waghmareatul8
Copy link

Dear Sir,

I went through other scripts, could you please guide the way one can query to Geo-package using those scripts.

@danielbarela
Copy link
Member

What exactly are you trying to query for?

@waghmareatul8
Copy link

waghmareatul8 commented Jan 21, 2018 via email

@danielbarela
Copy link
Member

Do you have a GeoPackage with the data you want to query for that you can share? The library allows you to do just about any query you want. What specific query are you trying to do that you are unable to do?

@waghmareatul8
Copy link

waghmareatul8 commented Jan 21, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Jan 24, 2018 via email

@danielbarela
Copy link
Member

@waghmareatul8 This library is backed by SQLite and does not include spatialite, so I believe that you are correct.

@waghmareatul8
Copy link

waghmareatul8 commented Jan 24, 2018 via email

@danielbarela
Copy link
Member

@waghmareatul8 Once you have a reference to the FeatureDao for the table you would like to query you can use any of the query methods that are defined in the Dao class to query.

@waghmareatul8
Copy link

waghmareatul8 commented Jan 24, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Jan 27, 2018 via email

@danielbarela
Copy link
Member

@waghmareatul8 I wrote a new test in that file to demonstrate what I believe is the functionality you are trying to do.

it('should query for a row with property_1 equal to Gila', function(done) {

@waghmareatul8
Copy link

waghmareatul8 commented Jan 30, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Jan 30, 2018 via email

@danielbarela
Copy link
Member

danielbarela commented Jan 30, 2018

I am not exactly sure what you need, however this sounds like something that @Nanonid can include in the README example they are fixing.

@waghmareatul8
Copy link

waghmareatul8 commented Jan 30, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Jan 30, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Feb 1, 2018 via email

@danielbarela
Copy link
Member

Your screenshot did not come through. Can you deploy your current code somewhere that is runnable. Try your GeoPackage on http://ngageoint.github.io/geopackage-js/ That site uses the same library that you are using.

@waghmareatul8
Copy link

waghmareatul8 commented Feb 1, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Feb 2, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Feb 2, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Mar 2, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Mar 2, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Mar 7, 2018 via email

@danielbarela
Copy link
Member

It is very unclear what you are trying to do. Please reference the testFeatureDao.js file for an example of querying a geopackage for feature data and also for inserting new feature data. Beyond that, if you need more assistance, can you set up a web site that I can go to and see the errors you are getting?
Thanks.

@waghmareatul8
Copy link

waghmareatul8 commented Mar 7, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Apr 16, 2018 via email

@danielbarela
Copy link
Member

  1. Yes, you can open an existing GeoPackage and insert data into it.

  2. You can run queries on the GeoPackage via the API. You do not need to convert to GeoJSON. You will, however, have to create that query and send it to the query API.

@waghmareatul8
Copy link

waghmareatul8 commented Apr 19, 2018 via email

@danielbarela
Copy link
Member

I have created issues: #109 #110 and #111 to track the examples that need to be created.

@waghmareatul8
Copy link

waghmareatul8 commented Apr 19, 2018 via email

@danielbarela
Copy link
Member

Yes, it is possible.

The work for those tickets will show how to accomplish what you would like to do.

@waghmareatul8
Copy link

waghmareatul8 commented Apr 20, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Apr 22, 2018 via email

@danielbarela
Copy link
Member

@waghmareatul8 I cannot confirm that this library will do exactly what you need. It should be able to run any query that you provide it, however, there are not convenience methods for every query that someone would like to run. The library does support opening existing GeoPackages and writing data to them, however, I do not know your exact use case, and therefore cannot confirm or deny that this library will work without modifications.

@waghmareatul8
Copy link

waghmareatul8 commented Apr 23, 2018 via email

@waghmareatul8
Copy link

waghmareatul8 commented Apr 25, 2018 via email

@danielbarela
Copy link
Member

@waghmareatul8 I agree. That is what ticket #110 is about.

@waghmareatul8
Copy link

waghmareatul8 commented Apr 25, 2018 via email

@danielbarela
Copy link
Member

OBE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants