problems with some Oracle polygons
Francesco Sozzi
fsozzi at INTERCAD.CH
Mon Sep 26 05:39:05 PDT 2005
Hi Fernando,
Thanks for help.
I agree with you about sdo_etype.
I've just tested sdo_migrate as you suggested and it works fine.
Best regards
Francesco
----- Original Message -----
From: "Fernando Simon" <fsimon at UNIVALI.BR>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, September 26, 2005 2:21 PM
Subject: Re: [UMN_MAPSERVER-USERS] problems with some Oracle polygons
> Hi Francesco,
> I'm fine, your wecolme for your e-mail.
> This error appear when you use a type definition for your layer that
> don't match for what Mapserver read from the source, for the problem that
> relate probably Oracle Spatial driver reconize as a line segment. Using
> the geometry definition that you sent I saw a problem, for compound
> polygons (SDO_ETYPE 1005) this definition it's wrong, the first triplet
> indicates a SDO_GTYPE as 5, and this don't exist for default Oracle
> Spatial parameter. I checked it in user guide (9i and 10g) and this
> SDO_TYPE don't appear in the table for SDO_ELEM_INFO.
> But exist a little information about this value for SDO_TYPE in the
> SDO_ELEM_INFO chapter in the user guide, this section below I take from
> user guide (10g):
> "...
> Note: The use of 5 as an SDO_ETYPE value for polygon ring
> elements in a single geometry is discouraged. You should specify 5 only if
> you do not know if the compound polygon is exterior or
> interior, and you should then upgrade the table or layer to the current
> format using the SDO_MIGRATE.TO_CURRENT procedure, described in Chapter
> 17.
> ..."
> In this case I recommend that you test the SDO_MIGRATE function as user
> guide suggested. Here I did a little test with your data and after apply
> the SDO_MIGRATE your geometry was draw correctly, you can check in this
> link:
> After MIGRATE :
> http://200.169.63.95/cgi-bin/map460?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&mode=map&layer=99
> Before MIGRATE (as line):
> http://200.169.63.95/cgi-bin/map460?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&mode=map&layer=98_line
> Befor MIGRATE:
> http://200.169.63.95/cgi-bin/map460?map=/home/apache/mapserv/maporaclespatial/maporaclespatial.map&mode=map&layer=98
> After the MIGRATE function:
> SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 3, 1, 2,
> 1, 9, 2, 2, 17, 2, 1), SDO_ORDINATE_ARRAY(717393,311, 96290,2075,
> 717387,403, 96289,9591, 7
> 17352,296, 96287,4608, 717309,425, 96284,41, 717307,995, 96284,2265,
> 717305,79, 96283,6852, 717303,764, 96282,6628, 717301,79, 96281,1715,
> 717300,032, 96279,430 7, 717393,843, 96286,1065, 717393,311, 96290,2075))
> To execute the SDO_MIGRATE I did:
> SQL> execute sdo_migrate.to_current('cola_markets', 'shape');
>
> Best regards.
> Thanks again
>
> ------------------------------------------------------------------------
> Fernando Simon
> Mapserver and Oracle Spatial developer
> G10 - Laboratorio de Computacao Aplicada - Brazil
> http://www.univali.br/g10 - UNIVALI/CTTMAR
> ------------------------------------------------------------------------ .
>
>
>
> Francesco Sozzi wrote:
>
>> Hi Fernando,
>> How are you?...
>> In some cases I have polygon defined with a code "5" instead of "1005".
>> In this case mapserver does not recognize the polygon format and it
>> displayes an error:
>> *Warning: [MapServer Error]: msDrawShape(): Only polygon shapes can be
>> drawn using a POLYGON layer definition. in...*
>> Here you are a sample polygon definition that gives me problems:
>> SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 5, 3, 1, 2, 1, 5,
>> 2, 2, 13, 2, 1), SDO_ORDINATE_ARRAY(717393.311, 96290.2075, 717393.843,
>> 96286.1065, 717300.032, 96279.4307, 717301.79, 96281.1715, 717303.764,
>> 96282.6628, 717305.79, 96283.6852, 717307.995, 96284.2265, 717309.425,
>> 96284.41, 717352.296, 96287.4608, 717387.403, 96289.9591, 717393.311,
>> 96290.2075))
>> Any suggestions?...
>> Best regards
>> Francesco
>>
>
More information about the MapServer-users
mailing list