Hi Ying,

What Victor mentioned here is with the case if you have spatial index.

Hmm.. I never create table with spatial column... I'd used your script to 
create the table and insert a test record, update the spatial column with your 
update sql.  Strange enough, both the geometry column doesn't get encoded at 
all...  I don't have an answer of whether what you did is right or wrong.  Will 
try again when I have more time.

Why not try to create a table without geometry column and create a view from 
that table with extra geometry column base on the existing columns.    E.g.

CREATE VIEW "TESTVIEW" AS
SELECT ....,
....,
....,
SDO_GEOMETRY(2001,7405,SDO_POINT_TYPE(X, Y, NULL), NULL, NULL) SSHAPE,
SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY(X, Y, 
X, Y)) GEOM_SHAPE
FROM BOREHOLE3

Try that and see what's the result.



-----Original Message-----
From: v...@csiro [mailto:[email protected]]
Sent: Thursday, 28 October 2010 4:15 PM
To: [email protected]
Subject: [ExternalEmail] Re: [Geoserver-users] About gsml:Borehole again


Hi Ying,

Not sure if this is resolved :) but you will need to run the index again :)




yw wrote:
>
>
> Hi Florence,
>
> Good to hear you again. Thank you very much for your help again.
>
> What I have done is as following,
>
> 1. Data
>
> In Oracle, I have one table under SCOTT schema
>
> CREATE TABLE SCOTT.BOREHOLE3
> (
>   SHAPENR       NUMBER(5)                       NOT NULL,
>   X             NUMBER,
>   Y             NUMBER,
>   MEASURE       NUMBER,
>   BHOLE_NO      VARCHAR2(254 BYTE),
>   COUNTY        VARCHAR2(254 BYTE),
>   COMP_BHOLE    VARCHAR2(254 BYTE),
>   ANGLE         NUMBER(19,11),
>   AZIMUTH       NUMBER(19,11),
>   LENGTH        NUMBER(19,11),
>   ELEVATION     NUMBER(7,3),
>   DRILL_METHOD  VARCHAR2(20 BYTE),
>   SSHAPE        MDSYS.SDO_GEOMETRY,
>   GEOM_SHAPE    MDSYS.SDO_GEOMETRY
> )
>
> So SSHAPE is for gsml:location and GEOM_SHAPE is for sa:shape.
>
> I have 10 records in the table, here are two example,
>
> 1    178600    150650    0    002-11 LI        20985            0
> 45    0    132.6    0    4.1                    20985    2  137.6
> unknown    (2001, 7405, (178600, 150650, ), , )    (2002, , , (1, 2, 1, ,
> , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , ), (178600, 150650, 178600,
> 150650, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , , , , , ))
> 2    178600    150700    0    002-2    LI        20984            0
> 45    0    103.6    0    2.4                    20984    3     125.6
> unknown    (2001, 7405, (178600, 150700, ), , )    (2002, , , (1, 2, 1, ,
> , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , ), (178600, 150700, 178600,
> 150700, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
> , , , , , , , , , , , , , , , , , , , , , , , , , ))
>
> I set the values in columns SSHAPE and GEOM_SHAPE as
>
> *update scott.borehole3 set
> SSHAPE=SDO_GEOMETRY(2001,7405,SDO_POINT_TYPE(X,
> Y, NULL), NULL, NULL)
> *update scott.borehole3 set
> GEOM_SHAPE=SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY(X,
> Y, X, Y))
>
> I also tried
>
> *update scott.borehole3 set
> SSHAPE=SDO_GEOMETRY(2001,7405,SDO_POINT_TYPE(145.8057083 -39.8385806,
> NULL), NULL, NULL)
> *update scott.borehole3 set
> GEOM_SHAPE=SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY(145.8057083
> -39.8385806, 145.8057083 -39.8385806))
>
>
> Then I add only one record in USER_SDO_GEOM_METADATA table (about the
> table name, I've tried BOREHOLE3 and SCOTT.BOREHOLE3),
>
> INSERT INTO
> USER_SDO_GEOM_METADATA VALUES (
>
> 'BOREHOLE3',
>     'GEOM_SHAPE',
>
> MDSYS.SDO_DIM_ARRAY(
>
> MDSYS.SDO_DIM_ELEMENT('longitude', 0, 1000000,
> 0.000001),
>
> MDSYS.SDO_DIM_ELEMENT('latitude', 0, 1000000, 0.000001)
>
> ),
>     7405);
>
>
> 2. mapping file
>
> In mapping file, I define
>
>                 <AttributeMapping>
>
> <targetAttribute>gsml:collarLocation/gsml:BoreholeCollar/gsml:location</targetAttribute>
>                     <sourceExpression>
>                         <OCQL>SSHAPE</OCQL>
>                     </sourceExpression>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
> <targetAttribute>gsml:Borehole/sa:shape</targetAttribute>
>                     <sourceExpression>
>                         <OCQL>GEOM_SHAPE</OCQL>
>                     </sourceExpression>
>
> <targetAttributeNode>gml:LineStringType</targetAttributeNode>
>                  </AttributeMapping>
>
>
> The version of GeoServer is latest one, which I download from
> http://gridlock.opengeo.org/geoserver/trunk/. I use tomcat plus WAR.
>
> It's strange, isn't it?
>
> Best wishes,
>
> Ying
>
>
>
>
>
>
>
>
>
> From: [email protected]
> To: [email protected]; [email protected]
> Date: Wed, 27 Oct 2010 09:26:18 +0800
> Subject: RE: [Geoserver-users] About gsml:Borehole again
>
>
>
>
>
>
>
>
>
>
> Hi Ying,
>
> Hmm...  not sure what went wrong in your
> setting...
>
> Can you provide more info of what you had tried.
>
> Regards,
> Florence
>
>
>
> From: ssss [mailto:[email protected]]
>
> Sent: Tuesday, 26 October 2010 7:07 PM
> To: Tan, Florence
> (CESRE, Kensington); [email protected]
> Subject:
> RE: [Geoserver-users] About gsml:Borehole again
>
>
>
> Hi Florence,
>
> Unfortunately, I followed your instructions
> step by step, but it still does not work.
>
> It is just a 'srsName'!! I can
> not understand why GeoServer makes this so complicated.
>
> Thanks for your
> help very much,
>
> Ying Wu
>
>
>
>
>
>
> From: [email protected]
> To: [email protected];
> [email protected]
> Date: Fri, 22 Oct 2010 10:10:30
> +0800
> Subject: RE: [Geoserver-users] About gsml:Borehole again
>
>
>
>
>
> Hi Ying,
>
> Yes, it is confusing with Geoserver most of the
> time.. ;-)   and don't worry, you are not the only one, I don't
> understand everything as well.  We do need better and more detail
> documentation for Geoserver.
>
> I guess the main reason you don't get the srsName is
> due to the version of GeoServer you are using do not have the srsName
> patch
> committed yet.
> Try the trunk version
> from nightly build : http://gridlock.opengeo.org/geoserver/trunk/.
>
> FYI, I'd tested your example in my
> environment with EPSG:7405 :
>
> In my view, I have the following geometry
> columns:
> SDO_GEOMETRY(2001,7405,SDO_POINT_TYPE(X_COORD,
> Y_COORD, NULL), NULL, NULL)
> GEOM_LOCACTION,
> SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY(X_COORD,
> Y_COORD, X_COORD, Y_COORD)) GEOM_SHAPE,
>
> Insert a
> record base on your example :
> INSERT INTO
> USER_SDO_GEOM_METADATA VALUES (
>
> 'TESTVIEW',
>     'GEOM_SHAPE',
>
> MDSYS.SDO_DIM_ARRAY(
>
> MDSYS.SDO_DIM_ELEMENT('longitude', 0, 1000000,
> 0.000001),
>
> MDSYS.SDO_DIM_ELEMENT('latitude', 0, 1000000, 0.000001)
>
> ),
>     7405);
> *Note :
> you only need to insert one record for each table, as you can only have
> one srid
> for the entire borehole mapping.  Also, notice the SRID must be the same
> in
> your geometry column and USER_SDO_GEOM_METADATA for the srsName to be
> encoded.
>
> The
> mapping for location and shape :
>
> <AttributeMapping>
> <targetAttribute>gsml:collarLocation/gsml:BoreholeCollar/gsml:location</targetAttribute>
> <sourceExpression>
> <OCQL>GEOM_LOCATION</OCQL>
> </sourceExpression>
> </AttributeMapping>
>
>
>
> <AttributeMapping>
> <targetAttribute>sa:shape</targetAttribute>
> <sourceExpression>
> <OCQL>GEOM_SHAPE</OCQL>
> </sourceExpression>
> <targetAttributeNode>gml:LineStringType</targetAttributeNode>
> </AttributeMapping>
>
>
> The output :
> <gsml:location>
>
>
>
>   <gml:Point
> srsDimension="3"
> srsName="http://www.opengis.net/gml/srs/epsg.xml#7405";>
>
>
>
>  <gml:pos>145.8057083
> -39.8385806</gml:pos>
>  </gml:Point>
> </gsml:location>
>
> <sa:shape>
>
>
>     <gml:LineString srsDimension="3"
> srsName="http://www.opengis.net/gml/srs/epsg.xml#7405";>
>
>
>          <gml:posList>145.8057083 -39.8385806 145.8057083
> -39.8385806</gml:posList>
>  </gml:LineString>
>
>
>
> Hope these
> help.
>
> Regards,
> Florence
>
>
>
>
>
> From: ssss [mailto:[email protected]]
>
> Sent: Thursday, 21 October 2010 7:08 PM
> To: Tan, Florence
> (CESRE, Kensington)
> Subject: RE: [Geoserver-users] About gsml:Borehole
> again
>
>
> Hi Florence,
>
> Thanks for your help. It is very confusing
> anyway.
>
> I change to another data set, which uses EPSG:7405, the British
> National Grid. I add the record to USER_SDO_GEOM_METADATA as
>
> INSERT INTO USER_SDO_GEOM_METADATA VALUES
> (
>     'borehole2',
>
> 'SSHAPE',
>
> MDSYS.SDO_DIM_ARRAY(
>
> MDSYS.SDO_DIM_ELEMENT('longitude', 0, 1000000,
> 0.000001),
>
> MDSYS.SDO_DIM_ELEMENT('latitude', 0, 1000000, 0.000001)
>
> ),
>     7405);
>
> In the mapping file, I define
>
>
>
> <AttributeMapping>
>
> <targetAttribute>gsml:Borehole/sa:shape</targetAttribute>
>
> <sourceExpression>
>
> <OCQL>SSHAPE</OCQL>
>
> </sourceExpression>
>
> </AttributeMapping>
>
> and the output is
> still
>
> <sa:shape>
>
> <gml:LineString>
>
>   <gml:posList>178600.0
>     150650.0 178600.0
>     150650.0</gml:posList>
> </gml:LineString>
> </sa:shape>
>
> The geoserver
> I am using is v2.0.2, downloaded from
> http://geoserver.org/display/GEOS/Stable.
>
> I don't know where is
> wrong??
>
> Could I have one example value in your Oracle spatial column????
> Thanks very much.
>
> Best
> wishes,
>
> Ying
>
>
>
>
>
>
>
>
>
>
>
> From: [email protected]
> To:
> [email protected]
> Date: Thu, 21 Oct 2010 10:01:17
> +0800
> Subject: Re: [Geoserver-users] About gsml:Borehole again
>
>
>
>
> Please see my feedback below
>
>
>
> From: ssss [mailto:[email protected]]
>
> Sent: Wednesday, 20 October 2010 11:07 PM
> To: Tan, Florence
> (CESRE, Kensington); [email protected]
> Subject:
> RE: [Geoserver-users] About gsml:Borehole again
>
>
>
> Hi Florence,
>
> Thanks for your answer. Following your instruction, I
> insert one row as
>
> INSERT INTO USER_SDO_GEOM_METADATA VALUES
> (
>     'GSI_BOREHOLESING',
>
> 'GEOM',
>
> MDSYS.SDO_DIM_ARRAY(
>
> MDSYS.SDO_DIM_ELEMENT('X', 0, 200000,
> 0.1),
>         MDSYS.SDO_DIM_ELEMENT('Y',
> 0,250000, 0.1)
>     ),
>
> 19973);
>
> But there is no srsName, srsDimension
> in LineString. Do you mean I should add the linestring
> column to USER_SDO_GEOM_METADATA table before all the data is imported in?
> Could
> you give the instructions in more detail? Thanks.
>
> No, you
> don't have to perform the above before data is imported.  Does CRS
> definition exist for EPSG:19973 in geoserver ? What revision of geoserver
> build
> are you using ? (refer to :  for srsName encoding patch)
>
>
> Could I ask whether there is
> any plan to add 1-D and 3-D? Now I have to take the sa:shape and
> gsml:shape
> away. I understand  maybe GeoServer solely focuses on borehole, instead of
> its layers, so 1-D and 3-D is omitted. What about later time? Thanks.
>  Someone have to
> answer this one, I do not know of any plan at the
> moment.
>
> Best wishes,
>
> Yinghttp://jira.codehaus.org/browse/GEOT-2639
>
>
>
>
>
>
>
>
> From: [email protected]
> To: [email protected];
> [email protected]
> Date: Wed, 20 Oct 2010 09:08:46
> +0800
> Subject: RE: [Geoserver-users] About gsml:Borehole again
>
>
>
>
> Hi Ying, to answer your questions :
>
> I asked this question in May, could I ask whether <sa:shape>
> has been improved to support 3-dimension?
> AND how to add 'srsName',
> 'srsDimension' to gml:LineString as above?
> No, geoserver do not support 3D coordinate yet.
> (Someone please correct me if it does now...)
> To get the srsName, srsDimension for LineString, in
> Oracle, you need to add the linestring column to USER_SDO_GEOM_METADATA
> table,
> e.g. :
>
> INSERT INTO USER_SDO_GEOM_METADATA VALUES
> (table_name,column_name,diminfo,srid);
> e.g.
>
> INSERT INTO USER_SDO_GEOM_METADATA VALUES (
>
> 'SITE',
>     'GEODETIC_POINT',
>
> MDSYS.SDO_DIM_ARRAY(
>
> MDSYS.SDO_DIM_ELEMENT('longitude', -180, 180,
> 0.000001),
>
> MDSYS.SDO_DIM_ELEMENT('latitude', -90, 90, 0.000001)
>
> ),
>     4326);
>
> GeoServer will encode the srsName and srsDimension
> base on the SRID.
>
>
> For your
> second question on 1D mapping, I don't think GeoServer support 1D
> coordinate at
> the moment as well.
>
>
> Regards,
> Florence
>
>
>
>
>
> From: ssss [mailto:[email protected]]
>
> Sent: Tuesday, 19 October 2010 11:19 PM
> To:
> [email protected]
> Subject: [Geoserver-users] About
> gsml:Borehole again
>
>
> Hi,
>
> I come back to gsml:borehole again. Now, the GeoServer
> runs very well except for several small questions. Thanks very much.
>
> 1.
> About gsml:Borehole/sa:shape
>
> What I want is
> like
>
>
> <sa:shape>
>
>     <gml:LineString
>
>
> gml:id="bh.TR34SWBJ90.shape"
>
>
> srsName="urn:ogc:def:crs:EPSG:6.15:7405"
>
>
> srsDimension="3">
>
>         <gml:pos>630400 0141150
> 29.5</gml:pos>
>
>         <gml:pos>630400 0141150
> 74.5</gml:pos>
>
>     </gml:LineString>
>
>         </sa:shape>
>
> So in
> <gml:pos>, it should be like 'X Y Depth'.
>
> In mapping file, I
> define,
>
>
> <AttributeMapping>
>
> <targetAttribute>gsml:Borehole/sa:shape</targetAttribute>
>
> <sourceExpression>
>
> <OCQL>GEOM</OCQL>
>
> </sourceExpression>
>
> </AttributeMapping>
>
> where
> 'GEOM' is a Oracle spatial field in a table. But I can only get
>
>
> <sa:shape>
>
>   <gml:LineString>
>
>
>     <gml:posList>163410.0 264500.0 163410.0
>       264500.0</gml:posList>
>
>   </gml:LineString>
> </sa:shape>
>
> It
> seems GeoServer still doesn't support 3-dimension.
>
> I asked this
> question in May, could I ask whether <sa:shape> has been improved to
> support 3-dimension?
> AND how to add 'srsName', 'srsDimension' to
> gml:LineString as above?
>
>
> 2. About gsml:shape in
> gsml:MappedInterval
>
> If I encode a borehole log as MappedIntervals, then
> in gsml:MappedInterval, I need to define gsml:shape. What I want is
>
>
>
>         <gsml:shape>
>
>
>     <gml:LineString
>
>
>     srsName="bh.TR34SWBJ90.shape"
>
>
>         srsDimension="1">
>
>
>
> <gml:pos>0</gml:pos>
>
>
>     <gml:pos>1.0</gml:pos>
>
>
>     </gml:LineString>
>
>
> </gsml:shape>
>
> as Above, it define the starting depth to the end
> depth from 0 to 1.0, which is one layer of a borehole.
>
> Could I ask how
> to define this in the mapping? Should I define a new Oracle spatial field
> and
> use something
> like,
>
>
> <AttributeMapping>
>
> <targetAttribute>gsml:MappedInterval/sa:shape</targetAttribute>
>
> <sourceExpression>
>
> <OCQL>GDEPTH</OCQL>
>
> </sourceExpression>
>
> </AttributeMapping>
> ??????????????? Or there is better
> way???
>
> Meanwhile, how to add srsDimension to
> gml:LineString?
>
>
> Thanks very much for your
> help,
>
> Ying
>
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Geoserver-users mailing list [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

--
View this message in context: 
http://old.nabble.com/ExternalGraphic-SLD-Error---Argument--quot-value-quot--should-not-be-null.-tp30000342p30074318.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to