MapServer / MapServer

Source code of the MapServer project. Please submit pull requests to the 'main' branch.
https://mapserver.org
Other
1.03k stars 373 forks source link

Issue of drawing a compoun polygon (Oracle spatial) #4840

Closed sieutruc closed 10 years ago

sieutruc commented 10 years ago

Hello,

I try to draw a simple compound polygon by using ms4w 6.4 with a layer like:

LAYER
    NAME "cola_markets"
    STATUS DEFAULT
    TYPE POLYGON
    CONNECTIONTYPE oraclespatial
    CONNECTION "system/test@127.0.0.1:1521/ms4w"
    DATA "SHAPE FROM (SELECT shape FROM SYS.COLA_MARKETS WHERE name='cola_f')"
    PROCESSING "CLOSE_CONNECTION=DEFER"
    CLASS
        NAME "Ville"
        STYLE
            COLOR 246 241 223
            #OUTLINECOLOR 0 0 0
            ANTIALIAS true
        END
    END
END

and shape_data = SDO_GEOMETRY( 2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1005,2, 1,2,1, 5,2,2), SDO_ORDINATE_ARRAY(6,10, 10,1, 14,10, 10,14, 6,10))

I got : msDrawShape() General error message. Only polygon shapes can be drawn using a POLYGON layer definition when executing the command: sh2img -m test.map -o test.png -map_debug 3

Can anyone show me how to resolve that problem ?

sdlime commented 10 years ago

@msmitherdc, any idea? Is it possible to cast compond polygons somehow in the data satement? This probably should have started on the mapserver-users mailing list rather than as a issue ticket.

--Steve

msmitherdc commented 10 years ago

The issue is that mapserver doesn't support the circular arcs between nodes. You could wrap it in a 0 size buffer call to just get the outside or also possibly a sdo_concave_hull call.

sieutruc commented 10 years ago

Can you give a link of the method that shows how to do ?

thanks you in advance .

msmitherdc commented 10 years ago

http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#SPATL1111

DATA "SHAPE FROM (SELECT sdo_geom.sdo_buffer(shape, 0, 0.01) shape FROM SYS.COLA_MARKETS WHERE name='cola_f')"
sieutruc commented 10 years ago

@msmitherdc Are you sure when using sdo_geom.sdo_buffer, we don't get a same problem "msDrawShape() General error message. Only polygon shapes can be drawn using a POLYGON layer definition"

When i set: DATA "SHAPE FROM (SELECT sdo_geom.sdo_buffer(shape, 0, 0.01) shape FROM SYS.COLA_MARKETS WHERE name='cola_f')"

I got error: Error: ORA-13226: interface not supported without a spatial index.

When editting that command like below:

DATA "SHAPE FROM (SELECT sdo_geom.sdo_buffer(shape, 0, 0.01) shape FROM SYS.COLA_MARKETS WHERE name='cola_f') USING NONE"

I continued getting again the same error :

msDrawShape() General error message. Only polygon shapes can be drawn using a POLYGON layer definition

Can you suggest me what to do ?

I have used Oracle 10.2.0.3 for client and server. And ms4w v3.0.6 with MapServer CGI 6.0.3

jratike80 commented 10 years ago

Has anybody tried SDO_GEOM.SDO_ARC_DENSIFY http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objgeom.htm#i867686