Class PlaceNameLayer
- java.lang.Object
- 
- gov.nasa.worldwind.avlist.AVListImpl
- 
- gov.nasa.worldwind.WWObjectImpl
- 
- gov.nasa.worldwind.layers.AbstractLayer
- 
- gov.nasa.worldwind.layers.placename.PlaceNameLayer
 
 
 
 
- 
- All Implemented Interfaces:
- AVList,- Disposable,- MessageListener,- Layer,- Restorable,- BulkRetrievable,- WWObject,- java.beans.PropertyChangeListener,- java.util.EventListener
 - Direct Known Subclasses:
- NASAWFSPlaceNameLayer
 
 public class PlaceNameLayer extends AbstractLayer implements BulkRetrievable 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classPlaceNameLayer.DownloadPostProcessorprotected static classPlaceNameLayer.GMLPlaceNameSAXHandlerprotected classPlaceNameLayer.NavigationTileprotected static classPlaceNameLayer.PlaceNameChunkprotected static classPlaceNameLayer.RequestTaskprotected static classPlaceNameLayer.Tile
 - 
Field SummaryFields Modifier and Type Field Description protected booleancullNamesprotected java.lang.ObjectfileLockstatic LatLonGRID_1152x2304static LatLonGRID_144x288static LatLonGRID_16x32static LatLonGRID_1x1static LatLonGRID_288x576static LatLonGRID_36x72static LatLonGRID_4x8static LatLonGRID_576x1152static LatLonGRID_72x144static LatLonGRID_8x16static doubleLEVEL_Astatic doubleLEVEL_Bstatic doubleLEVEL_Cstatic doubleLEVEL_Dstatic doubleLEVEL_Estatic doubleLEVEL_Fstatic doubleLEVEL_Gstatic doubleLEVEL_Hstatic doubleLEVEL_Istatic doubleLEVEL_Jstatic doubleLEVEL_Kstatic doubleLEVEL_Lstatic doubleLEVEL_Mstatic doubleLEVEL_Nstatic doubleLEVEL_Ostatic doubleLEVEL_Pprotected java.util.List<PlaceNameLayer.NavigationTile>navTilesprotected PlaceNameServiceSetplaceNameServiceSetprotected Vec4referencePointprotected java.util.concurrent.PriorityBlockingQueue<java.lang.Runnable>requestQ
 - 
Constructor SummaryConstructors Constructor Description PlaceNameLayer(PlaceNameServiceSet placeNameServiceSet)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PlaceNameLayer.Tile[]buildTiles(PlaceNameService placeNameService, PlaceNameLayer.NavigationTile navTile)protected static AngleclampAngle(Angle a, Angle min, Angle max)protected Vec4computeReferencePoint(DrawContext dc)protected voiddoRender(DrawContext dc)protected voiddownloadTile(PlaceNameLayer.Tile tile)protected voiddownloadTile(PlaceNameLayer.Tile tile, PlaceNameLayer.DownloadPostProcessor postProcessor)protected voiddrawOrRequestTile(DrawContext dc, PlaceNameLayer.Tile tile, double minDisplayDistanceSquared, double maxDisplayDistanceSquared)longgetEstimatedMissingDataSize(Sector sector, double resolution)Get the estimated size in bytes of the placenames not in the WorldWind file cache for the given sector and resolution.longgetEstimatedMissingDataSize(Sector sector, double resolution, FileStore fileStore)Get the estimated size in bytes of the placenames not in a specified file store for the given sector and resolution.PlaceNameServiceSetgetPlaceNameServiceSet()protected Vec4getReferencePoint()protected java.util.concurrent.PriorityBlockingQueue<java.lang.Runnable>getRequestQ()protected static booleanisNameVisible(DrawContext dc, PlaceNameService service, Position namePosition)protected static booleanisSectorVisible(DrawContext dc, Sector sector, double minDistanceSquared, double maxDistanceSquared)protected static booleanisServiceVisible(DrawContext dc, PlaceNameService placeNameService)protected static booleanisTileVisible(DrawContext dc, PlaceNameLayer.Tile tile, double minDistanceSquared, double maxDistanceSquared)protected booleanloadTile(PlaceNameLayer.Tile tile, java.net.URL url)BulkRetrievalThreadmakeLocal(Sector sector, double resolution, FileStore fileStore, BulkRetrievalListener listener)Start a newBulkRetrievalThreadthat downloads all placenames for a given sector and resolution to a specified file store.BulkRetrievalThreadmakeLocal(Sector sector, double resolution, BulkRetrievalListener listener)Start a newBulkRetrievalThreadthat downloads all placenames for a given sector and resolution to the current WorldWind file cache.protected static java.nio.CharBuffernewCharBuffer(int numElements)protected static PlaceNameLayer.PlaceNameChunkreadTileData(PlaceNameLayer.Tile tile, java.net.URL url)protected voidrequestTile(DrawContext dc, PlaceNameLayer.Tile tile)protected voidsaveBuffer(java.nio.ByteBuffer buffer, java.io.File outFile)protected voidsendRequests()- 
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayercreateLayerConfigElements, dispose, doPick, doPreRender, getDataFileStore, getExpiryTime, getLayerConfigParams, getMaxActiveAltitude, getMaxEffectiveAltitude, getMinActiveAltitude, getMinEffectiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerConfigDocument, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setDataFileStore, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit, toString
 - 
Methods inherited from class gov.nasa.worldwind.WWObjectImplonMessage, propertyChange
 - 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpladdPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 - 
Methods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface gov.nasa.worldwind.avlist.AVListaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 - 
Methods inherited from interface gov.nasa.worldwind.retrieve.BulkRetrievablegetName
 - 
Methods inherited from interface gov.nasa.worldwind.event.MessageListeneronMessage
 
- 
 
- 
- 
- 
Field Detail- 
placeNameServiceSetprotected final PlaceNameServiceSet placeNameServiceSet 
 - 
requestQprotected java.util.concurrent.PriorityBlockingQueue<java.lang.Runnable> requestQ 
 - 
referencePointprotected Vec4 referencePoint 
 - 
fileLockprotected final java.lang.Object fileLock 
 - 
cullNamesprotected boolean cullNames 
 - 
LEVEL_Apublic static final double LEVEL_A - See Also:
- Constant Field Values
 
 - 
LEVEL_Bpublic static final double LEVEL_B - See Also:
- Constant Field Values
 
 - 
LEVEL_Cpublic static final double LEVEL_C - See Also:
- Constant Field Values
 
 - 
LEVEL_Dpublic static final double LEVEL_D - See Also:
- Constant Field Values
 
 - 
LEVEL_Epublic static final double LEVEL_E - See Also:
- Constant Field Values
 
 - 
LEVEL_Fpublic static final double LEVEL_F - See Also:
- Constant Field Values
 
 - 
LEVEL_Gpublic static final double LEVEL_G - See Also:
- Constant Field Values
 
 - 
LEVEL_Hpublic static final double LEVEL_H - See Also:
- Constant Field Values
 
 - 
LEVEL_Ipublic static final double LEVEL_I - See Also:
- Constant Field Values
 
 - 
LEVEL_Jpublic static final double LEVEL_J - See Also:
- Constant Field Values
 
 - 
LEVEL_Kpublic static final double LEVEL_K - See Also:
- Constant Field Values
 
 - 
LEVEL_Lpublic static final double LEVEL_L - See Also:
- Constant Field Values
 
 - 
LEVEL_Mpublic static final double LEVEL_M - See Also:
- Constant Field Values
 
 - 
LEVEL_Npublic static final double LEVEL_N - See Also:
- Constant Field Values
 
 - 
LEVEL_Opublic static final double LEVEL_O - See Also:
- Constant Field Values
 
 - 
LEVEL_Ppublic static final double LEVEL_P - See Also:
- Constant Field Values
 
 - 
GRID_1x1public static final LatLon GRID_1x1 
 - 
GRID_4x8public static final LatLon GRID_4x8 
 - 
GRID_8x16public static final LatLon GRID_8x16 
 - 
GRID_16x32public static final LatLon GRID_16x32 
 - 
GRID_36x72public static final LatLon GRID_36x72 
 - 
GRID_72x144public static final LatLon GRID_72x144 
 - 
GRID_144x288public static final LatLon GRID_144x288 
 - 
GRID_288x576public static final LatLon GRID_288x576 
 - 
GRID_576x1152public static final LatLon GRID_576x1152 
 - 
GRID_1152x2304public static final LatLon GRID_1152x2304 
 - 
navTilesprotected java.util.List<PlaceNameLayer.NavigationTile> navTiles 
 
- 
 - 
Constructor Detail- 
PlaceNameLayerpublic PlaceNameLayer(PlaceNameServiceSet placeNameServiceSet) - Parameters:
- placeNameServiceSet- the set of PlaceNameService objects that PlaceNameLayer will render.
- Throws:
- java.lang.IllegalArgumentException- if- PlaceNameServiceSetis null
 
 
- 
 - 
Method Detail- 
getPlaceNameServiceSetpublic final PlaceNameServiceSet getPlaceNameServiceSet() 
 - 
getRequestQprotected java.util.concurrent.PriorityBlockingQueue<java.lang.Runnable> getRequestQ() 
 - 
buildTilesprotected PlaceNameLayer.Tile[] buildTiles(PlaceNameService placeNameService, PlaceNameLayer.NavigationTile navTile) 
 - 
doRenderprotected void doRender(DrawContext dc) - Specified by:
- doRenderin class- AbstractLayer
 
 - 
computeReferencePointprotected Vec4 computeReferencePoint(DrawContext dc) 
 - 
getReferencePointprotected Vec4 getReferencePoint() 
 - 
drawOrRequestTileprotected void drawOrRequestTile(DrawContext dc, PlaceNameLayer.Tile tile, double minDisplayDistanceSquared, double maxDisplayDistanceSquared) 
 - 
isServiceVisibleprotected static boolean isServiceVisible(DrawContext dc, PlaceNameService placeNameService) 
 - 
isSectorVisibleprotected static boolean isSectorVisible(DrawContext dc, Sector sector, double minDistanceSquared, double maxDistanceSquared) 
 - 
isTileVisibleprotected static boolean isTileVisible(DrawContext dc, PlaceNameLayer.Tile tile, double minDistanceSquared, double maxDistanceSquared) 
 - 
isNameVisibleprotected static boolean isNameVisible(DrawContext dc, PlaceNameService service, Position namePosition) 
 - 
requestTileprotected void requestTile(DrawContext dc, PlaceNameLayer.Tile tile) 
 - 
sendRequestsprotected void sendRequests() 
 - 
loadTileprotected boolean loadTile(PlaceNameLayer.Tile tile, java.net.URL url) 
 - 
readTileDataprotected static PlaceNameLayer.PlaceNameChunk readTileData(PlaceNameLayer.Tile tile, java.net.URL url) 
 - 
newCharBufferprotected static java.nio.CharBuffer newCharBuffer(int numElements) 
 - 
downloadTileprotected void downloadTile(PlaceNameLayer.Tile tile) 
 - 
downloadTileprotected void downloadTile(PlaceNameLayer.Tile tile, PlaceNameLayer.DownloadPostProcessor postProcessor) 
 - 
saveBufferprotected void saveBuffer(java.nio.ByteBuffer buffer, java.io.File outFile) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
makeLocalpublic BulkRetrievalThread makeLocal(Sector sector, double resolution, BulkRetrievalListener listener) Start a newBulkRetrievalThreadthat downloads all placenames for a given sector and resolution to the current WorldWind file cache.This method creates and starts a thread to perform the download. A reference to the thread is returned. To create a downloader that has not been started, construct a PlaceNameLayerBulkDownloader.Note that the target resolution must be provided in radians of latitude per texel, which is the resolution in meters divided by the globe radius. - Specified by:
- makeLocalin interface- BulkRetrievable
- Parameters:
- sector- the sector to download data for.
- resolution- the target resolution, provided in radians of latitude per texel.
- listener- an optional retrieval listener. May be null.
- Returns:
- the PlaceNameLayerBulkDownloaderthat executes the retrieval.
- Throws:
- java.lang.IllegalArgumentException- if the sector is null or the resolution is less than zero.
- See Also:
- PlaceNameLayerBulkDownloader
 
 - 
makeLocalpublic BulkRetrievalThread makeLocal(Sector sector, double resolution, FileStore fileStore, BulkRetrievalListener listener) Start a newBulkRetrievalThreadthat downloads all placenames for a given sector and resolution to a specified file store.This method creates and starts a thread to perform the download. A reference to the thread is returned. To create a downloader that has not been started, construct a PlaceNameLayerBulkDownloader.Note that the target resolution must be provided in radians of latitude per texel, which is the resolution in meters divided by the globe radius. - Specified by:
- makeLocalin interface- BulkRetrievable
- Parameters:
- sector- the sector to download data for.
- resolution- the target resolution, provided in radians of latitude per texel.
- fileStore- the file store in which to place the downloaded elevations. If null the current WorldWind file cache is used.
- listener- an optional retrieval listener. May be null.
- Returns:
- the PlaceNameLayerBulkDownloaderthat executes the retrieval.
- Throws:
- java.lang.IllegalArgumentException- if the sector is null or the resolution is less than zero.
- See Also:
- PlaceNameLayerBulkDownloader
 
 - 
getEstimatedMissingDataSizepublic long getEstimatedMissingDataSize(Sector sector, double resolution) Get the estimated size in bytes of the placenames not in the WorldWind file cache for the given sector and resolution.Note that the target resolution must be provided in radians of latitude per texel, which is the resolution in meters divided by the globe radius. - Specified by:
- getEstimatedMissingDataSizein interface- BulkRetrievable
- Parameters:
- sector- the sector to estimate.
- resolution- the target resolution, provided in radians of latitude per texel.
- Returns:
- the estimated size in bytes of the missing placenames.
- Throws:
- java.lang.IllegalArgumentException- if the sector is null or the resolution is less than zero.
 
 - 
getEstimatedMissingDataSizepublic long getEstimatedMissingDataSize(Sector sector, double resolution, FileStore fileStore) Get the estimated size in bytes of the placenames not in a specified file store for the given sector and resolution.Note that the target resolution must be provided in radians of latitude per texel, which is the resolution in meters divided by the globe radius. - Specified by:
- getEstimatedMissingDataSizein interface- BulkRetrievable
- Parameters:
- sector- the sector to estimate.
- resolution- the target resolution, provided in radians of latitude per texel.
- fileStore- the file store to examine. If null the current WorldWind file cache is used.
- Returns:
- the estimated size in byte of the missing placenames.
- Throws:
- java.lang.IllegalArgumentException- if the sector is null or the resolution is less than zero.
 
 
- 
 
-