Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sieutruc opened this issue Jan 13, 2014 · 6 comments
Closed

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

sieutruc opened this issue Jan 13, 2014 · 6 comments

Comments

@sieutruc
Copy link

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
Copy link
Member

sdlime commented Jan 13, 2014

@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
Copy link
Contributor

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
Copy link
Author

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

thanks you in advance .

@msmitherdc
Copy link
Contributor

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')"

@sdlime sdlime closed this as completed Jan 14, 2014
@sieutruc
Copy link
Author

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants