Layer not showing Coordinate system override from feature source

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Layer not showing Coordinate system override from feature source

evegaba
I have a shape file feature source and I have added it a Coordinate system override as seen below:

LOCAL_CS["Non-Earth (Kilometer)",LOCAL_DATUM["
Local Datum",0],UNIT["Kilometer", 1000],AXIS["X",EAST],AXIS["Y",NORTH]]

If I preview it in Maestro, I can easily drill down to it the deepest scale, and coordinate system appears to be as defined above.  I can see that conversion from Non-Earth (Meter) to Non-Earth(Kilometer) is done correctly and map displays as expected.

The problem is when I create a layer out of it. The conversion just doesn't happen and If I preview such layer I can't get to the same scale. Am I missing something here ? Is this supposed to happen ?

Any pointers will be more than welcome.

I'm using Mapguide OpenSource 2.6 and Maestro 6.0a1

Regards,

Ernesto



--
"If opportunity doesn't knock, build a door."



_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Layer not showing Coordinate system override from feature source

Steve Golden
It might be helpful if you can post your layer definition xml file.  In Maestro open the layer and click on the "Edit as XML" and copy/paste/post to response.
Reply | Threaded
Open this post in threaded view
|

Re: Layer not showing Coordinate system override from feature source

evegaba
Thanks Steve. Here is my layer definition:

<?xml version="1.0"?>
<LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.4.0" xsi:noNamespaceSchemaLocation="LayerDefinition-2.4.0.xsd">
  <VectorLayerDefinition>
    <ResourceId>Library://Chile/Data/calles_ciudades_y_provincia.FeatureSource</ResourceId>
    <Watermarks />
    <FeatureName>Default:calles_ciudades_y_provincia</FeatureName>
    <FeatureNameType>FeatureClass</FeatureNameType>
    <PropertyMapping>
      <Name>FeatId</Name>
      <Value>FeatId</Value>
    </PropertyMapping>
    <PropertyMapping>
      <Name>NAME</Name>
      <Value>NAME</Value>
    </PropertyMapping>
    <Geometry>Geometry</Geometry>
    <VectorScaleRange>
      <LineTypeStyle>
        <LineRule>
          <LegendLabel />
          <LineSymbolization2D>
            <LineStyle>Solid</LineStyle>
            <Thickness>1</Thickness>
            <Color>ff000000</Color>
            <Unit>Points</Unit>
            <SizeContext>MappingUnits</SizeContext>
          </LineSymbolization2D>
        </LineRule>
      </LineTypeStyle>
    </VectorScaleRange>
  </VectorLayerDefinition>
</LayerDefinition>


I see no reference to the Coordinate System. Perhaps it is inherited from the feature source. Which is below:

<?xml version="1.0"?>
<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
  <Provider>OSGeo.SHP</Provider>
  <Parameter>
    <Name>DefaultFileLocation</Name>
    <Value>%MG_DATA_FILE_PATH%calles_ciudades_y_provincia.shp</Value>
  </Parameter>
  <SupplementalSpatialContextInfo>
    <Name>Non-Earth (Meter)</Name>
    <CoordinateSystem>LOCAL_CS["Non-Earth (Kilometer)",LOCAL_DATUM["Local Datum",0],UNIT["Kilometer", 1000],AXIS["X",EAST],AXIS["Y",NORTH]]</CoordinateSystem>
  </SupplementalSpatialContextInfo>
</FeatureSource>

I appreciate your help on this.

Ernesto

Reply | Threaded
Open this post in threaded view
|

Re: Layer not showing Coordinate system override from feature source

Jackie Ng
In reply to this post by evegaba
Coordinate conversions done by Maestro are a mixed bag. The reason is that Maestro doesn't use CS-Map at the moment for coordinate conversions and the current mapagent does not offer any interface for transforming coordinates from one coordinate system to another. Maestro currently uses Proj.Net to do client-side transformations of coordinates.

As a result, some coordinate conversions either aren't perfect or don't happen at all.

In the meantime, you could write a piece of disposable web tier code using the MgCoordinateSystem* APIs to do this extent number crunching, or use the mapguide-rest extension which has a /services/transformcoords endpoint for transforming coordinates. Then just manually put in the transformed coordinates into your

- Jackie