Skip to content

Commit

Permalink
Fix point inside box (#17)
Browse files Browse the repository at this point in the history
* Update LICENSE copyright year
* Fix a bug when selecting stations in a rectangular region
  • Loading branch information
seisman authored Feb 19, 2019
1 parent e3761be commit 7663912
Show file tree
Hide file tree
Showing 26 changed files with 104 additions and 90 deletions.
3 changes: 3 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

0.5.2 (2019-02-19):
- Fix selecting stations in a rectangular region (#17).

0.5.1 (2018-12-08):
- Fix typo from longtitude to longitude.

Expand Down
2 changes: 1 addition & 1 deletion HinetPy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""

__title__ = "HinetPy"
__version__ = "0.5.1"
__version__ = "0.5.2"
__author__ = "Dongdong Tian"
__license__ = "MIT"

Expand Down
19 changes: 11 additions & 8 deletions HinetPy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ def doctor(self):
""" Doctor does some checks.
>>> client.doctor()
[2017-01-01 00:00:00] INFO: You're using the latest release (v0.5.0).
[2017-01-01 00:00:00] INFO: Hi-net web service is NOT updated.
[2017-01-01 00:00:00] INFO: catwin32: /home/user/bin/catwin32.
[2017-01-01 00:00:00] INFO: win2sac_32: /home/user/bin/win2sac_32.
[2019-02-19 00:00:00] INFO: You're using the latest release (v0.5.2).
[2019-02-19 00:00:00] INFO: Hi-net web service is NOT updated.
[2019-02-19 00:00:00] INFO: catwin32: /home/user/bin/catwin32.
[2019-02-19 00:00:00] INFO: win2sac_32: /home/user/bin/win2sac_32.
**Checklist**
Expand Down Expand Up @@ -762,9 +762,12 @@ def select_stations(self, code, stations=None, minlatitude=None,
for station in stations_at_server:
if station.code != code:
continue
if point_inside_box(station.latitude, station.longitude,
latitude=latitude, longitude=longitude,
minradius=minradius, maxradius=maxradius):
if point_inside_box(station.latitude,
station.longitude,
minlatitude=minlatitude,
maxlatitude=maxlatitude,
minlongitude=minlongitude,
maxlongitude=maxlongitude):
stations_selected.append(station.name)

# select stations in a circular region
Expand Down Expand Up @@ -804,7 +807,7 @@ def check_package_release(self):
"""Check whether HinetPy has a new release.
>>> client.check_package_release()
[2017-01-01 00:00:00] INFO: You're using the latest release (v0.5.0).
[2019-02-19 00:00:00] INFO: You're using the latest release (v0.5.2).
"""
from HinetPy import __version__, __title__
from distutils.version import StrictVersion
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2018 Dongdong Tian
Copyright (c) 2014-2019 Dongdong Tian

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/api.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-22 12:20+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/api/HinetPy.client.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-21 16:38-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/api/HinetPy.header.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-21 16:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/api/HinetPy.win32.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-21 16:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/appendix.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-22 12:20+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/appendix/catwin32.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-21 16:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/appendix/channeltable.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-22 12:20+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/appendix/response.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-21 16:38-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/zh_CN/LC_MESSAGES/appendix/win2sac.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: HinetPy 0.4.2\n"
"Project-Id-Version: HinetPy 0.5.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-21 16:01-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
Loading

0 comments on commit 7663912

Please sign in to comment.