Skip to content

Commit f560cdc

Browse files
authored
Add -skipfailures to the ogr2ogr -f convert command (#3690)
Make it work the example in Forum https://forum.generic-mapping-tools.org/t/shape-file-into-gmt/685/3?u=joaquim
1 parent 2b0683c commit f560cdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gmt_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4703,7 +4703,7 @@ FILE * gmt_fopen (struct GMT_CTRL *GMT, const char *filename, const char *mode)
47034703
snprintf (GMT->current.io.tempfile, PATH_MAX, "gmt_ogr_%d.gmt", (int)getpid());
47044704
GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Convert %s to GMT/OGR file %s\n", c, GMT->current.io.tempfile);
47054705
#if GDAL_VERSION_MAJOR >= 2
4706-
snprintf (cmd, GMT_BUFSIZ+GMT_LEN256, "ogr2ogr -mapFieldType Integer64=Integer -f \"OGR_GMT\" %s %s", GMT->current.io.tempfile, c);
4706+
snprintf (cmd, GMT_BUFSIZ+GMT_LEN256, "ogr2ogr -mapFieldType Integer64=Integer -skipfailures -f \"OGR_GMT\" %s %s", GMT->current.io.tempfile, c);
47074707
#else
47084708
snprintf (cmd, GMT_BUFSIZ+GMT_LEN256, "ogr2ogr -f \"GMT\" %s %s", GMT->current.io.tempfile, c);
47094709
#endif

0 commit comments

Comments
 (0)