Can't load shpLayer

classic Classic list List threaded Threaded
3 messages Options
buaalhc buaalhc
Reply | Threaded
Open this post in threaded view
|

Can't load shpLayer

Hi~
This's the shp resource:



first earthfile:

<map name="Draped Lines Demo">

    <image name="world" driver="gdal">
        <url>../data/world.tif</url>
        <cache_policy usage="no_cache"/>
    </image>
               
    <feature_model name="world_boundaries">
           
        <features name="world" driver="ogr">
            <url>../data/world.shp</url>
            <build_spatial_index>true</build_spatial_index>
        </features>
               
        <styles>
            <style type="text/css"> world { stroke: #ffff00; stroke-width: 4px; altitude-clamping: terrain-drape; } </style>        </styles>
       
    </feature_model>
       
            <feature_model name="world_boundaries">
           
        <features name="beijing" driver="ogr">
            <url>http://192.168.2.154:8089/shp/beijing/lines.shp</url>
            <build_spatial_index>true</build_spatial_index>
        </features>
               
        <styles>
            <style type="text/css"> beijing { stroke: #ffff00; stroke-width: 4px; altitude-clamping: terrain-drape; } </style>        </styles>
       
    </feature_model>
       
 
</map>


But the result show:
" Resource unavailable : Invalid extent returned from "http://192.168.2.154:8089/shp/beijing/lines.shp""





 the Second earthFile :
<map name="Draped Lines Demo">

    <image name="world" driver="gdal">
        <url>../data/world.tif</url>
        <cache_policy usage="no_cache"/>
    </image>
 
    <feature_model name="world_boundaries">
           
        <features name="world" driver="ogr">
            <url>../data/world.shp</url>
            <build_spatial_index>true</build_spatial_index>
        </features>
               
        <styles>
            <style type="text/css"> world { stroke: #ffff00; stroke-width: 4px; altitude-clamping: terrain-drape; } </style>        </styles>
       
    </feature_model>
       
            <feature_model name="world_boundaries">
           
        <features name="beijing" driver="ogr">
            <url>http://192.168.2.154:8089/shp/beijing/lines.shp</url>
            <build_spatial_index>true</build_spatial_index>
                        <profile name=”myProfile”>
                        <srs>wgs84</srs>
                       
                </profile>       
        </features>
               
        <styles>
            <style type="text/css"> beijing { stroke: #ffff00; stroke-width: 4px; altitude-clamping: terrain-drape; } </style>        </styles>
       
    </feature_model>
</map>
When the program is running, no errors are generated.
result:


But 'beijing_lines_shp' is not displayed in the scene.

Why? Thanks!
buaalhc buaalhc
Reply | Threaded
Open this post in threaded view
|

Re: Can't load shpLayer

In fact, the essence of the problem is why the network data source does not work?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Can't load shpLayer

ESRI SHP is not a streaming format. Not sure if it will work, but try using the GDAL /vsicurl adapter like this:

<url>/vsicurl/http://192.168.2.154:8089/shp/beijing/lines.shp</url>

Hope that helps.
Glenn Waldron / Pelican Mapping