id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 799,Patch for casting geometry to geography,smarshall,pramsey,"Related to a post by Radu Ilie on Jan 20, 2011, I have a patch for casting from geometry to geography that solves his problem. In particular, it will transform coordinates into the desired range for geography objects (-90 to 90 lat, -180 to 180 lon). The previous version detected this problem, but simply issued an error if it occurred. The attached files add one new external function to the the postgis library (lwgeom_force_geodetic) and uses it in the function that casts geometry objects to geography objects (Datum geography_in). The logic is a very simple clone of the lwgeom_check_geodetic function, except it fixes any descrepancies it finds. The API at the SQL level is not changed at all.",enhancement,closed,medium,PostGIS 2.1.0,postgis,1.5.X,fixed,,