blueherongis / Heron

An add-on for Grasshopper enabling the GIS functions of GDAL in Rhino 3d
MIT License
31 stars 19 forks source link

SetEAP not working with Lat/Lon input #46

Closed blueherongis closed 9 months ago

blueherongis commented 1 year ago

See issue here: https://discourse.mcneel.com/t/re-heron-set-spacial-reference-system/150430/3?u=brian_washburn

Likely has something to do with the component regex not interpreting decimal degrees correctly.

ChristopherConnock commented 1 year ago

I can't see the issue with the link, but is this referring to this error when a text string is given as input to SetEAP LAT and LON? 1. Latitude value is invalid. Please enter value in valid Decimal Degree format (-79.976666) or valid Degree Minute Second format (79°58′36″W | 079:56:55W | 079d 58′ 36″ W | 079 58 36.0 | 079 58 36.4 E) image

blueherongis commented 1 year ago

Yes, you've reproduced the error. I think it's the fact that the regex here was limited to 12 decimal places. The regex is new since v0.4.0 to allow DMS input instead of just DD. I'm going to increase the regex to 20 decimal places.

https://github.com/blueherongis/Heron/blob/4222f99bdacde5c1d3bc8d030b0215a8791e53ce/Heron/Convert.cs#L979