Giter Site home page Giter Site logo

Comments (4)

rwarren2 avatar rwarren2 commented on June 21, 2024

See the redland library bindings. You are better off to create the content in memory and then serialize it out to the web server - at least for the headers.
http://librdf.org/

from elevation-spec.

markfarrell avatar markfarrell commented on June 21, 2024

Using redland/librdf. Are these responses correct?

N-triples example:

GET http://.../?bbox=2.3,50.35,2.35,50.40&format=ntriples&scale=90&proj=wgs84

_:2f60a0dbca51c3b2e010dc050ebb8b8b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
_:2f60a0dbca51c3b2e010dc050ebb8b8b <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30041666666666655" .
_:2f60a0dbca51c3b2e010dc050ebb8b8b <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323" .
_:2f60a0dbca51c3b2e010dc050ebb8b8b <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "104" .
_:44bb8c69da389a0b9047572cab6eee1c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
_:44bb8c69da389a0b9047572cab6eee1c <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30125000000000002" .
_:44bb8c69da389a0b9047572cab6eee1c <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323" .
_:44bb8c69da389a0b9047572cab6eee1c <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "102" .
_:09224095e8a6343159d353062ac50754 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
_:09224095e8a6343159d353062ac50754 <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30208333333333304" .
_:09224095e8a6343159d353062ac50754 <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323" .
_:09224095e8a6343159d353062ac50754 <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "100" .
_:68dcf28d43d9fb664ed7281ce1e474cc <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
_:68dcf28d43d9fb664ed7281ce1e474cc <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.3029166666666665" .
_:68dcf28d43d9fb664ed7281ce1e474cc <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323" .
_:68dcf28d43d9fb664ed7281ce1e474cc <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "99" .
_:a315457873e711b9a47afb79c8158063 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
_:a315457873e711b9a47afb79c8158063 <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30374999999999996" .
_:a315457873e711b9a47afb79c8158063 <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323" .
_:a315457873e711b9a47afb79c8158063 <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "98" .
_:4b110d12fd76e501fbd6f1f8e943ae6b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2003/01/geo/wgs84_pos#Point> .
_:4b110d12fd76e501fbd6f1f8e943ae6b <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30458333333333298" .
_:4b110d12fd76e501fbd6f1f8e943ae6b <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323" .
_:4b110d12fd76e501fbd6f1f8e943ae6b <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "95" .
...

RDF/XML example:

GET http://.../?bbox=2.3,50.35,2.35,50.40&format=rdf/xml&scale=90&proj=wgs84

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:nodeID="2f60a0dbca51c3b2e010dc050ebb8b8b">
    <rdf:type rdf:resource="http://www.w3.org/2003/01/geo/wgs84_pos#Point"/>
  </rdf:Description>
  <rdf:Description rdf:nodeID="2f60a0dbca51c3b2e010dc050ebb8b8b">
    <ns0:long xmlns:ns0="http://www.w3.org/2003/01/geo/wgs84_pos#">2.30041666666666655</ns0:long>
  </rdf:Description>
  <rdf:Description rdf:nodeID="2f60a0dbca51c3b2e010dc050ebb8b8b">
    <ns0:lat xmlns:ns0="http://www.w3.org/2003/01/geo/wgs84_pos#">50.3995833333333323</ns0:lat>
  </rdf:Description>
  <rdf:Description rdf:nodeID="2f60a0dbca51c3b2e010dc050ebb8b8b">
    <ns0:alt xmlns:ns0="http://www.w3.org/2003/01/geo/wgs84_pos#">104</ns0:alt>
  </rdf:Description>
</rdf:RDF>
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:nodeID="44bb8c69da389a0b9047572cab6eee1c">
    <rdf:type rdf:resource="http://www.w3.org/2003/01/geo/wgs84_pos#Point"/>
  </rdf:Description>
  <rdf:Description rdf:nodeID="44bb8c69da389a0b9047572cab6eee1c">
    <ns0:long xmlns:ns0="http://www.w3.org/2003/01/geo/wgs84_pos#">2.30125000000000002</ns0:long>
  </rdf:Description>
  <rdf:Description rdf:nodeID="44bb8c69da389a0b9047572cab6eee1c">
    <ns0:lat xmlns:ns0="http://www.w3.org/2003/01/geo/wgs84_pos#">50.3995833333333323</ns0:lat>
  </rdf:Description>
  <rdf:Description rdf:nodeID="44bb8c69da389a0b9047572cab6eee1c">
    <ns0:alt xmlns:ns0="http://www.w3.org/2003/01/geo/wgs84_pos#">102</ns0:alt>
  </rdf:Description>
</rdf:RDF>
...

N3 Example:

GET http://.../?bbox=2.3,50.35,2.35,50.40&format=n3&scale=90&proj=wgs84

[ a <http://www.w3.org/2003/01/geo/wgs84_pos#Point>;
    <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "104";
    <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323";
    <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30041666666666655"] .

 [ a <http://www.w3.org/2003/01/geo/wgs84_pos#Point>;
    <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "102";
    <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323";
    <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30125000000000002"] .

 [ a <http://www.w3.org/2003/01/geo/wgs84_pos#Point>;
    <http://www.w3.org/2003/01/geo/wgs84_pos#alt> "100";
    <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "50.3995833333333323";
    <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.30208333333333304"] .

from elevation-spec.

rwarren2 avatar rwarren2 commented on June 21, 2024

<rdf:Description rdf:nodeID= should be <rdf:Description rdf:about= but that might be a parser problem.

from elevation-spec.

rwarren2 avatar rwarren2 commented on June 21, 2024

Remember to add the prov triple to every node.

from elevation-spec.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.