I'm working on a Web Application that involves saving latitude/longitude for certain points to a database and I'm using PostgreSQL's geometry type to do this.
To grab the lat/lng from the database you have to do something like:
select x(geometry) as latitude, y(geometry) as longitude
and for saving there is a database function that takes lat/lng as parameters.
I was wondering if there's a way to extend my model in Yii to automatically grab the latitude/longitude from the database when a find is called. And then to automatically save the latitude/longitude using the database function when I save the model.
Thanks for your help!