[JPP-Devel] [jump-pilot:bugs] #494 Load WKT file with set options
- **status**: open --> pending - **assigned_to**: michael michaud --- ** [bugs:#494] Load WKT file with set options** **Status:** pending **Labels:** WKT WKT (set options) **Created:** Thu Jul 30, 2020 08:54 AM UTC by János Tamás Kis **Last Updated:** Fri Jul 31, 2020 09:01 PM UTC **Owner:** michael michaud **Attachments:** - [proba.jmp](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/proba.jmp) (6.5 kB; application/octet-stream) - [proba.wkt](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/proba.wkt) (149 Bytes; application/octet-stream) - [reverse.jmp](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/reverse.jmp) (7.2 kB; application/octet-stream) - [reverse.wkt](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/reverse.wkt) (149 Bytes; application/octet-stream) I have a simple WKT file with an attribute data (like 'proba.wkt' file) where the geomerty is in the second data field/column. I have open it with the "wkt (set options)" function into a new project. I have set the "Column containing WKT geometry" listbox to "2". That was great: I could see the map and data. I have saved the project as proba.jmp and I saw the ~~~ WKT-Column 2 ~~~ lines in JMP file so I thought everyhing is OK, but when I tried reopen the JMP file I got a java.lang.Exception: > Field 1 is needed for geometry but [] has only 0 fields. What was wrong...? It's OK, I tried other way... Let be the geometry in the first and the attribute data in the second data field/column (like 'reverse.wkt' file) and open it (with "Column containing WKT geometry" listbox to "1" option) and save the project (reverse.jmp). There are the ~~~ WKT-Column 1 ~~~ rows. When I tried reopen then I got the > Field 0 is needed for geometry but [] has only 0 fields exception, similar before but the index is 0... I am afraid, the JMP files are correct but the loader have wrong about indexing besause it try load geometry from other column what I have set and stored in JMP file or what am i wrong with? --- Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is subscribed to https://sourceforge.net/p/jump-pilot/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jump-pilot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] #494 Load WKT file with set options
János, Problem was in the serialization of the field separator. Please, check that it works in r6365+ Notice that you need both this new version of OJ and the new version of the csv driver. --- ** [bugs:#494] Load WKT file with set options** **Status:** open **Labels:** WKT WKT (set options) **Created:** Thu Jul 30, 2020 08:54 AM UTC by János Tamás Kis **Last Updated:** Thu Jul 30, 2020 05:26 PM UTC **Owner:** nobody **Attachments:** - [proba.jmp](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/proba.jmp) (6.5 kB; application/octet-stream) - [proba.wkt](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/proba.wkt) (149 Bytes; application/octet-stream) - [reverse.jmp](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/reverse.jmp) (7.2 kB; application/octet-stream) - [reverse.wkt](https://sourceforge.net/p/jump-pilot/bugs/494/attachment/reverse.wkt) (149 Bytes; application/octet-stream) I have a simple WKT file with an attribute data (like 'proba.wkt' file) where the geomerty is in the second data field/column. I have open it with the "wkt (set options)" function into a new project. I have set the "Column containing WKT geometry" listbox to "2". That was great: I could see the map and data. I have saved the project as proba.jmp and I saw the ~~~ WKT-Column 2 ~~~ lines in JMP file so I thought everyhing is OK, but when I tried reopen the JMP file I got a java.lang.Exception: > Field 1 is needed for geometry but [] has only 0 fields. What was wrong...? It's OK, I tried other way... Let be the geometry in the first and the attribute data in the second data field/column (like 'reverse.wkt' file) and open it (with "Column containing WKT geometry" listbox to "1" option) and save the project (reverse.jmp). There are the ~~~ WKT-Column 1 ~~~ rows. When I tried reopen then I got the > Field 0 is needed for geometry but [] has only 0 fields exception, similar before but the index is 0... I am afraid, the JMP files are correct but the loader have wrong about indexing besause it try load geometry from other column what I have set and stored in JMP file or what am i wrong with? --- Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is subscribed to https://sourceforge.net/p/jump-pilot/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jump-pilot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6365] core/trunk
Revision: 6365 http://sourceforge.net/p/jump-pilot/code/6365 Author: michaudm Date: 2020-07-31 20:57:58 + (Fri, 31 Jul 2020) Log Message: --- #494 : csv driver 1.0.3 : fix serialization problem Modified Paths: -- core/trunk/ChangeLog Added Paths: --- core/trunk/lib/plus/csv-driver-1.0.3.jar Removed Paths: - core/trunk/lib/plus/csv-driver-1.0.2.jar Modified: core/trunk/ChangeLog === --- core/trunk/ChangeLog2020-07-31 20:51:43 UTC (rev 6364) +++ core/trunk/ChangeLog2020-07-31 20:57:58 UTC (rev 6365) @@ -4,6 +4,9 @@ # 3. be concise but convey the change in a way that ordinary users understand #< 80 chars --># +2020-07-31 mmichaud + * #494 : csv driver 1.0.3 : fix serialization problem + 2020-07-16 Giuseppe Aruta * EditOptionPanel : Added option to automatically open a feature attributes Info Frame after a new feature is created. Workaround to Feature request Deleted: core/trunk/lib/plus/csv-driver-1.0.2.jar === (Binary files differ) Added: core/trunk/lib/plus/csv-driver-1.0.3.jar === (Binary files differ) Index: core/trunk/lib/plus/csv-driver-1.0.3.jar === --- core/trunk/lib/plus/csv-driver-1.0.3.jar2020-07-31 20:51:43 UTC (rev 6364) +++ core/trunk/lib/plus/csv-driver-1.0.3.jar2020-07-31 20:57:58 UTC (rev 6365) Property changes on: core/trunk/lib/plus/csv-driver-1.0.3.jar ___ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6364] plug-ins/CsvDriver/trunk
Revision: 6364 http://sourceforge.net/p/jump-pilot/code/6364 Author: michaudm Date: 2020-07-31 20:51:43 + (Fri, 31 Jul 2020) Log Message: --- version 1.0.3 of csv driver: fix serialization in jmp project file Modified Paths: -- plug-ins/CsvDriver/trunk/build.xml plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/CSVDriverConfiguration.java plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java2xml plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/SaveCSVFileDataSourceQueryChooser.java Modified: plug-ins/CsvDriver/trunk/build.xml === --- plug-ins/CsvDriver/trunk/build.xml 2020-07-31 20:43:46 UTC (rev 6363) +++ plug-ins/CsvDriver/trunk/build.xml 2020-07-31 20:51:43 UTC (rev 6364) @@ -16,7 +16,7 @@ - + Modified: plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/CSVDriverConfiguration.java === --- plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/CSVDriverConfiguration.java 2020-07-31 20:43:46 UTC (rev 6363) +++ plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/CSVDriverConfiguration.java 2020-07-31 20:51:43 UTC (rev 6364) @@ -43,8 +43,9 @@ /** * Extension loading a driver for csv and other character delimited text files * @author Michal MICHAUD - * @version 1.0.2 (2018-01-27) + * @version 1.0.3 (2020-07-31) */ +// 1.0.3 (2020-07-31) fix serialization of fieldSeparator in jmp file (need OJ r6363) // 1.0.2 (2018-01-27) add I18N for finnish language // 1.0.1 (2017-05-07) fix parser to parse correctly non quoted fields including double quotes // 1.0.0 (2017-02-09) writer : add encoding option @@ -77,7 +78,7 @@ } public String getVersion() { -return "1.0.2 (2018-01-27)"; +return "1.0.3 (2020-07-31)"; } public void configure(PlugInContext context) throws Exception { Modified: plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java === --- plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java 2020-07-31 20:43:46 UTC (rev 6363) +++ plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java 2020-07-31 20:51:43 UTC (rev 6364) @@ -51,6 +51,13 @@ this.separator = separator; } +public FieldSeparator(String sep) { +if (sep.equals("{tab}")) this.separator = '\t'; +else if (sep.equals("{whitespace}")) this.separator = ' '; +else if (sep != null & sep.length() > 0) this.separator = sep.charAt(0); +else this.separator = '\t'; +} + public char getSeparator() { return separator; } @@ -58,6 +65,13 @@ public void setSeparator(char sep) { this.separator = sep; } + +public void setSeparator(String sep) { +if (sep.equals("{tab}")) this.separator = '\t'; +else if (sep.equals("{whitespace}")) this.separator = ' '; +else if (sep != null & sep.length() > 0) this.separator = sep.charAt(0); +else this.separator = '\t'; +} public Pattern getFieldPattern() { if (fieldPattern == null) { @@ -93,7 +107,7 @@ public String toString() { if (separator == '\t') return "{tab}"; -if (separator == ' ') return "{whitespace}"; +if (separator == ' ' ) return "{whitespace}"; return "" + separator; } Modified: plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java2xml === --- plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java2xml 2020-07-31 20:43:46 UTC (rev 6363) +++ plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/FieldSeparator.java2xml 2020-07-31 20:51:43 UTC (rev 6364) @@ -1,4 +1,4 @@ - + Modified: plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/SaveCSVFileDataSourceQueryChooser.java === --- plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/SaveCSVFileDataSourceQueryChooser.java 2020-07-31 20:43:46 UTC (rev 6363) +++ plug-ins/CsvDriver/trunk/src/fr/michaelm/jump/drivers/csv/SaveCSVFileDataSourceQueryChooser.java 2020-07-31 20:51:43 UTC (rev 6364) @@ -31,7 +31,6 @@ import com.vividsolutions.jump.workbench.datasource.SaveFileDataSourceQueryChooser; import com.vividsolutions.jump.workbench.WorkbenchContext; -import org.openjump.core.ui.swing.factory.field.FieldComponentFactoryRegistry; import static fr.michaelm.jump.drivers.csv.FieldSeparator.*; ___ Jump-pilot-devel mailing list
[JPP-Devel] SVN: [6363] core/trunk/src/com/vividsolutions/jump/util/java2xml/ XMLBinder.java
Revision: 6363 http://sourceforge.net/p/jump-pilot/code/6363 Author: michaudm Date: 2020-07-31 20:43:46 + (Fri, 31 Jul 2020) Log Message: --- Add classToCustomConverter for char primitive Modified Paths: -- core/trunk/src/com/vividsolutions/jump/util/java2xml/XMLBinder.java Modified: core/trunk/src/com/vividsolutions/jump/util/java2xml/XMLBinder.java === --- core/trunk/src/com/vividsolutions/jump/util/java2xml/XMLBinder.java 2020-07-18 09:57:06 UTC (rev 6362) +++ core/trunk/src/com/vividsolutions/jump/util/java2xml/XMLBinder.java 2020-07-31 20:43:46 UTC (rev 6363) @@ -240,6 +240,16 @@ return object.toString(); } }); +classToCustomConverterMap.put(char.class, +new CustomConverter() { +public Object toJava(String value) { +return value.length()>0?value.charAt(0):'\u'; +} + +public String toXML(Object object) { +return object.toString(); +} +}); classToCustomConverterMap.put(Character.class, new CustomConverter() { public Object toJava(String value) { ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] #495 Warp panel shows a vertical toolba instead of horizontal on Ubuntu
One possible solution is to change LayoutManager of the toolbar. This line works: toolbox.getToolBar().setLayout(new FlowLayout()); --- ** [bugs:#495] Warp panel shows a vertical toolba instead of horizontal on Ubuntu** **Status:** open **Created:** Fri Jul 31, 2020 07:40 AM UTC by Giuseppe Aruta **Last Updated:** Fri Jul 31, 2020 07:40 AM UTC **Owner:** Giuseppe Aruta **Attachments:** - [Senzanome.png](https://sourceforge.net/p/jump-pilot/bugs/495/attachment/Senzanome.png) (45.0 kB; image/png) On Ubuntu Mate. Warp Plugin. The toolbar of the panel sets all vector tools icon in a vertical position, as shown in the attached picture. --- Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is subscribed to https://sourceforge.net/p/jump-pilot/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jump-pilot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] #495 Warp panel shows a vertical toolba instead of horizontal on Ubuntu
--- ** [bugs:#495] Warp panel shows a vertical toolba instead of horizontal on Ubuntu** **Status:** open **Created:** Fri Jul 31, 2020 07:40 AM UTC by Giuseppe Aruta **Last Updated:** Fri Jul 31, 2020 07:40 AM UTC **Owner:** Giuseppe Aruta **Attachments:** - [Senzanome.png](https://sourceforge.net/p/jump-pilot/bugs/495/attachment/Senzanome.png) (45.0 kB; image/png) On Ubuntu Mate. Warp Plugin. The toolbar of the panel sets all vector tools icon in a vertical position, as shown in the attached picture. --- Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is subscribed to https://sourceforge.net/p/jump-pilot/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jump-pilot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel