public class WorldMapProcessor extends Object implements EntityDocumentProcessor
The size of the images, the projects that are included, and the brightness of the maps can be modified in the main method.
Constructor and Description |
---|
WorldMapProcessor(int width,
double brightness)
Creates a new processor for building world maps.
|
Modifier and Type | Method and Description |
---|---|
void |
addSite(String siteKey)
Registers a new site for specific data collection.
|
static void |
main(String[] args)
Main method.
|
static void |
printDocumentation()
Prints some basic documentation about this program.
|
void |
processItemDocument(ItemDocument itemDocument)
Processes the given ItemDocument.
|
void |
setGlobe(String globe)
Sets the globe on which coordinates should be gathered.
|
void |
writeFinalData()
Writes all collected data to files after processing is finished.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processEntityRedirectDocument, processLexemeDocument, processMediaInfoDocument, processPropertyDocument
public WorldMapProcessor(int width, double brightness)
width
- horizontal size of the world map; the map's height is half of
this (plus some pixels for printing the scale)brightness
- parameter for scaling up the brightness of colors; the default
is 1.0; higher values make smaller numbers appear more
brightly; smaller numbers darken smaller numbers and thus help
to highlight the biggest concentrations of itemspublic static void main(String[] args)
ExampleHelpers
.args
- public void addSite(String siteKey)
siteKey
- the site to collect geo data forpublic void setGlobe(String globe)
GlobeCoordinatesValue.GLOBE_EARTH
.globe
- public void processItemDocument(ItemDocument itemDocument)
EntityDocumentProcessor
processItemDocument
in interface EntityDocumentProcessor
itemDocument
- the ItemDocumentpublic void writeFinalData()
public static void printDocumentation()
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage