Open Tekn1ck opened 4 years ago
Hi , it's quite simple, just use
slpk2vts path/to/input/slpk/file path/to/output/vts/dir --referenceFrame melown2015 --tilesetId ID
Where --referenceFrame
is a reference frame to use, you probably do not need anything else than melown2015
, otherwise use another one.
Replace ID with identifier of converted dataset, i.e. some-descriptive-name
(without spaces).
It'll take some time (and temporary disk space), depending on the size of input SLPK dataset. When done, the output can be served via vtsd directly as a standalone dataset or integrated with other datasets in a VTS storage.
Hello tekuchi, (seems Vaclav was a bit faster)
there is no step by step example at the moment (future reference for @michaelKosatka), however all *2vts
encoders have much the same interface so if you used e.g. 3dtiles2vts
or vef2vts
the command will be nearly the same.
Minimal command to run it (if you installed through vts-backend and you work on Earth):
slpk2vts --referenceFrame melown2015 --tilesetId <pick some suitable name/id> <input.spk> <output-path>
Optionally, you may wish to add --credits
but I'll elaborate more on it if needed.
After this finishes (may take a while at the beginning as it needs to analyze the dataset) you are left with VTS tileset. To see how to handle it, you can pick up relevant part of existing VTS Geospatial tutorial here - which show the work with similar tool vef2vts
- or here.
To view the tileset just after conversion, simply put it somewhere under /var/vts/store/<your path>
and browse to it http://yourserver:8070/store/
In case you need some more explanation/examples, do not hesitate to ask.
Thanks guys - I was nearly there. I think I should be able to manage this now. Is there any difference from your side between slpk 1.5 and 1.7? I just noticed this on my output options in my photogrammetry software. Do you guys have a slack channel or discord for the odd question here and there?
Ah - so now I have a small problem.
terminate called after throwing an instance of 'std::runtime_error'
what(): Invalid SLPK metadata format (Passed object doesn't have member
my metadata.json file looks like this
{ "ResourceCompressionType" : "GZIP", "i3sVersion" : "1.5", "ArchiveCompressionType" : "STORE", "folderPattern" : "BASIC" }
Any idea what I should do next?
My photogrammetry software exports to i3s and then converts to slpk version 1.5 - The software help suggests that if I need v 1.7 I should use this converter https://github.com/Esri/i3s-spec/blob/master/i3s_converter/i3s_converter_ReadMe.md
Do you think that would solve the issue?
Hi, it error looks strange (no missing property name logged) but looking at the provided metadata.json
I can see that it lacks nodeCount
property.
The only supported SLPK is a "integrated mesh" I3S dataset with hierarchical tiled mesh.
I am going back to them to ask why that information is not in the json file. It is an integrated mesh format so it should be there.
EDIT: Can you please send me an example metadata.json file so I can show to the photogrammetry software guys please? They want to understand what the format should be
Hi Vaclav. Do you think it would be possible to post an example JSON file today so I can forward on? I would love to get this up and running.
Nick
Hi,
here's link to SLPK metadata.json
in the I3S documentation:
https://docs.opengeospatial.org/cs/17-014r7/17-014r7.html#_metadata
As you can see, all fields are required, however all except one have default value, so the only required field in the file is nodeCount
. I.e. the minimum viable SLPK metadata.json
is {"nodeCount": 123}
where the actual value is the number of nodes in the whole dataset.
ESRI removed metadata.json
documentation from their github doc repo in the last commit -- I have no idea why.
EDIT:
Our photogrammetry providers have said that the nodecount is no longer required in later iterations of i3s/slpk formats and they are unlikely to add this back in to their exporter. Do you think it would be possible to remove the requirement for nodecount?
Hello tekuchi,
I filed the issue with i3s/SLPK, as current metadata.json docs seem to be missing on their GitHub. As you mentioned your photogrammetry provider, finding out what is their resource on the SLPK spec would help us get this fixed - though I cannot guarantee any time frame right now.
Hey, So actually this turned out to be very simple. I simply looked in the i3s folder and saw that there was 31171 folder so I made a new metadata.json file with the following line in it, converted to slpk and then used slpk2vts to convert.
{"nodeCount": 31171}
Hi again - so this worked previously, but I have just tried with with a different dataset and used exactly the same idea and now I am getting errors slpk2vts --referenceFrame melown2015 --tilesetId test2 /var/vts/mapproxy/datasets/test2/test2.slpk /var/vts/store/test2 2020-08-13 20:08:46 E2 [19163(main)]: File "nodes/0-2-1-1-1-2-2-1-3-3-7/3dNodeIndexDocument.json" not found in the zip archive at "/var/vts/mapproxy/datasets/test2/test2.slpk". {zip.cpp:istream():128} terminate called after throwing an instance of 'roarchive::NoSuchFile' what(): File "nodes/0-2-1-1-1-2-2-1-3-3-7/3dNodeIndexDocument.json" not found in the zip archive at "/var/vts/mapproxy/datasets/test2/test2.slpk". @{zip.cpp:istream():128} Aborted (core dumped)
Did you get any answers about the nodecount not being a part of the metadata.json docs any more - if this is no longer needed will the converter be updated?
Hi, I actually pinged them just today (and once before that). They promised to update the docs, so I hope they will. The error you posted might be related - looks like there were more structural changes in the format than this one.
Again, if it is possible for you to get your photogrammetry provider to share the docs they based their SLPK implementation upon, that would be great. Obviously, that document exists, but not on ESRI's github (where all the articles point to).
If you have a chance to provide the problematic SLPK we could then develop against, that would be much appreciated.
I have asked them to provide the informatiom - if possible perhaps we can have a chat about this on email. Shall I just write to Melown tech on the contact page?
Yep, that should get through. The idea now is to get all the prerequisites at hand (the file and the docs). Once that is done, it should be clearer how big is the actual task. Then we can discuss when and how we shall fit it among the other tasks we have.
Hi,
We have successfully set up the server and are now trying to work out how to use the slpk2vts tool. I have the commands that can be used, but there is no practical example of how this should work in the help so I have hit a wall with this. I have a large dataset in slpk 1.5 format that I am assuming I need to convert before it can be hosted.
Is there a step by step example of the process?