This project has moved and is read-only. For the latest updates, please go here.

Oracle Provider - Geometry type not recognized

Topics: CompactFramework, Data Access, General Topics, SharpMap v0.9 / v1.x
Jun 27, 2011 at 1:49 PM


i use oracle provider to view the following script as example:

CREATE TABLE cola_markets (
name VARCHAR2(32),

INSERT INTO cola_markets VALUES(1,'cola_a',SDO_GEOMETRY(
2003, -- two-dimensional polygon 
SDO_ELEM_INFO_ARRAY(1,1003,3), -- one rectangle (1003 =exterior)
SDO_ORDINATE_ARRAY(1,1, 5,7) -- only 2 points needed to
-- define rectangle (lower left and upper right) with
-- Cartesian-coordinate data));

INSERT INTO cola_markets VALUES(
SDO_GEOMETRY(2003, -- two-dimensional polygon
SDO_ELEM_INFO_ARRAY(1,1003,1), -- one polygon (exterior polygon ring)
SDO_ORDINATE_ARRAY(5,1, 8,1, 8,6, 5,7, 5,1)));

INSERT INTO cola_markets VALUES(
2003, -- two-dimensional polygon
SDO_ELEM_INFO_ARRAY(1,1003,1), -- one polygon (exterior polygon ring)
SDO_ORDINATE_ARRAY(3,3, 6,3, 6,5, 4,5, 3,3)));

CREATE INDEX cola_spatial_idx
ON cola_markets(shape)

When i try this script i got this exception (Geometry type not recognized) when i call  System.Drawing.Bitmap img = (System.Drawing.Bitmap)map.GetMap() in handler file.

Please any help....

Jun 27, 2011 at 3:09 PM

I assume you are using OracleXE. If so, applying this patch might help you to get over this issue. It is more than a year old, so you may need to change this or that.

Hth FObermaier

Jun 28, 2011 at 8:00 AM

hello FObermaier,

Thanks you for reply.

i use orcale 11g enterprise not XE. and could you please tell me how can i apply this patch to my application??

Jun 28, 2011 at 10:16 AM

Get the latest source from sharpmap via TortoiseSVN (,

copy the patchfile to SharpMap.Extensions folder,

in explorer right-click the patchfile an choose Apply Patch from the TortoiseSVN sub-contextmenu,

update OraOps10w client in ExternalReferences.References4SharpMap.Extensions folder.

Start SharpMap solution, compile, and you should be all set.

Jun 28, 2011 at 1:56 PM

thanks you for reply.

i applied the Patch file and still the problem exist  "Geometry type not recognized" .

i don't have any idea  why this exception ? please any help .....

Jun 28, 2011 at 3:20 PM

Sorry, I cannot help you any further, since I don't have access to an Oracle server of any kind.

Try intercepting all exceptions to see where the error occurs, what are the values of variables in question. Maybe the original author of the provider can help you. His eMail is in the sourcecode

Cheers FObermaier

Jul 12, 2011 at 10:42 AM

Hi, I´m Operator (The creator of Oracle Provider for SharpMap)

The problem is not on Oracle Privider.

Well .. Before you create a spatial index for any table , you need to insert meta data info on USER_SDO_GEOM_METADATA oracle table.

Please reade first 10 chapters of Oracle Spatial User Guide, especially page 2-4.