Closed tbuckl closed 7 years ago
an example tool that does this for single values: https://postmile.dot.ca.gov/PMQT/PostmileQueryTool.html?
this is what a request that service looks like:
curl 'https://postmile.dot.ca.gov/PMQT/proxy.php'
-H 'Origin: https://postmile.dot.ca.gov'
-H 'Accept-Encoding: gzip, deflate, br'
-H 'Accept-Language: en-US,en;q=0.8'
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36'
-H 'Content-Type: text/xml'
-H 'Accept: */*'
-H 'Referer: https://postmile.dot.ca.gov/PMQT/PostmileQueryTool.html'
-H 'Cookie: Mode=Point; Components=true; __utma=245789585.446899156.1490121007.1490121007.1490121007.1; __utmc=245789585; __utmz=245789585.1490121007.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmt=1; __utmt_b=1; __utma=158387685.1821002306.1490056191.1490123101.1490125683.5; __utmb=158387685.6.10.1490125683; __utmc=158387685; __utmz=158387685.1490125683.5.4.utmcsr=github.com|utmccn=(referral)|utmcmd=referral|utmcct=/MetropolitanTransportationCommission/caltrans-typical-weekday-counts/issues/1'
-H 'Connection: keep-alive'
-H 'SOAPAction: http://dev1.dot.ca.gov//GetOdometerForPostmile'
--data-binary '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="urn:webservice.postmile.lrs.gis.dot.ca.gov" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><q0:getOdometerForPostmileParameters><q0:alignment>R</q0:alignment><q0:postmile><q0:alignmentCode></q0:alignmentCode><q0:countyCode>CC</q0:countyCode><q0:postmilePrefixCode>R</q0:postmilePrefixCode><q0:postmileValue>20.102</q0:postmileValue><q0:routeNumber>4</q0:routeNumber><q0:routeSuffixCode></q0:routeSuffixCode></q0:postmile></q0:getOdometerForPostmileParameters></soapenv:Body></soapenv:Envelope>'
--compressed
response:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><getOdometerForPostmileReturn xmlns="urn:webservice.postmile.lrs.gis.dot.ca.gov"><odometer>19.909</odometer></getOdometerForPostmileReturn></soapenv:Body></soapenv:Envelope>
Awaiting word from CalTrans on whether this service can be used for our purposes.
this is mostly resolved here: https://github.com/MetropolitanTransportationCommission/caltrans-typical-weekday-counts/tree/get-xy
using the linear reference system in the output file, output a similar version with x/y or with a simple lookup to x/y.
for reference, this is a chunk of the output file as output by this script