POST
|
Adam, Thanks again for your quick reply. I looked into creating a mobile mosaic data set, but I fear my users would prefer to just point my app to the RPF files and have them loaded up instead of having to do a conversion process with ArcGIS Desktop first. Unfortunately, I can't share the files with anyone. But I added a few lines to see what was going on with the spatial reference. layer.addDoneLoadingListener(() -> {
SpatialReference sr = layer.getSpatialReference();
if (sr != null) System.out.println(sr.getWKText());
}); and map.addDoneLoadingListener(() -> {
System.out.println(map.getSpatialReference().getWKText());
}); I get...
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
Licensed For Developer Use Only
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] Which looks like the base map and the Raster Layers are both the same projection? Am I reading that right? Should set the z-order of the raster images or something?
... View more
03-21-2017
02:46 PM
|
0
|
1
|
842
|
POST
|
Adam, Thanks. I was able to load the files onto a RasterLayer using Java SDK 100. However, I cannot get it to display the RPF raster (aerial photographs) layers over a basemap. If I I set the basemap I cannot see the RasterLayer. If I comment out the call to setBasemap() it will display the RPF layer with no basemap and the extent set to the first RasterLayer. I've tried it with and without the StrechRenderer, it behaves the same. I think this is what you meant by "iterate through each raster in the directory"... map = new ArcGISMap();
map.setBasemap(Basemap.createLightGrayCanvasVector());
List<Double> minValues = Arrays.asList(1.61, 3.14);
List<Double> maxValues = Arrays.asList(3.22, 6.28);
StretchParameters stretchParameters = new MinMaxStretchParameters(minValues, maxValues);
RasterRenderer stretch = new StretchRenderer(stretchParameters, null, true, null);
File dir = new File("C:\\maps\\RPF");
for (File file : dir.listFiles()) {
if (file.getName().endsWith(".i42")) {
Raster raster = new Raster(file.getAbsolutePath());
RasterLayer layer = new RasterLayer(raster);
layer.setRasterRenderer(stretch);
map.getOperationalLayers().add(layer);
}
}
//create the MapView and assign its map
mapView = new MapView();
mapView.setMap(map); The examples I found on the Esri section of GitHub just load one Raster in a single RasterLayer. Also, I could only find a little information about a mosaic dataset. MosaicDatasetRaster| arcgis-java However, I couldn't find any information on the format of the Raster Database File that is the first Parameter of the constructor. I feel as though I have glossed over some vital bit of documentation on both the RasterLayer and MosaicDatasetRaster. I'd be grateful if you could point me in the right direction. I was able to use ArcGIS Explorer to load the maps and the raster images exactly as I want them. The base map, then the photos overplayed at their correct positions. Thanks again, Geoff
... View more
03-20-2017
03:29 PM
|
0
|
3
|
842
|
POST
|
How do I load a catalog of RPF (CADRG) Map tiles using the Java version 10.2.4 or version 100? I was able to load a single tile using RasterLayer rasterLayer = new RasterLayer(new FileRasterSource("filepath")) but I can't seem to find the API to load the directory full of RPF/CADRG/NITFS files as the base map similar to what I get when we use ArcGISTiledMapServiceLayer.
... View more
03-13-2017
01:09 PM
|
0
|
5
|
2137
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|