|
Android APIThe Android API is the backend for our android product. Many use this API with their own software. The output is easy to parse and requires little or no libraries. The Android API provides a unified interface for all the conversions available at legallandconverter.com. Java Code sample code. Table of Contents
OverviewAnd http request is created and sent to the webserver. The webserver does the calcuation and returns a text page.The webpage returned is a text file. It contains one variable / value pair per line. The lines end with CRLF. The Variable names are all uppercase letters, no embedded spaces, no numbers and no special characters. The variables end with a colon ':' then there is a single space and then the value until the end of the line marked with CRLF. The line HAVECONVERSION: 1 appears in a successful conversion. Canadian DLS QueryText Senthttp://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&quarter=SW§ion=24&township=12&range=20&meridian=W4&cmd=legal
Text ReturnedContent-type: text/plain STATUSBAR: Version 1.20 Available LATITUDE: 50.008196 LONGITUDE: -112.614401 UTM: 12N 384323 5540791 MGRS: 12UUA8432240790 NTS: D-10-A/82-I-2 CREDITS: 29 LSD: QUARTER: SW QUARTERLSD: SW USAQUARTER: USASECTION: USATOWNSHIP: USANORTHSOUTH: USARANGE: USAEASTWEST: USAMERIDIAN: USASTATE: COUNTRY: Canada HAVECONVERSION: 1Valid Meridians are E1, E2, W1, W2, W3, W4, W5, W6, W7 & COAST.
US PLSS Query (by Meridian)Text Senthttp://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&usaquarter=NE&usasection=23&usatownship=42&usanorthsouth=N&usarange=23&usaeastwest=W&usameridian=Michigan&cmd=plssText ReturnedContent-type: text/plain STATUSBAR: Version 5.00 Available LATITUDE: 46.025463 LONGITUDE: -87.146129 UTM: 16N 488690 5096887 MGRS: 16TDR8869096886 CREDITS: 82 NTS: N/A LSD: QUARTER: QUARTERLSD: SECTION: TOWNSHIP: RANGE: EASTWEST: MERIDIAN: COUNTRY: USA HAVECONVERSION: 1List of PLSS Meridians These exact spellings must be used. Cimarron Copper River Fairbanks Fifth Principal First Principal Fourth Principal Fourth Principal Extended Gila and Salt River Humboldt Huntsville Indian Kateel River Louisiana Michigan Mount Diablo Navajo New Mexico Principal Principal Salt Lake San Bernardino Second Principal Seward Sixth Principal St. Helena St. Stephens Tallahassee Third Principal Uintah Umiat Ute Washington Willamette Wind River US PLSS Query (by State and County)Text Senthttp://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&usasection=29&usatownship=43&usanorthsouth=N&usarange=3&usaeastwest=E&usastate=WI&usacounty=Iron&cmd=plsscountyText ReturnedSTATUSBAR: Version 5.00 Available LATITUDE: 46.168863 LONGITUDE: -90.136838 UTM: 15N 721022 5116795 MGRS: 15TYM2102216795 CREDITS: 93 NTS: N/A LSD: QUARTER: QUARTERLSD: SECTION: TOWNSHIP: RANGE: EASTWEST: MERIDIAN: COUNTRY: USA HAVECONVERSION: 1PLSS State Code List Use the name of the county ie: Marathon Use the 2 letter state abbreviation ie: WI
Latitude and Longitude to USA PLSSText Senthttp://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&latitude=48.00820&longitude=-112.61440&cmd=gpsText ReturnedSTATUSBAR: Version 4.00 Available USAQUARTER: NE USASECTION: 15 USATOWNSHIP: 26 USANORTHSOUTH: N USARANGE: 8 USAEASTWEST: W USAMERIDIAN: Principal USASTATE: MT COUNTRY: USA LSD: QUARTER: QUARTERLSD: SECTION: TOWNSHIP: RANGE: EASTWEST: MERIDIAN: RURALUNIT: RURALHOUSE: RURALTYPE: RURALACCESS: MAPQUARTER: D MAPUNIT: 10 MAPBLOCK: A MAPSERIES: 82 MAPAREA: A MAPSHEET: 2 UTM: 12N 379594 5318473 MGRS: 12U UU 79593 18472 CREDITS: 85 HAVECONVERSION: 1 Latitude and Longitude to Canada DLSText Senthttp://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&latitude=50.00820&longitude=-112.61440&cmd=gpsText ReturnedSTATUSBAR: Version 5.00 Available NTS: D-10-A/82-I-2 LSD: 6 QUARTER: SW QUARTERLSD: SW SECTION: 24 TOWNSHIP: 12 RANGE: 20 EASTWEST: W MERIDIAN: 4 COUNTRY: Canada USAQUARTER: USASECTION: USATOWNSHIP: USANORTHSOUTH: USARANGE: USAEASTWEST: USAMERIDIAN: USASTATE: UTM: 12N 384323 5540791 MGRS: 12UUA8432340791 CREDITS: 87 HAVECONVERSION: 1 NTS to Latitude and Longitude (Canada)Text Senthttp://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&mapquarter=c&mapunit=26&mapblock=F&mapseries=93&maparea=K&mapsheet=11&cmd=ntsText ReturnedSTATUSBAR: Version 5.00 Available LATITUDE: 54.606250 LONGITUDE: -125.321875 NTS: c-26-F/93-K-11 LSD: 4 QUARTER: SW QUARTERLSD: SW SECTION: 7 TOWNSHIP: 65 RANGE: 22 EASTWEST: W MERIDIAN: 7 COUNTRY: Canada UTM: 10N 350036 6053454 MGRS: 10UCF5003553454 CREDITS: 86 HAVECONVERSION: 1 Latitude and Longitude to MGRS (decimal)This will resolve successfully to MGRS only.Text Senthttp://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&latitude=48.00820&longitude=-112.61440&cmd=mgrsrev1Text ReturnedSTATUSBAR: Version 5.00 Available CREDITS: 62 MGRS: 12U UU 79593 18472 UTM: 12N 379594 5318473 HAVECONVERSION: 1 Latitude and Longitude to MGRS (degree minute second )Text SentThis will resolve successfully to MGRS only.http://legallandconverter.com/cgi-bin/android5c.cgi?username=DEVELOPX&password=TEST1234&latdeg=50&latmin=1&latsec=1&northsouth=N&longdeg=112&longmin=31&longsec=51&eastwest=W&cmd=mgrsrev2 Text ReturnedSTATUSBAR: Version 5.00 Available CREDITS: 61 MGRS: 12U UA 90330 41637 UTM: 12N 390330 5541637 HAVECONVERSION: 1 Java CodeApache Java LibrariesApache Java Library Documentation Java Library HTTP Query Imports
Resource Strings
Query Variables
Clear Variables
Build Query and Make Request
Parse Results into Java Variables
Socket ProgrammingPerl socket programming tutorial Python socket programming tutorial
|
||||||||||||||