Giter Club home page Giter Club logo

citysdk-ld's People

Contributors

bertspaan avatar jobspierings avatar tomdemeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

citysdk-ld's Issues

JSON-LD contexts for GTFS layers

The CitySDK LD API stores data per object, per layer. An object is something with a physical representation in a city (train station, bus stop, building, etc.), each object can have one or more layers with data.

We plan to define the following layers, based upon GTFS:

  1. gtfs.stops - layer containing all GTFS stops, plus basic data (stop_id, stop_name, etc.)
  2. gtfs.routes - layer containing all GTFS routes, plus basic data (route_id, agency_id, etc.)
  3. gtfs.stops.routes - extra layer for each GTFS stop, containing routes calling at stop
  4. gtfs.routes.stops - extra layer for each GTFS route, containing stops for route in right order
  5. gtfs.stops.schedule - work-in-progress, layers 5 & 6 contain schedule data (probably for current day or week), for routes and stops
  6. gtfs.routes.schedule
  7. gtfs.stops.now - current departure times, per stop

When possible, we should use OpenTransport's vocabulary.

Improve map viewer

Improve map viewer:

  • show layer semantics (JSON-LD, RDF/Turtle);
  • select layers;
  • apply filters.

Refactor GTFS code

GTFS code is old! Refactor!

GTFS code also includes lots of large SQL queries. We should move those to postgres functions.

Write v1.0 documentation in WIKI

Write preliminary v1.0 documentation:

  • URI structure;
  • concept;
  • serializations;
  • Semantic data - JSON-LD & RDF/Turtle;
  • missing pieces.

Build sets/members support

v0.9 had support for routes, objects which had one or more child objects. This is used for GTFS line/stop relationships, OSM relations and is useful for API users who want to add data to a set of objects.

  • Add API functions to support creating and deleting sets,
  • Add DB constraints to make sure objects cannot be deleted when still in a set,
  • Decide what happens to objects without data which are still in a set.

Fix URLs with file extension (.json, .turtle) ending with regex pattern (or completely disallow file extension URLs altogether)

Grape, by default, allows URLs to end with a file extension. This does not work well together with URL patterns ending with a regex pattern:

resource '/:cdk_id', requirements: { cdk_id: ::Helpers.alphanumeric_regex } do
   ...
end

Or, maybe we should not allow file extension URLs and always use the format parameter (?format=json) or the Content-Type request header.

GeoJSON output of single object: FeatureCollection or Feature

In line with calls to /layers/ and /layers/:layer (the first returns a JSON array, the second a single JSON object), should we decide to return a GeoJSON FeatureCollection on calls to /objects and a single GeoJSON Feature on calls to /objects/:cdk_id?

Currently, all object calls return FeatureCollection.

Wrong HTTP method to URL should result in error

Doing a PATCH request to a URL to which only GET and POST requests are allowed should result in an error. Example:

curl --request PATCH --data "{\"a\": \"b\"}" http://localhost:9292/owners

Installation Issue.

When i try to run the below command during installation

ruby importers/osm/osm_importer.rb -f ~/Downloads/amsterdam_netherlands.osm.pbf -d

I get the following error:

root@ns553739:~/citysdk-ld# ruby importers/osm/osm_importer.rb -f ~/Downloads/amsterdam_netherlands.osm.pbf -d osm
importers/osm/osm_importer.rb:99:in osm2pgsql': undefined method +@' for #String:0x0000000190c530 (NoMethodError)
from importers/osm/osm_importer.rb:180:in `

'

Issue in Installation

Hi
I am new to this.

getting following error when i try
ruby importers/osm/osm_importer.rb -f ~/Downloads/amsterdam_netherlands.osm.pbf

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- citysdk (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require'
from importers/osm/osm_importer.rb:6:in `

'

Importing city extracts (osm *.pbf)

When importing an OSM extract (like e.g. Amsterdam oder an own) using the osm_importer.rb script, I get this output:

screenshot from 2014-11-25 01 52 32

Now note that I used a custom user for the postgres DB, which is configured correctly in the config.development.json file. The problem is that the script when calling osm2pgsql uses still the user postgres as default (-U postgres):

osm2pgsql = "export PGPASS=#{config[:db][:password]}; osm2pgsql --slim -j -d #{config[:db][:database]} -H #{config[:db][:host]} -l -C6000 -U postgres #{options[:osm_filename]}"

However when connecting to the db earlier for example, it uses the user specified in the config file:

database = Sequel.connect "postgres://#{config[:db][:user]}:#{config[:db][:password]}@#{config[:db][:host]}/#{config[:db][:database]}", encoding: 'UTF-8'

So it would probably make sense to change that fixed username with the one from the config.
Could be like this:

osm2pgsql = "osm2pgsql --slim -j -d #{config[:db][:database]} -H #{config[:db][:host]} -l -C6000 -U #{config[:db][:user]} -W #{config[:db][:password]} #{options[:osm_filename]}"

(Still in earlier tries it didn't even work with the standard user postgres (when there was one), because no password with the option -W was specified, the result was also failed authentication.)
Now when running this fixed version of the script, it can authenticate itself (although it's curious that I still have to enter the password manually), however the import fails because of other reasons:

Here's the output:
screenshot from 2014-11-25 01 53 00

Looks like some tables are missing. . What could be the reason for that??
thank you very much for your help!

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.