Quantcast

GML file not loading

classic Classic list List threaded Threaded
4 messages Options
akshay1192 akshay1192
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GML file not loading

Does osgEarth support GML loading. I am trying loading it using earth file but its not loading.
This is the earth file i am loading. If osgEarth loads GML , please tell me what is wrong with my earth file.
Earth file snippet
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GML file not loading

Did you get any console warnings? Which version of osgEarth are you using?

osgEarth supports GML subject to the restrictions here: http://www.gdal.org/drv_gml.html

You may need to add the property:

  ogr_driver="gml"

to your features block.

Or, try running

  gdalinfo Yo.gml

And see if you have a projection defined.

Hope this helps.

Glenn Waldron / Pelican Mapping
akshay1192 akshay1192
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GML file not loading

This post was updated on .
I have tried using ogr_driver property also but it did not help.

Yes , i am getting "Invalid feature source" warning from FeatureModelSource.When i dig into it , i found out geometry is coming out to be null.

ogrInfo - Layer SRS WKT : (unknown).

But i also tried loading another gml having Layer SRS WKT : GEOGCS["WGS 84",,,,,] , osgEarth is not giving any warning with this GML but did not load the gml either (tried loading the same gml in QGIS and its loading properly there)

I do not know what to do...........any further suggestions would be really helpful.

Thanks




 
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GML file not loading

Every source in osgEarth requires a spatial reference. So, you probably need an accompanying .prj file that contains the WKT spatial reference info.

You could also try to override it by adding this under your features block:

<profile>global-geodetic</profile>

...assuming the coordinates are lat/long. If they aren't you will need a custom profile (or a .prj file).

Hope this helps.
Glenn Waldron / Pelican Mapping
Loading...