[mapguide-users] SHP Load problem

Yewondwossen Assefa assefa at dmsolutions.ca
Wed Jul 26 21:22:07 EDT 2006


I just realized that there must be a projection (prj) file attached to 
the shape files for this to work properly.  With a valid prj file, It 
works as advertised.

Yewondwossen Assefa wrote:
> 
> Hi There,
> 
>  There was a thread a while ago about loading sdf/shape files using the 
> mapagent's load resource service. A detailed solutions was provided by 
> Traian 
> (https://mapguide.osgeo.org/servlets/ReadMsg?listName=users&msgNo=321).
>  I was trying this today and did manage to apply the solution with sdf 
> files but I am having trouble with shape files.
> 
>  The resource content looks something like this :
> 
> <?xml version="1.0" encoding="utf-8"?>
> <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.3.0</Provider>
>   <Parameter>
>     <Name>rail.shp</Name>
>     <Value>C:\temp\rail\</Value>
>   </Parameter>
> </FeatureSource>
> 
> I have set the Name parameter to diffrent values such as 
> DefaultFileLocation, empty string, name of the file with and without 
> extension. I have also played with the Value parameter (giving the path 
> to the directory, givin the full path to the shp file ...) .
> 
> When I execute the load resource, the feature resource is created but it 
> does not to seem valid. When creating a layer element in Studio, It 
> indicates that the data resource is invalid.
> 
> As I mentioned It worked with sdf files.  Do someone know what could be 
> wrong ?
> 
> Thanks
> 
> 
> 


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------






More information about the Mapguide_users mailing list