diff --git a/app/controllers/extract_controller.rb b/app/controllers/extract_controller.rb deleted file mode 100644 index 726f091a..00000000 --- a/app/controllers/extract_controller.rb +++ /dev/null @@ -1,61 +0,0 @@ -class ExtractController < ApplicationController - caches_page :osm_to_json_by_tag, :osm_to_json - - def osm_to_json - @features = ParseOsm.parse(params[:url]) - puts @features.length - respond_to do |format| - format.html { render :html => @features } - format.xml { render :xml => @features } - format.kml { render :template => "map/plot.kml.erb" } - format.js { render :json => @features } - format.json { render :json => @features } - end - end - - def osm_to_json_by_tag - params[:url] ||= "http://localhost:3000/rome.osm" - @features = ParseOsm.filter(params[:url],params[:tag]) - puts @features.length - respond_to do |format| - format.html { render :html => @features } - format.xml { render :xml => @features } - format.kml { render :template => "map/plot.kml.erb" } - format.js { render :json => @features } - end - end - - - def osm_to_json_collected_ways - @features = ParseOsm.parse(params[:url]) - puts @features.length - respond_to do |format| - format.html { render :html => @features } - format.xml { render :xml => @features } - format.kml { render :template => "map/plot.kml.erb" } - format.js { render :json => @features } - end - end - - def georss_to_json - params[:url] ||= "http://api.flickr.com/services/feeds/geo/?tags=mushroommap&lang=en-us&format=rss_200" - @features = ParseGeoRss.parse(params[:url]) - respond_to do |format| - format.html { render :html => @features } - format.xml { render :xml => @features } - #format.kml { render :template => "map/plot.kml.erb" } - format.js { render :json => @features } - end - end - - def kml_to_json - params[:url] ||= 'cartagen.localhost/doc.kml' - @features = ParseKml.parse(params[:url]) - respond_to do |format| - format.html { render :html => @features } - format.xml { render :xml => @features } - #format.kml { render :template => "map/plot.kml.erb" } - format.js { render :json => @features } - end - end -end diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb deleted file mode 100644 index ea371bd2..00000000 --- a/app/controllers/messages_controller.rb +++ /dev/null @@ -1,62 +0,0 @@ -class MessagesController < ApplicationController - - def index - @tweet = Tweet.find(:all, :from=>"/statuses/friends_timeline/whooz.xml") - render :xml => @tweet - end - - def status_update - Tweet.update_status(params[:status]) - @tweets = Tweet.find(:all, :from=>"/statuses/user_timeline/whooz.xml") - render :xml => @tweets - end - - def update_friend - Tweet.direct_message('l20amesstCambri','This is only for you eyes') - @tweets = Tweet.find(:all, :from=>"/statuses/friends_timeline/l20amesstCambri.xml") - render :xml => @tweets - end - - def import - # Tweets: - # last_tweet = Message.find(:last,:conditions => ['source = "twitter"']) - # since = (last_tweet.created_at+1.second).strftime("%a%%2C+%d+%b+%Y+%H%%3A%M%%3A%S+GMT") - # puts since - # new_tweets = Tweet.find(:all, :from=>"/statuses/friends_timeline/whooz.xml?since="+since) - # new_tweets.each do |tweet| - # begin - # tweet.save_as_message - # rescue - # puts "GEOCODING ERROR: "+tweet.inspect - # end - # end - # SMSes: - last_sms = Message.find(:last,:conditions => ['source = "sms"']) - since = (DateTime.now-2.hours).strftime("%a%%2C+%d+%b+%Y+%H%%3A%M%%3A%S+GMT") - # since = (last_sms.created_at+1.second).strftime("%a%%2C+%d+%b+%Y+%H%%3A%M%%3A%S+GMT") - puts since - new_sms = Sms.find(:all,:limit => 100) - new_sms.each do |sms| - begin - sms.save_as_message.save_as_node - rescue - puts "IMPORT ERROR: "+sms.inspect - end - end - render :xml => Message.find(:all) - end - - def messages - render :xml => Message.find(:all) - end - - def keyvalues - render :xml => Keyvalue.find(:all, :conditions => {:message_id => params[:id]}) - end - - def search - n = Message.new - n.text = params[:text] - render :xml => n.use_as_search - end -end \ No newline at end of file diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb deleted file mode 100644 index 54a80ae8..00000000 --- a/app/controllers/node_controller.rb +++ /dev/null @@ -1,35 +0,0 @@ -class NodeController < ApplicationController - skip_before_filter :verify_authenticity_token - - def write - p params - n = Node.new - n.color = params[:color] - n.lat = params[:lat] - n.lon = params[:lon] - n.author = params[:author] - n.name = params[:name] - n.save - render :text => n.id - end - - def read - conditions = [[]] - if params[:bbox] - bbox = params[:bbox].split(',') - # counting from left, counter-clockwise - lon1,lat2,lon2,lat1 = bbox - conditions[0] << '((lat BETWEEN ? AND ?) OR (lat BETWEEN ? AND ?)) AND ((lon BETWEEN ? AND ?) OR (lon BETWEEN ? AND ?))' - conditions.push(lat1,lat2,lat2,lat1,lon1,lon2,lon2,lon1) - end - if params[:timestamp] - since = DateTime.parse(params[:timestamp]) - conditions[0] << "updated_at > '?'" - conditions << since.utc.to_s(:db) - end - conditions[0] = conditions[0].join(' AND ') - nodes = Node.find(:all, :conditions => conditions) - render :json => nodes - end - -end diff --git a/app/controllers/way_controller.rb b/app/controllers/way_controller.rb deleted file mode 100644 index 3b3b11c9..00000000 --- a/app/controllers/way_controller.rb +++ /dev/null @@ -1,76 +0,0 @@ -require 'rubygems' -require 'json' - -class WayController < ApplicationController - skip_before_filter :verify_authenticity_token - - def write - json = JSON.parse(params[:way]) - nodes = [] - way = nil - - Way.transaction do - way = Way.new - way.color = json['color'] - way.bbox = json['bbox'] - way.author = json['author'] - way.name = json['name'] - - order = -1 - json['nodes'].each do |nd| - node = Node.new - node.lat = nd[0] - node.lon = nd[1] - node.author = way.author - node.order = order += 1 - node.save - nodes << node - end - - way.save - - # after saving, go back and assign foreign way_id for each node - nodes.each do |node| - node.way_id = way.id - node.save - end - end - - nodes_hash = nodes.collect {|n| n.id} - render :json => {:way_id => way.id, :node_ids => nodes_hash} - end - - def read - conditions = [[]] - ######## UNTESTED: ######## - if params[:bbox] - bbox = params[:bbox].split(',') - # counting from left, counter-clockwise - lon1,lat2,lon2,lat1 = bbox - # box1 = record, box2 = param - conditions[0] << '? > lon2 AND ? < lon1 AND ? > lat2 AND ? < lat1' - conditions.push lon1,lon2,lat1,lat2 - end - ########################### - if params[:timestamp] - since = DateTime.parse(params[:timestamp]) - conditions[0] << "updated_at > '?'" - conditions << since.utc.to_s(:db) - end - if params[:ids] - ids = params[:ids].split(',') - ids.collect! {|id| id.to_i} - conditions[0] << "id IN ("+ids.join(",")+")" - end - conditions[0] = conditions[0].join(' AND ') - ways = Way.find(:all, :conditions => conditions) - way_ids = ways.collect {|way| way.id } - ways.collect! {|way| way.attributes} - nodes = Node.find_all_by_way_id(way_ids) - p nodes - nodes.collect! {|node| node.attributes} - p nodes - render :json => {'way' => ways, 'node' => nodes} - end - -end diff --git a/app/helpers/extract_helper.rb b/app/helpers/extract_helper.rb deleted file mode 100644 index e726549b..00000000 --- a/app/helpers/extract_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ExtractHelper -end diff --git a/app/helpers/utility_helper.rb b/app/helpers/utility_helper.rb deleted file mode 100644 index 6fd8f90d..00000000 --- a/app/helpers/utility_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module UtilityHelper -end diff --git a/app/helpers/way_helper.rb b/app/helpers/way_helper.rb deleted file mode 100644 index e597a980..00000000 --- a/app/helpers/way_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module WayHelper -end diff --git a/app/models/message.rb b/app/models/message.rb deleted file mode 100644 index a24fdc36..00000000 --- a/app/models/message.rb +++ /dev/null @@ -1,91 +0,0 @@ -gem 'davetroy-geohash' -require 'geohash' - -class Message < ActiveRecord::Base - has_many :keyvalues - after_create :keyvalues - - def keyvalues - # /(\w+):((?:(?:\w+[,.!]*)+(?: |$))+)/ - # "location:20 Ames St 02139 tag:brown bears" - # [["location","20 Ames St 02139"],["tag","brown bears"]] - pairs = self.text.scan(/(\w+):((?:(?:\w+[,.!]*)+(?: |$))+)/) - pairs.each do |pair| - keyvalue = Keyvalue.new - keyvalue.key = pair[0] - keyvalue.value = pair[1] - keyvalue.message_id = self.id - keyvalue.save - end - end - - def save_as_node - # mind privacy with regard to phone # => author. maybe gen irreversible hash of #? - keyword = Cartagen.chop_word(self.text) - if keyword == "line" - way = Way.find(:last,:conditions => {:complete => false, :author => self.author}) - if way.nil? - way = Way.new({:complete => false,:author => self.author}) - way.save - end - coords = GeoHash.decode(Cartagen.chop_word(self.text)) - elsif keyword == "end" - way = Way.find(:last,:conditions => {:complete => false, :author => self.author}) - way.complete = true - way.save - coords = GeoHash.decode(Cartagen.chop_word(self.text)) - elsif keyword == "find" - - else - coords = GeoHash.decode(Cartagen.chop_word(self.text)) - end - - # save it as a node - unless coords.nil? - n = Node.new - n.color = 'red' - n.lat = coords[0] - n.lon = coords[1] - n.description = self.text unless self.text.nil? - # append to way if one exists: - n.way_id = way.id unless way.nil? - n.author = self.author unless self.nil? - n.save - end - end - - def search? - return self.text[0..5] == 'search' - end - - def use_as_search - return false unless self.search? - - query = text.split - - # return false if no geohash - return false if query.length == 1 - - lat, lon = GeoHash.decode(query[-1]) - - min_lat, max_lat = lat - 0.01, lat + 0.01 - min_lon, max_lon = lon - 0.01, lon + 0.01 - - # if >2 words, there must be tags in the query - if query.length > 2 - tags = '%' + query[1..-2].join(' ') + '%' - nodes = Node.find(:all, :limit => 10, :conditions => - ['(lat BETWEEN ? AND ?) AND (lon BETWEEN ? AND ?) AND ((description LIKE ?) OR (name LIKE ?)) AND way_id = 0', - min_lat, max_lat, min_lon, max_lon, tags, tags]) - else - tags = [] - nodes = Node.find(:all, :limit => 10, :conditions => - ['(lat BETWEEN ? AND ?) AND (lon BETWEEN ? AND ?) AND way_id = 0', - min_lat, max_lat, min_lon, max_lon]) - end - - puts nodes - return nodes - end - -end diff --git a/app/models/sms.rb b/app/models/sms.rb deleted file mode 100644 index 868927eb..00000000 --- a/app/models/sms.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Sms < ActiveRecord::Base - establish_connection :frontline_db - set_table_name "frontline_messages" - set_inheritance_column :ruby_type - set_primary_key "tid" - - validates_presence_of :type, :status, :omsisdnA, :dmsisdnA, :dest_port - - def before_save - # self.type ||= "" - end - - def save_as_message - unless Message.find(:first,:conditions => {:author => self.omsisdnA,:source => "sms",:text => self.content,:created_at => self.dateTimeP}) - message = Message.create({ - :author => self.omsisdnA, - :source => "sms", - :text => self.content, - :created_at => self.dateTimeP - }) - message.save - message - end - end - - - - # create_table "frontline_messages", :primary_key => "tid", :force => true do |t| - # t.integer "type" - # t.integer "status" - # t.string "omsisdnA", :limit => 40 - # t.string "dmsisdnA", :limit => 40 - # t.integer "dest_port" - # t.string "content", :limit => 1024 - # t.timestamp "dateTimeP", :null => false - # t.integer "smscReference" - # t.timestamp "dispatch_dateTime", :null => false - # t.integer "form_message" - # t.integer "form_id" - # end - -end diff --git a/app/models/tweet.rb b/app/models/tweet.rb deleted file mode 100644 index fab19ff2..00000000 --- a/app/models/tweet.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Tweet < ActiveResource::Base - - self.site = "http://twitter.com" - self.user = "whooz" - self.password = "gibbledygobbledygoo" - self.password = "poopies" - # Get the latest 20 public statuses - # Optionally take in :since_id and get updates since passed id - # Can't figure out how to get a :from and a :params - def self.public_timeline(params={}) - find(:all, :from=>:public_timeline) - end - - # Get 20 most recent statuses from authenticated user and his/her friends in the last 24 hours - # Optionally take in :since timestamp in format: Tue%2C+27+Mar+2007+22%3A55%3A48+GMT - # Can't figure out how to get a :from and a :params - def self.friends_timeline(params={}) - find(:all, :from=>:friends_timeline) - end - - # Get friends timeline for a specified user - # Can be user id or username - # Need to implement the :since param as in friends_timeline - def self.user_and_friends_timeline(id) - find(:all, :from=>"/statuses/friends_timeline/#{id.to_s}.xml") - end - - # Get timeline for a user - # Need to implement :count (limit 20) and :since timestamp - def self.user_timeline(id) - find(:all, :from=>"/statuses/user_timeline/#{id.to_s}.xml") - end - - # Get a specific status - # Not really RESTful because the 'show' part is extraneous - def self.show(id) - find(:one, :from=>"/statuses/show/#{id.to_s}.xml") - end - - def self.update_status(content) - connection.post("/statuses/update.xml?status="+CGI.escape(content)) - end - - def self.direct_message(username,content) - connection.post("/direct_messages/new.xml?user="+username+"&text="+content) - end - - def self.send_to_user(username,content) - connection.post("/statuses/update.xml?status="+CGI.escape("@"+username+" "+content)) - end - - def save_as_message - message = Message.create({ - :author => self.user.name, - :source => "twitter", - :text => self.text, - :created_at => Time.parse(self.created_at) - }) - unless self.user.location.nil? - message.location_string = self.user.location - end - message.save - end - -end diff --git a/app/views/utility/geocode.html.erb b/app/views/utility/geocode.html.erb deleted file mode 100644 index 9d58ec16..00000000 --- a/app/views/utility/geocode.html.erb +++ /dev/null @@ -1,45 +0,0 @@ - - - -
- -",C=J+"
",K=""+E,H=C+"/api/0.6/geohash/xxxxxx.json- -To accomplish that, uncomment the following lines from **/app/controllers/api_controller.rb**: - -
url = URI.parse('http://cartagen.org/api/0.6/geohash/'+params[:id]+'.json')
- req = Net::HTTP::Get.new(url.path)
- res = Net::HTTP.start(url.host, url.port) {|http|
- http.request(req)
- }
- render :text => res.body
-
-## .htaccess redirecting ##
-
-For higher performance, you can redirect requests to your CartagenServer instance's /api/0.6/ directory with a .htaccess file containing the following lines:
-
-Redirect 301 /api/0.6/(.*) http://cartagen.org/api/0.6/$1- -For a \*NIX server, especially Mac OS X, you have to make sure .htaccess redirects are working by modifying the httpd.conf file: - -
# - # AllowOverride controls what directives may be placed in .htaccess files. - # It can be "All", "None", or any combination of the keywords: - # Options FileInfo AuthConfig Limit - # - AllowOverride All -- -And the **users/username.conf** file: - -
<Directory "/Users/your_username/Sites/"> - Options Indexes MultiViews FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all -</Directory> -diff --git a/wiki.cartagen.org/wiki-markdownMML-2011-09-05-12-16-31/StaticMapLayers.markdownMML b/wiki.cartagen.org/wiki-markdownMML-2011-09-05-12-16-31/StaticMapLayers.markdownMML deleted file mode 100644 index 8b137891..00000000 --- a/wiki.cartagen.org/wiki-markdownMML-2011-09-05-12-16-31/StaticMapLayers.markdownMML +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wiki.cartagen.org/wiki-markdownMML-2011-09-05-12-16-31/StylesheetGallery.markdownMML b/wiki.cartagen.org/wiki-markdownMML-2011-09-05-12-16-31/StylesheetGallery.markdownMML deleted file mode 100644 index efe329a5..00000000 --- a/wiki.cartagen.org/wiki-markdownMML-2011-09-05-12-16-31/StylesheetGallery.markdownMML +++ /dev/null @@ -1,72 +0,0 @@ -Stylesheets demonstrating the use of GSS: - - -### Warcraft II stylesheet ### - -Mapping the world in the style of classic computer game Warcraft II: - -
GSS (Geo Style Sheets) is an evolving specification based on CSS and JSON. It is designed to handle dynamic data sources in a flexible manner, and allow interactions to be specified directly in the style sheet. It is changing rapidly, but we try to keep the Gss Usage page as updated as possible. As such, some of the information on that page may only be applicable to the development version of Cartagen. Feel free to make notes on the wiki about which versions of Cartagen certain properties work with.
- -We hope to improve compatibility with other styling systems, especially Cascadenik and SLD.
- -GSS is uique amound geographical styling system becuase it is designed to work directly with Javascript. GSS is a subset of JSON that is intended to feels natural to CSS users.
- -To see a fairly long GSS file, visit http://cartagen.org/glop/style.gss, or visit the Stylesheet Gallery
- -To use your own stylesheet, add ”?gss=http://yoursite.com/yourstylesheet.gss” to the end of your URL, like:
-
-
-http://cartagen.org/find/sweden?gss=http://unterbahn.com/cartagen/style.gss
-
-
-Here’s an example style from a GSS file:
-
-
-footway: {
-
- lineWidth: 2,
-
- strokeStyle: "#842"
-
-},
-
-
-we also can write actual Javascript code in a style, like:
-
-
-way: {
-
- strokeStyle: function() {
-
- return color_from_string(this.user)
-
- },
-
- lineWidth: 2,
-
- fillStyle: "white"
-
-},
-
-
-The above converts the user name of the contributor (from OSM) to a hex string usable as a color.
- -For a complete reference, see Gss Usage. * The vast changes that is taking place in the GSS sector has made it difficult to keep updated with the same. Many of the developers are finding it difficult to cope with these changes which occur too fast. I’m trying hard to cope with these changes. d1s
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassCartagenEventCartagen%3Ainit.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassCartagenEventCartagen%3Ainit.xhtml deleted file mode 100644 index a3d05a56..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassCartagenEventCartagen%3Ainit.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -asdf asdfd
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassImagePropSrc.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassImagePropSrc.xhtml deleted file mode 100644 index dff873f4..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassImagePropSrc.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapMethodPointerY.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapMethodPointerY.xhtml deleted file mode 100644 index 18c7da32..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapMethodPointerY.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropLat.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropLat.xhtml deleted file mode 100644 index c61f0c4f..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropLat.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropLon.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropLon.xhtml deleted file mode 100644 index b4dd51f3..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropLon.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropX.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropX.xhtml deleted file mode 100644 index f3378ac2..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropX.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropXOld.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropXOld.xhtml deleted file mode 100644 index a8a760b4..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropXOld.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropY.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropY.xhtml deleted file mode 100644 index c054b67b..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropY.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropYOld.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropYOld.xhtml deleted file mode 100644 index d1f0aa11..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropYOld.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropZoom.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropZoom.xhtml deleted file mode 100644 index 5d718d6e..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropZoom.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropZoomOld.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropZoomOld.xhtml deleted file mode 100644 index 8c6453b0..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMapPropZoomOld.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropClickX.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropClickX.xhtml deleted file mode 100644 index c183541c..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropClickX.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropClickY.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropClickY.xhtml deleted file mode 100644 index 0152ca4e..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropClickY.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropDragX.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropDragX.xhtml deleted file mode 100644 index 2a007f23..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropDragX.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropDragY.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropDragY.xhtml deleted file mode 100644 index dd4318e3..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropDragY.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropX.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropX.xhtml deleted file mode 100644 index d78ab5be..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropX.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropY.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropY.xhtml deleted file mode 100644 index 1279e4cd..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassMousePropY.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -See Cartagen Coordinates for a discussion of coordinate systems.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassPanMethodDblclick.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassPanMethodDblclick.xhtml deleted file mode 100644 index e704f234..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassPanMethodDblclick.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -adf
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassPanMethodDrag.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassPanMethodDrag.xhtml deleted file mode 100644 index a55beb2a..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ApiClassPanMethodDrag.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -I was an intern with the Design Ecology group at the MIT Media Lab, working on Cartagen during the summer of 2009.
- - - - - - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAPI.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAPI.xhtml deleted file mode 100644 index a1df43b5..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAPI.xhtml +++ /dev/null @@ -1,620 +0,0 @@ - - - -This API works with the server edition only. Note that bounding box coordinates are submitted as latitudes/longitudes of the sides. They are ordered counter-clockwise starting with the left bound.
- -To see an implementation of the API, see public/cartagen/src/interface/user.js in the Cartagen source.
- -Submit a request to /node/write, passing these parameters:
- -The server will respond with the id of the node, as plain text.
- -Submit a request to /node/read, passing one or both of these parameters:
- -The server will respond with a JSON object with the property ‘node’, which is an array of objects with the following properties:
- -Submit a request to /way/write passing the parameter “way” which should correspond to a JSON object with the following properties:
- -The server will respond with the way’s id in plain text format.
- -Submit a request to /way/read with the parameter “ids” corresponding to a comma-seperated list of bounding box bounds.
- -The server will respond with a JSON object with two properties: “node” and “way”. The “way” property is an array of objects with the following properties:
- -The “node” property is an array of objects with the same properties as those returned by reading a node (see above)
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAerial.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAerial.xhtml deleted file mode 100644 index 73516575..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAerial.xhtml +++ /dev/null @@ -1,565 +0,0 @@ - - - -Cartagen Aerial is a sub-project attempting to use low-cost weather-balloon photography as a base layer for mapping. Weather balloon photography, when rectified, can provide very high-resolution images from which to base mapping efforts.
- -Links:
- - - -Rough estimates:
- -4/3*PI*r^3*0.64
or in most programming languages:
- -4.0000/3*3.141592*r*r*r*0.64
r = diameter in feet
-| Diameter | Volume (cu ft) | lift power |
|---|---|---|
| 3’ | 14.1 | 0.9 lbs | -
| 4’ | 33.5 | 2.14 lbs | -
| 5’ | 65.45 | 33.51 lbs | -
| 8’ | 268.1 | 17.16 lbs | -
| 16’ | 2145 | 137 lbs | -
There’s a problem that photos are such high resolution that we can’t rectify them… there’s no building corners for reference. So I’m trying to turn on the Google Maps satellite layer to use low-res images to rectify high-res ones.
- -Use this line:
- -to_map.addLayer(googleSat);
or drag this into your bookmarks bar:
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAmazonAws.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAmazonAws.xhtml deleted file mode 100644 index 5d3d2f51..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenAmazonAws.xhtml +++ /dev/null @@ -1,564 +0,0 @@ - - - -http://uec-images.ubuntu.com/releases/karmic/release/
- -MapBox offers Postgres data files on an EBS. They also have an EC2 image, but not of the Rails port, so it’s not useful for serving Cartagen Planet Server_
- -Search for more AMIs at thecloudmarket.com
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenClient.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenClient.xhtml deleted file mode 100644 index 9c9b2c9f..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenClient.xhtml +++ /dev/null @@ -1,612 +0,0 @@ - - - -To run Cartagen on your own server, you’ll need:
- -Below is an in-depth walk-through of how to get set up.
- -To get an official release, download the latest zip file from http://code.google.com/p/cartagen/downloads/list.
- -
When prompted, save the file. If you ware not prompted, it is probably placed automatically into your downloads folder.
- -
Cartagen is packaged as a zip file. Extract the file. Depending on your system, you may need to double-click th file, or right-click and select “extract” or “unarchive”.
- -
You should now be able to open up the index.html file included in the distribution to view some sample data, several layers of map data from Rome, provided under Creative Commons Sharealike-Attribution by http://openstreetmap.org.
- -If you want to display a location other than Rome, you’ll need to get your own data files. First, search for the place you want data from on http://cartagen.org:
- -
Then, click the “Download data” link:
- -
Click “OK”, then click and drag to select and area:
- -
Wait for the data to be generated, then choose to save the file if prompted. If you are not prompted to save the file, it is probably placed in your downloads folder automatically. Be sure to keep track of the code that you are given, as well. You may want to copy and paste t to a file, or just keep the browser window open. We’ll use this code later.
- -
Place the downloaded file into the Cartagen folder.
- -
Open the index.html file in the Cartagen folder using a text editor, for example “TextEdit”, “Notepad”, or “GEdit”.
- -
Replace the “static_map_layers” code with your downloaded data file, and replace the latitude/longitude lines with the code you were provided when you downloaded the data.
- -

Thats it! Just save the file and open it in your web browser:
- -
Say you want to grab the latest OpenStreetMap data, or your own OSM-XML formatted dataset. Learn how to convert your ‘osm.xml’ files into ‘osm.json’ format at Importing Data
- -If you want to test out the latest new features and get the ltest fixes, you can use the bleeding-edge development version. The bleeding-edge version is for development purposes oly. It is unlikely to be stable or suitable for public consumption. See http://code.google.com/p/cartagen/source/checkout for instructions on how to get it from the project’s subversion repository. You’ll want to use the “public” folder, which contains the client edition.
- -To customize Cartagen, change the parameters in the Cartagen.setup command at the top of index.html. Read more at Customizing Cartagen.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenContributors.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenContributors.xhtml deleted file mode 100644 index faaa9dca..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenContributors.xhtml +++ /dev/null @@ -1,540 +0,0 @@ - - - -
Cartagen and GSS were created by Jeffrey Warren in the Design Ecology group at the MIT Media Lab in Cambridge, Massachusetts, USA.
- -Ben Weissmann began working on Cartagen as part of the Design Ecology team on June 1, 2009. internet marketing guide and mobile reviews
- -If you’re interested in outback steakhouse coupons contributing to Cartagen or GSS, check out the Developer Center or Contact Us. You can also visit our contributor resources at stride rite coupons
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenCoordinates.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenCoordinates.xhtml deleted file mode 100644 index b53b3ef0..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenCoordinates.xhtml +++ /dev/null @@ -1,563 +0,0 @@ - - - -
-The Cartagen coordinate system describes x and y coordinates for both the entire map (effectively the whole world) and for the viewport - creating confusion for some developers. Here we outline all the notable coordinate systems you can use in JavaScript:
- -Map.x and Map.y may not be 1:1 scale to the pixel dimensions of the browser window. They should be related via the Map.zoom
- -The 0.5 branch is the first stable release of Cartagen, intended for developers. 0.5 was released 7/10/09. Future releases of 0.5 (0.5.1, 0.5.2, etc.) will be stability updates and bug fixes. These updates will also be meged into the 0.6 branch.
- -The 0.6 branch will focus mainly on speed. It will have performace updates that enalbe it to run on older computers and mobile platforms. A few features will be added, including GSS-controlled context menus. It is expected to be released in the late summer of 2009.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenSMS.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenSMS.xhtml deleted file mode 100644 index c7c2a527..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenSMS.xhtml +++ /dev/null @@ -1,566 +0,0 @@ - - - -Cartagen SMS is a data-reporting system for geographic information. It allows anyone with a cell phone to create map data without a GPS.
- -Download a PDF about Cartagen SMS.
- -
Using existing low-cost cell phones, Cartagen SMS allows anyone with a mobile phone to report real-time geographic information. Users look at a printed paper map for instructions and coordinates. There’s no need for expensive smart phones or GPS devices.
- -
Unique location codes known as ‘geohashes’ allow users to submit their locations to a provider with a short message. These compress latitude and longitude into a short, easy- to-type code. If users do not have a printed map, they can type the name of the nearest town, for example:
- -Bakhra: bad water

Aid providers can view collected data on a laptop, even without an internet connection. As new data arrives, it appears within seconds on a map. Reports can be searched, filtered, or replied to. This equipment can be used in the field or kept at a central server for others to view online.
- -
Advanced Cartagen SMS commands can relay messages to anyone else near your location, or search recent and nearby messages for keywords. This has been demonstrated in the WHOOZ project (whooz.org)
- -Cartagen SMS is based on work done in the Next Lab initiative at the MIT Media Lab.
- -NextLab Disaster Management overview: http://vimeo.com/2464809 InnovGreen/Vietnam tree growth reporting; field work: http://vimeo.com/4184955
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenServer.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenServer.xhtml deleted file mode 100644 index b9b5c34f..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenServer.xhtml +++ /dev/null @@ -1,550 +0,0 @@ - - - -To view LIVE OpenStreetMap data
- -add ”?live=true” to the end of your URL, like:
-http://cartagen.org/find/sweden?live=true
-This will bypass cached data, and will load the most recent edited data from OSM. This is useful for checking your edits on OSM, since openstreetmap.org only regenerates tiles on a weekly basis, as far as I can tell. (Some zoom level DO seem to update, but it’s inconsistent.)
- -See a full list of modifiers here: Map Modifiers
- -To embed a map on your site
- -Use the fullscreen=true parameter in the URL, and put it in an iframe:
-<iframe width="600" height="300" src="http://cartagen.org/find/tjornin%20reykjavik?fullscreen=true&gss=http://unterbahn.com/cartagen/natalie.gss"></iframe>
-Using the read/write API
- -A Cartagen server install accepts user-submitted nodes and ways via the Cartagen API
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenSextant.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenSextant.xhtml deleted file mode 100644 index 54970fac..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/CartagenSextant.xhtml +++ /dev/null @@ -1,562 +0,0 @@ - - - -This page discusses the proposed use of cell phone cameras and Java (J2ME) to automate geolocation based on the height of the sun above the horizon plus the exact time, as in a sextant.
- -Java code exists for generating data needed to calculate position from sextant readings without a nautical almanac:
- -http://celestjava.sourceforge.net/
- -We’re working to get this running in J2ME on a mobile device such as the Nokia 6130 (which I bought in Vietnam).
- -Wikipedia references some numbers on expected accuracy which are discouraging, but perhaps useful not for authoring maps but for reporting geographic data or calling for help via SMS.
- -"Since 1 minute of error is about a nautical mile, the best possible accuracy of celestial navigation is about 0.1 nautical miles (200 m). At sea, results within several nautical miles, well within visual range, are acceptable. A highly-skilled and experienced navigator can determine position to an accuracy of about 0.25-nautical-mile (460 m).[1]"
It’s been suggested that the resolution of a cell phone camera (say, 1-3 megapixels) cannot provide the resolution needed for a good reading. 3 megapixels equates to approximately 2048×1536 pixel resolution, and 2 is about 1600x1200. Assuming that the sun is in the image, we could expect to use 1000-2000 pixels to measure an angle. The iPhone has ~53°x~37.5°, and 2 megapixels of resolution (Apple downreses to 800x600 in their camera app). Using the longer dimension that would offer an absolute best of 1600px for about 53°, or a maximum of 30.2 px per degree. That’s about 2 minutes per pixel… and while we could do some subpixel stuff, a rough estimate would be of about 400m precision as absolute maximum. That’s not bad.
- -To improve this, Chris Csikszentmihályi and I discussed using a toy telescope lens to magnify a smaller range… if we got only 26° in 2 megapixels we might be able to match a sextant or better. We’d then have to recalculate the field of view of the camera. Or if we used a 5 megapixel camera we’d get 3000px for ~53°, which would get us close to 1 minute precision.
- -For times when the sun is not near the horizon or there is even cloud cover, we can use the radial gradient of brightness to find the sun’s position, as shown in the illustration below:
- -
Here we are outlining key elements of a possible Cartagen 2.0 release.
- -Coastline rendering description coming soon.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ContactUs.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ContactUs.xhtml deleted file mode 100644 index da676aa3..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ContactUs.xhtml +++ /dev/null @@ -1,536 +0,0 @@ - - - -You can contact the Jeffrey Warren via email at warren@mit.edu, or the developer mailing list at cartagen-dev@googlegroups.com. Our address is:
- -Massachusetts Institute of Technology
Room E15-301
20 Ames Street
Cambridge, Massachusetts 02139-4307 USA
Any Cartagen installation (including http://cartagen.org) can be configured by the user. Simply modify the URL ro include configuration parameters:
- -http://cartagen.org?lat=123.22&lon=123.45&debug=true
- -That example starts the map at latitude 123.22 and longitude 123.45, and enables debugging mode.
- -If you are using your own installation of Cartagen, you can modify Cartagen.setup to set default values for configuration parameters. Open index.html and edit the Cartagen.setup call that looks like this:
-Cartagen.setup({
- stylesheet: "static/rome/style.gss",
- static_map: true,
- static_map_layers: [
- "static/rome/park.js",
- "static/rome/rail.js",
- "static/rome/waterway.js",
- "static/rome/primary.js",
- "static/rome/secondary.js",
- "static/rome/building.js",
- "static/rome/area.js"
- ],
- lat: 41.92,
- lng: 12.12
- })
-Specifies the starting latitude, longitude and zoom level of the map. Defaults to the middle of Rome.
- -Sets the GSS stylesheet to use for the map. On server edition sites (such as cartagen.org), this can be any url. For client edition sites, this must be a path to file on th same site.
-http://cartgen.org/?stylesheet="http://example.com/styles.gss"
http://example.com/?gss=/path/to/styles.gss-
Allows Cartagen to go into “powersave” mode, which re-draws the map less often. Cartagen will automatically exit powersave mode when you interact with th map. By default, this is enabled.
- -The farthest out Cartagen will allow the user to zoom. By default, this is 0.02. Decrease this to allow the user to zoom out more, increase this to allow the user to zoom out less.
- -Simplifies ways by only drawing some noes. Making this more than 1 will decrease the quality of the map, but make the map work faster. Defaults to 1.
- -If this is true, it means that a live GSS editor (like the one on http://cartagen.org is available. If you remove the GSS editor, set this to false. Defaults to true.
- -If this is set to false, Cartagen will load map data from a server in addition to static files. This only works with Cartagen server edition. Defaults to false.
- -An array (or comma-seperated string) of map layers to load from static data files.
-http://cartagen.org/?static_map_layers=http://example.com/a.json,http://example.com/b.json,http://example.com/c.json
Cartagen.setup({
- static_map_layers: ['a.json', 'b.json', c.json']
-}
-If set to true, Cartagen will constantly re-load data. This is useful if data is being loaded from a live source, however, it in not recommended unless needed, because it slows down Cartagen greatly. Defaults to false.
- -Enables debug mode if set to true. Messages will be printed to the console, a geohash grid will be shown, and debug context menu items will be available. Defaults to false.
- -Hides the overlay (or any element called “brief”). Not used on sites that don’t have an overlay (or an element called “brief”). Defaults to false.
- -Causes Cartagen to load data from the Cartagen API. This will only work on a Cartagen Server installation. Defaults to false.
- -Set this to a color to draw a geohash grid on top of the map in the specified color.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DeveloperCenter.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DeveloperCenter.xhtml deleted file mode 100644 index 0b355ca8..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DeveloperCenter.xhtml +++ /dev/null @@ -1,578 +0,0 @@ - - - -Cartagen needs contributions from all sorts of people! Below are some suggestions, but if you want to lend a hand and aren’t sure how to go about it, email cartagen-dev@googlegroups.com and we’ll find something for you to do.
- -Do you know JavaScript? Ruby on Rails? Help write Cartagen!
- -Check out the source from Github and take a look at Navigating The Source. Send an email to warren@mit.edu with what’ you’re interested in working on, suggestions that you have, or code patches.
- -To generate a code patch, look at this good outline for git patch submission: https://rails.lighthouseapp.com/projects/8994/sending-patches
- -Make sure to look at the source documentation, which is build from comments in the source code. Once you check out the source, make sure you have Ruby and Rake installed, and run rake docs from public/cartagen.
Also look at the preliminary System Diagram to learn more about how Cartagen is structured.
- -Documentation is an important aspect of Cartagen. The easiest way to contribute is to work on this wiki - crate articles on aspects of Cartagen not covered, improve existing articles, or fix typos and errors. You can also work on the in-code documentation - see the above instruction for checking out the source and building the documentation.
- -The server edition of Cartagen as an API to read and write nodes and ways. This allows developers to build tools that integrate with Cartagen, but are not part of Cartagen itself. The API is also used within Cartagen itself to add nodes – look at public/cartagen/src/interface/user.js for an example, and look at the Cartagen API for the complete reference.
- -See Cartagen Roadmap.
- -If you want access to the full planet data set when static_map = false, you can redirect requests to your Cartagen Server instance’s /api/0.6/ directory. To learn more about this, read Redirecting To Cartagen Planet Server.
- -Cartagen.org runs on an OpenStreetMap planet dataset which is kept up to date with the import tool Osmosis. Read more about setup and maintenance in Planet Server
- -Coastline Rendering covers some of the techniques Cartagen uses to do live client-side coastline rendering.
- -Cartagen Amazon Aws - discussion and notes of running Cartagen in an Amazon EC2 instance
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DrawingInGlop.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DrawingInGlop.xhtml deleted file mode 100644 index 14ec4504..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DrawingInGlop.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -There is a GLOP reference in the GLOP codebase; a copy can be found at http://cartagen.org/cartagen/src/glop/canvas.js
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DynamicLoading.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DynamicLoading.xhtml deleted file mode 100644 index 881b24e6..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/DynamicLoading.xhtml +++ /dev/null @@ -1,582 +0,0 @@ - - - -Basically, if you look at cartagen.org, it loads map data in chunks, downloading new chunks every time you move the map. These come from our customized OpenStreetMap Planet Server and are found at the address: http://cartagen.org/api/0.6/geohash/xxxxx.json. This has the added benefit of only loading the data the user is looking at, not the whole map at once.
- -Think of it as loading a map in smaller pieces.
- -Regardless of how you set up the tiles (see later on this page for some options), you’ll need to configure Cartagen to look for them instead of a static data set.
- -If you’ve just downloaded Cartagen, you should have an index.html file that has the following inside:
-Cartagen.setup({
- stylesheet: "static/rome/style.gss",
- static_map: true,
- static_map_layers: [
- "static/rome/park.js",
- "static/rome/rail.js",
- "static/rome/waterway.js",
- "static/rome/primary.js",
- "static/rome/secondary.js",
- "static/rome/building.js",
- "static/rome/area.js"
- ],
- lat: 41.92,
- lng: 12.12
- })
-Change static_map to ‘false’:
- - static_map: false,
Now Cartagen will look at /api/0.6/geohash/xxxxxx.json for map tiles. Now you need to be sure it will find something there… read on!
- -(Read more about how to customize Cartagen at Customizing Cartagen)
- -If you don’t want to run a Planet Server (if you’re not sure, then DONT!) you can ‘cheat’ by just copying some files from ours.
- -Cartagen looks locally at the web root of your project for these tiles, so for smaller projects, I’ve downloaded the tiles and kept them in a local /api/0.6/geohash/ directory; I’m happy to zip up all Manhattan tiles for you, so email me at warren@mit.edu if you need them.
- -If you really do need to map the whole world, you STILL don’t need to run your own Planet Server; just BORROW OURS!
- -You can set up a proxy from your site to our planet server, so that any request to your site such as ‘yourserver.com/api/…’ would actually route to ‘cartagen.org/api/…’ - this would mean you’d get the latest updated version of the planet, since we try to regenerate our tiles every so often. Eventually we’ll have them running with up-to-the-minute data from OpenStreetMap
- -You could potentially run your own Planet Server, but it’s a bit of a pain in the ass, and after all, if you only need a static dump of Manhattan, it doesn’t seem like it would be a problem to simply serve the static files.
- -There is more information at Planet Server, but this is unsupported. Contact warren@mit.edu for more details, but don’t expect me to do it for you!
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/EmbeddingCartagen.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/EmbeddingCartagen.xhtml deleted file mode 100644 index 8d7f7ccc..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/EmbeddingCartagen.xhtml +++ /dev/null @@ -1,538 +0,0 @@ - - - -As of Cartagen 0.5, the scroll wheel zooming scrolls both the page and the map; we’re looking at a way to disable page scrolling while the user is hovering in the iFrame.
- -There’s an example of multiple iframes of Cartagen on a single page here:
- -http://unterbahn.com/cartagen-gss-gallery/
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GeoHashes.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GeoHashes.xhtml deleted file mode 100644 index bb3de3d9..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GeoHashes.xhtml +++ /dev/null @@ -1,567 +0,0 @@ - - - -Geohashes can be thought of as rectangular subdivisions of the Earth’s surface. Learn more here: Geohash at Wikipedia. They were invented by Gustavo Niemeyer in 2008.
- -A degree of latitude is ~111.3km anywhere on earth. A degree of longitude varies depending on your latitude, but at the equator, it is also ~111.3km.
- -| N | Longitude | Latitude | east/west distance at equator | north/south distance at equator |
|---|---|---|---|---|
| 12: | 0.00000033527612686157227 | 0.00000016763806343078613 | ~3.7cm | ~1.8cm | -
| 11: | 0.000001341104507446289 | 0.000001341104507446289 | ~14.9cm | ~14.9cm | -
| 10: | 0.000010728836059570312 | 0.000005364418029785156 | ~1.19m | ~0.60m | -
| 9: | 0.00004291534423828125 | 0.00004291534423828125 | ~4.78m | ~4.78m | -
| 8: | 0.00034332275390625 | 0.000171661376953125 | ~38.2m | ~19.1m | -
| 7: | 0.001373291015625 | 0.001373291015625 | ~152.8m | ~152.8m | -
| 6: | 0.010986328125 | 0.0054931640625 | ~1.2km | ~0.61km | -
| 5: | 0.0439453125 | 0.0439453125 | ~4.9km | ~4.9km | -
| 4: | 0.3515625 | 0.17578125 | ~39km | ~19.6km | -
| 3: | 1.40625 | 1.40625 | ~157km | ~157km | -
| 2: | 11.25 | 5.625 | ~1252km | ~626km | -
| 1: | 45 | 45 | ~5018km | ~5018km | -
IGNORE THE FOLLOWING NUMBERS
- -They’re wrong - i used x,y instead of lat/lon, and as a result they’re only valid for Rome; projected values are location-specific. But they’re interesting anyways and I wasted a half-hour on them so I’m saving them.
-| N | x | y |
|---|---|---|
| 12: | 0.03352761268615723 | 0.022274659015238285 | -
| 11: | 0.1341104507446289 | 0.1781972600147128 | -
| 10: | 1.0728836059570312 | 0.7127890586853027 | -
| 9: | 4.291534423828125 | 5.702313330955803 | -
| 8: | 34.332275390625 | 22.809258637949824 | -
| 7: | 137.3291015625 | 182.4745806204155 | -
| 6: | 1098.6328125 | 729.8819535905495 | -
| 5: | 4394.53125 | 5838.531777993776 | -
| 4: | 35156.25 | 23348.537284125574 | -
| 3: | 140625 | 187680.11060012504 | -
| 2: | 1125000 | 744941.5192134883 | -
| 1: | 4500000 | 6966582.671835422 | -
For a quick look at installing and using Cartagen, watch the video introduction
- -http://cartagen.org is a demonstration of the latest release of Cartagen. Test it out, visit places, and create your own maps!
- -Gss is a specification for map stylesheets that work with dynamic data. Cartagen uses GSS (Geo Style Sheets) to style its maps.
- -You can try it out by editing the GSS on http://cartagen.org using the link under the search box or by appending ”?gss=http://yoursite.com/yourstylesheet.gss” to the end of your URL, like:
-http://cartagen.org/?gss=http://unterbahn.com/cartagen/style.gss
-Read more at About Gss or see the specification at Gss Usage.
- -Cartaen allows users to configure it. Simply add a query string to he end of the URL – more at Customizing Cartagen.
- -To geocode locations to add to your map using Static Map Layers, go to:
- -http://cartagen.org/utility/geocode
- -You can use an iframe to embed a Cartagen map on your own website:
-<iframe height='300' src='http://cartagen.org/find/paris?fullscreen=true' style='border:0;' width='700'/>
-You can even view it with your own stylesheet by specifying it with a “gss=” flag:
-<iframe height='300' src='http://cartagen.org/find/paris?fullscreen=true&gss=http://unterbahn.com/cartagen/authors.gss' style='border:0;' width='700'/>
-Read more at Embedding Cartagen
- -Cartagen has two distributions: the client edition and the server edition.
- -The client edition is the simplest version of Cartagen, and the easiest to get started with – you don’t need a web server to run it. However, you must provide it with static data or every location you want it to load - it cannot dynamically fetch data from a server.
- -Read more at Cartagen Client
- -The server edition is not yet officially released. If you are interested in it, you can get it from the development repository via subversion. It is not recommended for end-users, as installation and setup procedures are not fully in place. Read more at Cartagen Server.
- -Cartagen is free and open source software - you are free to modify the code to fit your needs. Get the source and head to the Developer Center for help on developing with Cartagen and contributing to the project.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingCuestionario.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingCuestionario.xhtml deleted file mode 100644 index 803fedd0..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingCuestionario.xhtml +++ /dev/null @@ -1,546 +0,0 @@ - - - -¿Existen mapas ya de Nuevo Invasion? ¿Como son?
- -¿Cuantos personas viven en Nuevo Invasion? Como se organizan? En manzanas?
- -¿Como es el proceso de legitimizar la propiedad de tierra?
- -¿Cuales son los ventajas de legitimizar?
- -¿Como se trata el gobierno de Lima/Peru a Nuevo Invasion?
- -Cuantos años tiene Nuevo Invasion, o varios partes de si?
- -¿Como se ha cambiado el distrito desde su fundacion?
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingLima.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingLima.xhtml deleted file mode 100644 index 9ccbfdbc..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingLima.xhtml +++ /dev/null @@ -1,605 +0,0 @@ - - - -Este projecto propone el uso de mapas y el acto de crearlas como una actividad comunal, que fortalece el sentido de comunidad y les ayuda a la comunidad de Nuevo Invasion en definir su propio version de su geografia local.
- -Proponemos una serie de eventos en que miembros de la comunidad (especialmente los jovenes) pueden usar una variedad de metodos para medir, explorar, y documentar su comunidad. Al final, usaremos los datos geograficos para crear unas mapas que describen varios aspetos de la comunidad, y los publicaremos en papel y en una pagina web.
- -Lo consideramos importante que este projecto no sea uno de documentacion de la comunidad para extranjeros, pero una forma de auto-representacion, y comunicacion, para los inhabitantes. Pensamos quizas en no sacar fotos… pero por lo menos concentramos en mapas y dibujos de un lugar realizados por las personas que viven alla.
- -Hay numerosos metodos de medir un lugar, pero concentramos en unos que son mas comunales, faciles, y divertidos, y los que dan enfasis a informacion que pertenece a la comunidad.
- -Fotografia con globos de tiempo
- -Esto lo estamos discutiendo en Cartagen Aerial. La ultima prueba fue bien pero necesitamos subir mas… a por lo menos 100 metros, y necesitamos esperar hasta que no haya viento. Mira las fotos aca: Fotos de Globos - Prueba 1
- -
Mapas dibujadas manualmente
- -Datos enviado por movil
- -Jeffrey Warren
- -Jeff trabaja en MIT como parte del Centro por Media Civica del Futuro, y sus investigaciones estan concentrado en herramientos para crear mapas. Jeff estudio arquitectura y vivio en Lima por un ano durante 2006-7, durante que llego a amar todo tipo de comida peruana.
- -Carla del Carpio
- -Carla trabaja con CEDRO…
- -Ysabel Luisa
- -Seth Hunter
- -Seth es parte del grupo Fluid Interfaces en el Laboratorio de Media en MIT, y su trabajo explora technologias que apoyan trabajo creativo en grupos. (…)
- -Diego Rotalde
- -Diego Rotalde fundo una escuela de programmacion web con Jeff Warren en 2006, y tiene experiencia profesional en diseno grafico y industrial. Es un gran dibujador y no le gusta leche.
- -Crear una mapa del futuro - somo puede ser la comunidad idealmente.
- -Dar nombres a todos los lugares, usar nombres de personas respetados en la comunidad usa payday loans.
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingPlan.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingPlan.xhtml deleted file mode 100644 index 0e869ed1..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GrassrootsMappingPlan.xhtml +++ /dev/null @@ -1,570 +0,0 @@ - - - -Despues de trabajar como voluntario o asistente con los estudiantes por unos pocos dias para encontrarnos con ellos y conocerlos mejor, trabajaremos con ellos en dibujar una primera mapa del pueblo. Primero, los estudiantes pueden dibujar con lapices mapas individuales de su area de la comunidad. Despues podemos medir distancias y areas con una tela marcado en metros. Esto presenta una oportunidad de usar algo de geometria para ninos mas jovenes.
- -Combinaremos las mapas individuales en una mapa grande (2 metros por lado) dibujado libre sin respeto a ubicaciones exactos, pero correcto en tamano. Podemos despues ‘rectificarlo’ a un red longitudinal si queremos.
- -Como su primer tarea, estudiantes preguntaran a su familia y vecinos algunas preguntas sobre su area de la comunidad. En grupos, discutiremos los demograficos de la comunidad, como cuantos mujeres y hombres, y cuantos ninos, chicos, y viejos hay.
- -Podemos a este punto apuntar cuales son los nombres de cada lugar, cada pasaje, y cada lugar publico. Si no tienen nombres, o tienen solo numeros, los estudiantes les pueden dar nombres nuevos. Proximo usaremos globos de tiempo y una camara barata para sacar fotos de la comuniadad de arriba. Esto no dira una idea de como se parece la comunidad entera, y con ello podemos verificar nuestras mapas dibujadas. Con estudiantes mas viejos podemos ‘rectificar’ (es decir, modificar a ser unido con un red longitudinal) las fotos, y unirlos en una foto o sea una mapa grande. Esto lo imprimiremos y, usando papel de calcar, trasladamos las mapas viejas a este mapa bien ubicado y medido.
- -Despues de eso, los estudiantes pueden hacer projectos pequenos sobre la historia de una area de la comunidad, y podemos crear mapas de como era la comunidad hace 1 ano, 2 anos, y al principio. Si podemos, incluiremos a las familias en esta parte del projecto, y podemos sacar fotos y hacer videos si quieren. Cada estudiante presentara sus investigaciones.
- -Finalmente, los estudiantes se partaran en grupos de 2 o 3 y imaginaran como se va a parecer la comunidad en 1 ano, 5 anos y 10 anos. Cada grupo presentara un poster con sus ideasj y una mapa, y discutimos todo en grupo.
- -Al final del mes, habremos una reunion con las familias y si posible, los lideres de la comunidad, y podemos discutir el projecto con ellos. Tendremos una exposicion de las mapas y los projectos de las participantes, y terminaremos con una fiesta para celebrar el projecto.
- -Podemos modificar nuestra agenda con respecto a la frecuencia que puede sostener CEDRO o participantes.
- -enero 6 - Introducir y discutir (y quizas modificar) la agenda con profesores, voluntarios, y representantes de la comunidad y los ONGs
- -enero 7-9 - Encontrarnos con los estudiantes, participar en actividades para conocerlos mejor
- -enero 11 - introducir el primer projecto: dibujar mapas individuales y medir la comunidad con tela
- -enero 12-13 - Usar globos de tiempo (depende en el viento).
- -enero 14 - Rectificar fotos de globos y imprimir una mapa completa
- -enero 15-16 - Trasladar mapas viejas a la mapa completa
- -enero 17 - Introducir projecto ‘historia de la comunidad’
- -enero 19-20 - Dibujar mapas historicos en papel de calcar
- -enero 21-22 - Introducir projecto ‘futuro de la comunidad’ partir estudiantes en grupos de 2-3
- -enero 23-24 - Presentar projectos, preparar para la exposicion
- -enero 25-30 - Exposicion, fiesta. Discutir valor del projecto, lo que paso bien y no, y organiza projectos de mapas en otros comunidades. Tambien discutir la posibilidad de repetir algunos de estos projectos en 6 meses o 1 ano para mantener los datos de la mapa. Liability Insurance CA
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GssUsage%2C.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GssUsage%2C.xhtml deleted file mode 100644 index f61eee3b..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/GssUsage%2C.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -GSS is valid JSON (http://www.json.org/), but follows the format of CSS as much as possible.
- -To see a fairly long GSS file, visit http://cartagen.org/static/rome/style.gss, or visit the Stylesheet Gallery
- -Here’s an example style from a GSS file:
-footway: {
- lineWidth: 2,
- strokeStyle: "#842"
-},
-
-GSS selectors are matched against the type of feature (node, way, or relation), so you can create a style that affects all ways like this:
-way: {
- strokeStyle: "blue",
- opacity: 0.5
-}
-
-This kind of style takes the lowest priority – it will be overridden by name-based or tag-based styles.
- -You can style a specific feature by name, for example the lake Tjörnin, in Reykjavik, Iceland. Outlining the lake itself in blue could be done with the following style:
-"Tjörnin": {
- lineWidth: 4,
- strokeStyle: "blue"
-}
-Selectors can also reference tags that features may have. They are matched against both the key and the value of the tag. For example, to turn churches green, use this code:
-church: {
- fillStyle: "green"
-}
-GSS is capable of handling “dynamic” styles – styles specified as JavaScript code by pos system, grocery pos software rather than as a static value. Here’s an example:
-way: {
- strokeStyle: function() {
- return color_from_string(this.user)
- },
- lineWidth: 2,
- fillStyle: "white"
-},
-
-In the above example essays, the JavaScript code is executed once, when the element is first loaded. If you want the function to be re-executed periodically, you can specify the interval (in seconds) with the “update” property:
-way: {
- strokeStyle: function() {
- return color_from_string(this.user)
- },
- lineWidth: 2,
- fillStyle: "white",
- update: {
- strokeStyle: 30
- }
-},
-
-In that example, the strokeStyle function is run once, then the result is used for 30 seconds. After 30 seconds, the function is run again, and the new value is used bodybuilding workout shirtshttp://www.bodybuildingworkoutshirts.com/).
- -For hover and mouseDown styles, the syntax is:
-building: {
- lineWidth: 0.001,
- fillStyle: "#444",
- hover: {
- fillStyle: '#222'
- },
- mouseDown: {
- lineWidth: 4,
- strokeStyle: "red"
- }
-},
-
-The above converts the user name of the contributor (from OSM) to a hex string useable as a color. So what you see is something like this:
- -http://cartagen.org/?gss=http://unterbahn.com/cartagen/style.gss
- -To trigger a JavaScript call on hover or mouseDown, nest an action property in the event’s style definition, like so:
-building: {
- lineWidth: 0.001,
- fillStyle: "#444",
- hover: {
- fillStyle: '#222',
- action: function() {
- // javascript code goes here
- console.log('hover!')
- }
- },
- mouseDown: {
- lineWidth: 4,
- strokeStyle: "red"
- }
-},
-
-Cartagen’s context menus are controlled entirely by GSS. To create items that are always available, add then to the body style, like this:
-body: {
- menu: {
- "My menu item": function() {alert('a message')},
- "My other item": function() {alert('another message')}
- }
-}
-
-The function associated with the menu item can contain any valid Javascript.
- -Context menus may also be applied to specific features, like other GSS styles.
-building: {
- menu: {
- "Show the name": function(){alert(this.tags.get('name'))}
- }
-}
-Note that the “this” keyword in the function associated with the menu item refers to the feature that the context menu was invoked upon.
- -Colors are handled the same way as in CSS. There are four formats:
- -A color name, like “blue” or “red”. A fill list is at w3schools.
-A hex string that specifies red, green, and blue values in base 16, like #1a44bf or #3db.
-An rgb definition that specifies red, green, and blue values out of 255, like rgb(10, 100, 255).
-An rgba definiton, which works like an rgb definition, but also has an alpha (opacity) value between 0 and 1. 1 is fully opaque, 0 is fully transparent. For example, rgba(255, 0, 0, 0.5) is half-transparent red.
-In the below reference, “Color” refers to a string in one of the above formats.
- -Here’s a list of all the GSS properties and what they do:
- -The color a closed way is filled with.
- -Type: Color
- -Default: Transparent
- -The pattern to fill a closed way with. Overrides fillStyle.
- -Type: String - path to the image
- -Default: No pattern
- -The color of an unclosed way, or the border of a closed way.
- -Type: Color
- -Default: Black
- -The opacity of the feature. 1 is fully opaque, 0 is fully transparent. To control the opacity of individual parts of a feature (e.g. just the fill, or just the stroke), use an rgba color definition (see above) for that part.
- -Type: Number - between 0 and 1, inclusive
- -Default: 1
- -The width, in pixels, of an unclosed way, or the width of the border of a closed way.
- -Type: Number - non-negative integer
- -Default: 6
- -The color of the outline of a way.
- -Type: Color
- -Default: No outline
- -The width of the outline of a way.
- -Type: Number - non-negative integer
- -Default: No outline
- -The radius, in pixels, of a node.
- -Type: Number - non-negative integer
- -Default: 6
- -The image to draw at the center of a way. Should be the path to the image.
- -Type: String - path to the image
- -Default: No pattern
- -Text to display as the label of a way.
- -Type: String
- -Default: No label
- -Color to draw label text in.
- -Type: Color
- -Default: #eee
- -Size, in points, of the label text.
- -Type: Number - non-negative integer
- -Default: 11
- -Whether the label should scale with the zoom level.
- -Type: Boolean
- -Default: false
- -Background color to draw behind label.
- -Type: Color Default: No background
- -/)###
- -Angle, in radians, to rotate the label by. Set to “fixed” to force label to not rotate with map in . Note that unclosed ways’ labels are automatically rotate to align with the way.
- -Type: Boolean or String
- -Default: 0
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/HomePage.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/HomePage.xhtml deleted file mode 100644 index 08145441..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/HomePage.xhtml +++ /dev/null @@ -1,597 +0,0 @@ - - - -See a variety of stylesheets demonstrating Cartagen's abilities:
-
-
-
-
-
-Cartagen (http://cartagen.org) is a vector-based, client-side framework for rendering maps in native HTML 5. Written in JavaScript, it uses the new Canvas element to load mapping data from various sources, including OpenStreetMap.
- -Maps are styled with Geographic Style Sheets (GSS), a cascading stylesheet specification for geospatial information – a decision which leverages literacy in CSS to make map styling more accessible. However, GSS is a scripting language as well, making Cartagen an ideal framework for mapping dynamic data. See About Gss and Gss Usage for more on GSS.
- -Mobile devices and networks have made possible distributed reporting of geographic and temporal data, from unfolding natural disasters to organizing protests in real time. Cartagen allows users to integrate real time data streams and display them in novel ways.
- -It also offers the possibility of rendering OpenStreetMap data which is not currently efficient with tile-based systems - such as authorship and time data. A simple but useful example is that Cartagen can show live OpenStreetMap data – in the sense that viewers see edits occurring in real time, with no rendering load on the server.
- -With powerful mapping tools such as these, there is an opportunity for users to create their own maps – not just pushpins and overlays, but completely ___ maps which incorporate rich and dynamic data, and most of all maps which tell stories. Instead of a single canonical map for everyone, individuals and communities can make locally and personally relevant maps.
- -http://cartagen.org/ is a demonstration of the latest version of Cartagen – use it to experiment with the technology, explore the world, and create you own maps! In addition, you can download Cartagen and use it on your own website, or read and change the code to fit your needs. More at Getting Started.
- -You can also look at the video introduction:
- -See Also:
- -For help using Cartagen, see: Troubleshooting Cartagen
-
-
-Also read about Cartagen SMS, a tool for reporting geographic data in real time, without a GPS.
- -Head to the Developer Center for ways to work with Cartagen, change it to fit your needs, and contribute to the project.
- -The Cartagen project is led by researchers at the MIT Media Lab in Cambridge, Massachusetts, USA, but we welcome contributions from anyone. Read about the Cartagen Contributors, or Contact Us.
- -Cartagen uses a version of the GLOP Javascript Canvas environment developed at the MIT Media Lab. For details see
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ImportingData.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ImportingData.xhtml deleted file mode 100644 index 7c6b033c..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/ImportingData.xhtml +++ /dev/null @@ -1,588 +0,0 @@ - - - -So, for example, Kate wanted to use a more recent dump of the Rio de Janiero map data from OpenStreetMap.org. She navigated to Rio on that site, and opened the Export menu. She checked “OpenStreetMap XML Data” under Format to Export, and pressed “Export”.
- -A file called “map.osm.xml” was downloaded, with a lot of lines like this:
-
-Well, you need to get a running copy of Cartagen Server, which you can find at Github (more info at Cartagen Server). Or you can use the existing demo install of Cartagen at cartagen.org.
- -I’ll assume you’re running a local copy at “http://localhost:3000/”, a common port number for Rails applications. If you’re not, just substitute “http://cartagen.org/” wherever you see it.
- -Move the file into a web-accessible folder. It’s convenient to just put it in the /public/ folder, and I created a subfolder called ‘rio’. So my file is accessible at:
-http://localhost:3000/rio/map.osm.xml
-You might try entering that URL in your browser just to be sure you can actually download the file from there. Now navigate to:
-http://localhost:3000/extract/osm_to_json/map-osm.js?url=http://localhost:3000/rio/map.osm.xml
-This should take a little while but it will download a new file called “map-osm.js”. (I’m changing this in the latest code to ‘.json’ but it’s not a big deal for now.)
- -You can now use this file as a standard static layer in Cartagen Client, with the following setup code, assuming you correct the lat/lng coordinates to display the map data you’ve downloaded:
-Cartagen.setup({
- stylesheet: "style.gss",
- static_map: true,
- static_map_layers: [
- "map-osm.js"
- ],
- lat: 41.92,
- lng: 12.12
- })
-For large datasets which are impractical to load statically, you might consider ‘tricking’ Cartagen into thinking it actually does have a dynamic server generating data tiles.
- -Cartagen dynamic data consists of files in the format yourserver.org/api/0.6/geohash/xxxxxx.json (to follow the \OpenStreetMap Rails port modification). You can use wget or a browser to just download all the files relevant to your project, and store them at that relative path. (to learn more about geohashes, see the Geohash article on Wikipedia)
- -Visiting Cartagen.org/find/rio gets you to Rio de Janiero, but http://cartagen.org/find/rio?grid=black shows the geohash grid overlaid on the map.
- -So for example, if you want to display Rio de Janiero without depending on the main Cartagen server, you can see that the whole city is in the geohash “75cm” (that’s ‘7’, ‘5’, ‘c’, and ‘m’, not seventy-five centimeters).
-
-Since Cartagen reads 6-digit geohash files, we might get all the geohash map data files that start with ‘75cm’, like 75cmaa, 75cmab, 75cmac, etc. You may correctly suppose that there are 36^2 of these, or 1,296 files. But most of these will be of the countryside and won’t be very big. You could write a script, or just start downloading them manually. I’d start around 75cm8z.json and work outward…
- -http://cartagen.org/api/0.6/geohash/75cm8z.json
- -http://cartagen.org/api/0.6/geohash/75cm8z.json
- -If you’re good with scripting you can probably do this faster.
- -Then just place these files in the same relative path from your Cartagen install. If you’re running Cartagen Server, thats:
-RAILS_ROOT/public/api/0.6/geohash/xxxxxx.json
-And for Cartagen Client, it’s in the same folder as your index.html file:
-WEB_ROOT/api/0.6/geohash/xxxxxx.json
-Now, your Cartagen code can read these files with the setup code:
-Cartagen.setup({
- stylesheet: "style.gss",
- static_map: false,
- lat: 41.92,
- lng: 12.12
- })
-
-
-
diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/Jeffrey+Warren.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/Jeffrey+Warren.xhtml
deleted file mode 100644
index ff925374..00000000
--- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/Jeffrey+Warren.xhtml
+++ /dev/null
@@ -1,538 +0,0 @@
-
-
-
- Helloooo!
- - - - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/JeffreyWarren.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/JeffreyWarren.xhtml deleted file mode 100644 index 45012766..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/JeffreyWarren.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -Are you looking for Jeffrey Warren?
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/MapModifiers.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/MapModifiers.xhtml deleted file mode 100644 index 117a6c49..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/MapModifiers.xhtml +++ /dev/null @@ -1,549 +0,0 @@ - - - -Zoom level
- -To change the initial zoom level, add the zoom_level parameter to your URL:
-http://cartagen.org/find/london?zoom_level=0.2
-Try zoom levels ranging from 0.1 to 3.
- -To view LIVE OpenStreetMap data
- -add ”?live=true” to the end of your URL, like:
-http://cartagen.org/find/sweden?live=true
-This will bypass cached data, and will load the most recent edited data from OSM. This is useful for checking your edits on OSM, since openstreetmap.org only regenerates tiles on a weekly basis, as far as I can tell. (Some zoom level DO seem to update, but it’s hard to tell… inconsistent)
- -To use your own stylesheet
- -add ”?gss=http://yoursite.com/yourstylesheet.gss” to the end of your URL, like:
-http://cartagen.org/find/sweden?gss=http://unterbahn.com/cartagen/style.gss
-
-
-
diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/MapWarpingWithCartagen.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/MapWarpingWithCartagen.xhtml
deleted file mode 100644
index adde2f4e..00000000
--- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/MapWarpingWithCartagen.xhtml
+++ /dev/null
@@ -1,568 +0,0 @@
-
-
-
- This is now possible with the Cartagen Knitter.
- -Related work:
- -Perspective texturing in canvas
- -Projective Texturing with Canvas
- - - -This ought to be a separate application from the main Cartagen framework… though eventually perhaps integrated? Discuss.
- -Required steps:
- -Cartagen is a Ruby on Rails application. Before you can work on it, you will need Ruby, Rails and Rake.
- -The Cartagen Javascript is in public/cartagen/src. However, it is concatenated info public/cartagen/cartagen.js by Sprockets. If you’re just modifying files, just make sure not to move or change lines starting with //= – those lines are Sprocket directives. If you nee to add or move files, take a look at http://getsprockets.org/installation_and_usage to see how to get your files into the concatenated cartagen.js
To build cartagen.js, just run rake build from public/cartagen. To have Cartagen automatically build wheneve the src/ directory is changed, run rake autobuild. Be aware, though, that autobuild only checks every 5 seconds, so wait a few seconds after making a change before testing it in a browser.
Cartagen uses the Prototype JavaScript Framework. You should be at least somewhat familiar with Protoype before developing with Cartagen – it will save you a lot of time.
- -The Javascript source is documented with JsDoc Toolkit. Please try to add documentation for any functions or properties you add.
- -l(), which logs a message to the browser's console. Various other methods are in the D namespace.Coordinates in Cartagen can get complicated; there’s latitude, longitude, Map x, Map y, Screen x, Screen y… an more! Learn all about it on the Cartagen Coordinates page.
- -Cartagen makes extensive use of the Geohash geocoding system invented by Gustavo Niemeyer. Read more about Geo Hashes
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/NextLab.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/NextLab.xhtml deleted file mode 100644 index 0bb15f54..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/NextLab.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -as
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/PlanetServer.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/PlanetServer.xhtml deleted file mode 100644 index a8b866e0..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/PlanetServer.xhtml +++ /dev/null @@ -1,545 +0,0 @@ - - - -Our planet server is an OpenStreetMap Rails Port install running on Mac OS X Leopard, with a PostgreSQL database. You can access it like any other OpenStreetMap api at http://cartagen.org/api/…
- -If you want to map a very large area, but don’t want to run your own Planet server, try Dynamic Loading - this means you can use our Planet server with your own projects.
-This’ll be a bit disorganized until the Planet server is complete. Also see the OpenStreetMap wiki and Osmosis documentation for more documentation.
- -osmosis-0.31/bin/osmosis --read-xml-change file="/Volumes/Planet/20090516-20090517.osc.gz" --write-apidb-change populateCurrentTables=yes host="localhost" database="****" user="****" password="****" validateSchemaVersion=no
-to import many, run this ruby command from the directory containing changesets. Edit the path the osmosis as needed.
-Dir.entries('.').select{|f| f[-4..-1]=='.osc'}.each{|f| `osmosis-0.31/bin/osmosis --read-xml-change file="#{f}" --write-apidb-change populateCurrentTables=yes host="localhost" database="****" user="****" password="****" validateSchemaVersion=no`}
-
-
-
diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/RedirectingToCartagenPlanetServer.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/RedirectingToCartagenPlanetServer.xhtml
deleted file mode 100644
index 50afb9dd..00000000
--- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/RedirectingToCartagenPlanetServer.xhtml
+++ /dev/null
@@ -1,575 +0,0 @@
-
-
-
- Say you’re running an instance of Cartagen Server, or even just a copy of Cartagen Client, but you want access to the full map data for the planet (provided by OpenStreetMap). But you don’t want to run a Planet server!
- -First, you’ll static_map to false in your html:
-<script charset='utf-8' type='text/javascript'>
- Cartagen.setup({
- stylesheet: "/static/rome/style.gss",
- static_map: false,
- static_map_layers: ["more.json"],
- lat: 41.891,
- lng: 12.4902,
- // debug: true
- })
- </script>
-Now your map will generate requests to your server at the address:
-/api/0.6/geohash/xxxxxx.json-
To accomplish that, uncomment the following lines from /app/controllers/api_controller.rb:
- url = URI.parse('http://cartagen.org/api/0.6/geohash/'+params[:id]+'.json')
- req = Net::HTTP::Get.new(url.path)
- res = Net::HTTP.start(url.host, url.port) {|http|
- http.request(req)
- }
- render :text => res.body
-For higher performance, you can redirect requests to your Cartagen Server instance’s /api/0.6/ directory with a .htaccess file containing the following lines:
-Redirect 301 /api/0.6/(.*) http://cartagen.org/api/0.6/$1-
For a *NIX server, especially Mac OS X, you have to make sure .htaccess redirects are working by modifying the httpd.conf file:
-# - # AllowOverride controls what directives may be placed in .htaccess files. - # It can be "All", "None", or any combination of the keywords: - # Options FileInfo AuthConfig Limit - # - AllowOverride All --
And the users/username.conf file:
-<Directory "/Users/your_username/Sites/"> - Options Indexes MultiViews FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all -</Directory> -- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/StaticMapLayers.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/StaticMapLayers.xhtml deleted file mode 100644 index 46894b3b..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/StaticMapLayers.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -
Stylesheets demonstrating the use of GSS:
- -Mapping the world in the style of classic computer game Warcraft II:
- -http://cartagen.org/find/london?gss=http://unterbahn.com/cartagen/warcraft.gss
- -Stylesheet: http://unterbahn.com/cartagen/warcraft.gss
- -
This map was made with Cartagen, but goes further than basic stylesheeting. Still of interest: http://newsflow.cartagen.org/
- -Stylesheet: http://newsflow.cartagen.org/style.gss
- -
Labeling in different languages based on URL parameter:
- -http://cartagen.org/find/brussels?gss=http://unterbahn.com/cartagen/localization.gss&language=fr
- -http://cartagen.org/find/brussels?gss=http://unterbahn.com/cartagen/localization.gss&language=nl
- -Stylesheet: http://unterbahn.com/cartagen/localization.gss
- -
Coloring by author name:
- -http://cartagen.org/find/london?gss=http://unterbahn.com/cartagen/authors.gss
- -Stylesheet: http://unterbahn.com/cartagen/authors.gss
- -
Using tagged street widths to
- -http://cartagen.org?gss=http://unterbahn.com/cartagen/width.gss
- -Stylesheet: http://unterbahn.com/cartagen/width.gss
- -
Stylesheet: http://unterbahn.com/cartagen/natalie.gss
- -(you have to pan around a bit to get this one to render in)
- -
Use patterns to display stylized maps:
- -http://mushroommap.com?gss=/styles/ben/styles.gss
- -Stylesheet: http://cartagen.org/styles/ben/styles.gss
- -

Cartagen wasn’t designed to load that large of a file all at once; for anything over about 1mb, I’d recommend loading it ‘by tile’. We generally refer to this as Dynamic Loading. This will allow you to load a very large map (even of the whole world!) in pieces. For most cases, you can do this WITHOUT running Ruby on Rails, or your own Planet Server.
- -This is a known bug in Safari 4: if you check your console, you will see:
- -10/2/09 7:41:38 PM 0x0-0x424424.com.apple.Safari59690 Assertion failed: ((min.y == p0.y && max.y == porder.y) || (min.y == porder.y && max.y == p0.y)), function crossing_count, file Paths/path-crossing.c, line 176.
- -We hope the WebKit team (or Apple?) will resolve it soon.
- -Bug report: https://bugs.webkit.org/show_bug.cgi?id=30074
- - - diff --git a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/car-shipping.xhtml b/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/car-shipping.xhtml deleted file mode 100644 index fec5fc7f..00000000 --- a/wiki.cartagen.org/wiki-xhtml-2011-09-05-12-16-31/car-shipping.xhtml +++ /dev/null @@ -1,534 +0,0 @@ - - - -