ST_GetReverseGeocodingLayers to get a list of available layers.
You can change the geocodes table or view used by setting spark.sedona.reverse.geocode.table in the spark config.
You can set the distance thresholds (in degrees) for reverse geocoding by setting
spark.sedona.reverse.geocode.distance.<layerName>. The value for layers without a specific configuration is set by
spark.sedona.reverse.geocode.distance.default. When unset the values are 0.0006 (~67 meters on the equator) for
places, 0.0003 for addresses, and 0.0 for all other layers.
Do not pass duplicate input rows. Passing duplicate input rows has undefined behavior. The concept of a duplicate
row is based on the columns input to the function call. At the time of writing the behavior is to deduplicate.
addresses: Street addressesplaces: aka points of interestdivisions-locality: See Overture documentationdivisions-country: See Overture documentationdivisions-dependency: See Overture documentationdivisions-localadmin: See Overture documentationdivisions-macrohood: See Overture documentationdivisions-county: See Overture documentationdivisions-microhood: See Overture documentationdivisions-neighborhood: See Overture documentationdivisions-region: See Overture documentation
ST_ReverseGeocode includes the following parameters:
geom: Geometry: The location that you’re querying. Provide a geometry object in accordance with the WGS84 coordinate system (using longitude and latitude).layer: String: Specifies which “layer” of information you want to search. Layers correspond to different categories of data in the reverse geocode database.
Signatures
Parameters
The input geometry.
The layer to search. Use
ST_GetReverseGeocodingLayers to see available layers.Return type
A struct containing
location (the name or address found), layer (the resulting layer), and geometry (the geometry of the result).Example
ST_GeomFromText('POINT (13.040766 47.812924)')creates a point geometry in Salzburg Austria.'addresses'is used to specify that we want to find addresses (as opposed to e.g. places or neighborhoods).
location: The name or address found at that location (e.g., “1600 Amphitheatre Parkway, Mountain View, CA” or “Google”).layer: The resulting layer (e.g., “address” or “place”).geometry: The geometry of the result.

