Panoramas API
Panoramas API documentation. This API is used in the panorama and point cloud viewer of the geoportal.
Tables
Panoramas are defined in two tables. The mapia_panoramas_panorama table contains all the information about the panoramas:
Field | Definition |
---|---|
id | Autogenerated ID |
filename | Image name |
filetype | Image type (extension) |
sourceid | User-defined ID, can be used for sorting panoramas |
capture | Date and time of the panorama capture |
altitude | Altitude above sea level of the panorama |
roll | Angle with respect to the longitudinal axis |
pitch | Angle with respect to the transversal axis |
pan | Angle with respect to the vertical axis (orientation with the north) |
geom | Geometry, coordinates of the point |
project_id | Project defined in the mapia_panoramas_project table, where different MoMa campaigns are defined, for example |
category | String to define a category, for example, different floors of a building |
In the mapia_panoramas_project table, different Mobile Mapping projects are defined. It is usually associated with campaigns, for example, Panoramas 2018, Panoramas 2020, etc.
Field | Definition |
---|---|
id | Autogenerated ID |
code | Project code, for example, pano-2020 |
name | Project name, for example, Panoramas 2020 |
API URL
The panorama part is treated as an external module, not part of giscube admin, so it will be added as a plugin.
The Endpoint depends on the project in which we want to perform the search.
Endpoint | plugins/mapia_panoramas/api/projects/{project name}/panoramas/ | |
Example | https://rondes3d.infraplan.cat/apps/giscube-admin/plugins/mapia_panoramas/api/projects/pano/panoramas/ |
Authentication
This is a public API, no authentication is required.
Parameters
The search parameters for this API are as follows:
Parameter | Definition | Required | Example |
---|---|---|---|
p | Coordinates (lat, lng) of the point we are searching for | * | p=41.3997,2.1133 |
r | Search radius in meters | * | r=15 |
c | Search for those with the same category | c=floor_1 |
The API returns all the panoramas that are within the search radius (r), ordered by distance from the point (p).
Example | https://rondes3d.infraplan.cat/apps/giscube-admin/plugins/mapia_panoramas/api/projects/pano/panoramas/?p=41.3997,2.1133&r=15 |
From this search, we will get the following result:
[
{
"id":8027,
"project":"pano",
"category":null,
"filename":"181020_Track_H-Sphere-613.jpg",
"filetype":"JPG",
"sourceid":28325,
"capture":"2019-05-02T08:00:00Z",
"altitude":148.405115384189,
"roll":0.0,
"pitch":0.0,
"pan":-173.766304016036,
"geom": {
"type":"Point",
"coordinates": [
2.113266164076979,
41.3997155877604
]
}
},
{...},
{...}
]