Menu

#404 Add import of grid size from ocd files

0.6.1
tracked-on-github
nobody
None
Feature_Request
2015-08-30
2014-10-05
No

I guess that at least a partial import of grid characteristics should be not very complicated for ocd version 9-11.

Proposal: add to function OcdFileImport::importGeoreferencing
something like

        case 'd':
            double grid = param_value.toDouble(&ok);
            if (ok)
            {
                map->getGrid().setHorizontalSpacing(grid);
                map->getGrid().setVerticalSpacing(grid);
                map->getGrid().setUnit(MapGrid::MetersInTerrain); // MetersInTerrain is default unit
            }
            break;

Discussion

  • Kai Pastor

    Kai Pastor - 2014-10-28

    Need a test file (or an existing ticket with test file).

     
  • Kai Pastor

    Kai Pastor - 2014-10-28
    • Milestone: 0.6.0 --> 0.6.1
     
  • Matthias Kühlewein

    I added three Ocad10 test maps, each with active grid, 100m, 250m and 500m grid size.

     
  • Matthias Kühlewein

    Following modification is working (thank you for the hints Kai):
    Insert at line 263:

                case 'd':
                {
                    double gridsize = param_value.toDouble(&ok);
                    if (ok)
                    {
                        MapGrid grid{map->getGrid()};
                        grid.setHorizontalSpacing(gridsize);
                        grid.setVerticalSpacing(gridsize);
                        grid.setUnit(MapGrid::MetersInTerrain); // MetersInTerrain is default unit
                        map->setGrid(grid);
                    }
                    break;
                }
    
     

    Last edit: Matthias Kühlewein 2015-07-02
  • Kai Pastor

    Kai Pastor - 2015-08-30
    • Status: new --> tracked-on-github
     
MongoDB Logo MongoDB