-
Notifications
You must be signed in to change notification settings - Fork 80
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
Conversation
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.
Before unlink, close on the file descriptor should be fully completed. |
Update to readme to demonstrate feature extraction which works for current library.
Added working example to Readme for #99 |
Why did you remove the example code for retrieving the tile tables? |
Because this code is supposed to work after cut and paste. |
test/fixtures/rivers.gpkg has both features and tiles. |
Then I will re-add and test for it and update the MD. |
I was trying to run the geopackage. However I feel there is query regarding the path. It would be great if it is considered to help me out. |
@Nanonid any update on re-adding that to the README? |
@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. |
Dear Sir,
Thanks for your email and updates.
With Kind Regards,
Atul W
…On 17 January 2018 at 01:57, Nanonid ***@***.***> wrote:
@danielbarela <https://github.com/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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQrU0R6g0g5vVjk2tU9pC7npL-ipfks5tLQYggaJpZM4RRLuu>
.
--
Thanks with Regards
A W
|
Dear Sir, I went through other scripts, could you please guide the way one can query to Geo-package using those scripts. |
What exactly are you trying to query for? |
Dear Sir,
Thanks for your reply, I wanted to show Geo-Location on map, then based on
the the location get the point data on the map (in specific radius, which
can be changed after getting location).
Upon the click on any point display the name and address of the location.
Thanks with kind Regards
…On 21 January 2018 at 06:48, Dan ***@***.***> wrote:
What exactly are you trying to query for?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQmtnMYCsdc_sMin25mSvGDcLDP-bks5tMpBTgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
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? |
Dear Sir,
Thank you for your reply.
I do have Geo-Package that can display only one table right now as a
GeoPackageTileLayer. However all points and all columns of the specific
point selected are displayed.
Basically working on displaying the Geo-location on the map and query that
can say ST_Within specific range from a Geo-location obtained from cell-id.
Thank you for your time!!!
With Regards,
Atul W
…On 21 January 2018 at 15:21, Dan ***@***.***> wrote:
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?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQr1kamGsCHL_BzHrPGMdaRTM0EEgks5tMwizgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear All,
I wonder if we can really make Spatial and non-spatial query on the
Geo-package through java-script presently?
Thanks with kind regards,
Atul
…On 21 January 2018 at 21:24, Atul Waghmare ***@***.***> wrote:
Dear Sir,
Thank you for your reply.
I do have Geo-Package that can display only one table right now as a
GeoPackageTileLayer. However all points and all columns of the specific
point selected are displayed.
Basically working on displaying the Geo-location on the map and query that
can say ST_Within specific range from a Geo-location obtained from cell-id.
Thank you for your time!!!
With Regards,
Atul W
On 21 January 2018 at 15:21, Dan ***@***.***> wrote:
> 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?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQr1kamGsCHL_BzHrPGMdaRTM0EEgks5tMwizgaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
@waghmareatul8 This library is backed by SQLite and does not include spatialite, so I believe that you are correct. |
Dear Sir,
Thank you for your reply. Is there any logic /way to try query on
Geo-Package database.
With Warm regards,
…On 24 January 2018 at 20:01, Dan ***@***.***> wrote:
@waghmareatul8 <https://github.com/waghmareatul8> This library is backed
by SQLite and does not include spatialite, so I believe that you are
correct.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQuY0lUODnXDyAHzPPbsIURCjJFgoks5tNz6tgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
@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. |
Dear All,
Thank you for your reply. I'll try to do that. Meanwhile i was trying to
get the geolocation on the map offline using the scripts written under
device ready, would like to know if this geolocation part is included in
any of the script.
With Kind Regards,
…On 24 January 2018 at 20:33, Dan ***@***.***> wrote:
@waghmareatul8 <https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQkrfBtJutZoCA5_jdWe8h60W3BLkks5tN0ZFgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
I was trying to use testFeatureDao.js to query but being new to this would
like to know further how can i use the files to query. A sample example
would be great.
Thanks for your time!!!!
With Kind Regards,
Atul W
…On 24 January 2018 at 21:27, Atul Waghmare ***@***.***> wrote:
Dear All,
Thank you for your reply. I'll try to do that. Meanwhile i was trying to
get the geolocation on the map offline using the scripts written under
device ready, would like to know if this geolocation part is included in
any of the script.
With Kind Regards,
On 24 January 2018 at 20:33, Dan ***@***.***> wrote:
> @waghmareatul8 <https://github.com/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.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQkrfBtJutZoCA5_jdWe8h60W3BLkks5tN0ZFgaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
@waghmareatul8 I wrote a new test in that file to demonstrate what I believe is the functionality you are trying to do.
|
Dear Sir,
Thanks a lot for writing and further sharing the same!!!
Thats extremely kind of you!!!
Thank you very much
Atul W
…On 29 January 2018 at 22:24, Dan ***@***.***> wrote:
@waghmareatul8 <https://github.com/waghmareatul8> I wrote a new test in
that file to demonstrate what I believe is the functionality you are trying
to do. https://github.com/ngageoint/geopackage-js/blob/
7632799/test/lib/features/
user/testFeatureDao.js#L37
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQobxWKTSI99NJOV5Uh83Cw0viOHaks5tPffggaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
Is there any chance to get the way i can use the file, a sample demo kind
or set of instructions.
1. xyz.gpkg
2.featureDao.js
3.index.html
Especially where can i put the query?
Thanks for your time!!
Warm Regards,
…On 30 January 2018 at 10:21, Atul Waghmare ***@***.***> wrote:
Dear Sir,
Thanks a lot for writing and further sharing the same!!!
Thats extremely kind of you!!!
Thank you very much
Atul W
On 29 January 2018 at 22:24, Dan ***@***.***> wrote:
> @waghmareatul8 <https://github.com/waghmareatul8> I wrote a new test in
> that file to demonstrate what I believe is the functionality you are trying
> to do. https://github.com/ngageoint/geopackage-js/blob/763279921788
> 05a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeatureDao.js#L37
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQobxWKTSI99NJOV5Uh83Cw0viOHaks5tPffggaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
I am not exactly sure what you need, however this sounds like something that @Nanonid can include in the README example they are fixing. |
Dear Sir,
Thank you for the reply and the link: Actually following snippets shows
what i have done so far
******************start of the code
var tileLayer = L.geoPackageTileLayer({
geoPackageUrl: './r.gpkg',
layerName: 'tiles',
maxZoom:15,
minZoom:11
});
var map = L.map('map', {
center: [30.34, 78.04],
zoom: 12,
layers:[tileLayer]
});
var atms = tileLayer.on('load', function() { //tileLayer.off('load');
L.geoPackageFeatureLayer([], {
geoPackageUrl: './dehradun.gpkg',
layerName: 'atms',
style: function (feature) {
return {color: "#F00", weight: 2,
opacity: 1
};
},
onEachFeature: function (feature,
layer) {
layer.bindPopup(feature.properties.operator);
}
})
});
var hotels = tileLayer.on('load', function() {// tileLayer.off('load');
L.geoPackageFeatureLayer([], {
})
});
var baseMaps = {"BASEMAP": tileLayer};
var tiles = null;
var overlayMaps = {"ATMS": atms};
L.control.layers(tiles, overlayMaps).addTo(map);
************** END OF THE CODE ***********
But actually the points of atms are not loaded
…On 30 January 2018 at 20:02, Dan ***@***.***> wrote:
I am not exactly sure what you need, however this sounds like something
that @Nanonid <https://github.com/nanonid> can include in the README
example he is fixing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQs8iK6_DHLoFwKO_Nb03TSWgS7RBks5tPyfrgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
Thank you for your support.
Same code as previously sent.
******************start of the code*******************************
var tileLayer = L.geoPackageTileLayer({
geoPackageUrl: './r.gpkg',
layerName: 'tiles',
maxZoom:15,
minZoom:11
});
var map = L.map('map', {
center: [30.34, 78.04],
zoom: 12,
layers:[tileLayer]
});
var atms = tileLayer.on('load', function() { //tileLayer.off('load');
L.geoPackageFeatureLayer([], {
geoPackageUrl: './r.gpkg',
layerName: 'atms',
style: function (feature) {
return {color: "#F00", weight: 2,
opacity: 1
};
},
onEachFeature: function (feature,
layer) {
layer.bindPopup(feature.
properties.operator);
}
})
});
var hotels = tileLayer.on('load', function() {// tileLayer.off('load');
L.geoPackageFeatureLayer([], {
geoPackageUrl: './r.gpkg',
layerName: 'atms',
style: function (feature) {
return {color: "#F00",
weight: 2, opacity: 1
};
},
onEachFeature: function
(feature, layer) {
layer.bindPopup(feature.
properties.operator);
}
})
});
var baseMaps = {"BASEMAP": tileLayer};
var tiles = null;
var overlayMaps = {"ATMS": atms};
//var overlayMaps = {"ATMS": atms, "HOTELS": hotels};
L.control.layers(tiles, overlayMaps).addTo(map);
************** END OF THE CODE ***********
1. How to load data points from multiple tables (e.g. atms, hotels),
commented in above code, only basemap are loaded. (CODE IS CLEANED above,
tried the probable ways that i could think right now.)
Presently it loads only the tiles, but not loading the points on the
basemap, even with only one Featurelayer (i.e. atms).
Thinking to add array format into the geopackage.js
Please revert back for any doubt.
Thanks
…On 30 January 2018 at 21:55, Atul Waghmare ***@***.***> wrote:
Dear Sir,
Thank you for the reply and the link: Actually following snippets shows
what i have done so far
******************start of the code
var tileLayer = L.geoPackageTileLayer({
geoPackageUrl: './r.gpkg',
layerName: 'tiles',
maxZoom:15,
minZoom:11
});
var map = L.map('map', {
center: [30.34, 78.04],
zoom: 12,
layers:[tileLayer]
});
var atms = tileLayer.on('load', function() { //tileLayer.off('load');
L.geoPackageFeatureLayer([], {
geoPackageUrl: './dehradun.gpkg',
layerName: 'atms',
style: function (feature) {
return {color: "#F00", weight:
2, opacity: 1
};
},
onEachFeature: function (feature,
layer) {
layer.bindPopup(feature.
properties.operator);
}
})
});
var hotels = tileLayer.on('load', function() {// tileLayer.off('load');
L.geoPackageFeatureLayer([], {
})
});
var baseMaps = {"BASEMAP": tileLayer};
var tiles = null;
var overlayMaps = {"ATMS": atms};
L.control.layers(tiles, overlayMaps).addTo(map);
************** END OF THE CODE ***********
But actually the points of atms are not loaded
On 30 January 2018 at 20:02, Dan ***@***.***> wrote:
> I am not exactly sure what you need, however this sounds like something
> that @Nanonid <https://github.com/nanonid> can include in the README
> example he is fixing.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQs8iK6_DHLoFwKO_Nb03TSWgS7RBks5tPyfrgaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
Dear All,
The following is a screenshot, this is not taking featurelayers to display
on the map.
When ATM is selected, then with different style it should be displayed on
the map,but its not loading the points that way either.
[image: Inline images 3]
The code in previous email does presentation as shown in the screenshot
above.
Thank you for your time and suggestions so far.
…On 30 January 2018 at 22:23, Atul Waghmare ***@***.***> wrote:
Dear Sir,
Thank you for your support.
Same code as previously sent.
******************start of the code*******************************
var tileLayer = L.geoPackageTileLayer({
geoPackageUrl: './r.gpkg',
layerName: 'tiles',
maxZoom:15,
minZoom:11
});
var map = L.map('map', {
center: [30.34, 78.04],
zoom: 12,
layers:[tileLayer]
});
var atms = tileLayer.on('load', function() { //tileLayer.off('load');
L.geoPackageFeatureLayer([], {
geoPackageUrl: './r.gpkg',
layerName: 'atms',
style: function (feature) {
return {color: "#F00", weight:
2, opacity: 1
};
},
onEachFeature: function (feature,
layer) {
layer.bindPopup(feature.prope
rties.operator);
}
})
});
var hotels = tileLayer.on('load', function() {// tileLayer.off('load');
L.geoPackageFeatureLayer([], {
geoPackageUrl: './r.gpkg',
layerName: 'atms',
style: function (feature) {
return {color:
"#F00", weight: 2, opacity: 1
};
},
onEachFeature: function
(feature, layer) {
layer.bindPopup(feature.properties.operator);
}
})
});
var baseMaps = {"BASEMAP": tileLayer};
var tiles = null;
var overlayMaps = {"ATMS": atms};
//var overlayMaps = {"ATMS": atms, "HOTELS": hotels};
L.control.layers(tiles, overlayMaps).addTo(map);
************** END OF THE CODE ***********
1. How to load data points from multiple tables (e.g. atms, hotels),
commented in above code, only basemap are loaded. (CODE IS CLEANED above,
tried the probable ways that i could think right now.)
Presently it loads only the tiles, but not loading the points on the
basemap, even with only one Featurelayer (i.e. atms).
Thinking to add array format into the geopackage.js
Please revert back for any doubt.
Thanks
On 30 January 2018 at 21:55, Atul Waghmare ***@***.***>
wrote:
> Dear Sir,
> Thank you for the reply and the link: Actually following snippets shows
> what i have done so far
>
> ******************start of the code
>
> var tileLayer = L.geoPackageTileLayer({
> geoPackageUrl: './r.gpkg',
> layerName: 'tiles',
> maxZoom:15,
> minZoom:11
> });
>
> var map = L.map('map', {
> center: [30.34, 78.04],
> zoom: 12,
> layers:[tileLayer]
> });
>
> var atms = tileLayer.on('load', function() { //tileLayer.off('load');
> L.geoPackageFeatureLayer([], {
> geoPackageUrl: './dehradun.gpkg',
> layerName: 'atms',
> style: function (feature) {
> return {color: "#F00", weight:
> 2, opacity: 1
> };
> },
> onEachFeature: function (feature,
> layer) {
> layer.bindPopup(feature.prope
> rties.operator);
> }
> })
> });
> var hotels = tileLayer.on('load', function() {// tileLayer.off('load');
> L.geoPackageFeatureLayer([], {
>
> })
> });
>
> var baseMaps = {"BASEMAP": tileLayer};
> var tiles = null;
>
> var overlayMaps = {"ATMS": atms};
> L.control.layers(tiles, overlayMaps).addTo(map);
>
>
> ************** END OF THE CODE ***********
> But actually the points of atms are not loaded
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On 30 January 2018 at 20:02, Dan ***@***.***> wrote:
>
>> I am not exactly sure what you need, however this sounds like something
>> that @Nanonid <https://github.com/nanonid> can include in the README
>> example he is fixing.
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#101 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AavgQs8iK6_DHLoFwKO_Nb03TSWgS7RBks5tPyfrgaJpZM4RRLuu>
>> .
>>
>
>
>
> --
>
> Thanks with Regards
>
> Atul W
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
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. |
Dear Sir,
Thanks for your email and updates, the issue is resolved and once properly
done, will be shared.
Now trying to get location on the map and based on the geo-location display
the points nearby. For instance considering the link shared (thanks again
for sharing) about the river.gpkg, if geo-location is in Europe then show
only the rivers in the nearby countries. Show Thames if location
co-ordinates are displayed as London.
Thanks for your time!!!
Warm Regards,
…On 1 February 2018 at 20:54, Dan ***@***.***> wrote:
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQnnX_RiCj1H5y2ZNSEuiLcQhR4Wlks5tQdcagaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
I've following queries.
1. As described previously, "if geo-location is in Europe then show only
the rivers in the nearby countries. Show Thames if location co-ordinates
are displayed as London". How this can be done?
2.
According to the code in the file ./doc/leaflet/index.js
L.geoPackageFeatureLayer([], {
geoPackageUrl: './dehradun.gpkg',
layerName: 'hotels',
style: function (feature) {
return {color: "#F00", weight: 2, opacity: 1
};
},
…On 1 February 2018 at 22:24, Atul Waghmare ***@***.***> wrote:
Dear Sir,
Thanks for your email and updates, the issue is resolved and once properly
done, will be shared.
Now trying to get location on the map and based on the geo-location
display the points nearby. For instance considering the link shared
(thanks again for sharing) about the river.gpkg, if geo-location is in
Europe then show only the rivers in the nearby countries. Show Thames if
location co-ordinates are displayed as London.
Thanks for your time!!!
Warm Regards,
On 1 February 2018 at 20:54, Dan ***@***.***> wrote:
> 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.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQnnX_RiCj1H5y2ZNSEuiLcQhR4Wlks5tQdcagaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
Dear Sir,
I've following queries.
1. As described previously, "if geo-location is in Europe then show only
the rivers in the nearby countries. Show Thames if location co-ordinates
are displayed as London". How this can be done?
2. If we want to bring icons instead of point on the map, how could it
could be done, with reference to the following code.
The code in the file ./doc/leaflet/index.js
L.geoPackageFeatureLayer([], {
geoPackageUrl: './dehradun.gpkg',
layerName: 'hotels',
style: function (feature) {
return {color: "#F00", weight: 2, opacity: 1
};
},
thank you for your time!!!
Kind Regards,
|
Dear Sir,
With reference to the link provided and the query format descried in the
line 37 was understood https://github.com/ngageoint/geopackage-js/blob/
7632799/test/lib/features/
user/testFeatureDao.js#L37.
<https://github.com/ngageoint/geopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeatureDao.js#L37>
However from the link:https://github.com/ngageoint/geopackage-js
File input onchage event and the code described is bit confusing. Besides
that there is a snippets about the getfeature table names
I do have a code as below which was given in one of your examples and
modified accordingly
var institutes = L.geoPackageFeatureLayer([], {
geoPackageUrl: './dehradun.gpkg',
layerName: 'institutes',
pointToLayer: function(feature, layer){ return L.marker(layer,
{icon:institutesIcon});},
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.institute);
}
});
…On 29 January 2018 at 22:24, Dan ***@***.***> wrote:
@waghmareatul8 <https://github.com/waghmareatul8> I wrote a new test in
that file to demonstrate what I believe is the functionality you are trying
to do. https://github.com/ngageoint/geopackage-js/blob/
7632799/test/lib/features/
user/testFeatureDao.js#L37
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQobxWKTSI99NJOV5Uh83Cw0viOHaks5tPffggaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
With reference to the link provided and the query format descried in the
line 37 was understood https://github.com/ngageoint/g
eopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/
test/lib/features/user/testFeatureDao.js#L37.
<https://github.com/ngageoint/geopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeatureDao.js#L37>
However from the link:https://github.com/ngageoint/geopackage-js
File input onchage event and the code described is bit confusing. Besides
that there is a snippets about the getfeature table names
I do have a code as below which was given in one of your examples and
modified accordingly
*****************************************************************************
var tileLayer = L.geoPackageTileLayer({
geoPackageUrl: './dehradun.gpkg',
layerName: 'tiles',
attribution: '© <a
href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
<strong> </strong>',
// center: [30.34, 78.04] //The map is empty
maxZoom: 15,
minZoom: 12
});
*
*
*
var institutes = L.geoPackageFeatureLayer([], {
geoPackageUrl: './ddn.gpkg',
layerName: 'institutes',
pointToLayer: function(feature, layer){ return L.marker(layer,
{icon:institutesIcon});},
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.institute);
}
});
Query:
1. All that was trying is how can i make a query to the table named
institutes and take out the specific row(s) i want to GeoJSON format ( that
includes the co-ordinates as well), the way its done to implement above
code and results (points)are displayed on the map.
2. If i want to delete a row based on the co-ordinates then how can it be
done?
3. How can a insert query will be performed on the table institutes of the
ddn.gpkg in the same javascript file?
Thanks a lot for your time and efforts.
Have a great weekend ahead
Kind Regards,
Atul W
…On 3 March 2018 at 04:46, Atul Waghmare ***@***.***> wrote:
Dear Sir,
With reference to the link provided and the query format descried in the
line 37 was understood https://github.com/ngageoint/g
eopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/
test/lib/features/user/testFeatureDao.js#L37.
<https://github.com/ngageoint/geopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeatureDao.js#L37>
However from the link:https://github.com/ngageoint/geopackage-js
File input onchage event and the code described is bit confusing. Besides
that there is a snippets about the getfeature table names
I do have a code as below which was given in one of your examples and
modified accordingly
var institutes = L.geoPackageFeatureLayer([], {
geoPackageUrl: './dehradun.gpkg',
layerName: 'institutes',
pointToLayer: function(feature, layer){ return L.marker(layer,
{icon:institutesIcon});},
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.institute);
}
});
On 29 January 2018 at 22:24, Dan ***@***.***> wrote:
> @waghmareatul8 <https://github.com/waghmareatul8> I wrote a new test in
> that file to demonstrate what I believe is the functionality you are trying
> to do. https://github.com/ngageoint/geopackage-js/blob/763279921788
> 05a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeatureDao.js#L37
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQobxWKTSI99NJOV5Uh83Cw0viOHaks5tPffggaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
Dear Sir,
I want to do sync from server to client side GeoPackage, so insert query to
GeoPackage is needed. Here just can't get a clue from testFeatureDao.js nor
from testGeoPackage.js
In html or js how could one write a code to open and fetch the query to
geopackage then insert the values?
Thank you for your time!
…On 3 March 2018 at 04:55, Atul Waghmare ***@***.***> wrote:
Dear Sir,
With reference to the link provided and the query format descried in the
line 37 was understood https://github.com/ngageoint/g
eopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/t
est/lib/features/user/testFeatureDao.js#L37.
<https://github.com/ngageoint/geopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeatureDao.js#L37>
However from the link:https://github.com/ngageoint/geopackage-js
File input onchage event and the code described is bit confusing. Besides
that there is a snippets about the getfeature table names
I do have a code as below which was given in one of your examples and
modified accordingly
************************************************************
*****************
var tileLayer = L.geoPackageTileLayer({
geoPackageUrl: './dehradun.gpkg',
layerName: 'tiles',
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
<strong> </strong>',
// center: [30.34, 78.04] //The map is empty
maxZoom: 15,
minZoom: 12
});
*
*
*
var institutes = L.geoPackageFeatureLayer([], {
geoPackageUrl: './ddn.gpkg',
layerName: 'institutes',
pointToLayer: function(feature, layer){ return L.marker(layer,
{icon:institutesIcon});},
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.institute);
}
});
Query:
1. All that was trying is how can i make a query to the table named
institutes and take out the specific row(s) i want to GeoJSON format ( that
includes the co-ordinates as well), the way its done to implement above
code and results (points)are displayed on the map.
2. If i want to delete a row based on the co-ordinates then how can it be
done?
3. How can a insert query will be performed on the table institutes of
the ddn.gpkg in the same javascript file?
Thanks a lot for your time and efforts.
Have a great weekend ahead
Kind Regards,
Atul W
On 3 March 2018 at 04:46, Atul Waghmare ***@***.***> wrote:
> Dear Sir,
>
> With reference to the link provided and the query format descried in the
> line 37 was understood https://github.com/ngageoint/g
> eopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/t
> est/lib/features/user/testFeatureDao.js#L37.
> <https://github.com/ngageoint/geopackage-js/blob/76327992178805a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeatureDao.js#L37>
> However from the link:https://github.com/ngageoint/geopackage-js
> File input onchage event and the code described is bit confusing.
> Besides that there is a snippets about the getfeature table names
>
> I do have a code as below which was given in one of your examples and
> modified accordingly
>
> var institutes = L.geoPackageFeatureLayer([], {
> geoPackageUrl: './dehradun.gpkg',
> layerName: 'institutes',
> pointToLayer: function(feature, layer){ return L.marker(layer,
> {icon:institutesIcon});},
> onEachFeature: function (feature, layer) {
> layer.bindPopup(feature.properties.institute);
> }
> });
>
>
> On 29 January 2018 at 22:24, Dan ***@***.***> wrote:
>
>> @waghmareatul8 <https://github.com/waghmareatul8> I wrote a new test in
>> that file to demonstrate what I believe is the functionality you are trying
>> to do. https://github.com/ngageoint/geopackage-js/blob/763279921788
>> 05a56295f7ec1d50c18e34eae01b/test/lib/features/user/testFeat
>> ureDao.js#L37
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#101 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AavgQobxWKTSI99NJOV5Uh83Cw0viOHaks5tPffggaJpZM4RRLuu>
>> .
>>
>
>
>
> --
>
> Thanks with Regards
>
> Atul W
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
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? |
Dear Sir,
Thank you very much for your time,
Just giving scenario:
1. A row is entered in the postgres database. (gid:15, name: Trumph Tower,
geom:40.754932, -73.984016).
2. The php file saved on the mobile device check if the database version is
upgraded at the server side?
3. When its updated database version then comes the insert operation
Something like following: the connection then insert or delete then
connection close.
<script>
var connection = new ActiveXObject("ADODB.Connection") ;
var connectionstring="Data Source=<server>;Initial
Catalog=<catalog>;User
ID=<user>;Password=<password>;Provider=SQLOLEDB";
connection.Open(connectionstring);
var rs = new ActiveXObject("ADODB.Recordset");
*rs**.Open(**"*
*INSERT name, geom** INTO sampletable", connection);*
rs.MoveFirstwhile(!rs.eof){
document.write(rs.fields(1));
rs.movenext;}
rs.close;
connection.close;
</script>
Actually serve side scripting is based on how i insert the data manually.
The manual entry is mentioned in first line.
The script should enter the data written or passed directly to the
GeoPackage file.
I can just read the data from the weblink as per query but couldn't do the
same using html page: https://github.com/lovasoa/sql.js
<https://github.com/lovasoa/sql.js>
<https://github.com/lovasoa/sql.js>
Thanks for you email and time
Kind Regards
…On 8 March 2018 at 04:26, Dan ***@***.***> wrote:
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQk4a_do4CK_LvYpp7Z3ns-3rEQsIks5tcGWYgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
Thank you for the support so far and the time given. There are few queries
based on the NGA Library application as follows:
1. Could you please suggest if the current JS library allows me to insert
the data into the existing GeoPackage file unlike the current feature that
creates the new GeoPackage file. - I want to update the existing file in an
application that takes the data from the remote server in the form of
GeoJSON (Ajax).
2. Is it possible to directly put the proximity query on the GeoPackage
without converting into GeoJSON - Turf.js (http://turfjs.org/docs/) allows
to query the GeoJSON to show nearest points, just like that or similar to
that can i do direct query on the GeoPackage.
Thank you for your time.
Warm regards,
Atul W
…On 7 March 2018 at 23:12, Atul Waghmare ***@***.***> wrote:
Dear Sir,
Thank you very much for your time,
Just giving scenario:
1. A row is entered in the postgres database. (gid:15, name: Trumph Tower,
geom:40.754932, -73.984016).
2. The php file saved on the mobile device check if the database version
is upgraded at the server side?
3. When its updated database version then comes the insert operation
Something like following: the connection then insert or delete then
connection close.
<script>
var connection = new ActiveXObject("ADODB.Connection") ;
var connectionstring="Data Source=<server>;Initial Catalog=<catalog>;User ID=<user>;Password=<password>;Provider=SQLOLEDB";
connection.Open(connectionstring);
var rs = new ActiveXObject("ADODB.Recordset");
*rs**.Open(**"*
*INSERT name, geom** INTO sampletable", connection);*
rs.MoveFirstwhile(!rs.eof){
document.write(rs.fields(1));
rs.movenext;}
rs.close;
connection.close;
</script>
Actually serve side scripting is based on how i insert the data manually.
The manual entry is mentioned in first line.
The script should enter the data written or passed directly to the
GeoPackage file.
I can just read the data from the weblink as per query but couldn't do the
same using html page: https://github.com/lovasoa/sql.js
<https://github.com/lovasoa/sql.js>
<https://github.com/lovasoa/sql.js>
Thanks for you email and time
Kind Regards
On 8 March 2018 at 04:26, Dan ***@***.***> wrote:
> 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.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQk4a_do4CK_LvYpp7Z3ns-3rEQsIks5tcGWYgaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
|
Dear Sir,
Thank you for your email and the time given.
Based on the previous feedback could you please point me in the right
direction in the following cases.
1.
Yes, you can open an existing GeoPackage and insert data into it.
Is is possible to get the live working example or hint that could help me
to insert data into the existing GeoPackage file.
1.
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.
I believe you created the API, through which rivers are shown in the
example or tables, rows and columns present in the GeoPackage are
displayed. Is it possible to redirect me.
Apologies that the questions might be very stupid, but i am new to these
application implementation.
Thanks for you time and feedback!
Atul W
…On 16 April 2018 at 13:55, Dan ***@***.***> wrote:
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQhVtmpQubWgKcGeiKJpDh0Wn9zbaks5tpKLEgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
Thank you for raising the issues 109, 110 and 111.
Would like to confirm that, is it possible at this moment to implement the
data insertion and spatial query using the published libraries?
If i want to develop those using the existing library especially
testGeoPackage.js, how it could be done?
Thanks you for your time and attention!
Kind Regards
Atul W
…On 19 April 2018 at 15:22, Dan ***@***.***> wrote:
I have created issues: #109
<#109> #110
<#110> and #111
<#111> to track the
examples that need to be created.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQo5sCl3BdItTGiLohglPa887UvJ8ks5tqKuvgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Yes, it is possible. The work for those tickets will show how to accomplish what you would like to do. |
Dear Sir,
I’m working to implement data sync where
G
eo
P
ackage file is opened to write the data obtained from remote server.
I wonder about how can it be written to accomplish the tasks mentioned
earlier about query and data insertion into the
G
eo
P
ackage.
I mean which file or code snippets does these tasks
(data reading and data insertion)
in the SDK shared on github?
May be the the example
that I might develop will help to publish on the github.
Thanks for your time
Kind Regards,
Atul W
…On Thu, 19 Apr 2018 at 23:25, Dan ***@***.***> wrote:
Yes, it is possible.
The work for those tickets will show how to accomplish what you would like
to do.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQi5tFQun74nmCrj0_j11_cO1T1vIks5tqM-QgaJpZM4RRLuu>
.
|
Dear Sir,
I'm working on a project as a part of MSc, using your SDK published on
github.
The project involves developing the mobile App using cordova that allows
data sync as well
Since Jan I was trying the data insertion and data sync.
Could you please confirm that using the gp.js or all the ngageoint
geopackage as it is without modifications, the above task (of existing file
reading and writing) is not possible.
This will help me to move on from where I'm badly stuck.
Thank you
Atul
…On 19 April 2018 at 17:55, Dan ***@***.***> wrote:
Yes, it is possible.
The work for those tickets will show how to accomplish what you would like
to do.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQi5tFQun74nmCrj0_j11_cO1T1vIks5tqM-QgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
@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. |
Dear Sir,
Thank you for your reply!
Regarding Use case, the data from server will be taken in the form of JSON,
however using a code snippets as shown below (taken from testGeoPackage.js)
was used to insert the data into existing file.
GeoPackage.addGeoJSONFeatureToGeoPackage(geopackage, {
"type": "Feature",
"properties": {
myTable.test': 'mycolumn'
},
"geometry": {
"type": "Point",
"coordinates": [
…-99.84374999999999,
40.17887331434696
]
}
},
all i want is at least manually a code should open the file and insert the
data entered through the code
Use Case scenario:
1. Open a file
2. insert name and geometry or coordinates into the file
3. Close the file
Thank you for your time!
Atul W
On 23 April 2018 at 19:42, Dan ***@***.***> wrote:
@waghmareatul8 <https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQgi9OcrYPAmaB1IEDOGxvi4GBdeFks5treFQgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
Dear Sir,
There are statements about reading the geopackage under About heading on
https://github.com/ngageoint/geopackage-js. However there is no description
about writing into the geopackage there.
It would be appreciated if the readme clarifies the confusion.
thanks a lot for your time
Atul
…On 23 April 2018 at 17:10, Atul Waghmare ***@***.***> wrote:
Dear Sir,
Thank you for your reply!
Regarding Use case, the data from server will be taken in the form of
JSON, however using a code snippets as shown below (taken from
testGeoPackage.js) was used to insert the data into existing file.
GeoPackage.addGeoJSONFeatureToGeoPackage(geopackage, {
"type": "Feature",
"properties": {
myTable.test': 'mycolumn'
},
"geometry": {
"type": "Point",
"coordinates": [
-99.84374999999999,
40.17887331434696
]
}
},
all i want is at least manually a code should open the file and insert the
data entered through the code
Use Case scenario:
1. Open a file
2. insert name and geometry or coordinates into the file
3. Close the file
Thank you for your time!
Atul W
On 23 April 2018 at 19:42, Dan ***@***.***> wrote:
> @waghmareatul8 <https://github.com/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.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AavgQgi9OcrYPAmaB1IEDOGxvi4GBdeFks5treFQgaJpZM4RRLuu>
> .
>
--
Thanks with Regards
Atul W
--
Thanks with Regards
Atul W
|
@waghmareatul8 I agree. That is what ticket #110 is about. |
Dear Sir,
Thank you for your email.
I was trying to develop the Windows App using the SDK by means of Cordova.
Theoretically cordova in Visual Studio 2015 should create the binaries but
it is not working.
There was description stating that it works on Android and iOS.
Please correct me if I'm wrong "technically cordova converts the JS code
into native code, so cordova should create windows App successfully.
I may be stupid in doing this attempt but presently i'm working with the
errors that are kind of limitations of Internet Explorer. The errors right
now are similar to Web Applications.
There is possibility that the errors are sort of related with limitations
in .Net Framework or the platform on which IE is developed and working.
Please share your opinion!!
Thanks for your time :)
Warm regards,
Atul W
…On 25 April 2018 at 13:22, Dan ***@***.***> wrote:
@waghmareatul8 <https://github.com/waghmareatul8> I agree. That is what
ticket #110 <#110> is
about.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AavgQiEdO-UI1JEXB-zlSCn8XBIjWt6gks5tsHimgaJpZM4RRLuu>
.
--
Thanks with Regards
Atul W
|
OBE |
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.