[Gvsig_usuarios] [Gvsig_english] oracle plugin crashes with point layers on oracle10.2

Juan Lucas Dominguez Rubio jldominguez en prodevelop.es
Jue Ene 14 12:38:18 CET 2010


> Could we manage this inside the oracle plugin?
> Maybe setting Z to 0 if it's NULL. 
 
Ok, We'll do that.
 
If a table called TABLE_NAME has a column called GEOMETRY_COLUMN with 3D points whose Z is null, you can convert them to 2D points with:
 
SELECT mdsys.sdo_geometry(
2001,
t.GEOMETRY_COLUMN.sdo_srid,
mdsys.sdo_point_type(t.GEOMETRY_COLUMN.sdo_point.X, t.GEOMETRY_COLUMN.sdo_point.Y, null),
null,
null)
FROM
TABLE_NAME t
 
(maybe we should send our emails in English only to the international list)
 
 
 
Regards,
 
Juan Lucas Domínguez Rubio
---
Prodevelop SL, Valencia (España)
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
http://www.prodevelop.es <http://www.prodevelop.es/> 
---

________________________________

De: gvsig_usuarios-bounces en listserv.gva.es en nombre de giohappy
Enviado el: jue 14/01/2010 11:28
Para: gvsig_usuarios en listserv.gva.es
Asunto: Re: [Gvsig_usuarios] [Gvsig_english] oracle plugin crashes with point layers on oracle10.2




Hi Juan. thanks for the reply.
Sorry, I meant 3001.
The problem was that, the SDO_POINT.Z set NULL. Anyway this is valid for
Oracle (I checked it with its validating functions), and this is what
returns when you make a get_centroid on 3003 polygons: we get a 3d point but
with Z null.
Could we manage this inside the oracle plugin? Maybe setting Z to 0 if it's
NULL. For now we will do it inside the DB...

giovanni






jldominguez wrote:
>
> Hello, Giovanni.
> 
> The gtype 1003 is not for points as far as I know. Do you mean 3001?
> 
> The error happens because gvSIG finds a NULL value in the Z, so maybe
> there is a contradiction in your data (the metadata says it is a 3D point
> but the Z is null). Do you have any application to access the database
> (for example SQLDeveloper)? If so, try to execute this:
> 
> SELECT t.<GEOMETRY_COLUMN>.sdo_gtype, t.<GEOMETRY_COLUMN>.sdo_point FROM
> <TABLE_NAME> t WHERE ROWNUM < 10
> 
> You have to replace <GEOMETRY_COLUMN> and <TABLE_NAME> with your values.
> What is the result?
> 
> How did you create those geometries in the Oracle Database? Did you create
> them with gvSIG?
> 
> Regards,
> 
> Juan Lucas Domínguez Rubio
> ---
> Prodevelop SL, Valencia (España)
> Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
> http://www.prodevelop.es <http://www.prodevelop.es/>  <http://www.prodevelop.es/>
> ---
>
> ________________________________
>
> De: gvsig_internacional-bounces en listserv.gva.es en nombre de G. Allegri
> Enviado el: mié 13/01/2010 16:28
> Para: Users and Developers mailing list; Lista de Usuarios de gvSIG
> Asunto: [Gvsig_english] oracle plugin crashes with point layers on
> oracle10.2
>
>
>
> I have a point layer (gtype 1003) in oracle, version 10.2
> I'm using the ojdbc14.jar from oracle client.
>
> Linear and polygon layers load correctly, while points give
> NullPointerException for every point.
> Here is the  expection (just on of the other similar thousands!) from log:
>
> java.lang.NullPointerException
>         at
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialUtils.getFMapGeometrySdoPoint(OracleSpatialUtils.java:2633)
>         at
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialUtils.getFMapGeometryPoint(OracleSpatialUtils.java:2583)
>         at
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver.getFMapGeometry(OracleSpatialDriver.java:587)
>         at
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialDriver.getGeometryUsing(OracleSpatialDriver.java:538)
>         at
> es.prodevelop.cit.gvsig.fmap.drivers.jdbc.oracle.OracleSpatialFeatureIterator.next(OracleSpatialFeatureIterator.java:141)
>         at
> com.iver.cit.gvsig.fmap.drivers.featureiterators.ReprojectWrapperFeatureIterator.next(ReprojectWrapperFeatureIterator.java:92)
>         at
> com.iver.cit.gvsig.fmap.layers.FLyrVect._draw(FLyrVect.java:437)
>         at com.iver.cit.gvsig.fmap.layers.FLyrVect.draw(FLyrVect.java:631)
>         at
> com.iver.cit.gvsig.fmap.DefaultMapContextDrawer.draw(DefaultMapContextDrawer.java:209)
>         at
> com.iver.cit.gvsig.fmap.DefaultMapContextDrawer.draw(DefaultMapContextDrawer.java:175)
>         at com.iver.cit.gvsig.fmap.MapContext.draw(MapContext.java:1092)
>         at
> com.iver.cit.gvsig.fmap.MapControl$PaintingRequest.paint(MapControl.java:1043)
>         at
> com.iver.cit.gvsig.fmap.MapControl$Drawer2$Worker.run(MapControl.java:1234)
>         at java.lang.Thread.run(Unknown Source)
>
> giovanni
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional en listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
>
> _______________________________________________
> gvSIG_usuarios mailing list
> gvSIG_usuarios en listserv.gva.es
>
> Para ver histórico de mensajes, editar sus preferencias de usuario o darse
> de baja en esta lista, acuda a la siguiente dirección:
>
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios
>
>

--
View this message in context: http://n2.nabble.com/oracle-plugin-crashes-with-point-layers-on-oracle-10-2-tp4352187p4391745.html
Sent from the gvSIG usuarios mailing list archive at Nabble.com.
_______________________________________________
gvSIG_usuarios mailing list
gvSIG_usuarios en listserv.gva.es

Para ver histórico de mensajes, editar sus preferencias de usuario o darse de baja en esta lista, acuda a la siguiente dirección:

http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios


------------ próxima parte ------------
Se ha borrado un mensaje que no está en formato texto plano...
Nombre     : no disponible
Tipo       : application/ms-tnef
Tamaño     : 9795 bytes
Descripción: no disponible
Url        : http://listserv.gva.es/pipermail/gvsig_usuarios/attachments/20100114/a28ab880/attachment.bin 


Más información sobre la lista de distribución gvSIG_usuarios