Jump to content
  • How to set a Projection for a Map Chart Layer in Spotfire® Using IronPython Scripting


    This example shows how to set the projection for a Map Chart layer. For more information on projections and Coordinate Reference Systems, see Spotfire Analyst User's Guide.

    Code Sample

    # Copyright © 2020. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
    from Spotfire.Dxp.Application.Visuals import *
    from Spotfire.Dxp.Application.Visuals.Maps import *
    for layer in mapchart.Layers:
    	if layer.Title == "Image Layer":		
    		#Creating a projection using an EPSG code
    		#Available since 6.5.0
    		layer.Projection = Projection("EPSG:3857")
    		#Creating a projection using an proj4 definition
    		#Available since 10.8.0
    		#For more info about proj4 definitions https://proj.org/
    		layer.Projection = Projection("Imported:1", "+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +units=m +datum=WGS84 +no_defs", "Generated CRS")


    License: BSD License



    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...