cityofaustin / atd-data-tech

Austin Transportation Data & Technology Services
17 stars 2 forks source link

Project Extent | Restrict geocoder to our region #4715

Closed amenity closed 3 years ago

amenity commented 3 years ago

Chatted w/ @mddilley about an enhancement to restrict the geocoder results to the Moped "region"... Only ... I don't know how to define it. ๐Ÿ˜…

I guess "Texas" would be safe, @johnclary ?

Screen Shot 2020-12-15 at 3 40 47 PM

mateoclarke commented 3 years ago

had the same thought. Wonder you could restrict the results by a radius from Austin

amenity commented 3 years ago

That would be cool. The state of Texas would be a safe start โ€” at least keep Malaysia out of the top suggestions.

Is this "Austin" clump of counties that appears on the TXDOT project tracker a formalized region, @jaime-mckeown @alan-deanda?

Screen Shot 2020-12-16 at 1 34 24 AM
jaime-mckeown commented 3 years ago

@amenity that area most likely encompasses the Austin District of TXDOT which includes those counties.

alan-deanda commented 3 years ago

@amenity this is the boundary for the Capital Area Council of Governments

amenity commented 3 years ago

Thanks, @alan-deanda @jaime-mckeown.

Nathan's 2 ยข when I suggested ๐Ÿ‘†:

For address lookup it could be tighter so it is at least the city ETJ. Each city has some degree of street name overlap which might make address lookup annoying if set too large.

I think this makes sense. Could expand to CAPCOG boundaries if/when the time comes.

Sound okay, @johnclary ?

johnclary commented 3 years ago

sounds good to me! assuming @mddilley is able to configure the geocoder as such...

johnclary commented 3 years ago

Assuming that we can configure the geocoder to limit results to a geometry, it will probably be be done by plugging in a bounding box. This url is a query that returns a geojson bounding box of the ETL and full-purpose jurisdiction.

so @mddilley hopefully you can plug this into the geocoder!

{
  "type" : "FeatureCollection", 
  "crs" : 
  {
    "type" : "name", 
    "properties" : 
    {
      "name" : "EPSG:4326"
    }
  }, 
  "bbox" : [-97.940377028014, 30.1337172258415, -97.578205982277, 30.4648268798927], 
  "features" : []
}
johnclary commented 3 years ago

If this doesn't work out, we do have a RESTful COA-only geocoder that is managed by CTM. we'd have to write the code to interact with it ourselves, so here's hoping we don't need to do that ๐Ÿคž

mddilley commented 3 years ago

@johnclary That bounding box worked perfectly with this library - thanks for providing! ๐Ÿ™

johnclary commented 3 years ago

oh, nice! @mddilley just realizing now that it'd probably be wise to shave off some decimal places from those bbox coordinates. Anything beyond 6 decimal places is basically a meaningless artifact of the translation from our local coordinate system to web mercator. It probably doesn't impact performance, but it maybe could?

mddilley commented 3 years ago

@johnclary Thanks for the heads up about that - I'll make that small change in an upcoming PR. ๐Ÿ‘