More > JRiver Media Center 32 for Windows

NEW: Reverse GeoCoding

<< < (3/4) > >>

Yaobing:
I updated the instructions.

Users can use their own key.
Data from the server is cached, so the next time you try to run it on an image that is taken at the same or near location, the server will not be involved.

Yaobing:

--- Quote from: darichman on May 19, 2024, 10:54:47 pm ---a major city in Australia lat 153°7'0.27"E  long 27°57'9.93"S
  [Country] Australia
  [State] Queensland
  [City] empty
  [Sublocation] Boyland, Boyland Road

--- End quote ---


--- Code: ---<addressparts>
<road>Boyland Road</road>
<city_district>Boyland</city_district>
<municipality>Scenic Rim Regional</municipality>
<state>Queensland</state>
<ISO3166-2-lvl4>AU-QLD</ISO3166-2-lvl4>
<country>Australia</country>
<country_code>au</country_code>
</addressparts>
--- End code ---

The data returned has no <city> element.  We try <town> (seen in some of your previously provided sample images), and <village> (common in the US), if we don't find <city>.  Maybe we should also try using <municipality> if City is still empty.



--- Quote ---For a file with lat 27°29'2.12"S & long 153°1'36.66"E
I am not sure why  South Brisbane would be duplicated in the above example.

--- End quote ---


--- Code: ---<addressparts>
<amenity>Queensland Children&#039;s Hospital</amenity>
<house_number>501</house_number>
<road>Stanley Street</road>
<suburb>South Brisbane</suburb>
<city_district>South Brisbane</city_district>
<city>Brisbane City</city>
<state>Queensland</state>
<ISO3166-2-lvl4>AU-QLD</ISO3166-2-lvl4>
<postcode>4101</postcode>
<country>Australia</country>
<country_code>au</country_code>
</addressparts>

--- End code ---

Here "South Brisbane" appears both as a <city_district> and a <suburb>.  Not sure how we should handle this.  Only use one?  Or don't use duplicate?


--- Quote ---
Would you consider using \ as the delimited in [Places] such that it can be nested in views?

--- End quote ---

[Places] is comma-delimited and that was not my decision (it has been like that for a long time).  I don't have a preference but I don't know if there was an initial reason for it.

[Sublocation] is delimited the same way.


--- Quote ---Some indicator that the query is occurring could be helpful eg in the status bar Eg 'updating location data file 1/4' etc

--- End quote ---

Maybe.


--- Quote ---I agree with others that I would pay for a user API if this were available. Can sometimes have a thousand photos to tag at a time, not to mention a library of several hundred thousand I may be going back to ;) Don't want to stretch the friendship and get MC banned. And obviously would like longevity and reliability of the service.

--- End quote ---

Update MC to build 48.  You can use your own key.


--- Quote ---Next feature will be 'Add coordinates from Map' to address scenarios 3 & 4 above :)

--- End quote ---

That seems to be more challenging.  We will see about that.

darichman:

--- Quote ---Changed: Reverse Geocoding will use "municipality" for [City] field, if other elements ("city", "town", or "village") are not found.
--- End quote ---

Sounds good. I hadn't realised they had such granular breakdown. In my 'Boyland' example, the Scenic Rim regional information would have been very useful, so agree with this.

Propose: [City] amalgamates municipality, city, town, village in the form Municipality\City\Town\Village ?
If any empty, they are ignored. If any identical, they are not duplicated? Would this be doable?
This ensures all useful permutations of the info is available, and also nested with the highest 'region' information (below state/province) captured, and ability to expand to smaller areas.

How are you handling sublocation? I can see various fields of 'Street', 'suburb', 'amenity' etc

Could we agree on the hierarchical structure of these? With some fields consolidated in a [City] hierarchy (like above) and others in a[Sublocation] hierarchy.
The broader [Places] could either be a non-hierachical ; delimited list (ie no nesting or groupings)
....or a full [Country]\[State]\[City - Municipality\City\City district\Town\Village]\[Sublocation - Suburb\Road\Amenity\]

Any thoughts from others?

Sorry Marko, this won't line up with your nested keywords approach, but the with magic of MC expressions I'm sure you can migrate (in either direction) as you desire ;)

Yaobing:

--- Quote from: darichman on May 23, 2024, 06:29:28 pm ---Propose: [City] amalgamates municipality, city, town, village in the form Municipality\City\Town\Village ?
If any empty, they are ignored. If any identical, they are not duplicated? Would this be doable?
This ensures all useful permutations of the info is available, and also nested with the highest 'region' information (below state/province) captured, and ability to expand to smaller areas.

--- End quote ---

This is interesting.  I am not sure if our users have already any fixed ideas about this field.  In the US, an address is almost always in the form of "### StreetName, CityName, StateName, PostalCode", where the StateName is the two letter abbreviation, while "CityName" can be a city (like Chicago), or a village, like Homewood.  It seems that the county and township names are always ignored.  No one pays any attention to them except at tax-paying time  ;D

That is why I initially ignored <municipality>, as it is used to return Township name in my home location.

I would like other users to chime in on this.



--- Quote ---How are you handling sublocation? I can see various fields of 'Street', 'suburb', 'amenity' etc

Could we agree on the hierarchical structure of these? With some fields consolidated in a [City] hierarchy (like above) and others in a[Sublocation] hierarchy.

--- End quote ---

This is the part that involved some guesswork by me and in need of more refinement.  We can try agreeing on some basic format.

Right now, [Sublocation] will contain most entries below [City].  For a rural location, there are not a lot.  Below <village>, I have seen <hamlet> for my home (which I didn't even knew we had) and <residential> for other locations, and then <road>, and <house_number>.  We ignore <house_number>.  So for my home location, [Sublocation] will contain "HamletName, StreetName", but for larger cities, we might have <city_district>, and other levels.  For example, a picture taken on University of Chicago campus has the following data:


--- Code: ---<?xml version="1.0" encoding="UTF-8" ?>
<reversegeocode timestamp='Tue, 28 May 24 14:08:06 +0000' attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright' querystring='lat=41.7894749999999959&amp;lon=-87.5985000000000014&amp;api_key=664cb89f83401276276823uenaed537&amp;format=xml'>
<result place_id="330249619" osm_type="relation" osm_id="13117436" ref="The University of Chicago" lat="41.79139685" lon="-87.60084387193544" boundingbox="41.7877878,41.7949773,-87.6061459,-87.5894438" place_rank='30' address_rank='30'>
The University of Chicago, 5801, South Ellis Avenue, Hyde Park, Chicago, Hyde Park Township, Cook County, Illinois, 60637, United States
</result>

<addressparts>

<amenity>The University of Chicago</amenity>
<house_number>5801</house_number>
<road>South Ellis Avenue</road>
<quarter>Hyde Park</quarter>
<city>Chicago</city>
<municipality>Hyde Park Township</municipality>
<county>Cook County</county>
<state>Illinois</state>
<ISO3166-2-lvl4>US-IL</ISO3166-2-lvl4>
<postcode>60637</postcode>
<country>United States</country>
<country_code>us</country_code>
</addressparts>

</reversegeocode>

--- End code ---

Here <municipality> "Hyde Park Township" is just a sub-district of the city of Chicago.  "Hyde Park Township" probably coincides with <quarter> "Hyde Park", which I had not included, and should include in [Sublocation].

<amenity>/<tourism>/<leisure>/<building>/<commercial> (usually only one of these) can be thought of as the "place of interest", and is included as the last level of [Sublocation], below <road> (Street).


--- Quote ---The broader [Places] could either be a non-hierachical ; delimited list (ie no nesting or groupings)
....or a full [Country]\[State]\[City - Municipality\City\City district\Town\Village]\[Sublocation - Suburb\Road\Amenity\]

Any thoughts from others?

--- End quote ---

We should talk more about this.  I just followed previous code of combining Country, State, City, and added Sublocation after that.

zybex:

Falsehoods programmers believe about addresses:
https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version