I am sorry, Michael.
I am totally involved to the raster section of OpenJUMP. I will try to do
some tests on next days.
But, as I can see, Jukka is always the first and the most professional ;-)
Peppe
2015-03-15 18:26 GMT+01:00 Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi>:
> Hi,
>
>
> I made a test file with one point and one attribute of each selectable
> data type. However, OpenJUMP is not totally ready for handling all those.
>
>
> Saving the JML file as shapefile stops to the following error:
>
>
> java.lang.Exception: ShapefileWriter: unsupported AttributeType found in
> featurecollection. : BIGINT
> at
> com.vividsolutions.jump.io.ShapefileWriter.writeDbf(ShapefileWriter.java:537)
> at
> com.vividsolutions.jump.io.ShapefileWriter.write(ShapefileWriter.java:292)
> at
> com.vividsolutions.jump.io.datasource.ReaderWriterFileDataSource$1.executeUpdate(ReaderWriterFileDataSource.java:73)
> at
> com.vividsolutions.jump.workbench.datasource.AbstractSaveDatasetAsPlugIn.run(AbstractSaveDatasetAsPlugIn.java:28)
> at
> com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
> at java.lang.Thread.run(Unknown Source)
>
>
> Next I tried to edit the schema and remove the BIGINT attribute but it
> was not so easy. Changes in the schema can be confirmed only after removing
> all the attributes of the following data types first:
>
>
> CHAR
>
> VARCHAR
>
> LONGVARCHAR
>
> TEXT
>
> BOOLEAN
>
> BIT
>
> SMALLINT
>
> TINYINT
>
> LONG
>
> BIGINT
>
> DECIMAL
>
> NUMERIC
>
> BIGDECIMAL
>
> FLOAT
>
> REAL
>
> TIME
>
> TIMESTAMP
>
>
> The error if any of the above data types appears in the schema is like:
>
>
> com.vividsolutions.jts.util.AssertionFailedException: Should never reach
> here: VARCHAR
> at
> com.vividsolutions.jts.util.Assert.shouldNeverReachHere(Assert.java:122)
> at
> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.convert(ViewSchemaPlugIn.java:557)
> at
> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.convert(ViewSchemaPlugIn.java:286)
> at
> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.applyChanges(ViewSchemaPlugIn.java:164)
> at
> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn.access$300(ViewSchemaPlugIn.java:76)
> at
> com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn$EditSchemaFrame$3.actionPerformed(ViewSchemaPlugIn.java:695)
> at
> com.vividsolutions.jump.workbench.ui.SchemaPanel.fireActionPerformed(SchemaPanel.java:686)
> at
> com.vividsolutions.jump.workbench.ui.SchemaPanel.applyButton_actionPerformed(SchemaPanel.java:676)
> at
> com.vividsolutions.jump.workbench.ui.SchemaPanel$14.actionPerformed(SchemaPanel.java:447)
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
> Source)
> at java.awt.Component.processMouseEvent(Unknown Source)
> at javax.swing.JComponent.processMouseEvent(Unknown Source)
> at java.awt.Component.processEvent(Unknown Source)
> at java.awt.Container.processEvent(Unknown Source)
> at java.awt.Component.dispatchEventImpl(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Window.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
> at java.awt.EventQueue.access$200(Unknown Source)
> at java.awt.EventQueue$3.run(Unknown Source)
> at java.awt.EventQueue$3.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
> Source)
> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
> Source)
> at java.awt.EventQueue$4.run(Unknown Source)
> at java.awt.EventQueue$4.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
> Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
>
>
> Here is how GDAL understands our new attribute types:
>
>
> ogrinfo datatype_test.jml -al -so
> Had to open data source read-only.
> INFO: Open of `datatype_test.jml'
> using driver `JML' successful.
>
> Layer name: dttest
> Geometry: Unknown (any)
> Feature Count: 1
> Extent: (310.000000, 406.000000) - (310.000000, 406.000000)
> Layer SRS WKT:
> (unknown)
> string_attribute: String (0.0)
> char_attribute: String (0.0)
> varchar_attribute: String (0.0)
> longvarchar_attribute: String (0.0)
> text_attribute: String (0.0)
> boolean_attribute: String (0.0)
> bit_attribute: String (0.0)
> smallint_attribute: String (0.0)
> tinyint_attribute: String (0.0)
> integer_attribute: Integer (0.0)
> long_attribute: String (0.0)
> bigint_attribute: String (0.0)
> decimal_attribute: String (0.0)
> numeric_attribute: String (0.0)
> bigdecimal_attribute: String (0.0)
> float_attribute: String (0.0)
> double_attribute: Real (0.0)
> real_attribute: String (0.0)
> date_attribute: DateTime (0.0)
> time_attribute: String (0.0)
> timestamp_attribute: String (0.0)
> object_attribute: String (0.0)
>
>
> Most new types are converted into strings by now. I think I could
> sponsor the GDAL development if someone writes the mapping between OpenJUMP
> datatypes and GDAL datatypes. I am not sure what the GDAL datatypes are but
> the following list might be right:
>
> 1. boolean (GDAL >= 2.0)
> 2. character(field_length). By default, field_length=1.
> 3. float(field_length)
> 4. numeric(field_length, field_precision)
> 5. smallint(field_length) : 16 bit signed integer (GDAL >= 2.0)
> 6. integer(field_length)
> 7. bigint(field_length), 64 bit integer, extension to SQL92 (GDAL >=
> 2.0)
> 8. date(field_length)
> 9. time(field_length)
> 10. timestamp(field_length)
>
> Obviously 'string', and 'real' are supported and then I believe that there
> is support for these three:
>
> 'integer list', 'double list' and 'string list'.
>
>
> However, I have not yet realized if we need all these data types and how
> generally they are supported in the surrounding GIS and computing world.
>
>
> -Jukka Rahkonen-
>
>
>
>
>
> ------------------------------
> Michaël Michaud wrote:
>
> Hi,
>
> I managed new attribute types introduced by Ede in shapefile and jml
> drivers (BOOLEAN and LONG are managed as "Logical" and "Numeric,21,0", and
> other types are managed as one of the former types).
>
> Please use and test these new types, especially with shapefiles.
>
> Next step is to introduce these types in PostGIS database driver.
>
> Michaël
>
> -------- Message transféré -------- Sujet : [jump-pilot:code] [r4337] -
> michaudm: Manage new attribute types BOOLEAN and LONG in jml and shp
> drivers (also manage other datatypes so that they can be written as one of
> the well-known datatype instead of throwing an error message) Date : Sat,
> 14 Mar 2015 16:55:29 +0000 De : Repository The JUMP Pilot Project code
> <nore...@code.jump-pilot.p.re.sf.net>
> <nore...@code.jump-pilot.p.re.sf.net> Répondre à : Repository The JUMP
> Pilot Project code <nore...@code.jump-pilot.p.re.sf.net>
> <nore...@code.jump-pilot.p.re.sf.net> Pour : Repository The JUMP Pilot
> Project code <nore...@code.jump-pilot.p.re.sf.net>
> <nore...@code.jump-pilot.p.re.sf.net>
>
> Manage new attribute types BOOLEAN and LONG in jml and shp drivers
> (also manage other datatypes so that they can be written as one of the
> well-known datatype instead of throwing an error message)
> http://sourceforge.net/p/jump-pilot/code/4337/
> ------------------------------
>
> Sent from sourceforge.net because you indicated interest in
> https://sourceforge.net/p/jump-pilot/code/
>
> To unsubscribe from further messages, please visit
> https://sourceforge.net/auth/subscriptions/
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel