Project

General

Profile

MZHow do map a field of type boost::geometry::models::polygon to a mysql field of type 'geometry’ using Dbo?

Added by Michael Z. almost 12 years ago

As subject. I have one MySQL table in which one column of type 'geometry' is defined, and I have another C class, in which one member of type 'boost::geometry::model::polygon' is define correspondingly. my question is that how do I map this field in the 'persist' template method?


Replies (2)

KD RE: How do map a field of type boost::geometry::models::polygon to a mysql field of type 'geometry’ using Dbo? - Added by Koen Deforche over 11 years ago

Hey,

I don't know if that is possible without changes in the MySQL backend; it depends on how you can read and write this data using the C API. Perhaps you can treat it as a string with some encoding?

Regards,
koen

MZ RE: How do map a field of type boost::geometry::models::polygon to a mysql field of type 'geometry’ using Dbo? - Added by Michael Z. over 11 years ago

you're correct, Koen. wkt_text function might be useful for the case;

    (1-2/2)