-
Notifications
You must be signed in to change notification settings - Fork 54
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
Open files in selected layer #16
Conversation
@@ -289,7 +289,7 @@ static void datasource_bfilter_exclude_polygon_get_process_options ( VikLayerPar | |||
|
|||
VikDataSourceInterface vik_datasource_bfilter_exclude_polygon_interface = { | |||
N_("Waypoints Outside This"), | |||
N_("Polygonzied Layer"), | |||
N_("Polygonized Layer"), | |||
VIK_DATASOURCE_CREATENEWLAYER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This typo fix change has nothing to do with this overall commit.
} | ||
} | ||
|
||
int i,j; | ||
if ((fd_dst = g_file_open_tmp("tmp-viking.XXXXXX", &name_dst, NULL)) >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems irrelevant to the overall commit.
A further comment to explain why this useful (such as avoid running GPSBabel if possible).
I think it to be very rare that input arguments would only be "-i gpx".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code to open files in selected layer looks good.
If you remove the unnecessary changes for this commit (and hopefully make them separate change requests), I will certainly approve and merge the changes.
Thanks.
Yes that's found when I translate into Chinese. Will commit it in its own.
On Jan 18, 2017 3:54 AM, Rob Norris <notifications@github.com> wrote:@rnorris commented on this pull request.
In src/datasource_bfilter.c:
@@ -289,7 +289,7 @@ static void datasource_bfilter_exclude_polygon_get_process_options ( VikLayerPar
VikDataSourceInterface vik_datasource_bfilter_exclude_polygon_interface = {
N_("Waypoints Outside This"),
- N_("Polygonzied Layer"),
+ N_("Polygonized Layer"),
VIK_DATASOURCE_CREATENEWLAYER,
This typo fix change has nothing to do with this overall commit.
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/viking-gps/viking","title":"viking-gps/viking","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/viking-gps/viking"}},"updates":{"snippets":[{"icon":"PERSON","message":"@rnorris commented on #16"}],"action":{"name":"View Pull Request","url":"#16 (review)"}}}
|
This is found when I try to import GPX file with spaces and Chinese in its name. GPSBabel always fails with space, frequently fails with Chinese, and can not import multiple files in one call. Finally I find a way to import all my 2016 bike tracks(100+) by opening them all in selected layer. Will submit in its own too.
On Jan 18, 2017 4:11 AM, Rob Norris <notifications@github.com> wrote:@rnorris commented on this pull request.
In src/babel.c:
int fd_dst;
gchar *name_dst = NULL;
gboolean ret = FALSE;
gchar *args[64];
+ /* directly read GPX file */
+ if ((babelargs != NULL && strcmp("-i gpx", babelargs) == 0) || a_file_check_ext(from, ".gpx")) {
+ FILE *f = g_fopen(from, "r");
+ if (f) {
+ ret = a_gpx_read_file(vt, f);
+ fclose(f);
+ return ret;
+ }
+ }
+
+ int i,j;
if ((fd_dst = g_file_open_tmp("tmp-viking.XXXXXX", &name_dst, NULL)) >= 0) {
This also seems irrelevant to the overall commit.
A further comment to explain why this useful (such as avoid running GPSBabel if possible).
I think it to be very rare that input arguments would only be "-i gpx".
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/viking-gps/viking","title":"viking-gps/viking","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/viking-gps/viking"}},"updates":{"snippets":[{"icon":"PERSON","message":"@rnorris commented on #16"}],"action":{"name":"View Pull Request","url":"#16 (review)"}}}
|
These changes are for the following workflow: