sitn / pytree

The potree python server application
8 stars 10 forks source link

Some completed example #28

Open chwu-rwth opened 1 year ago

chwu-rwth commented 1 year ago

Hi, I have followed the instructions but nothing seems to work.

# path to cpotree exectuable
  cpotree_executable: extract_profile
# Available point clouds. NOTE: pointclouds CRS must be the same as the APP, reprojection is not implemented!
  pointclouds:
    swissSURFACE3D: ./PCtree/Output/pointclouds/Potree/metadata.json
# point cloud to use in profile
  default_point_cloud: swissSURFACE3D 

I am unsure how is the "path to CPotree executable" and "default_point_cloud" is defined. Would be great if there is some example.

Docker-compose is as below:

version: "3.8"

services:
  api:
    image: sitn/pytree:1.0.5
    environment:
      DEPLOY_ENV: ${DEPLOY_ENV:-DEV}
    restart: unless-stopped
    command: /app/start_server.sh
    volumes:
      - ./PCtree/Output/pointclouds/Potree:/app/data
      - ./pytree.yml:/app/pytree.yml
    ports:
      - "${PORT:-6001}:5000"
maltaesousa commented 1 year ago

Hi @chwu-rwth,

The path to cpotree executable is in case you want to provide your own build of cpotree. You can let it by default, it should work.

default_point_cloud must be one of the keys defined in pointclouds, so your config looks ok. You can rename swissSURFACE3D to something else if you want but you'll have to do it inside pointclouds and in default_point_cloud.

The only thing that looks wrong, is the path to metadata.json in your pytree.yml. You are inside the container so your path should be ./data/metadata.json. Also, if it's still not working, make sure the metadata.json is really accessible inside you container by going inside and running a ls /app/data.

chwu-rwth commented 1 year ago

I have changed the path to ./data/metadata.json. But it doesn't seem to work. The 'metadata.json' is indeed mounted correctly. Screenshot 2023-01-24 225622 Flask app seems to be running properly as i can access http://localhost:6001 but not http://localhost:6001/pytree Any idea what might be wrong? Is there any specific location where 'pytree.yml' must be saved in?