Quantcast

FeatureSourceOGR

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

FeatureSourceOGR

Hi
I would like to know how would I use FeatureSourceOGR  to write a transaction (insert feature) through a url.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FeatureSourceOGR

Please look at the osgearth_featureinfo.cpp example; This shows how to open an OGR feature source for writing. In the example it does so to delete a feature, but you can call features->insertFeature() to do an insertion.

Good luck!
Glenn Waldron / Pelican Mapping
andreahmed andreahmed
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FeatureSourceOGR

how do I create a feature ?
andreahmed andreahmed
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FeatureSourceOGR

also set user value gives compilation error. I would like to know how to create a feature and set user value. please provide an example. Thanks a lot.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FeatureSourceOGR

Create an osgEarth::Features::Feature object and call a set() method.

What have you tried?
What is the compilation error?
What does your code look like?

Please provide as much information as possible when asking questions. Thanks.
Glenn Waldron / Pelican Mapping
andreahmed andreahmed
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FeatureSourceOGR

Feature *feature = new Feature(140); // does not work compilation error

    feature->setName("ahmed");
    feature->set("type","AIS");
    feature->set("global", "true");
    feature->set("lat", 11);
    feature->set("lom", 14);
    features->insertFeature(feature);

From: gwaldron [via osgEarth] [mailto:ml-node+s2174485n7590414h88@n2.nabble.com]
Sent: Tuesday, January 31, 2017 2:19 PM
To: Ahmed Tolba
Subject: Re: FeatureSourceOGR

Create an osgEarth::Features::Feature object and call a set() method.

What have you tried?
What is the compilation error?
What does your code look like?

Please provide as much information as possible when asking questions. Thanks.
Glenn Waldron / Pelican Mapping / @glennwaldron<http://twitter.com/#!/glennwaldron>

________________________________
If you reply to this email, your message will be added to the discussion below:
http://forum.osgearth.org/FeatureSourceOGR-tp7590408p7590414.html
To unsubscribe from FeatureSourceOGR, click here<http://forum.osgearth.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7590408&code=YWhtZWQudG9sYmFAc2NoaWViZWwubmV0fDc1OTA0MDh8LTIxODU4MDQ0OQ==>.
NAML<http://forum.osgearth.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FeatureSourceOGR

Since there's no public constructor with that signature, I will have to assume that is the compilation error you are getting.

Please refer to the Feature header:

https://github.com/gwaldron/osgearth/blob/2.8/src/osgEarthFeatures/Feature#L138

A Feature requires a Geometry, an SRS, and optional attributes.
Glenn Waldron / Pelican Mapping
Loading...