Projection Transformation (coordsystranslator)
Introduction
Demonstrate the projection conversion of Gaussian Kruger, UTM and LAMBERT, and see the effect of the projection conversion.
Operation effect
Figure: Projection Transformation Operation Effect |
Location
Android Studio
- Product package: Product package catalogue\SampleCode\SampleCode_AndroidStudio\AndroidStudioSampleCode\coordsystranslator
ADT
- Product package: Product package catalogue\SampleCode\SampleCode_ADT\CoordSysTranslator
Data
Storage location
- Product package: Product package catalogue\SampleData\CoordSysTranslator
Deployment Location
- mobile device internal storage\SampleData\CoordSysTranslator
License
Offline license, copy the license file to the "mobile device internal storage\SuperMap\License" folder.
Library
jar |
---|
com.supermap.data.jar, com.supermap.mapping.jar, com.supermap.services.jar |
so |
libimb2d.so, libgnustl_shared.so, libQt5Core.so, libQt5Gui.so, libQt5Svg.so, libQt5Widgets.so(Note: Starting from version 11.1, the last five so libraries need to be added.) |
Key types/members
Control/Class | Method | Event |
---|---|---|
Workspace | open(), save() | |
WorkspaceConnectionInfo | setServer(), setType() | |
Environment | setLicensePath(), setTemporaryPath(), initialization() | |
MapControl | getMap() | setOnTouchListener() |
Map | getLayers(), setCenter(), setScale(), refresh() | |
Datasource | getDatasets() | |
Datasets | get(int/name)(), contains(), create(), delete() | |
DatasetVector | setPrjCoordSys(), getRecordset() | |
DatasetVectorInfo | setName(), setType() | |
PrjCoordSys | setProjection(), setPrjParameter() | |
CoordSysTranslator | convert() |
Basic steps
- Click the button on the top of the screen to choose a projection for transforming;
- Two figures in the screen are different effects before and after transformation;
- Slide the bottom scroll bar to check the projected coordinate system before and after transformation.