geokernel 0.1.2__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. {geokernel-0.1.2 → geokernel-1.0.2}/PKG-INFO +1 -1
  2. {geokernel-0.1.2 → geokernel-1.0.2}/pyproject.toml +1 -1
  3. geokernel-1.0.2/src/geokernel/__init__.py +45 -0
  4. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/GeoKernel.Core.dll +0 -0
  5. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/GeoKernel.Formats.dll +0 -0
  6. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/GeoKernel.Viewer.dll +0 -0
  7. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/license-profile.json +1 -1
  8. geokernel-1.0.2/src/geokernel/controls.py +95 -0
  9. geokernel-1.0.2/src/geokernel/crs.py +68 -0
  10. geokernel-1.0.2/src/geokernel/diagnostics.py +136 -0
  11. geokernel-1.0.2/src/geokernel/dll.py +94 -0
  12. geokernel-1.0.2/src/geokernel/editing.py +273 -0
  13. geokernel-1.0.2/src/geokernel/geometry_ops.py +255 -0
  14. geokernel-1.0.2/src/geokernel/layers.py +272 -0
  15. geokernel-1.0.2/src/geokernel/native.py +327 -0
  16. geokernel-1.0.2/src/geokernel/native_api.py +50 -0
  17. geokernel-1.0.2/src/geokernel/navigation.py +78 -0
  18. geokernel-1.0.2/src/geokernel/projects.py +17 -0
  19. geokernel-1.0.2/src/geokernel/routing.py +77 -0
  20. geokernel-1.0.2/src/geokernel/serialization.py +90 -0
  21. geokernel-1.0.2/src/geokernel/spatial.py +13 -0
  22. geokernel-1.0.2/src/geokernel/styling.py +117 -0
  23. geokernel-1.0.2/src/geokernel/types.py +165 -0
  24. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/viewer.py +99 -20
  25. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel.egg-info/PKG-INFO +1 -1
  26. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel.egg-info/SOURCES.txt +15 -0
  27. geokernel-0.1.2/src/geokernel/__init__.py +0 -11
  28. geokernel-0.1.2/src/geokernel/dll.py +0 -178
  29. {geokernel-0.1.2 → geokernel-1.0.2}/README.md +0 -0
  30. {geokernel-0.1.2 → geokernel-1.0.2}/setup.cfg +0 -0
  31. {geokernel-0.1.2 → geokernel-1.0.2}/setup.py +0 -0
  32. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/assets/images/FullExtent.svg +0 -0
  33. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/assets/images/GeoKernelAppIcon.ico +0 -0
  34. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/assets/images/Pan.svg +0 -0
  35. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/assets/images/RectangularZoom.svg +0 -0
  36. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/assets/images/ZoomIn.svg +0 -0
  37. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/assets/images/ZoomOut.svg +0 -0
  38. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/Qt6Core.dll +0 -0
  39. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/Qt6Gui.dll +0 -0
  40. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/Qt6Network.dll +0 -0
  41. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/Qt6OpenGL.dll +0 -0
  42. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/Qt6OpenGLWidgets.dll +0 -0
  43. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/Qt6Sql.dll +0 -0
  44. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/Qt6Widgets.dll +0 -0
  45. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/README_LICENSE_PROFILE.txt +0 -0
  46. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/GDALLogoBW.svg +0 -0
  47. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/GDALLogoColor.svg +0 -0
  48. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/GDALLogoGS.svg +0 -0
  49. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/LICENSE.TXT +0 -0
  50. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/cubewerx_extra.wkt +0 -0
  51. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ecw_cs.wkt +0 -0
  52. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/epsg.wkt +0 -0
  53. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/esri_StatePlane_extra.wkt +0 -0
  54. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gdal_algorithm.schema.json +0 -0
  55. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gdalicon.png +0 -0
  56. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gdalinfo_output.schema.json +0 -0
  57. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gdalmdiminfo_output.schema.json +0 -0
  58. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gdalvrt.xsd +0 -0
  59. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gfs.xsd +0 -0
  60. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gml_registry.xml +0 -0
  61. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/gml_registry.xsd +0 -0
  62. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/inspire_cp_BasicPropertyUnit.gfs +0 -0
  63. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/inspire_cp_CadastralBoundary.gfs +0 -0
  64. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/inspire_cp_CadastralParcel.gfs +0 -0
  65. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/inspire_cp_CadastralZoning.gfs +0 -0
  66. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_AdmArea.gfs +0 -0
  67. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_AdmBdry.gfs +0 -0
  68. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_AdmPt.gfs +0 -0
  69. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_BldA.gfs +0 -0
  70. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_BldL.gfs +0 -0
  71. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_Cntr.gfs +0 -0
  72. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_CommBdry.gfs +0 -0
  73. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_CommPt.gfs +0 -0
  74. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_Cstline.gfs +0 -0
  75. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_ElevPt.gfs +0 -0
  76. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_GCP.gfs +0 -0
  77. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_LeveeEdge.gfs +0 -0
  78. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RailCL.gfs +0 -0
  79. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RdASL.gfs +0 -0
  80. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RdArea.gfs +0 -0
  81. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RdCompt.gfs +0 -0
  82. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RdEdg.gfs +0 -0
  83. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RdMgtBdry.gfs +0 -0
  84. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RdSgmtA.gfs +0 -0
  85. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_RvrMgtBdry.gfs +0 -0
  86. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_SBAPt.gfs +0 -0
  87. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_SBArea.gfs +0 -0
  88. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_SBBdry.gfs +0 -0
  89. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_WA.gfs +0 -0
  90. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_WL.gfs +0 -0
  91. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_WStrA.gfs +0 -0
  92. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/jpfgdgml_WStrL.gfs +0 -0
  93. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/leaflet_template.html +0 -0
  94. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ogr_fields_override.schema.json +0 -0
  95. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ogrinfo_output.schema.json +0 -0
  96. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ogrvrt.xsd +0 -0
  97. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/osmconf.ini +0 -0
  98. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ozi_datum.csv +0 -0
  99. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ozi_ellips.csv +0 -0
  100. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/pci_datum.txt +0 -0
  101. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/pci_ellips.txt +0 -0
  102. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ruian_vf_ob_v1.gfs +0 -0
  103. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ruian_vf_st_uvoh_v1.gfs +0 -0
  104. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ruian_vf_st_v1.gfs +0 -0
  105. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/ruian_vf_v1.gfs +0 -0
  106. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/stateplane.csv +0 -0
  107. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/template_tiles.mapml +0 -0
  108. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/tms_LINZAntarticaMapTileGrid.json +0 -0
  109. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/tms_MapML_APSTILE.json +0 -0
  110. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/tms_MapML_CBMTILE.json +0 -0
  111. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal-data/tms_NZTM2000.json +0 -0
  112. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdal.dll +0 -0
  113. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/drivers.ini +0 -0
  114. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/gdal_ECW_JP2ECW.dll +0 -0
  115. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/gdal_JPEG.dll +0 -0
  116. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/gdal_MrSID.dll +0 -0
  117. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/gdal_PNG.dll +0 -0
  118. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/ogr_Arrow.dll +0 -0
  119. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/ogr_LIBKML.dll +0 -0
  120. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/ogr_Parquet.dll +0 -0
  121. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/gdalplugins/ogr_XLS.dll +0 -0
  122. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/licenses/README.txt +0 -0
  123. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/CH +0 -0
  124. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/GL27 +0 -0
  125. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/ITRF2000 +0 -0
  126. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/ITRF2008 +0 -0
  127. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/ITRF2014 +0 -0
  128. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/ITRF2020 +0 -0
  129. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/copyright +0 -0
  130. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/deformation_model.schema.json +0 -0
  131. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/nad.lst +0 -0
  132. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/nad27 +0 -0
  133. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/nad83 +0 -0
  134. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/other.extra +0 -0
  135. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj-config-version.cmake +0 -0
  136. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj-config.cmake +0 -0
  137. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj-targets-debug.cmake +0 -0
  138. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj-targets-release.cmake +0 -0
  139. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj-targets.cmake +0 -0
  140. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj.db +0 -0
  141. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj.ini +0 -0
  142. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj4-targets-debug.cmake +0 -0
  143. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj4-targets-release.cmake +0 -0
  144. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/proj4-targets.cmake +0 -0
  145. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/projjson.schema.json +0 -0
  146. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/triangulation.schema.json +0 -0
  147. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/usage +0 -0
  148. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/vcpkg.spdx.json +0 -0
  149. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/vcpkg_abi_info.txt +0 -0
  150. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/proj-data/world +0 -0
  151. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/bin/use-license-profile.ps1 +0 -0
  152. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/geometry.py +0 -0
  153. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel/layer.py +0 -0
  154. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel.egg-info/dependency_links.txt +0 -0
  155. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel.egg-info/requires.txt +0 -0
  156. {geokernel-0.1.2 → geokernel-1.0.2}/src/geokernel.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geokernel
3
- Version: 0.1.2
3
+ Version: 1.0.2
4
4
  Summary: Python bindings and samples for the GeoKernel GIS SDK.
5
5
  Author-email: GeoKernel <sales@geokernel.io>
6
6
  License: Proprietary
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "geokernel"
7
- version = "0.1.2"
7
+ version = "1.0.2"
8
8
  description = "Python bindings and samples for the GeoKernel GIS SDK."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1,45 @@
1
+ from .crs import CrsDatabase
2
+ from .geometry import Geometry
3
+ from .layer import Layer
4
+ from .types import (
5
+ ClassificationMethod,
6
+ ColorRampMode,
7
+ CoordinateSystemPreset,
8
+ Extent,
9
+ MeasureMode,
10
+ OverlayAnchor,
11
+ Point,
12
+ RenderBackendPreference,
13
+ RouteSummary,
14
+ RoutingCostMetric,
15
+ ScreenRectangle,
16
+ ShapeType,
17
+ SpatialIndexType,
18
+ SymbolStyleTarget,
19
+ TopologyFixOperation,
20
+ )
21
+ from .viewer import GeoKernelError, Viewer, ViewerTool
22
+
23
+ __all__ = [
24
+ "ClassificationMethod",
25
+ "ColorRampMode",
26
+ "CoordinateSystemPreset",
27
+ "CrsDatabase",
28
+ "Extent",
29
+ "Geometry",
30
+ "GeoKernelError",
31
+ "Layer",
32
+ "MeasureMode",
33
+ "OverlayAnchor",
34
+ "Point",
35
+ "RenderBackendPreference",
36
+ "RouteSummary",
37
+ "RoutingCostMetric",
38
+ "ScreenRectangle",
39
+ "ShapeType",
40
+ "SpatialIndexType",
41
+ "SymbolStyleTarget",
42
+ "TopologyFixOperation",
43
+ "Viewer",
44
+ "ViewerTool",
45
+ ]
@@ -15,5 +15,5 @@
15
15
  "excludedPlugins": [
16
16
 
17
17
  ],
18
- "generatedAtUtc": "2026-07-05T18:30:19Z"
18
+ "generatedAtUtc": "2026-07-10T01:16:00Z"
19
19
  }
@@ -0,0 +1,95 @@
1
+ from __future__ import annotations
2
+
3
+ from .types import MeasureMode, OverlayAnchor
4
+
5
+
6
+ class ControlsMixin:
7
+ def set_scale_bar_visible(self, visible: bool) -> None:
8
+ self._require_handle()
9
+ self._dll.viewer.GeoKernelViewer_SetScaleBarVisible(self._handle, bool(visible))
10
+
11
+ def get_scale_bar_visible(self) -> bool:
12
+ self._require_handle()
13
+ return bool(self._dll.viewer.GeoKernelViewer_GetScaleBarVisible(self._handle))
14
+
15
+ def set_scale_bar_anchor(self, anchor: OverlayAnchor | int) -> None:
16
+ self._require_handle()
17
+ self._dll.viewer.GeoKernelViewer_SetScaleBarAnchor(self._handle, int(anchor))
18
+
19
+ def set_scale_bar_colors(self, background_argb: int, line_argb: int, text_argb: int) -> None:
20
+ self._require_handle()
21
+ self._dll.viewer.GeoKernelViewer_SetScaleBarColors(
22
+ self._handle,
23
+ int(background_argb),
24
+ int(line_argb),
25
+ int(text_argb),
26
+ )
27
+
28
+ def set_mini_map_visible(self, visible: bool) -> None:
29
+ self._require_handle()
30
+ self._dll.viewer.GeoKernelViewer_SetMiniMapVisible(self._handle, bool(visible))
31
+
32
+ def get_mini_map_visible(self) -> bool:
33
+ self._require_handle()
34
+ return bool(self._dll.viewer.GeoKernelViewer_GetMiniMapVisible(self._handle))
35
+
36
+ def set_mini_map_anchor(self, anchor: OverlayAnchor | int) -> None:
37
+ self._require_handle()
38
+ self._dll.viewer.GeoKernelViewer_SetMiniMapAnchor(self._handle, int(anchor))
39
+
40
+ def set_mini_map_background_color(self, background_argb: int) -> None:
41
+ self._require_handle()
42
+ self._dll.viewer.GeoKernelViewer_SetMiniMapBackgroundColor(self._handle, int(background_argb))
43
+
44
+ def set_measure_tool_active(self, active: bool) -> None:
45
+ self._require_handle()
46
+ self._dll.viewer.GeoKernelViewer_SetMeasureToolActive(self._handle, bool(active))
47
+
48
+ def get_measure_tool_active(self) -> bool:
49
+ self._require_handle()
50
+ return bool(self._dll.viewer.GeoKernelViewer_GetMeasureToolActive(self._handle))
51
+
52
+ def set_measure_mode(self, mode: MeasureMode | int) -> None:
53
+ self._require_handle()
54
+ self._dll.viewer.GeoKernelViewer_SetMeasureMode(self._handle, int(mode))
55
+
56
+ def get_measure_mode(self) -> MeasureMode:
57
+ self._require_handle()
58
+ return MeasureMode(int(self._dll.viewer.GeoKernelViewer_GetMeasureMode(self._handle)))
59
+
60
+ def start_measure_distance(self) -> None:
61
+ self._require_handle()
62
+ self._dll.viewer.GeoKernelViewer_StartMeasureDistance(self._handle)
63
+
64
+ def start_measure_area(self) -> None:
65
+ self._require_handle()
66
+ self._dll.viewer.GeoKernelViewer_StartMeasureArea(self._handle)
67
+
68
+ def finish_measure(self) -> None:
69
+ self._require_handle()
70
+ self._dll.viewer.GeoKernelViewer_FinishMeasure(self._handle)
71
+
72
+ def clear_measure(self) -> None:
73
+ self._require_handle()
74
+ self._dll.viewer.GeoKernelViewer_ClearMeasure(self._handle)
75
+
76
+ def get_measure_total_distance(self) -> float:
77
+ self._require_handle()
78
+ return float(self._dll.viewer.GeoKernelViewer_GetMeasureTotalDistance(self._handle))
79
+
80
+ def get_measure_area(self) -> float:
81
+ self._require_handle()
82
+ return float(self._dll.viewer.GeoKernelViewer_GetMeasureArea(self._handle))
83
+
84
+ def get_measure_result_text(self) -> str:
85
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetMeasureResultText)
86
+
87
+ def set_measure_colors(self, line_argb: int, fill_argb: int, text_argb: int, label_background_argb: int) -> None:
88
+ self._require_handle()
89
+ self._dll.viewer.GeoKernelViewer_SetMeasureColors(
90
+ self._handle,
91
+ int(line_argb),
92
+ int(fill_argb),
93
+ int(text_argb),
94
+ int(label_background_argb),
95
+ )
@@ -0,0 +1,68 @@
1
+ from __future__ import annotations
2
+
3
+ import ctypes
4
+ import json
5
+ from pathlib import Path
6
+ from typing import Any
7
+
8
+ from .dll import GeoKernelDll
9
+ from .types import CoordinateSystemPreset
10
+
11
+
12
+ def _read_global_json(function: Any, *args: object) -> dict[str, Any]:
13
+ required = int(function(*args, None, 0))
14
+ if required <= 0:
15
+ return {}
16
+ buffer = ctypes.create_unicode_buffer(required + 1)
17
+ function(*args, buffer, len(buffer))
18
+ return json.loads(buffer.value) if buffer.value else {}
19
+
20
+
21
+ class CrsDatabase:
22
+ def __init__(self, database_path: str | Path, bin_dir: str | Path | None = None) -> None:
23
+ self.database_path = str(database_path)
24
+ self._dll = GeoKernelDll(bin_dir)
25
+
26
+ def find_by_srid(self, srid: int) -> dict[str, Any]:
27
+ return _read_global_json(
28
+ self._dll.viewer.GeoKernelViewer_CrsDatabaseFindBySridJson,
29
+ self.database_path,
30
+ int(srid),
31
+ )
32
+
33
+ def find_by_authority(self, authority_name: str, authority_srid: int) -> dict[str, Any]:
34
+ return _read_global_json(
35
+ self._dll.viewer.GeoKernelViewer_CrsDatabaseFindByAuthorityJson,
36
+ self.database_path,
37
+ authority_name,
38
+ int(authority_srid),
39
+ )
40
+
41
+
42
+ class CrsMixin:
43
+ def set_coordinate_system_preset(self, preset: CoordinateSystemPreset | int | str) -> bool:
44
+ self._require_handle()
45
+ return bool(self._dll.viewer.GeoKernelViewer_SetCoordinateSystemPreset(self._handle, self._preset_name(preset)))
46
+
47
+ def set_layer_coordinate_system_preset(self, index: int, preset: CoordinateSystemPreset | int | str) -> bool:
48
+ self._require_handle()
49
+ return bool(self._dll.viewer.GeoKernelViewer_SetLayerCoordinateSystemPreset(
50
+ self._handle,
51
+ int(index),
52
+ self._preset_name(preset),
53
+ ))
54
+
55
+ def _preset_name(self, preset: CoordinateSystemPreset | int | str) -> str:
56
+ if isinstance(preset, str):
57
+ return preset
58
+ names = {
59
+ CoordinateSystemPreset.WGS84: "WGS84",
60
+ CoordinateSystemPreset.WEB_MERCATOR: "WebMercator",
61
+ CoordinateSystemPreset.WORLD_MERCATOR: "WorldMercator",
62
+ CoordinateSystemPreset.MILLER: "Miller",
63
+ CoordinateSystemPreset.MOLLWEIDE: "Mollweide",
64
+ CoordinateSystemPreset.SINUSOIDAL: "Sinusoidal",
65
+ CoordinateSystemPreset.ECKERT_IV: "EckertIV",
66
+ CoordinateSystemPreset.ECKERT_VI: "EckertVI",
67
+ }
68
+ return names[CoordinateSystemPreset(int(preset))]
@@ -0,0 +1,136 @@
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+
5
+ from .types import RenderBackendPreference
6
+
7
+
8
+ class DiagnosticsMixin:
9
+ def set_verbose_mode(self, enabled: bool) -> None:
10
+ self._require_handle()
11
+ self._dll.viewer.GeoKernelViewer_SetVerboseMode(self._handle, bool(enabled))
12
+
13
+ def get_verbose_mode(self) -> bool:
14
+ self._require_handle()
15
+ return bool(self._dll.viewer.GeoKernelViewer_GetVerboseMode(self._handle))
16
+
17
+ def get_logging_mode_name(self) -> str:
18
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetLoggingModeName)
19
+
20
+ def set_logging_mode_name(self, value: str) -> None:
21
+ self._require_handle()
22
+ self._dll.viewer.GeoKernelViewer_SetLoggingModeName(self._handle, value)
23
+
24
+ def get_render_metrics_visible(self) -> bool:
25
+ self._require_handle()
26
+ return bool(self._dll.viewer.GeoKernelViewer_GetRenderMetricsVisible(self._handle))
27
+
28
+ def set_render_metrics_visible(self, visible: bool) -> None:
29
+ self._require_handle()
30
+ self._dll.viewer.GeoKernelViewer_SetRenderMetricsVisible(self._handle, bool(visible))
31
+
32
+ def get_render_metrics_log_path(self) -> str:
33
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetRenderMetricsLogPath)
34
+
35
+ def set_render_metrics_log_path(self, path: str | Path) -> None:
36
+ self._require_handle()
37
+ self._dll.viewer.GeoKernelViewer_SetRenderMetricsLogPath(self._handle, str(path))
38
+
39
+ def set_render_debug_window(self, enabled: bool) -> None:
40
+ self._require_handle()
41
+ self._dll.viewer.GeoKernelViewer_SetRenderDebugWindow(self._handle, bool(enabled))
42
+
43
+ def get_render_debug_window(self) -> bool:
44
+ self._require_handle()
45
+ return bool(self._dll.viewer.GeoKernelViewer_GetRenderDebugWindow(self._handle))
46
+
47
+ def set_render_debug_file(self, enabled: bool) -> None:
48
+ self._require_handle()
49
+ self._dll.viewer.GeoKernelViewer_SetRenderDebugFile(self._handle, bool(enabled))
50
+
51
+ def get_render_debug_file(self) -> bool:
52
+ self._require_handle()
53
+ return bool(self._dll.viewer.GeoKernelViewer_GetRenderDebugFile(self._handle))
54
+
55
+ def get_render_step_log(self) -> bool:
56
+ self._require_handle()
57
+ return bool(self._dll.viewer.GeoKernelViewer_GetRenderStepLog(self._handle))
58
+
59
+ def set_render_step_log(self, enabled: bool) -> None:
60
+ self._require_handle()
61
+ self._dll.viewer.GeoKernelViewer_SetRenderStepLog(self._handle, bool(enabled))
62
+
63
+ def get_render_step_log_path(self) -> str:
64
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetRenderStepLogPath)
65
+
66
+ def set_render_step_log_path(self, path: str | Path) -> None:
67
+ self._require_handle()
68
+ self._dll.viewer.GeoKernelViewer_SetRenderStepLogPath(self._handle, str(path))
69
+
70
+ def get_fps(self) -> float:
71
+ self._require_handle()
72
+ return float(self._dll.viewer.GeoKernelViewer_GetFPS(self._handle))
73
+
74
+ def get_map_scale(self) -> float:
75
+ self._require_handle()
76
+ return float(self._dll.viewer.GeoKernelViewer_GetMapScale(self._handle))
77
+
78
+ def get_show_fps(self) -> bool:
79
+ self._require_handle()
80
+ return bool(self._dll.viewer.GeoKernelViewer_GetShowFPS(self._handle))
81
+
82
+ def set_show_fps(self, enabled: bool) -> None:
83
+ self._require_handle()
84
+ self._dll.viewer.GeoKernelViewer_SetShowFPS(self._handle, bool(enabled))
85
+
86
+ def get_show_extra_info(self) -> bool:
87
+ self._require_handle()
88
+ return bool(self._dll.viewer.GeoKernelViewer_GetShowExtraInfo(self._handle))
89
+
90
+ def set_show_extra_info(self, enabled: bool) -> None:
91
+ self._require_handle()
92
+ self._dll.viewer.GeoKernelViewer_SetShowExtraInfo(self._handle, bool(enabled))
93
+
94
+ def get_extra_info_text(self) -> str:
95
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetExtraInfoText)
96
+
97
+ def set_extra_info_text(self, value: str) -> None:
98
+ self._require_handle()
99
+ self._dll.viewer.GeoKernelViewer_SetExtraInfoText(self._handle, value)
100
+
101
+ def get_use_hardware_acceleration(self) -> bool:
102
+ self._require_handle()
103
+ return bool(self._dll.viewer.GeoKernelViewer_GetUseHardwareAcceleration(self._handle))
104
+
105
+ def set_use_hardware_acceleration(self, enabled: bool) -> None:
106
+ self._require_handle()
107
+ self._dll.viewer.GeoKernelViewer_SetUseHardwareAcceleration(self._handle, bool(enabled))
108
+
109
+ def get_render_backend_preference(self) -> RenderBackendPreference:
110
+ self._require_handle()
111
+ return RenderBackendPreference(int(self._dll.viewer.GeoKernelViewer_GetRenderBackendPreference(self._handle)))
112
+
113
+ def set_render_backend_preference(self, value: RenderBackendPreference | int) -> None:
114
+ self._require_handle()
115
+ self._dll.viewer.GeoKernelViewer_SetRenderBackendPreference(self._handle, int(value))
116
+
117
+ def get_render_backend_preference_name(self) -> str:
118
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetRenderBackendPreferenceName)
119
+
120
+ def set_render_backend_preference_name(self, value: str) -> None:
121
+ self._require_handle()
122
+ self._dll.viewer.GeoKernelViewer_SetRenderBackendPreferenceName(self._handle, value)
123
+
124
+ def get_current_render_backend_name(self) -> str:
125
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetCurrentRenderBackendName)
126
+
127
+ def get_render_backend_diagnostics(self) -> str:
128
+ return self._read_wide_text(self._dll.viewer.GeoKernelViewer_GetRenderBackendDiagnostics)
129
+
130
+ def get_map_background_color(self) -> int:
131
+ self._require_handle()
132
+ return int(self._dll.viewer.GeoKernelViewer_GetMapBackgroundColor(self._handle))
133
+
134
+ def set_map_background_color(self, argb: int) -> None:
135
+ self._require_handle()
136
+ self._dll.viewer.GeoKernelViewer_SetMapBackgroundColor(self._handle, int(argb))
@@ -0,0 +1,94 @@
1
+ import ctypes
2
+ import os
3
+ import sys
4
+ from pathlib import Path
5
+
6
+ from .native import configure_viewer_signatures
7
+
8
+
9
+ WINDOWS_DLL_LOAD_FLAGS = 0x00000100 | 0x00001000
10
+
11
+ DEFAULT_BIN_CANDIDATES = [
12
+ Path(os.environ["GEOKERNEL_BIN"]) if os.environ.get("GEOKERNEL_BIN") else None,
13
+ Path(__file__).resolve().parent / "bin",
14
+ Path(r"D:\projects\GeoKernel\outputs\packages\Evaluation"),
15
+ ]
16
+
17
+
18
+ class GeoKernelDllError(RuntimeError):
19
+ pass
20
+
21
+
22
+ def load_library(path: Path) -> ctypes.CDLL:
23
+ if sys.platform == "win32":
24
+ return ctypes.CDLL(str(path), winmode=WINDOWS_DLL_LOAD_FLAGS)
25
+ return ctypes.CDLL(str(path))
26
+
27
+
28
+ def find_bin_dir() -> Path:
29
+ for candidate in DEFAULT_BIN_CANDIDATES:
30
+ if candidate is None:
31
+ continue
32
+ dll_path = candidate / "GeoKernel.Viewer.dll"
33
+ if dll_path.exists():
34
+ return candidate
35
+ searched = ", ".join(str(path) for path in DEFAULT_BIN_CANDIDATES if path is not None)
36
+ raise GeoKernelDllError(f"Could not find GeoKernel.Viewer.dll. Searched: {searched}")
37
+
38
+
39
+ class GeoKernelDll:
40
+ def __init__(self, bin_dir: str | Path | None = None) -> None:
41
+ self.bin_dir = Path(bin_dir) if bin_dir is not None else find_bin_dir()
42
+ if not (self.bin_dir / "GeoKernel.Viewer.dll").exists():
43
+ raise GeoKernelDllError(f"GeoKernel.Viewer.dll not found in {self.bin_dir}")
44
+
45
+ configure_runtime_environment(self.bin_dir)
46
+ configure_qt_plugin_path(self.bin_dir)
47
+ self._dll_directory_cookie = os.add_dll_directory(str(self.bin_dir))
48
+ self.viewer = load_library(self.bin_dir / "GeoKernel.Viewer.dll")
49
+ self._configure_signatures()
50
+
51
+ def _configure_signatures(self) -> None:
52
+ configure_viewer_signatures(self.viewer)
53
+
54
+
55
+ def configure_qt_plugin_path(bin_dir: Path) -> None:
56
+ if os.environ.get("QT_PLUGIN_PATH") and os.environ.get("QT_QPA_PLATFORM_PLUGIN_PATH"):
57
+ return
58
+
59
+ candidates = [
60
+ bin_dir / "plugins",
61
+ bin_dir,
62
+ Path(r"C:\Qt\6.11.0\msvc2022_64\plugins"),
63
+ ]
64
+
65
+ for candidate in candidates:
66
+ platforms_dir = candidate / "platforms"
67
+ if platforms_dir.exists() and any(platforms_dir.glob("qwindows*.dll")):
68
+ os.environ.setdefault("QT_PLUGIN_PATH", str(candidate))
69
+ os.environ.setdefault("QT_QPA_PLATFORM_PLUGIN_PATH", str(platforms_dir))
70
+ return
71
+
72
+
73
+ def configure_runtime_environment(bin_dir: Path) -> None:
74
+ icon_dir = Path(__file__).resolve().parent / "assets" / "images"
75
+ if icon_dir.exists():
76
+ os.environ.setdefault("GEOKERNEL_ICON_DIR", str(icon_dir))
77
+
78
+ current_path = os.environ.get("PATH", "")
79
+ bin_text = str(bin_dir)
80
+ path_parts = [part for part in current_path.split(os.pathsep) if part]
81
+ if bin_text.casefold() not in {part.casefold() for part in path_parts}:
82
+ os.environ["PATH"] = bin_text + os.pathsep + current_path
83
+
84
+ gdal_data = bin_dir / "gdal-data"
85
+ if gdal_data.exists():
86
+ os.environ.setdefault("GDAL_DATA", str(gdal_data))
87
+
88
+ proj_data = bin_dir / "proj-data"
89
+ if proj_data.exists():
90
+ os.environ.setdefault("PROJ_LIB", str(proj_data))
91
+
92
+ gdal_plugins = bin_dir / "gdalplugins"
93
+ if gdal_plugins.exists():
94
+ os.environ.setdefault("GDAL_DRIVER_PATH", str(gdal_plugins))