MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / ExtentTo

Method ExtentTo

Explore/MapNewView.cpp:663–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661 return !no_change;
662}
663void MapCanvas::ExtentTo(double minx, double miny, double maxx, double maxy)
664{
665 if (basemap) {
666 OGRCoordinateTransformation *poCT = NULL;
667 if (project->sourceSR != NULL) {
668 OGRSpatialReference destSR;
669 destSR.importFromEPSG(4326);
670#ifdef __PROJ6__
671 destSR.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
672 //project->sourceSR->SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
673#endif
674 poCT = OGRCreateCoordinateTransformation(project->sourceSR,
675 &destSR);
676 }
677 basemap->Extent(maxy, minx, miny, maxx, poCT);
678 }
679 last_scale_trans.SetData(minx, miny, maxx, maxy);
680}
681
682OGRSpatialReference* MapCanvas::GetSpatialReference()
683{

Callers 3

ExtentMapMethod · 0.95
OnZoomToLayerMethod · 0.80
OnZoomToSelectedMethod · 0.80

Calls 2

ExtentMethod · 0.80
SetDataMethod · 0.80

Tested by

no test coverage detected