--- a/src/pyams_gis/rpc/json/__init__.py Fri Jan 26 17:17:00 2018 +0100
+++ b/src/pyams_gis/rpc/json/__init__.py Sat Jan 27 03:26:56 2018 +0100
@@ -57,14 +57,14 @@
'area': area,
'srid': from_srid
}
- point1 = transform(area['x1'], area['y1'])
- point2 = transform(area['x2'], area['y2'])
+ point1 = transform((area['x1'], area['y1']), from_srid, to_srid)
+ point2 = transform((area['x2'], area['y2']), from_srid, to_srid)
return {
'area': {
- 'x1': point1['longitude'],
- 'y1': point1['latitude'],
- 'x2': point2['longitude'],
- 'y2': point2['latitude']
+ 'x1': point1['point']['longitude'],
+ 'y1': point1['point']['latitude'],
+ 'x2': point2['point']['longitude'],
+ 'y2': point2['point']['latitude']
},
- 'srid': to_srid
+ 'srid': point1['srid']
}