OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimTiling.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2004 Garrett Potts
3 //
4 // License: LGPL
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: Garrett Potts
9 //
10 // Description: implementation for image generator
11 //
12 //*************************************************************************
13 // $Id: ossimTiling.cpp 22668 2014-03-10 16:52:03Z dburken $
14 
15 #include <sstream>
16 #include <iomanip>
21 #include <ossim/base/ossimTrace.h>
22 
23 static ossimTrace traceDebug("ossimTiling:debug");
24 
25 RTTI_DEF1(ossimTiling, "ossimTiling", ossimObject);
26 
28  :theTilingDistance(0,0),
29  theTilingDistanceUnitType(OSSIM_UNIT_UNKNOWN),
30  theDelta(0,0),
31  theDeltaType(ossimTilingDeltaType_TOTAL_PIXELS),
32  theOutputSizeInBytes(0),
33  theNumberOfBands(1),
34  theNumberOfBytesPerPixelPerBand(1),
35  thePaddingSizeInPixels(0.0, 0.0),
36  theMapProjection(),
37  theImageRect(),
38  theTilingRect(),
39  theTileId(-1),
40  theTotalHorizontalTiles(0),
41  theTotalVerticalTiles(0),
42  theTotalTiles(0),
43  theTileNameMask(),
44  theEdgeToEdgeFlag(false)
45 {
46 }
47 
49  const ossimIrect& boundingRect)
50 {
51  if(traceDebug())
52  {
54  << "ossimTiling::initialize DEBUG: Entered..."
55  << "\nBounding rect === " << boundingRect
56  << std::endl;
57  }
58 
59  bool result = true;
61  theImageRect = boundingRect;
62 
63  result = validate();
64 
65  ossimDpt convertedTilingDistance = theTilingDistance;
66 
67  if(result)
68  {
69  // Let's setup the bounding tile rect.
71  {
72  getConvertedTilingDistance(convertedTilingDistance);
73 
75  {
76  ossimGpt ul;
77  ossimGpt ur;
78  ossimGpt lr;
79  ossimGpt ll;
80 
82  ul);
84  ur);
86  lr);
88  ll);
89 
91  ossimDpt(ur),
92  ossimDpt(lr),
93  ossimDpt(ll),
95 
96  if(traceDebug())
97  {
99  << "DEBUG: Geographic input bounds = "
100  << theTilingRect
101  << std::endl;
102  }
103 
104  theTilingRect.stretchToTileBoundary(convertedTilingDistance);
105 
106  if(traceDebug())
107  {
109  << "DEBUG: Geographic input bounds stretched = "
110  << theTilingRect << std::endl;
111  }
112 
114 
115  if(traceDebug())
116  {
118  << "DEBUG: Geographic input bounds clamped = "
119  << theTilingRect << std::endl;
120  }
121 
122  } // End "if(theMapProjection->isGeographic())"
123 
124  else // meters
125  {
126  ossimDpt ul;
127  ossimDpt ur;
128  ossimDpt lr;
129  ossimDpt ll;
130 
132  ul);
134  ur);
136  lr);
138  ll);
140  ur,
141  lr,
142  ll,
144 
145  theTilingRect.stretchToTileBoundary(convertedTilingDistance);
146  }
147  }
148  else
149  {
150  ossim_int32 remainderX = (ossim_int32)((theImageRect.width()%((ossim_int32)theDelta.x)) != 0);
151  ossim_int32 remainderY = (ossim_int32)((theImageRect.height()%((ossim_int32)theDelta.y)) != 0);
152 
154  (remainderX*theDelta.x));
156  (remainderY*theDelta.y));
158  theImageRect.ul().y,
159  theImageRect.ul().x + (w-1),
160  theImageRect.ul().y + (h-1));
161 
162  // since we are pixel space we force delta to be 1 pixel unit
163  //
164  theDelta.x = 1.0;
165  theDelta.y = 1.0;
167  }
168  }
169 
170  theTotalHorizontalTiles = ossim::round<int>(fabs(theTilingRect.ur().x - theTilingRect.ul().x)/convertedTilingDistance.x);
171  theTotalVerticalTiles = ossim::round<int>(fabs(theTilingRect.ur().y - theTilingRect.lr().y)/convertedTilingDistance.y);
173 
174  // reset the tile id to the beginning
175  //
176  reset();
177 
178  if(traceDebug())
179  {
181 
183  << "\nossimTiling::initialize DEBUG: Leaving..." << std::endl;
184  }
185  return result;
186 }
187 
189  ossimIrect& resultingBounds,
190  ossimString& resultingName)const
191 {
192  bool result = true;
193 
195  {
196  ossimDpt origin;
197  ossim_int64 row=0;
198  ossim_int64 col=0;
199 
200  getRowCol(row, col, theTileId);
201 
202  getTileName(resultingName,
203  row, col, theTileId);
204 
205  getOrigin(origin, row, col);
206 
208  {
209  ossimIpt ul = origin;
210 
211  resultingBounds =
214  ul.x + ((ossim_int32)theTilingDistance.x-1) +
216  ul.y + ((ossim_int32)theTilingDistance.y-1) +
218  }
219  else
220  {
221 
222  ossimDpt deltaPerPixel = getDeltaPerPixel();
223  ossimIpt pixels;
224 
226  {
227  pixels = theDelta;
228  }
229  else
230  {
233  }
234 
236  {
237  if ( theEdgeToEdgeFlag )
238  {
240  ossimGpt( origin.lat - (deltaPerPixel.y/2.0),
241  origin.lon + (deltaPerPixel.x/2.0),
242  0.0,
243  theMapProjection->origin().datum()) );
244  }
245  else
246  {
248  ossimGpt(origin.lat,
249  origin.lon,
250  0.0,
252 
253  }
255  }
256  else
257  {
258  if ( theEdgeToEdgeFlag )
259  {
261  ossimDpt( origin.x + (deltaPerPixel.x/2.0),
262  origin.y - (deltaPerPixel.y/2.0) ) );
263  }
264  else
265  {
266  theMapProjection->setUlTiePoints(ossimDpt(origin.x, origin.y));
267  }
268  theMapProjection->setMetersPerPixel(deltaPerPixel);
269  }
270  resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
272  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
273  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
274  }
275  resultProjection = theMapProjection;
276 
277  ++theTileId;
278  if(traceDebug()&&resultProjection.valid())
279  {
280  ossimKeywordlist projKwl;
281 
282  resultProjection->saveState(projKwl);
284  << "ossimTiling::next DEBUG: rect = " << resultingBounds
285  << "\nproj = " << projKwl
286  << "\ntileName = " << resultingName
287  << "\norigin = " << origin << std::endl;
288  }
289  }
290  else
291  {
292  result = false;
293  }
294 
295 
296  return result;
297 }
298 
299 
301 {
302  theTileId = 0;
303 }
304 
305 void ossimTiling::setTilingDistance(const ossimDpt& tilingDistance,
306  ossimUnitType unitType)
307 {
308  theTilingDistance = tilingDistance;
309  theTilingDistanceUnitType = unitType;
310 }
311 
312 void ossimTiling::setDelta(const ossimDpt& delta,
313  ossimTilingDeltaType deltaType)
314 {
315  theDelta = delta;
316  theDeltaType = deltaType;
317 }
318 
320 {
321  bool result = true;
322 
323  if(theMapProjection.valid())
324  {
326  {
328  {
329  case OSSIM_DEGREES:
330  case OSSIM_RADIANS:
331  case OSSIM_SECONDS:
332  case OSSIM_MINUTES:
333  case OSSIM_PIXEL:
334  {
335  break;
336  }
337  default:
338  {
340  << "ossimTiling::validate()\n"
341  << "Map projeciton requires tiling in angular units but the"
342  << "\nspacing is in non angular" << std::endl;
343  result = false;
344  }
345  }
346  }
347  else
348  {
350  {
351  case OSSIM_METERS:
352  case OSSIM_FEET:
355  case OSSIM_PIXEL:
356  case OSSIM_MILES:
357  case OSSIM_MILLIMETERS:
358  {
359  break;
360  }
361  default:
362  {
364  << "ossimTiling::validate()"
365  << "\nMap projeciton requires tiling using linear spacing"
366  << " but the spacing is in non linear" << std::endl;
367  result = false;
368  }
369  }
370  }
371  }
372  else
373  {
374  result = false;
376  << "ossimTiling::validate()"
377  << "\nthe image projection is null and so not valid"
378  << std::endl;
379  }
380  if((theDelta.x <= FLT_EPSILON) ||
381  (theDelta.y <= FLT_EPSILON))
382  {
384  << "ossimTiling::validate() the delta is too small or is negative"
385  << "value = " << theDelta << std::endl;
386  result = false;
387  }
390  {
392  << "ossimTiling::validate()"
393  << "\nthe tiling distance is too small or is negative"
394  << "Value = " << theTilingDistance << std::endl;
395  }
396 
397  if(theImageRect.hasNans())
398  {
400  << "ossimTiling::validate() the image rect has nans"
401  << std::endl;
402  result = false;
403  }
404 
405  return result;
406 }
407 
409 {
410  bool result = false;
411 
412  switch(unitType)
413  {
414  case OSSIM_DEGREES:
415  case OSSIM_RADIANS:
416  case OSSIM_SECONDS:
417  case OSSIM_MINUTES:
418  {
419  result = true;
420  break;
421  }
422  default:
423  {
424  break;
425  }
426  }
427  return result;
428 }
429 
431 {
432  bool result = false;
433 
434  switch(unitType)
435  {
436  case OSSIM_METERS:
437  case OSSIM_FEET:
440  case OSSIM_MILES:
441  case OSSIM_MILLIMETERS:
442  {
443  result = true;
444  break;
445  }
446  default:
447  {
448  break;
449  }
450  }
451  return result;
452 
453 }
454 
456 {
457  if(theTileNameMask == "")
458  {
459  theTileNameMask = "tile%i%";
460  }
461  if(mask.contains("%i%")||
462  mask.contains("%oc%")||
463  mask.contains("%or%")||
464  mask.contains("%r%")||
465  mask.contains("%c%")||
466  mask.contains("%SRTM%"))
467  {
468  theTileNameMask = mask;
469  }
470  else
471  {
472  theTileNameMask += "%i%";
473  }
474 }
475 
477 {
478  return theTileNameMask;
479 }
480 
482  ossim_int64& col,
483  ossim_int64 tileId)const
484 {
485  bool result = true;
486 
487  if((theTotalHorizontalTiles > 0)&&
488  (tileId < theTotalTiles))
489  {
490  row = tileId/static_cast<ossim_int64>(theTotalHorizontalTiles);
491  col = tileId%static_cast<ossim_int64>(theTotalHorizontalTiles);
492  if((col >= static_cast<ossim_int32>(theTotalHorizontalTiles)) &&
493  (row >= static_cast<ossim_int32>(theTotalVerticalTiles)))
494  {
495  result = false;
496  }
497  }
498  return result;
499 }
500 
502  ossim_int64 tileId)const
503 {
504  ossim_int64 row=0;
505  ossim_int64 col=0;
506 
507  bool result = getRowCol(row, col, tileId);
508  if(result)
509  {
510  result = getOrigin(origin, row, col);
511  }
512 
513  return result;
514 }
515 
517  ossim_int64 row,
518  ossim_int64 col)const
519 {
520  bool result = false;
521 
522  if((col < static_cast<ossim_int64>(theTotalHorizontalTiles)) &&
523  (row < static_cast<ossim_int64>(theTotalVerticalTiles)))
524  {
525  ossimDpt convertedTilingDistance;
526  getConvertedTilingDistance(convertedTilingDistance);
527 
528  result = true;
530  {
531  origin.x = theTilingRect.ul().x + col*convertedTilingDistance.x;
532  origin.y = theTilingRect.ul().y - row*convertedTilingDistance.y;
533  }
534  else
535  {
536  origin.x = theTilingRect.ul().x + col*convertedTilingDistance.x;
537  origin.y = theTilingRect.ul().y + row*convertedTilingDistance.y;
538  }
539  }
540 
541  return result;
542 }
543 
545 {
546 
547  ossimDpt result = theDelta;
548 
549  if (!theMapProjection)
550  {
551  return result;
552  }
553 
555  {
558  }
559 
561  1.0,
564  {
565  unitConverter.setValue(result.x, theTilingDistanceUnitType);
566  result.x = unitConverter.getValue(OSSIM_DEGREES);
567 
568  unitConverter.setValue(result.y,
570  result.y = unitConverter.getValue(OSSIM_DEGREES);
571  }
572  else
573  {
574  unitConverter.setValue(result.x,
576  result.x = unitConverter.getValue(OSSIM_METERS);
577 
578  unitConverter.setValue(result.y,
580  result.y = unitConverter.getValue(OSSIM_METERS);
581  }
582 
583  return result;
584 }
585 
587  ossim_int64 row,
588  ossim_int64 col,
589  ossim_int64 id)const
590 {
591  if(theTileNameMask == "")
592  {
593  ostringstream idString;
594  idString << id;
595  resultingName = ossimString("tile") + idString.str().c_str();
596  }
597  else if(theTileNameMask.contains("%SRTM%"))
598  {
599  // must be a 1x1 degree tiling distance
600  //
602  (theTilingDistance.x == 1.0)&&
603  (theTilingDistance.x == 1.0))
604  {
605  ostringstream latString;
606  ostringstream lonString;
607 
608  resultingName = "";
609  ossimDpt origin;
610  getOrigin(origin, row, col);
611  // the name is lower left and not upper left
612  // subtract one degree
613  //
614  origin.lat -=1;
615  latString << setfill('0') << setw(2) << fabs(origin.lat);
616  lonString << setfill('0') << setw(3) << fabs(origin.lon);
617 
618  if(origin.lat < 0.0)
619  {
620  resultingName += "S";
621  }
622  else
623  {
624  resultingName += "N";
625  }
626  resultingName += latString.str().c_str();
627  if(origin.lon < 0.0)
628  {
629  resultingName += "W";
630  }
631  else
632  {
633  resultingName += "E";
634  }
635  resultingName += lonString.str().c_str();
636  resultingName += ".hgt";
637  }
638  }
639  else
640  {
641  ostringstream rowString;
642  ostringstream colString;
643  ostringstream idString;
644  ostringstream oRowString;
645  ostringstream oColString;
646  ossimDpt origin;
647  getOrigin(origin, row, col);
648 
649  rowString << row;
650  colString << col;
651  idString << id;
652  oRowString << row;
653  oColString << col;
654 
655  resultingName = theTileNameMask;
656  resultingName = resultingName.substitute("%r%",
657  rowString.str().c_str());
658  resultingName = resultingName.substitute("%c%",
659  colString.str().c_str());
660  resultingName = resultingName.substitute("%i%",
661  idString.str().c_str());
662  resultingName = resultingName.substitute("%oc",
663  oColString.str().c_str());
664  resultingName = resultingName.substitute("%or",
665  oRowString.str().c_str());
666  }
667 }
668 
670 {
671  ossimDpt ul = rect.ul();
672  ossimDpt lr = rect.lr();
673 
674  if(ul.lat > 90) ul.lat = 90.0;
675  if(lr.lat < -90.0) lr.lat = -90.0;
676 
677  if(ul.lon < -180) ul.lon = -180;
678  if(lr.lon > 180) lr.lon = 180;
679 
680  rect = ossimDrect(ul, lr, rect.orientMode());
681 }
682 
684  const char* prefix)const
685 {
686  std::stringstream tilingDistance;
687 
688  tilingDistance << theTilingDistance.x << " " << theTilingDistance.y << std::endl;
689 
690  kwl.add(prefix,
691  "tiling_distance",
692  tilingDistance.str().c_str(),
693  true);
694 
695 
696  kwl.add(prefix,
697  "tiling_distance_type",
699  getTableIndexString(theTilingDistanceUnitType),
700  true);
701  std::ostringstream delta;
702  delta << theDelta.x << " " << theDelta.y;
703  kwl.add(prefix,
704  "delta",
705  delta.str().c_str(),
706  true);
707 
709  {
710  kwl.add(prefix,
711  "delta_type",
712  "total_pixels",
713  true);
714  }
715  else
716  {
717  kwl.add(prefix,
718  "delta_type",
719  "delta_per_pixels",
720  true);
721  }
722  std::ostringstream padding;
723 
724  padding << thePaddingSizeInPixels.x << " " << thePaddingSizeInPixels.y;
725  kwl.add(prefix,
726  "padding_size_in_pixels",
727  padding.str().c_str(),
728  true);
729 
730  kwl.add(prefix,
731  "tile_name_mask",
733  true);
734 
736  {
737  kwl.add(prefix,
738  "output_size_in_bytes",
740  true);
741  kwl.add(prefix,
742  "output_bands",
744  true);
745  kwl.add(prefix,
746  "output_bytes_per_pixel_per_band",
748  true);
749  }
750 
751  kwl.add(prefix,
752  "edge_to_edge",
754  true);
755 
756 
757  return true;
758 }
759 
761  const char* prefix)
762 {
763  bool result = false;
764 
765  // Get the mask if any.
766  theTileNameMask = kwl.find(prefix, "tile_name_mask");
768 
769  const char* paddingSizeInPixels = kwl.find(prefix,
770  "padding_size_in_pixels");
771  if (paddingSizeInPixels)
772  {
773  ossimString x,y;
774  std::istringstream padding(ossimString(paddingSizeInPixels).c_str());
775  padding >> x >> y;
776  thePaddingSizeInPixels.x = x.toFloat64();
777  thePaddingSizeInPixels.y = y.toFloat64();
778  }
779 
780  // Check to tile by size in bytes.
781  const char* lookup;
782  if (kwl.numberOf(prefix, "output_size_in_"))
783  {
784  lookup = kwl.find(prefix, "output_size_in_bytes");
785  if (lookup)
786  {
788  }
789  lookup = kwl.find(prefix, "output_size_in_kilo_bytes");
790  if (lookup)
791  {
792  theOutputSizeInBytes = ossimString(lookup).toInt64() * 1024;
793  }
794  lookup = kwl.find(prefix, "output_size_in_mega_bytes");
795  if (lookup)
796  {
797  theOutputSizeInBytes = ossimString(lookup).toInt64() * 1024 * 1024;
798  }
799  }
800 
802  {
803 
804  lookup = kwl.find(prefix, "output_bands");
805  if (lookup)
806  {
808  }
809  lookup = kwl.find(prefix, "output_bytes_per_pixel_per_band");
810  if (lookup)
811  {
813  }
814 
815  ossim_int64 pixelsPerBand = theOutputSizeInBytes /
817 
818  ossim_int32 oneDimension =
819  static_cast<ossim_int32>(floor(sqrt((double)pixelsPerBand)));
820 
821  //---
822  // TODO: Clamp to power of two option. (drb)
823  //---
824  // theDelta.x = oneDimension;
825  // theDelta.y = oneDimension;
826  // theTilingDistance.x = 1;
827  // theTilingDistance.y = 1;
828 
829  theDelta.x = 1;
830  theDelta.y = 1;
831  theTilingDistance.x = oneDimension;
832  theTilingDistance.y = oneDimension;
835  result = true;
836  }
837  else
838  {
839  const char* tilingDistance = kwl.find(prefix,
840  "tiling_distance");
841  const char* tilingDistanceType = kwl.find(prefix,
842  "tiling_distance_type");
843  const char* delta = kwl.find(prefix,
844  "delta");
845 
846  const char* deltaType = kwl.find(prefix,
847  "delta_type");
848 
849  result = tilingDistance&&tilingDistanceType&&delta&&deltaType&&paddingSizeInPixels;
850  ossimString x,y;
851  std::istringstream distance(ossimString(tilingDistance).c_str());
852  distance >> x >> y;
853  theTilingDistance.x = x.toFloat64();
854  theTilingDistance.y = y.toFloat64();
855  if(theTilingDistance.x <= 0.0)
856  {
857  theTilingDistance.x = 1.0;
858  }
859  if(theTilingDistance.y<=0.0)
860  {
862  }
863 
864  // unitLut.getTableIndexString(theTilingDistanceUnitType), ?????
865 
868  ossimString(tilingDistanceType).c_str());
869 
870  theDelta = ossimDpt(0,0);
871  x="";
872  y="";
873  std::istringstream deltaValues(ossimString(delta).c_str());
874  deltaValues >> x >> y;
875  theDelta.x = x.toFloat64();
876  theDelta.y = y.toFloat64();
877 
878  if(theDelta.x <= 0.0)
879  {
880  theDelta.x = 1.0;
881  }
882 
883  if(theDelta.y <= 0.0)
884  {
885  theDelta.y = theDelta.x;
886  }
887 
888  if(ossimString(deltaType).downcase().contains("total"))
889  {
891  }
892  else
893  {
895  }
896  }
897 
898  lookup = kwl.find(prefix, "edge_to_edge");
899  if ( lookup )
900  {
902  }
903 
904  if (traceDebug())
905  {
907  }
908 
909  return result;
910 }
911 
913 {
914  out << "theTilingDistance: " << theTilingDistance
915  << "\ntheTilingDistanceUnitType: " << theTilingDistanceUnitType
916  << "\ntheDelta: " << theDelta
917  << "\ntheDeltaType: " << theDeltaType
918  << "\nthePaddingSizeInPixels: " << thePaddingSizeInPixels
919  << "\ntheImageRect: " << theImageRect
920  << "\ntheTilingRect: " << theTilingRect
921  << "\ntheTileId: " << theTileId
922  << "\ntheTotalHorizontalTiles: " << theTotalHorizontalTiles
923  << "\ntheTotalVerticalTiles: " << theTotalVerticalTiles
924  << "\ntheTotalTiles: " << theTotalTiles
925  << "\ntheTileNameMask: " << theTileNameMask
926  << "\ntheOutputSizeInBytes: " << theOutputSizeInBytes
927  << "\ntheNumberOfBands: " << theNumberOfBands
928  << "\ntheNumberOfBytesPerPixelPerBand: " <<
930  << "\ntheEdgeToEdgeFlag: " << theEdgeToEdgeFlag
931  << "\n";
932 
933  if (theMapProjection.valid())
934  {
935  out << "\ntheMapProjection:\n";
936  theMapProjection->print(out);
937  }
938  else
939  {
940  out << "theMapProjection is not set.";
941  }
942  out << endl;
943 
944  return out;
945 }
946 
948 {
950  {
951  pt = theTilingDistance;
952  return;
953  }
954  if (!theMapProjection)
955  {
956  // This should not happen...
958  << "ossimTiling::getConvertedTilingDistance WARNING"
959  << " projection not set!" << endl;
960  pt = theTilingDistance;
961  return;
962  }
964  1.0,
966 
968  {
969  unitConverter.setValue(theTilingDistance.x,
971  pt.x = unitConverter.getValue(OSSIM_DEGREES);
972 
973  unitConverter.setValue(theTilingDistance.y,
975  pt.y = unitConverter.getValue(OSSIM_DEGREES);
976  }
977  else
978  {
979  unitConverter.setValue(theTilingDistance.x,
981  pt.x = unitConverter.getValue(OSSIM_METERS);
982 
983  unitConverter.setValue(theTilingDistance.y,
985  pt.y = unitConverter.getValue(OSSIM_METERS);
986  }
987 }
RTTI_DEF1(ossimTiling, "ossimTiling", ossimObject)
ossimTilingDeltaType theDeltaType
Definition: ossimTiling.h:137
ossim_uint32 x
bool isAngularUnit(ossimUnitType unitType) const
virtual ossimObject * dup() const =0
bool isLinearUnit(ossimUnitType unitType) const
ossimString substitute(const ossimString &searchKey, const ossimString &replacementValue, bool replaceAll=false) const
Substitutes searchKey string with replacementValue and returns a string.
ossim_uint32 numberOf(const char *str) const
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
ossimUnitType theTilingDistanceUnitType
The unit type for "theDelta", and "theTilingDistance".
Definition: ossimTiling.h:125
std::basic_stringstream< char > stringstream
Class for char mixed input and output memory streams.
Definition: ossimIosFwd.h:38
ossimUnitType
Represents serializable keyword/value map.
ossim_uint32 y
ossim_int64 theTileId
Definition: ossimTiling.h:176
bool valid() const
Definition: ossimRefPtr.h:75
const char * find(const char *key) const
const ossimDpt & ul() const
Definition: ossimDrect.h:339
void setValue(double value, ossimUnitType unitType=OSSIM_METERS)
double y
Definition: ossimDpt.h:165
ossim_uint32 height() const
Definition: ossimIrect.h:487
bool contains(char aChar) const
Definition: ossimString.h:58
static ossimString toString(bool aValue)
Numeric to string methods.
ossimRefPtr< ossimMapProjection > theMapProjection
Definition: ossimTiling.h:173
virtual bool isGeographic() const
const ossimIpt & ul() const
Definition: ossimIrect.h:274
bool initialize(const ossimMapProjection &proj, const ossimIrect &boundingRect)
Definition: ossimTiling.cpp:48
ossim_int64 theTotalVerticalTiles
Definition: ossimTiling.h:178
virtual ossim_int32 getEntryNumber(const char *entry_string, bool case_insensitive=true) const
ossimIrect theImageRect
Definition: ossimTiling.h:174
virtual void setDecimalDegreesPerPixel(const ossimDpt &gsd)
void getTileName(ossimString &resultingName, ossim_int64 row, ossim_int64 col, ossim_int64 id) const
const ossimIpt & ll() const
Definition: ossimIrect.h:277
void setTilingDistance(const ossimDpt &tilingDistance, ossimUnitType unitType)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
void getConvertedTilingDistance(ossimDpt &pt) const
ossimCoordSysOrientMode orientMode() const
Definition: ossimDrect.h:414
virtual void setMetersPerPixel(const ossimDpt &gsd)
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
void clampGeographic(ossimDrect &rect) const
ossim_int32 toInt32() const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossimDpt getDeltaPerPixel() const
virtual ossimGpt lineSampleToWorld(const ossimDpt &projectedPoint) const
ossimDpt theDelta
If (theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS) then this is the size of the tile in pixels li...
Definition: ossimTiling.h:134
void setTileNameMask(const ossimString &mask)
This sets the tilename mask.
double lat
Definition: ossimDpt.h:165
bool validate() const
virtual void lineSampleToEastingNorthing(const ossimDpt &liineSample, ossimDpt &eastingNorthing) const
#define FLT_EPSILON
bool toBool() const
String to numeric methods.
virtual ossimGpt origin() const
ossim_int64 theTotalTiles
Definition: ossimTiling.h:179
ossimString getTileNameMask() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
ossim_uint32 theNumberOfBytesPerPixelPerBand
Output number of bytes per pixel.
Definition: ossimTiling.h:170
ossim_int64 theOutputSizeInBytes
If set tiling size is controlled by the desired output size in bytes.
Definition: ossimTiling.h:149
const ossimIpt & lr() const
Definition: ossimIrect.h:276
bool getOrigin(ossimDpt &origin, ossim_int64 tileId) const
bool getRowCol(ossim_int64 &row, ossim_int64 &col, ossim_int64 tileId) const
ossim_uint32 width() const
Definition: ossimIrect.h:500
double lon
Definition: ossimDpt.h:164
ossim_int64 theTotalHorizontalTiles
Definition: ossimTiling.h:177
virtual std::ostream & print(std::ostream &out) const
Generic print method.
const ossimIpt & ur() const
Definition: ossimIrect.h:275
ossimDrect theTilingRect
Definition: ossimTiling.h:175
ossim_uint32 theNumberOfBands
Output number of bands.
Definition: ossimTiling.h:158
ossimString theTileNameMask
Definition: ossimTiling.h:180
ossimDpt theTilingDistance
The size of a tile in theTilingDistanceUnitType.
Definition: ossimTiling.h:122
void stretchToTileBoundary(const ossimDpt &widthHeight)
Definition: ossimDrect.cpp:396
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossim_int32 y
Definition: ossimIpt.h:142
ossimDpt thePaddingSizeInPixels
Definition: ossimTiling.h:172
const ossimDpt & ur() const
Definition: ossimDrect.h:340
double x
Definition: ossimDpt.h:164
long long ossim_int64
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
ossim_int64 toInt64() const
bool hasNans() const
Definition: ossimIrect.h:337
virtual void setUlTiePoints(const ossimGpt &gpt)
ossim_int32 x
Definition: ossimIpt.h:141
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
bool next(ossimRefPtr< ossimMapProjection > &resultProjection, ossimIrect &resultingBounds, ossimString &resultingName) const
float distance(double lat1, double lon1, double lat2, double lon2, int units)
static ossimUnitTypeLut * instance()
Returns the static instance of an ossimUnitTypeLut object.
const ossimDpt & lr() const
Definition: ossimDrect.h:341
bool theEdgeToEdgeFlag
This flags the code to shift the tie point so that the edge of the pixel falls on the tile boundary...
Definition: ossimTiling.h:186
virtual std::ostream & print(std::ostream &out) const
Prints data members to stream.
void setDelta(const ossimDpt &delta, ossimTilingDeltaType deltaType)
This sets the pixel delta.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
int ossim_int32