Ticket #549 (closed defect: fixed)
geotiff output from perl mapscript
| Reported by: | hunt@… | Owned by: | sdlime |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript | Version: | 4.0 |
| Severity: | normal | Keywords: | |
| Cc: | sgillies@…, lfilak@… |
Description
When making a geotiff from perl mapscript the geo info does not get encoded.
If I use shp2img on the same mapfile it works.
This is what Frank Warmerdam Send me on the user list.
OK, the above $img->save($imagename) is the problem. The underlying C
function is looks like this:
int msSaveImage(mapObj *map, imageObj *img, char *filename)
In the GDAL fork, it checks if map is NULL. If it is NULL no coordinates
or georeferencing system is saved (because it gets it from the map). That
is why your getting a plain TIFF instead of a GeoTIFF.
Looking through mapscript.i, I see that there is a save() method on the
imageObj, but it just passed NULL to msSaveImage() for the map. There
does not seem to be a save operation that includes the map handle accessable
in MapScript.
My suggestion is that you file an enhancement request in bugzilla requesting
one, and explaining why you need it. I would suggest it be implemented
something like the following as a method on the mapObj.
void saveImage(imageObj *image, char *filename) {
msSaveImage(self, image, filename );
}
Change History
Note: See
TracTickets for help on using
tickets.
