Re: [gdal-dev] A modified version of your get_soundg.py

2017-08-01 Thread Dave Liske

Frank,Thank you for this. I had a suspicion feat1 had a purpose at some point. It'd probably be interesting to hear if you ever do remember what that might have been.I've made a couple other changes to my version of this since contacting you last week. Precision of the LAT/LONG fields is now 7, as per S-52 Appendix B.2. But then, to add flexibility for the user of the KML file, I ditched my additional second argument to specify metres or feet in favor of creating and filling both a DEPTHM and a DEPTHF field. This gives the user the choice of switching between the two without generating a separate KML file.Thanks again,DaveOn July 29, 2017 at 10:00 PM Frank Warmerdam  wrote:Dave,Thanks for the notice. I am not updating the upstream get_soundg.pybut I've taken the liberty of cc:ing this reply to the gdal-devmailing list so more potentially interested folks will be aware ofyour changes, and your blog post:http://micuisine.com/code-projects/?page_id=10I was particularly amused by change entry "Changed feat2 to feat1 toprevent searching for unused feat1.". Indeed looking back at the codethere must have been some history behind my use of feat2 that was lostand now is just confusing.Best regards,FrankOn Sat, Jul 29, 2017 at 7:46 AM, Dave Liske  wrote:Mr. Warmerdam,In recently looking for a method to split the depth values from NOAA S-57files for a personal art project, I came across your 2003 get_soundg.py filefor accomplishing the task via Python. In running your file withus3fl28m.000 I found that it did, in fact, accomplish what I was trying todo. But it also generated a number of errors, the reasons of which are notclear as it likely didn't generate those same errors in 2003 when youoriginally released the script.Sir I know this is out-of-the-blue but I wanted you to know that, with somechanges to correct current errors, your 2003 code still does what youintended. I then took it a few more steps to hopefully make it more usefulfor some as well.I've made the following changes, saving the new version ass57_kml_extract_soundg.py:Added error handling if SOUNDG layer or source S-57 file is not found.Deleted second usage argument: Added code to create target file in samedirectory as source S-57 file.Added new second usage argument: Select soundings as provided as 'metre',or calculate new sounding values as 'feet'Target File Type: Changed to KML. Errors are subsequently handledcorrectly, i.e. the errors are suppressed while the FFPT_RIND and LNAM_REFSfields are also not included in the resulting KML file.Added "_metre" or "_feet" to the new filename based on second usageargumentAdded WGS84 CSR to the target KML file.Changed created layer name from 'out' to 'KML_SOUNDG'. When imported intoQGIS the resulting layer is displayed as _KML_SOUNDG_Point in theBrowser Panel.Changed target field 'ELEV' to 'DEPTH', which is accurate for soundings.Changed precision for 'DEPTH' field from 4 to 0 to reflect chart usage.Added target fields 'LAT' and 'LONG' for xcoord and ycoord.Changed feat2 to feat1 to prevent searching for unused feat1.Added completion messages.I've posted the new code at http://micuisine.com/code-projects/?page_id=10along with further descriptions, as well as a link to a ZIP file containings57_kml_extract_soundg.py.I hope this email finds you well, and that these updates are useful and notoffensive in some manner. Please feel free to contact me with any commentsor questions about this updated work.Sincerely,Dave LiskeLuna Pier, Michigan-+--I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.comlight and sound - activate the windows |and watch the world go round - Rush | Geospatial Software Developer
 
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] A modified version of your get_soundg.py

2017-07-29 Thread Frank Warmerdam
Dave,

Thanks for the notice.  I am not updating the upstream get_soundg.py
but I've taken the liberty of cc:ing this reply to the gdal-dev
mailing list so more potentially interested folks will be aware of
your changes, and your blog post:

http://micuisine.com/code-projects/?page_id=10

I was particularly amused by change entry "Changed feat2 to feat1 to
prevent searching for unused feat1.".  Indeed looking back at the code
there must have been some history behind my use of feat2 that was lost
and now is just confusing.

Best regards,
Frank


On Sat, Jul 29, 2017 at 7:46 AM, Dave Liske  wrote:
> Mr. Warmerdam,
>
> In recently looking for a method to split the depth values from NOAA S-57
> files for a personal art project, I came across your 2003 get_soundg.py file
> for accomplishing the task via Python. In running your file with
> us3fl28m.000 I found that it did, in fact, accomplish what I was trying to
> do. But it also generated a number of errors, the reasons of which are not
> clear as it likely didn't generate those same errors in 2003 when you
> originally released the script.
>
> Sir I know this is out-of-the-blue but I wanted you to know that, with some
> changes to correct current errors, your 2003 code still does what you
> intended. I then took it a few more steps to hopefully make it more useful
> for some as well.
>
> I've made the following changes, saving the new version as
> s57_kml_extract_soundg.py:
>
> * Added error handling if SOUNDG layer or source S-57 file is not found.
> * Deleted second usage argument: Added code to create target file in same
> directory as source S-57 file.
> * Added new second usage argument: Select soundings as provided as 'metre',
> or calculate new sounding values as 'feet'
> * Target File Type: Changed to KML. Errors are subsequently handled
> correctly, i.e. the errors are suppressed while the FFPT_RIND and LNAM_REFS
> fields are also not included in the resulting KML file.
> * Added "_metre" or "_feet" to the new filename based on second usage
> argument
> * Added WGS84 CSR to the target KML file.
> * Changed created layer name from 'out' to 'KML_SOUNDG'. When imported into
> QGIS the resulting layer is displayed as _KML_SOUNDG_Point in the
> Browser Panel.
> * Changed target field 'ELEV' to 'DEPTH', which is accurate for soundings.
> * Changed precision for 'DEPTH' field from 4 to 0 to reflect chart usage.
> * Added target fields 'LAT' and 'LONG' for xcoord and ycoord.
> * Changed feat2 to feat1 to prevent searching for unused feat1.
> * Added completion messages.
>
> I've posted the new code at http://micuisine.com/code-projects/?page_id=10
> along with further descriptions, as well as a link to a ZIP file containing
> s57_kml_extract_soundg.py.
>
> I hope this email finds you well, and that these updates are useful and not
> offensive in some manner. Please feel free to contact me with any comments
> or questions about this updated work.
>
> Sincerely,
> Dave Liske
> Luna Pier, Michigan



-- 
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows |
and watch the world go round - Rush| Geospatial Software Developer
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev