Forums » GAMMA Processing » Data Import/Export »
Polygon description file from kml file
Added by Tapas Dey over 3 years ago
Dear Gamma users,
In order to obtain statistical quantities of a particular output file for a polygonal area I want to use "polyx" command. However, in "polyx" program, I need to provide a polygon description file.
I am curious to know is there any program readily available in Gamma by which a a polygon description file can be generated from a kml file for an intended area of interest?
Thanks in advance.
Best regards,
Tapas
Replies (6)
RE: Polygon description file from kml file - Added by Naeem Shahzad over 3 years ago
Dear Tapas,
In order to generate polygon description file you can use program "polyras".
polyras allows you to mention the extent of the AOI, in i,j. Sample file is attached for your reference. For more information, you can read html doc file of the program.
Regards
Naeem
aoi_mask.poly (69 Bytes) aoi_mask.poly |
Polygon description file from kml file - Added by Charles Werner over 3 years ago
Hello,
The gamma software has the program polyras to select polygons, given a raster
image file (TIFF or BMP format).
You can then graphically select the polygons, and the text format polygon
description file can be created.
Best regards,
Charles
Polygon description file from kml file - Added by Charles Werner over 3 years ago
Hello,
The gamma software has the program polyras to select polygons, given a raster
image file (TIFF or BMP format).
You can then graphically select the polygons, and the text format polygon
description file can be created.
Best regards,
Charles
RE: Polygon description file from kml file - Added by Tapas Dey over 3 years ago
Dear Charles and Naeem,
Thanks for your response.
In "polyras", user needs to draw the polygon by clicking on a ras file. I am wondering is there any program, which can read the lat-lon coordinates from kml file automatically and provides polygon description file in SAR coordinates. Kindly suggest.
Best regards,
Tapas
RE: Polygon description file from kml file - Added by Charles Werner over 3 years ago
Hello,
In the next release (Summer 2021) there will be a new program called "kml2poly"
that converts polygon(s) in KML format to a "Gamma" polygon file in map
coordinates. There will also be a new program called "poly2kml" for the inverse
process, i.e. generating polygon(s) in KML format from either a graphical
interface or from an existing "Gamma" polygon file.
There are also programs coord_to_sarpix_list and coord_to_sarpix_list that can
be used to transform from map coordinates to SAR image coordinates. Writing a
script to take the polygon in DEM coordinates and the height values from the DEM
to a polygon in radar coordinates should not be too difficult. Just take the map
polygons, extract heights at those points from the DEM, and feed these into
coord_to_sarpix_list or coord_to_sarpix. The py_gamma python scripting
environment should make this not too difficult. We may consider adding
capability in a future release (after Summer 2021).
Best regards,
Charles
RE: Polygon description file from kml file - Added by Charles Werner over 3 years ago
Hello,
In the next release (Summer 2021) there will be a new program called "kml2poly"
that converts polygon(s) in KML format to a "Gamma" polygon file in map
coordinates. There will also be a new program called "poly2kml" for the inverse
process, i.e. generating polygon(s) in KML format from either a graphical
interface or from an existing "Gamma" polygon file.
There are also programs coord_to_sarpix_list and coord_to_sarpix_list that can
be used to transform from map coordinates to SAR image coordinates. Writing a
script to take the polygon in DEM coordinates and the height values from the DEM
to a polygon in radar coordinates should not be too difficult. Just take the map
polygons, extract heights at those points from the DEM, and feed these into
coord_to_sarpix_list or coord_to_sarpix. The py_gamma python scripting
environment should make this not too difficult. We may consider adding
capability in a future release (after Summer 2021).
Best regards,
Charles