google / earthenterprise

Google Earth Enterprise - Open Source
Apache License 2.0
2.66k stars 882 forks source link

Fix Search and Snippets for Python 3 Migration #1963

Closed tst-cjeffries closed 3 years ago

tst-cjeffries commented 3 years ago

Forces swig for gepublishmanagerhelper to handle strings as byte strings. This allows protobuf binary data to be passed through without issue.

To test: Testing Search:

  1. Build and Install (Build and install according to the build docs (https://github.com/tst-cjeffries/earthenterprise/blob/python_3_snippet_bug/earth_enterprise/BUILD_RHEL_CentOS.md)
  2. Run the tutorials. sudo /opt/google/share/tutorials/fusion/download_tutorial.sh sudo cp earthenterprise/earth_enterprise/src/fusion/tools/gee_test/tutorial_files/providers.xml /gevol/assets/.userdata/ sudo env "PATH=$PATH:/opt/google/bin" earthenterprise/earth_enterprise/src/fusion/tools/gee_test/run_tutorial.sh Then wait until the tutorials are finished building. This can be monitored in with the status scripts in that same directory. `sudo env "PATH=$PATH:/opt/google/bin" earthenterprise/earth_enterprise/src/fusion/tools/gee_test/publish_tutorial.sh
  3. Open the vector project
  4. Open the search properties: Right click the “California Highways” layer. Click “Layer Properties”. Click the “Search” tab at the top of the dialog.
  5. Add a field for search and display: Click the “Add Search Field” button . For the “Column Name” drop down, select “NAME”. For the “Use” drop down, leave it at the default “Search and Display”. Click “OK”.
  6. Add a field for display only: Click the “Add Search Field” button . For the “Column Name” drop down, select “LENGTH”. For the “Use” drop down, select “Display Only”. Click “OK”.
  7. Return to the asset manager
  8. Rebuild and push the database. This cannot be done in the UI, due to the python 3 migration not including a QT bug fix from a while back. /opt/google/bin/geserveradmin --addb "/gevol/assets/Tutorial/Databases/SFDb_3d.kdatabase/gedb.kda/ver002/gedb" /opt/google/bin/geserveradmin --pushdb "/gevol/assets/Tutorial/Databases/SFDb_3d.kdatabase/gedb.kda/ver002/gedb"
  9. Re-publish the database with POI and Search Tabs   Ensure that POI Search is On. Add ‘Places’ and ‘ExampleSearch’ as “Search Tabs”. Click “Publish”.
  10. Perform a POI Search: Open the database in Google Earth Enterprise Client. In the search box in the top left corner, enter “880” and click “Search”. 12 results appear that reference Interstate Route 880.  A name and length is shown for each search result.
  11.  Perform ‘Places’ Search : Open the database in Google Earth Enterprise Client. Click on ‘Places’ tab and enter “Rome” and click “Search”. 31 results appear that reference ‘Rome’.  A Country and Population  is shown for each search result. The globe should have pins for the found locations covering USA and Italy: Enter “Rome, Italy” and click “Search”. The globe should now move to Rome in Italy and only one place is found: On the globe click on the pin. A popup should be displayed with the following info:Country: ItalyPopulation: 2563241
  12. Perform an ‘Example Search’: Open the database in Google Earth Enterprise Client. Click on ‘Example search’’ tab and enter “pacific heights” and click “Search”. One place should be found and the globe should pan and zoom to west California. Click on the found polygon. A popup should be displayed with the following text:The total area in decimal degrees of Pacific Heights is: 0.000203463059316The total perimeter in decimal degrees of Pacific Heights is: 0.0664409249373

Testing Snippets:

  1. Click on the ‘Snippet profiles’ tab.
  2. Click ‘Create New’.
  3. Enter ‘test_snippet’ in the Profile Name.
  4. Click ‘Create’.
  5. Click on ‘test_snippet’.
  6. Click on the drop-down menu titled “Add a new snippet set to the profile”.
  7. Select ‘use_ge_logo’.
  8. Select ‘False’.
  9. Add snippet profile to database and publish
  10. View the globe with missing logo and verify that the logo is indeed missing.