MySQL Forums
Forum List  »  GIS

Cannot get geometry object from data you send to the GEOMETRY field
Posted by: Crackie Maggie
Date: August 08, 2012 01:44AM

Hi All,

I kept getting error:Cannot get geometry object from data you send to the GEOMETRY field

We have a POLYGON table TBL_BDY which has two columns :CODE, BDY .BDY is meant to be like a geometry column except the data type is text.

In the BDY column : the format of the latitude longitude is arranged as : 10 -10|1 -1|10 -10|.....and so on...it is seperated by a pipeline.

My effort is to try to spatialize the table.

I created a replicated table with an additional column of GEOMETRY.

CREATE TABLE tbl_bdy_geom
(CODE VARCHAR(4),
BDY TEXT,
GEOLOC GEOMETRY);


I then try to insert the table by replacing theipelines with comma...but I ran into error:Cannot get geometry object from data you send to the GEOMETRY field


insert into tbl_bdy_geom (code,bdy,geoloc)
select code,bdy,polyFromText(REPLACE(`bdy`, '|', ',')) from `tbl_bdy`;

Any help is much appreciated!

Options: ReplyQuote


Subject
Views
Written By
Posted
Cannot get geometry object from data you send to the GEOMETRY field
17449
August 08, 2012 01:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.