SS,

 

Everything is fixed now. (puff)

 

So I tried 'Run Datastore Query' again. To my surprise it threw the same
exception. :O

Looking more attentively it became obvious the reason for it:

com.vividsolutions.jts.io.ParseException: Unknown geometry type:
0101000020E61000008CA20E1811DA30C0B0FECF61BE524040

                at
com.vividsolutions.jts.io.WKTReader.readGeometryTaggedText(WKTReader.java:43
4)

                at
com.vividsolutions.jts.io.WKTReader.read(WKTReader.java:193)

                at
com.vividsolutions.jts.io.WKTReader.read(WKTReader.java:162)

                at
com.vividsolutions.jump.datastore.postgis.PostgisValueConverterFactory$WKTGe
ometryValueConverter.getValue(PostgisValueConverterFactory.java:60

 

It simply doesn't support WKB . only WKT.

 

Seeing this I tried to run the query with the astext() function enveloping
the desired geometry field..

It threw another exception:

java.lang.ArrayIndexOutOfBoundsException: -1

                at
com.vividsolutions.jump.feature.BasicFeature.getAttribute(BasicFeature.java:
82)

                at
com.vividsolutions.jump.feature.AbstractBasicFeature.getGeometry(AbstractBas
icFeature.java:163)

                at
com.vividsolutions.jump.feature.FeatureDataset.getEnvelope(FeatureDataset.ja
va:92)

                at
com.vividsolutions.jump.feature.FeatureDataset.query(FeatureDataset.java:116
)

                at
com.vividsolutions.jump.feature.FeatureCollectionWrapper.query(FeatureCollec
tionWrapper.java:138)

                at
com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer.layerToFeaturesM
ap(LayerRenderer.java:162)

                at
com.vividsolutions.jump.workbench.ui.renderer.FeatureCollectionRenderer.crea
teRunnable(FeatureCollectionRenderer.java:55)

                at
com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer.createRunnable(L
ayerRenderer.java:87)

                at
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.render(Render
ingManager.java:204)

                at
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.render(Render
ingManager.java:184)

                at
com.vividsolutions.jump.workbench.ui.LayerViewPanel.layerChanged(LayerViewPa
nel.java:361)

                at
com.vividsolutions.jump.workbench.model.LayerManager$3.run(LayerManager.java
:418)

                at
com.vividsolutions.jump.workbench.ui.GUIUtil.invokeOnEventThread(GUIUtil.jav
a:556)

                at
com.vividsolutions.jump.workbench.model.LayerManager.fireLayerEvent(LayerMan
ager.java:382)

                at
com.vividsolutions.jump.workbench.model.LayerManager.fireLayerChanged(LayerM
anager.java:416)

                at
com.vividsolutions.jump.workbench.model.LayerManager.fireLayerChanged(LayerM
anager.java:440)

                at
com.vividsolutions.jump.workbench.model.Category.add(Category.java:124)

                at
com.vividsolutions.jump.workbench.model.LayerManager.addLayerable(LayerManag
er.java:153)

                at
com.vividsolutions.jump.workbench.ui.plugin.datastore.AbstractAddDatastoreLa
yerPlugIn$1.run(AbstractAddDatastoreLayerPlugIn.java:39)

                at java.awt.event.InvocationEvent.dispatch(Unknown Source)

                at java.awt.EventQueue.dispatchEvent(Unknown Source)

                at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

                at
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

                at
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

                at java.awt.Dialog$1.run(Unknown Source)

                at java.awt.Dialog$2.run(Unknown Source)

                at java.security.AccessController.doPrivileged(Native
Method)

                at java.awt.Dialog.show(Unknown Source)

                at java.awt.Component.show(Unknown Source)

                at java.awt.Component.setVisible(Unknown Source)

                at
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager.execute(TaskMon
itorManager.java:112)

                at
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(Ab
stractPlugIn.java:133)

                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.AbstractButton.doClick(Unknown Source)

                at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown
Source)

                at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.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.dispatchEvent(Unknown Source)

                at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

 

 

So, imho, the 'Run Datastore Query' still needs some work. Even more so
where WKB is concerned (adding support for it).

 

Pedro Doria Meunier

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Sunburned Surveyor
Sent: quinta-feira, 8 de Fevereiro de 2007 15:52
To: List for discussion of JPP development and use.
Subject: [Norton AntiSpam] Re: [JPP-Devel] Datastore query

 

Pedro, 

 

I've done the same thing many times. :]

 

SS

 

On 2/8/07, Pedro Doria Meunier <[EMAIL PROTECTED]> wrote: 

SS,

 

It happened that I had lat in place of lon and vice-versa (blush).

It was by sequence of *miracles* that getting the correct name for the
street,locality,city of the current unit's position was achieved.

As it turned out part of my code also computes the utm zone for the given
cords thus allowing me to do perimeter-based searches in meters (by
reprojecting on-the-fly to the correct srid). This, I think, was what hold
everything together.. :O 

 

But enough history. I'll execute a datastore query this afternoon and get
back to you guys with the result (which I expect to be correct. :D )

 

Pedro Doria Meunier

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] On Behalf Of
Sunburned Surveyor
Sent: quarta-feira, 7 de Fevereiro de 2007 15:21
To: List for discussion of JPP development and use.
Subject: [Norton AntiSpam] Re: [JPP-Devel] Datastore query 

 

Pedro,

 

I'm guessing from the information that you provided that there is a problem
with the format of your WKT "Point" geometry. Or at least OpenJUMP thinks
that there is.

 

Can you check to make sure the WKT geometry your storing is a valid format
and get back to us?

 

The Sunburned Surveyor

 

On 2/7/07, Pedro Doria Meunier <[EMAIL PROTECTED]> wrote: 

Hi group,

 

Trying to execute a valid query for a valid geom. type (point) fires this
baby:

The query:

select friendly_name, curr_location from units where id=80000135;

in the table definition:

CONSTRAINT enforce_point CHECK (geometrytype(curr_location) = 'POINT'::text)

 

The 'baby':

com.vividsolutions.jts.io.ParseException: Unknown geometry type:
0101000020E6100000C05B2041B14EA94038F8C264EAC999C0

                at
com.vividsolutions.jts.io.WKTReader.readGeometryTaggedText(WKTReader.java:43
4)

                at
com.vividsolutions.jts.io.WKTReader.read(WKTReader.java:193)

                at
com.vividsolutions.jts.io.WKTReader.read(WKTReader.java:162)

                at
com.vividsolutions.jump.datastore.postgis.PostgisValueConverterFactory$WKTGe
ometryValueConverter.getValue(PostgisValueConverterFactory.java:60)

                at
com.vividsolutions.jump.datastore.postgis.PostgisResultSetConverter.getFeatu
re(PostgisResultSetConverter.java:47)

                at
com.vividsolutions.jump.datastore.postgis.PostgisFeatureInputStream.getFeatu
re(PostgisFeatureInputStream.java:72)

                at
com.vividsolutions.jump.datastore.postgis.PostgisFeatureInputStream.readNext
(PostgisFeatureInputStream.java:66)

                at
com.vividsolutions.jump.io.BaseFeatureInputStream.hasNext(BaseFeatureInputSt
ream.java:38)

                at
com.vividsolutions.jump.workbench.ui.plugin.datastore.RunDatastoreQueryPlugI
n.createLayer(RunDatastoreQueryPlugIn.java:55)

                at
com.vividsolutions.jump.workbench.ui.plugin.datastore.RunDatastoreQueryPlugI
n.createLayerable(RunDatastoreQueryPlugIn.java:27)

                at
com.vividsolutions.jump.workbench.ui.plugin.datastore.AbstractAddDatastoreLa
yerPlugIn.run(AbstractAddDatastoreLayerPlugIn.java:32)

                at
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run
(TaskMonitorManager.java:149)

                at java.lang.Thread.run(Unknown Source)

btw: the geometry is SRID=4326.

 

Using openjump-20061203-0014.

JTS ver = 1.7.2

 

Any ideas as to what is happening?

 

BR,

Pedro Doria Meunier

 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier. 
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
&kid=120709&bid=263057&dat=121642
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel> 

 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier. 
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
&kid=120709&bid=263057&dat=121642
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel> 

 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to