Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @gempa-lukas on file. Please follow https://github.com/GEOFON/CLA/blob/master/README.md to get yourself added. |
|
Can you please rebase against the latest main branch? This PR includes dozen of old commits. |
cb60a80 to
33d325e
Compare
|
Done |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Actually I am not in favour of adding an additional JSON file as dependency to make that work. Adding the missing attributes to cities.xml might be the better option but I am not sure right now if we could gather all the required information from the data sources? |
|
I had the same worry, but I didn't want to change cities.xml because it has been there for a long time. It might be time for it to change. |
|
You have updated the content some time ago anyway. So I don't see an issue with extending its model to other attributes. Not sure how big this XML will get afterwards and if it is worth to keep an XML file at all or if it would be better to use an SQLite3 database. The XML file could take an (tremendous) amount of memory at each client who is reading it. Dealing with another source of information, even in the MariaDB/PostgreSQL database itself, could be a better approach. As you say, it has been there for a long time and sometimes things are about to change for the better. |
|
Yes, I'm adding more to the XML content. I use the same source to update the current XML file. Let me see how big it can get. |
|
I will be touching coord.h and coord.cpp to add new fields as well. |
Adds a Nearby Cities tab to scolv that lists cities and locations near the current origin, sorted by distance. The tab provides a convenient way to select a descriptive region name and set it on the event without leaving scolv. Cities are sourced exclusively from the built-in cities.xml via SCApp->cities(). The CityD struct has been extended in seiscomp/common (see feature/cityd-state-type) to carry type, state and stateFull attributes enriched from GeoNames and Natural Earth data. Features: - Table showing Name, Type, State, Country, Distance (km), Direction, Population and capital flag (★); capital cities rendered in bold - 16-point compass direction - Correct numeric sorting on Distance and Population columns - "Set as Region Name" button sets a REGION_NAME EventDescription on the current event via notifier to the EVENT messaging group - Five selectable region name format templates - "Full state name" toggle switches between stateFull and state Configuration (cities.* in scolv.cfg): maxDist Maximum search radius in km (default: 1000) maxCount Maximum cities displayed (default: 20) minPopulation Minimum population filter (default: 10000) useFullState Show full state name vs abbreviation (default: true)
33d325e to
c57dead
Compare
- Use city.adminRegion() instead of deprecated state()/stateFull() - Fall back to city.country() in Region column when no admin region set - Rename column header "State" to "Region" - Update useFullState config description
the cities XML is now ~18MB |
Adds a Nearby Cities tab to scolv that lists cities near the current origin, sorted by distance, and allows setting a descriptive region name on the event without leaving scolv.
Features
REGION_NAMEEventDescriptionon the current event via notifier to theEVENTmessaging group; five selectable format templatescities.xmlviaSCApp->cities()— no external file dependencyConfiguration (
scolv.cfg)cities.maxDistcities.maxCountcities.minPopulationcities.useFullStateRegion column display logic
useFullState=trueuseFullState=falsestatewithabbrandnamestatewithnameonlystate, hascountryRelationship to cities.xml
cities.xmlcurrently carriesname,lat/lon,population,countryID,category,country,stateandtype. The enrichment tooling is available at https://github.com/comoglu/cities-xml-update.