Home > Uncategorized > Scripting Carmenta Engine 5 – Part 3

Scripting Carmenta Engine 5 – Part 3

Carmenta Engine 5 configuration files (.px) are normally produced using Carmenta Studio. The interested user might have peeked into the file and found out that the objects are serialized to an xml dialect heavily influenced by XAML. This, of course, can be utilized in scripts. For example, assume we want to define an UTM10 coordinate reference system suitable for the lake tahoe sample data.

$snippet = [Carmenta.Engine.Configuration]::FromString(@”
    <Configuration Version=”5.1.0.0″ Namespace=”snippet” xmlns=”
http://www.carmenta.com/Engine5″>
      <Crs Name=”Nad27LakeTahoeUtm10N” Public=”true” Projection=”{ResourceReference Predefined=true,Value=Projections.Utm10N}”>
        <Crs.GeodeticDatum>
          <GeodeticDatum Ellipsoid=”{ResourceReference Predefined=true,Value=Ellipsoids.Clarke1866}”>
            <GeodeticDatum.DatumShift>
              <HelmertDatumShift DX=”-15.853″ DY=”148.791″ DZ=”188.423″/>
            </GeodeticDatum.DatumShift>
          </GeodeticDatum>
        </Crs.GeodeticDatum>
      </Crs>
    </Configuration> 
“@)

$snippet.GetPublicObject(“Nad27LakeTahoeUtm10N”)

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: