
|
If you were logged in you would be able to see more operations.
|
|
|
|
The Geomery data type for the PostGIS dialect does a manual transformation of a BOX result from PostGIS, which is returned when the Envelope projection is used. Data point 4 is incorrectly created using to longitude points. Currently, the string format used is this:
string wkt = string.Format(
"POLYGON(({0} {1},{2} {1},{2} {3},{0} {2},{0} {1}))",
min[0], min[1], max[0], max[1]);
The fourth data point is formatted as {0} {2} - which equals min[0] and max[0] - both of which refer to longitude points. To match what PostGIS returns from st_AsEWKT, the format should be:
string wkt = string.Format(
"POLYGON(({0} {1},{0} {3},{2} {3},{2} {1},{0} {1}))",
min[0], min[1], max[0], max[1]);
Both of these formats cause the Envelope Projection unit test to pass. I am including a patch for the change (although probably not needed), but the unit test should probably be modified to detect the problem. I can't compile the solution without heavy modifications due to missing references, so I'm not including that.
|
|
Description
|
The Geomery data type for the PostGIS dialect does a manual transformation of a BOX result from PostGIS, which is returned when the Envelope projection is used. Data point 4 is incorrectly created using to longitude points. Currently, the string format used is this:
string wkt = string.Format(
"POLYGON(({0} {1},{2} {1},{2} {3},{0} {2},{0} {1}))",
min[0], min[1], max[0], max[1]);
The fourth data point is formatted as {0} {2} - which equals min[0] and max[0] - both of which refer to longitude points. To match what PostGIS returns from st_AsEWKT, the format should be:
string wkt = string.Format(
"POLYGON(({0} {1},{0} {3},{2} {3},{2} {1},{0} {1}))",
min[0], min[1], max[0], max[1]);
Both of these formats cause the Envelope Projection unit test to pass. I am including a patch for the change (although probably not needed), but the unit test should probably be modified to detect the problem. I can't compile the solution without heavy modifications due to missing references, so I'm not including that. |
Show » |
|