- Timestamp:
- Mar 9, 2015 10:25:52 AM (9 years ago)
- Location:
- geovis/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/RendererCmd.cpp
r5105 r5107 1019 1019 if (driver[0] == 'c' && strcmp(driver, "colorramp") == 0) { 1020 1020 osgEarth::Drivers::ColorRampOptions colorRampOpts; 1021 osgEarth::Drivers::GDALOptions opts; 1022 opts.url() = url; 1023 char *profile = Tcl_GetString(objv[8]); 1024 char *colormap = Tcl_GetString(objv[9]); 1025 osgEarth::ElevationLayerOptions elevOpts(name, opts); 1026 if (!cache) { 1027 elevOpts.cachePolicy() = osgEarth::CachePolicy(osgEarth::CachePolicy::USAGE_NO_CACHE); 1021 char *edriver = Tcl_GetString(objv[8]); 1022 char *profile = Tcl_GetString(objv[9]); 1023 char *colormap = Tcl_GetString(objv[10]); 1024 if (edriver[0] == 'g' && strcmp(edriver, "gdal") == 0) { 1025 osgEarth::Drivers::GDALOptions opts; 1026 opts.url() = url; 1027 osgEarth::ElevationLayerOptions elevOpts(name, opts); 1028 if (!cache) { 1029 elevOpts.cachePolicy() = osgEarth::CachePolicy(osgEarth::CachePolicy::USAGE_NO_CACHE); 1030 } 1031 if (profile != NULL) { 1032 elevOpts.driver()->profile() = osgEarth::ProfileOptions(profile); 1033 } 1034 colorRampOpts.elevationLayer() = elevOpts; 1035 } else if (edriver[0] == 't' && strcmp(edriver, "tms") == 0) { 1036 osgEarth::Drivers::TMSOptions opts; 1037 //char *tmsType = Tcl_GetString(objv[8]); 1038 //char *format = Tcl_GetString(objv[9]); 1039 opts.url() = url; 1040 //opts.tmsType() = tmsType; 1041 //opts.format() = format; 1042 osgEarth::ElevationLayerOptions elevOpts(name, opts); 1043 if (!cache) { 1044 elevOpts.cachePolicy() = osgEarth::CachePolicy(osgEarth::CachePolicy::USAGE_NO_CACHE); 1045 } 1046 if (profile != NULL) { 1047 elevOpts.driver()->profile() = osgEarth::ProfileOptions(profile); 1048 } 1049 colorRampOpts.elevationLayer() = elevOpts; 1028 1050 } 1029 if (profile != NULL) {1030 //elevOpts.driver()->profile()->srsString() = "epsg:4326";1031 elevOpts.driver()->profile() = osgEarth::ProfileOptions(profile);1032 }1033 colorRampOpts.elevationLayer() = elevOpts;1034 1051 colorRampOpts.ramp() = g_renderer->getColorMapFilePath(colormap); 1035 1052 ret = g_renderer->addImageLayer(name, colorRampOpts, cache, shared, visible, minLOD, maxLOD); -
geovis/trunk/geovis_protocol.txt
r5105 r5107 130 130 131 131 General form: 132 map layer add < type> <driver> <url> ... <layerName>132 map layer add <layerName> <type> <driver> <url> ... 133 133 <type> = image|elevation|line|point|polygon|text 134 <driver> = gdal|tms|wms|xyz134 <driver> = colorramp|debug|gdal|tms|wms|xyz 135 135 136 136 Specific image layer types: 137 map layer add image gdal <url> <cache> <layerName> 137 map layer add <layerName> image colorramp <url> <cache> <elevdriver> <profile> <colormapName> 138 Add a colormapped image layer from a file or URL 139 <url> = URL of source 140 <cache> = bool indicating if tiles should be cached on disk 141 <elevdriver> = Elevation driver to read source 142 <profile> = profile of source 143 <colormapName> = Name of colormap 144 map layer add <layerName> image gdal <url> <cache> 138 145 Add a GDAL image layer from a file or URL 139 map layer add image wms <url> <cache> <layers> <format> <transparent> <layerName>146 map layer add <layerName> image wms <url> <cache> <layers> <format> <transparent> 140 147 Add a WMS image layer from a URL + layer string 141 148 <url> = URL of WMS service … … 144 151 <format> = Image format to return (e.g. 'png') 145 152 <transparent> = bool 146 map layer add image tms <url> <cache> <layerName>153 map layer add <layerName> image tms <url> <cache> 147 154 Add a TMS image layer from a URL 148 155 <url> = URL of TMS service 149 156 <cache> = bool indicating if tiles should be cached on disk 150 map layer add image xyz <urlPattern> <cache> <layerName>157 map layer add <layerName> image xyz <urlPattern> <cache> 151 158 Add an image layer from a web map using a template URL 152 159 <cache> = bool indicating if tiles should be cached on disk 153 160 154 161 Elevation layers: 155 map layer add elevation <driver> <url> <layerName>162 map layer add <layerName> elevation <driver> <url> 156 163 Add an elevation image layer from a file or URL 157 164 <driver> = gdal|tms|wms 158 165 159 166 Feature/model layers: 160 map layer add point <url> <r> <g> <b> <size> <layerName>167 map layer add <layerName> point <url> <r> <g> <b> <size> 161 168 Add a point feature layer from a file or URL 162 map layer add polygon <url> <r> <g> <b> <width> <layerName>169 map layer add <layerName> polygon <url> <r> <g> <b> <width> 163 170 Add a polygon feature layer from a file or URL 164 map layer add line <url> <r> <g> <b> <width> <layerName>171 map layer add <layerName> line <url> <r> <g> <b> <width> 165 172 Add a line feature layer from a file or URL 166 map layer add text <url> <layerName>173 map layer add <layerName> text <url> <content> <priority> <fgR> <fgG> <fgB> <bgR> <bgG> <bgB> <haloWidth> <fontSize> <removeDupes> <declutter> <visibilityRangeMin> <visibilityRangeMax> 167 174 Add a text symbol layer from a file or URL 168 175 … … 185 192 <precision> = integer number of digits to display 186 193 187 map reset <type> < ?profile?> <?xmin?> <?ymin?> <?xmax?> <?ymax?>194 map reset <type> <r> <g> <b> <?profile?> <?xmin?> <?ymin?> <?xmax?> <?ymax?> 188 195 Clear the scene and rebuild a new map from scratch. When resetting the 189 196 map to geocentric, a profile and extents should be omitted. When the map 190 197 type is projected, the profile is required and extents are optional. 191 type = geocentric|projected 192 profile = Well known profile string, e.g. 'global-geodetic', 198 <type> = geocentric|projected 199 <r>,<g>,<b> - Background color red, green and blue components [0,1] 200 <profile> = Well known profile string, e.g. 'global-geodetic', 193 201 'global-mercator'. If specifying bounds (i.e. not global), use 'geodetic' 194 202 or 'spherical-mercator' or an SRS init string (such as an EPSG code)
Note: See TracChangeset
for help on using the changeset viewer.