Panorama Rendering API

Our Panorama Rendering API is a REST service that you can use to create cut-outs of Cyclomedia panoramic images. Based on an address or coordinates you can render JPG files that can be used for a variety of documents and publications, including websites. In addition, the JPG cut-outs can also be used for texturing 3D models. The Panorama Rendering API is our most simple API to integrate Cyclomedia’s street-level imagery into your work.

Picture

Obtain API credentials

Before you can start using this API, you need to have an API Key and login credentials. If you do not have them yet, please use this form to request access.

Request your API credentials
Picture

Read the documentation

Everything you need to know about the Panorama Rendering API can be found in this API Reference Document.

Download the API documentation
Picture

View our examples

To help you getting started, we have created a set of code examples for you. You can use them as a basis for your own REST requests.

Explore the code examples

API documentation

Overview of parameters and Output modifiers

Parameters

recordingId

The id of the recording, e.g. 510M5HLV

width

The width of the generated image in pixels. 0 = automatically use the width that corresponds to the optimal resolution

Default = 1024

Max = 8192

height

The height of the generated image in pixels. 0 = automatically use the height that corresponds to the optimal resolution.

Default = 768

Max = 8192

srsName

Spatial reference system The definition of the srs is necessary to accomplish the "meridian convergence" correction for the given If not defined, the native reference system (ETRS89) is used. epsg:28992 = RD

yaw

Horizontal direction in degrees in the centre of the generated image. The yaw is expressed and used as a global yaw in the given spatial reference system (srs). 0 = north direction rendered in centre of image (Default).

Default = 0

direction

Horizontal direction in degrees relative to the RecorderDirection (driving direction). This parameter overrides the yaw parameter, when used.

pitch

Vertical direction in degrees in the centre of the generated image. 0= horizon rendered in center of the image (Default).

Default = 0

Range = -90,90

hfov

Horizontal field of view in degrees.

Default = 90

Max = <180

srs

EPSG code of the spatial reference system, without prefix.

x or lon

X coordinate in metres for a projected coordinate system, in degrees for a geographic coordinate system.

y or lat

Y coordinate in metres for a projected coordinate system, in degrees for a geographic coordinate sysrtem.

index

Not used of omitted or set to -1. Otherwise the images are based on views from a multiple of 3 nearby recording locations. 0 = left, 1 =central (same as when omitted), and 2 = right. The views are directed to the requested location.

Default = -1

Range = 0,1,2

z

Z coordinate in metres.

country

2 letter country abbreviation. i.e. NL

address

Address to be queried.

coordinates

A semicolon seperated list of 4 coordinates in the format of: x;y;z;x;y;z; x;y;z;x;y;z These must be clockwise (as seen from the outside of the building)and should respectively denote the upper left, upper right, lower right and lower left corner, as seen from the observer.

margin

Applies an outward margin both horizontally and vertically to the surface the coordinates describe. (Note: this does affect the returned image’s aspect ratio compared to the actual surface) The margin may be negative, serving as an inward margin.

Default = 0

maxElevation

Sets a maximum elevation angle in degrees that any point of the surface may have from recording locations. A lower maximum elevation enforces a better resolution near the top of tall buildings. This parameter helps ensure a minimum in the quality of a view of high buildings and a more evenly distributed resolution.

Default = 75

Max = <90

maxDistanceToHeightRatio

A floating point value that bounds - relative to the surface height- the horizontal distance between the recording and the surface centre. (This can help minimize occlusion for automated calls e.g. the back sides of houses with backyards; where error responses may be favorable to occluded images).

IncludeHistoricRecordings

Boolean (optional)

Default = false

apiKey

The developer key obtained from CycloMedia to authorize access to this service.

If you do not have an API Key already, you can request one through our Service Desk.

Output modifiers

With the output format and functionalities parameters, the output can be modified. Instead of an image, xml data can be returned, containing the meta data related to the result.
Note: The RenderSurfacemethod returns only a subset of the information below since yaw, pitch and roll are not applicable to its output; please see section Understanding RenderSurface on the left.

This extra functionalities can be accessed with following parameters:

format

Value: xml. The output will be forced to be xml metadata.

filename

A download dialog will be forced with the suggested filename.

Output XML Metadata

width

Units: pixels. Width of the rendered image.

height

Units: pixels. Height of the rendered image

recording-id

Id of the recording used to render the image.

recording-date

Units: ISO date-time. Recording date-time

focal-length

Units: pixels. Focal length.

hfov

Units: degrees. Horizontal field of view.

vfov

Units: degrees. Vertical field of view.

yaw

Units: degrees. Horizontal direction in the centre of the generated image.

The yaw is expressed and used as a global yaw in the requested spatial reference system (recording-location-srs).

0= north direction rendered in centre of image.

pitch

Units: degrees. Vertical direction in degrees in the centre of the generated image.

0 = horizon rendered in centre of the image.

roll

Units: degrees. Always 0.

recording-location-srs-base

EPSG code of the base spatial refence system base of the recording location persisted values.

recording-location-lon

Units: degrees. Longitude.

recording-location-lon-precision

Units: metres. Longitude precision.

recording-location-lat

Units: degrees. Latitude.

recording-location-lat-precision

Units: metres. Latitude precision.

recording-location-height

Units: metres. Ellipsoïdal height, omitted if not defined.

recording-location-height-precision

Units: metres. Ellipsoïdal height precision.

recording-location-groundleveloffset

Units: metres. Groundlevel offset.

recording-yaw-precision

Units: degrees. Yaw precision.

recording-location-srs

EPSG code of the requested spatial reference system.

recording-location-x

Units: metres. X coordinate value in the requested spatial reference system.

recording-location-y

Units: metres. Y coordinate value the requested spatial reference system.

recording-location-z

Units: metres. Z value in the related spatial height system, omitted if height is not defined or if there is no related spatial height system.

url

Corresponding URL that can be used to really render the image.

Examples:

Generate XML data:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/Render/5B0Q4X2T?width=1024&height=786&srsName=epsg:28992&yaw=0&pitch=0&hfov=90&format=xml&apiKey=<put_your_api_key_here>
<?xml version="1.0" ?>
<RenderingMetaData
url="https://atlasapi.cyclomedia.com/api/PanoramaRendering/Render/5B0Q4X2T/"
recording-id="5B0Q4X2T"
recording-date="2011-04-07T12:13:35.29+02:00"
width="1024"
height="786"
focal-length="512.000"
hfov="90.000"
vfov="75.018"
yaw="0.000"
pitch="0.000"
roll="0.000"
recordinglocation-srs-base="EPSG:4258"
recording-location-lon="5.248527411"
recordinglocation-lon-precision="0.012"
recording-location-lat="51.832667432"
recordinglocation-lat-precision="0.010"
recording-location-height="48.788"
recording-locationheight-precision="0.016"
recording-location-groundleveloffset="2.00"
recordinglocation-yaw-precision"0.0077"
recording-location-srs="EPSG:4258"
recordinglocation-x="5.249"
recording-location-y="51.833"
recording-location-z="48.788" />

Download dialog for XML:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/Render/5B0Q4X2T/?width=1024&height=786&srsName=epsg:28992&yaw=0&pitch=0&hfov=90&format=xml&filename=ABC&apiKey=<put_your_api_key_here>

Download dialog for JPG:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/Render/5B0Q4X2T/?width=1024&height=786&srsName=epsg:28992&yaw=0&pitch=0&hfov=90&filename=ABC&apiKey=<put_your_api_key_here>

Operations and response

Operations

The Panorama Rendering API is a REST service that uses basic authentication. The following operations are possible:

  • Render, renders an image based on the id of a recording. Request format:

/Render/{recordingId}/?width=<width>&height=<height>&srsName=<srsName>&yaw=<yaw>&pitch=<pitch>&hfov=<hfov>&apiKey=<apiKey>

The Vertical Field of view (VFov) is a result of the other parameters. To achieve a certain VFov a combination of the HFov and the width height ratio can be used. i.e when the requested width and height are equal, the VFov is also equal to the HFov.

  • RenderByLocation2D, renders an image based on the nearest recording to a given location. The image is automatically directed horizontally and vertically to the given location. The z system used is automatically related to the coordsystem <srs>. Request format:

/RenderByLocation2D/{srs}/{x|lon}/{y|lat}/?width=<width>&height=<height>&hfov=<hfov>&apiKey=<apiKey>
  • RenderByLocation3D, renders an image based on the nearest recording to a given location. The image is automatically directed horizontally and vertically to the given location. The z system used is automatically related to the coordsystem <srs>. Request format:

/RenderByLocation3D/{srs}/{x|lon}/{y|lat}/{z}/?width=<width>&height=<height>&hfov=<hfov>&apiKey=<apiKey>
  • RenderByAddress, renders an image based on the nearest most recent recording to a given address location. The image is automatically directed horizontally to the given address location. Request format:

/RenderByAddress/{country}/{address}/?width=<width>&height=<height>&pitch=<pitch>&hfov=<hfov>&apiKey=<apiKey>
  • RenderSurface, returns an image of a flat surface as defined by a set of four coordinates, which -as seen from an observer- respectively define the upper left, upper right, lower right and lower left corners of the surface. RenderSurfaceautomatically selects potentially suitable recording location. For more details, see Understanding RenderSurface. Request format:

/RenderSurface/{srs}/{coordinates}/?index=<index>&margin=<margin>&maxElevation=<maxElevation>&apiKey=<apiKey>
  • ListByAddress, lists the recordings nearest to a given address location, includes historical recordings. The horizontal direction to the given address location is also returned. The result data is returned in XML format. The output list is ordered according to the distance to the given address location. Request format:

/ListByAddress/{country}/{address}/?IncludeHistoricRecordings=<IncludeHistoricRecordings>&apiKey=<apiKey>
  • ListByLocation2D, lists the recordings nearest to a given 2D location, includes historical recordings. The horizontal direction to the given given location is also returned. The result data is returned in XML format. The output list is ordered according to the distance to the given address location. Request format:

/ListByLocation2D/{srs}/{x}/{y}/?IncludeHistoricRecordings=<IncludeHistoricRecordings>&apiKey=<apiKey>
  • ListByCoordinates, lists the recordings nearest to a given surface, includes historical recordings. The horizontal direction to the given service is also returned. The result data is returned in XML format. The output list is ordered according to the distance to the given address location.

/ListByCoordinates/{srs}/{coordinates}/?IncludeHistoricRecordings=<IncludeHistoricRecordings>&apiKey=<apiKey>

With the exception of your API Key, parameters after the question mark “?” may be omitted. The default values as listed on the right under "Overview of parameters" will then be used instead.

Understanding RenderSurface

Selection of Suitable Recording Location

RenderSurface returns an orthogonal view that appears to be taken exactly in front of a specified surface, from a source recording location which was not. The quality of the output depends on the recording location that was used; steeper angles will negatively influence results.

RenderSurface considers the following when rendering a building facade:

  • It will discount any recording that is not located in front of the surface. Similarly, any recording made too close to a tall building, is discounted.

  • The remaining recordings are ordered by an index that represents the match on horizontal angle and distance, as per below image.

1 - Currently surfaces that are virtually completely horizontal, such as roofs or sections of road, are not supported and may result in an error code.

2 - A rectification takes place based on the normal of the surface, where the normal is found by using the first 3 coordinates.

3 - “maxElevation” is used to specify when recordings are deemed too close to be suitable.

In above image we see that various recordings are not suitable for generating a view of the surface. The numbered dots represent recording locations that have been indexed based on their maximum horizontal theoretical image quality.

This figure demonstrates how three fictional recording locations yield varying image resolution potential, as determined by the horizontal angles between the measurement points at the surface centre. Recordings are automatically ordered by this theoretical horizontal image quality.

In general, one can expect index 0 to contain the highest resolution image with the least chance of occlusion. Conversely, higher indexes will produce higher incidence of occlusion and a lower overall resolution. (Note: In figure 1, the default “maxElevation” angle limit forced what would have been index 0 and 1 to be discounted out-of-hand; with a lower building or increased “maxElevation” tolerance this would not have happened).

In this example, for best results, the API user should choose index 3 to get an unobstructed view of the specified surface, as index 0 through 2 contain trees.

Occlusion and High Buildings

Due to the propensity toward occlusion with distance it is not prudent to automatically index recording locations for their quality based on the vertical angle towards the surface; This would prioritize recording locations that are further away, causing lower resolution imagery while also being more likely to produce occlusion.

Instead of taking the elevation angle into account when indexing images, a maximum desired elevation “maxElevation” can be used instead. A default value of 75 degrees is used.

With this knowledge an API user can take two distinct approaches in dealing with “RenderSurface” with regard to tall buildings:

A. Increase the index until no occlusion occurs (trying possibilities #0,#1 and #2, before arriving at #3)

B. Increase the maximum allowed elevation, such that index 0 is as close to the surface as possible, minimizing the chance of occlusion. (Doing so may however severely impact the quality the output image).

The parameters for achieving optimal results vary from situation to situation.

Note that when using source recordings which have a steep angle towards the defined surface, any errors that are present in either the surface coordinates and/or the orientation are amplified. To account for this influence, it may be advisable to specify a margin using the parameter “margin” to offer some required leeway.

Possible error messages

The following error messages may be returned when a call is made toRenderSurface that cannot be completed:

  • "There are no recordings that contain the front of the given surface."
    This error indicates there are no (authorized) recordings that are both within 300 metres and can contain the front of the surface.

  • "There are no recordings with an acceptable elevation towards the surface (current parameter 'maxElevation={maxElevation}' degrees.)"

    This error can occur for very tall surfaces or those located very high; it can be resolved by increasing the limit on maxElevation

  • "The Surface Rendering candidate at (zero based) index {index}does not exist. There are only {maxIndex+1} recordings enumerated within the radius currently defined. Occurs when trying to access an index that doesn’t exist."

    This error indicates that an attempt was made to access an index that did not exist.

  • "There are no recordings within the specified distance of{Distance}. (Determined with maxDistanceToHeightRatio='{maxDistanceToHeightRatio}' multiplied by the surface height which was calculated as being: '{surfaceHeight}')"

    This error results when no recordings were within a maximum distance defined as: maximum distance = ( SurfaceHeight × maxDistanceToHeightRatio )

Metadata Pertaining to RenderSurface

The XML and Header output of the RenderSurface method differs from the other methods in that it contains no fields that pertain to the yaw,pitch or roll. Here is the full example output of the call matching that of the url attribute:

<SurfaceRenderingMetaData 
url="https://atlasapi.cyclomedia.com/api/PanoramaRendering/RenderSurface/28992/146146.237900;420960.062190;15.5987216758;146151.119766;420960.550906;15.4933704670;146151.123472;420960.639873;10.4842588117;146146.163319;420960.143950;10.5556708197/?apiKey=abcdef12345&format=xml"
recording-id="5D35XF24"
recording-date="2015-02-18T10:40:41.98+00:00"
width="666"
height="680"
recording-location-lon-precision="0.026"
recording-location-lat-precision="0.018"
recording-location-height-precision="0.023"
recording-location-groundleveloffset="2.01"
recording-location-srs="EPSG:28992"
recording-location-x="146146.039"
recording-location-y="420954.089"
recording-location-z="5.152"/>

Response format

The response of all methods is a JPG image for the runtime rendered image, if not specified otherwise. Metadata is returned in HTTP response headers, for example:

Recording-Id: 5D0G4E8O
Recording-Date: 2011-09-15T12:48:07.5900000+02:00
Render-Width: 1024
Render-Height: 786
Render-FocalLength: 512.000
Render-HFov: 90.000
Render-VFov: 75.018
Render-Yaw: 0.000
Render-Pitch: 0.000
Render-Roll: 0.000
RecordingLocation-SrsBase: EPSG:4258
RecordingLocation-Longitude: 5.089819277
RecordingLocation-LongitudePrecision: 0.008
RecordingLocation-Latitude: 52.109259974
RecordingLocation-LatitudePrecision: 0.004
RecordingLocation-Height: 46.918
RecordingLocation-HeightPrecision: 0.009
RecordingLocation-GroundLevelOffset: 2.01
RecordingLocation-YawPrecision: 0.0075

Error response format

On input or processing error cases an XML error message is returned.

ResponseHeader:

Content-Type: application/xml; charset=utf-8

ResponseBody:

<Fault xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<detail>The specified address was not found by ...</detail>
<faultcode>404</faultcode>
<faultstring>NotFound</faultstring>
</Fault>

HTTP response codes:

The normal behaviour of REST web services is, to return HTTP status codes that correspond to the situation, if appropriate. This is also the case for this REST web service.

It is however possible to override this behaviour to make some integrations easier/possible.

When “ReturnHttpErrors=0” is defined, the service itself will always return a 200 response code. The original designated HTTP response code is always reflected in the “faultcode” field of the XML error message.

Code examples

Render by recording ID

Render an image based on the ID of a recording.

Example request based on a recording ID:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/Render/WE4AUJX6/?apiKey=
YourKeyGoesHere&width=1024&height=768&srsName=EPSG:28992&yaw=180

Render by coordinates

In these two examples, you will render an image of the Cyclomedia panoramic image that is closest to the specified coordinates.

Example request with a location in 2D coordinates:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/RenderByLocation2D/28992/
94313.15/435711.11/?width=1024&height=786&apiKey=YourKeyGoesHere&index=0

Example request with a 3D location:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/RenderByLocation3D/28992/
170126.70/440818.50/21.80/?width=1024&height=786&apiKey=YourKeyGoesHere&index=0

Render by address

These examples show how to render an image based on an address in the Netherlands and Belgium.

Example requests based on address:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/RenderByAddress/NL/Tramstraat%2037,%20Eindhoven%205611CN/?apiKey=YourKeyGoesHere 
https://atlasapi.cyclomedia.com/api/PanoramaRendering/RenderByAddress/BE/Snoekstraat%2012,%20Gent/?width=1024&height=786&apiKey=YourKeyGoesHere

Render a surface (texture)

This example returns an image of a flat surface as defined by a set of four coordinates. This is typically useful for creating surfaces (textures) on 3D models.

Example request for a traffic sign on a Dutch highway:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/RenderSurface/28992/163939.296444;379550.768569;32.5940330406;163939.271713;379555.715094;32.5827216870;163939.232470;379555.677124;28.1069348311;163939.257536;379550.711447;28.1455324211/?apiKey=YourKeyGoesHere&maxelevation=65

Example request for the side of a building:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/RenderSurface/28992/146221.595064;422841.765794;19.8390183574;146228.364368;422885.049088;20.0455430786;146228.391984;422885.111286;2.85253280443;146221.613937;422841.773320;2.83150864639/?apiKey=YourKeyGoesHere&index=1&margin=1.5

Retrieve a list of recordings

In these examples, you can retrieve a list of recordings that are nearest to an address, 2D location (coordinates) or surface (series of coordinates).

Example requests for addresses in the Netherlands and Belgium:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/ListByaddress/NL/Eindhoven%20M arkt%202/?apiKey=YourKeyGoesHere

The output for this request is:

<?xml version="1.0" encoding="utf-8"?>
<imagedirection_list>
  <imagedirection recording-id="WE7KBPEM" 
recording-date="2023-07-24T07:07:56.79Z" 
viewing-direction="75.89607105873029" />
    <imagedirection recording-id="WE7KBPEL" 
recording-date="2023-07-24T07:07:55.14Z" 
viewing-direction="92.9422700037514" />
    <imagedirection recording-id="WE7KBPEN" 
recording-date="2023-07-24T07:07:58.5Z" 
viewing-direction="55.487747990601235" />
    <imagedirection recording-id="WE7KBPEK" 
recording-date="2023-07-24T07:07:53.63Z" 
viewing-direction="105.17740525563069" />
    <imagedirection recording-id="WE7KBPEO" 
recording-date="2023-07-24T07:08:00.27Z" 
viewing-direction="36.280820732106875" />
    <imagedirection recording-id="WE7KBPEJ" 
recording-date="2023-07-24T07:07:52.19Z" 
viewing-direction="113.39879050162166" />
    <imagedirection recording-id="WE7KBPEP" 
recording-date="2023-07-24T07:08:01.96Z" 
viewing-direction="21.535470733438878" />
    <imagedirection recording-id="WE7KBPEI" 
recording-date="2023-07-24T07:07:50.74Z" 
viewing-direction="118.99022684629837" />
    <imagedirection recording-id="WE7KBPEQ" 
recording-date="2023-07-24T07:08:03.61Z" 
viewing-direction="11.212487083590055" />
    <imagedirection recording-id="WE7KBPEH" 
recording-date="2023-07-24T07:07:49.29Z" 
viewing-direction="122.8706154540448" />
    <imagedirection recording-id="WE7KBPER" 
recording-date="2023-07-24T07:08:05.24Z" 
viewing-direction="4.052533023508913" />
</imagedirection_list>
https://atlasapi.cyclomedia.com/api/PanoramaRendering/ListByAddress/BE/Snoekstraat%2012,%20Gent/?apiKey=YourKeyGoesHere
<?xml version="1.0" encoding="utf-8"?>
<imagedirection_list>
<imagedirection recording-id="WE3OJAX0" 
recording-date="2021-10-13T13:43:47.97Z" 
viewing-direction="-115.36083088867326" />
<imagedirection recording-id="WE3OJAWZ" 
recording-date="2021-10-13T13:43:47.24Z"
viewing-direction="-145.15057142426846" />
   ......
    <imagedirection recording-id="WE3OJAX5" 
recording-date="2021-10-13T13:43:51.17Z" 
viewing-direction="-73.52135850850985" />
</imagedirection_list>

Example request for a list of recordings based on 2D coordinates:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/ListByLocation2D/28992/161430.23 /383122.57?ApiKey=YourKeyGoesHere
<?xml version="1.0" encoding="utf-8"?>
<imagedirection_list>
<imagedirection recording-id="WE7KBPN3"
recording-date="2023-07-24T07:19:09.29Z"
viewing-direction="62.648596474726986" />
.....
<imagedirection recording-id="WE7KBPMJ"
recording-date="2023-07-24T07:18:24.27Z"
viewing-direction="166.38892940209462" />
</imagedirection_list>

Example request for a list of recordings based on a series of coordinates:

https://atlasapi.cyclomedia.com/api/PanoramaRendering/ListByCoordinates/28992/163939.296444;379550.768569;32.5940330406;163939.271713;379555.715094;32.5827216870;163939.232470;379555.677124;28.1069348311;163939.257536;379550.711447;28.1455324211?ApiKey=YourKeyGoesHere
<?xml version="1.0"?>
<imagedirection_list>
<imagedirection recording-id="WE6PZUIR"
recording-date="2023-04-07T09:38:42.35Z"
viewing-direction="-38.74933734623431" />
.....
<imagedirection recording-id="WE6Q20UZ"
recording-date="2023-04-06T06:31:26.6Z"
viewing-direction="-43.961897860207" />
</imagedirection_list>