Coordinate Extractor

버전 1.0.0.0 (2.65 KB) 작성자: Sebastian Hölz
Extract geographic coordinate(s) out of string(s).
다운로드 수: 233
업데이트 날짜: 2011/5/12

라이선스 보기

Use this function to extract one geographical coordinate out of an input string. The function is extremely flexible, thus the coordinate may be located anywhere in the string and may have one of many formats.

Examples:
txt2coord(' 100° 7'' 30" W')
txt2coord(' 100° 7´ 30´´ W')
txt2coord('-100° 7` 30"')
txt2coord('100° 7.5'' W')
txt2coord('100.125° west ')
txt2coord('bla 100°, 7min;30´´ S bla')
txt2coord({'100.125° W' '-100.125°'})

All specified examples yield the correct result (-100.125).

I have successfully tested this with various inputs. Yet, regular expressions, which are extensively used in this file, ... well ... they sometimes have a funny way of showing you that you havn't quite figured them out yet. Therefore, I would strongly advice you to performe some sanity-check on this function before using it and would be greatful, if you report any bugs to me.

Cheers

Sebastian

인용 양식

Sebastian Hölz (2024). Coordinate Extractor (https://www.mathworks.com/matlabcentral/fileexchange/31428-coordinate-extractor), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Vector Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0