GeonamesRdf icon indicating copy to clipboard operation
GeonamesRdf copied to clipboard

Using east_west_north_south_box doesn't work at all

Open barny opened this issue 7 years ago • 0 comments

AFAICT the geonames_rdf library doesn't convert the east_west_north_south_box bounding box parameter into HTTP/REST parameters correctly - it applies a single parameter "east,west,south,north" when the four values should all be individual parameters.

To fix this, in geonames\adapters\base.py, change:

def east_west_north_south_box(self, value):
    return self.set_string_parameter('east,west,north,south', value)

to this, which seems to work for my simple testing:

def east_west_north_south_box(self, value):
    for coord,val in zip(['east','west','north','south'],value):
        self.set_string_parameter(coord, val)
    return self

What made me look at this is here: https://stackoverflow.com/questions/44940721/geonames-bounding-box/44943290#44943290

barny avatar Jul 06 '17 21:07 barny