otbRasterizationApplication -pr options await for OGC WKT strings
Mantis Issue 231, reported by jmichel, assigned to jguinet, created: 2011-02-11
The otbRasterizationApplication has a projection option -pr which await for a OGC WKT string and nothing else.
For instance, to obtain an UTM rasterized map, one would have to enter :
-pr "PROJCS[\"WGS 84 / UTM zone 31N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],AUTHORITY[\"EPSG\",\"32631\"],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]"
Which is not user-friendly. We should use projection parameters syntax analogous to orthorectification applications instead.
1297443323 - christopIt would be great to be able to pass:
- an image
- a vector data to the projection option. What a user want is usually something like "give me something in the same projection as my other image".
1297680142 - julienI think we should think about this problem of passing a geometry to an application :
- The solution used in the Orthorectification application is user friendly but it restricts the amount of projection supported
- Passing the OGC WKT string is not user-friendly
Maybe a great way of doing it would be to support all of the following :
- Passing an EPSG code or
- Passing a text file containing a WKT, or
- Passing a reference image.
What do you think ?
1297698653 - julienmIt seems like a nice feature to me.
How about a little class to do the work, taking a string as input and giving a WKT string as output, doing the following work :
- if the string can be converted to a valid EPSG number, return the corresponding WKT
- if the string corresponds to