{"id":4893,"date":"2010-08-02T19:11:55","date_gmt":"2010-08-02T10:11:55","guid":{"rendered":"http:\/\/leavebehind.iobb.net\/wordpress\/?p=4893"},"modified":"2010-08-02T19:11:55","modified_gmt":"2010-08-02T10:11:55","slug":"openstreetmap","status":"publish","type":"post","link":"http:\/\/leavebehind.mydns.jp\/wordpress\/2010\/08\/02\/openstreetmap\/","title":{"rendered":"OpenStreetMap"},"content":{"rendered":"<p>\u304a\u76c6\u4f11\u307f\u3088\u3053\u3057\u306a\u3055\u30fc\u3044\uff01<\/p>\n<p><a href=\"http:\/\/www.sidefx.com\/index.php?option=com_content&#038;task=view&#038;id=1774&#038;Itemid=66\">Houdini\u304c\u30d0\u30fc\u30b8\u30e7\u30f311<\/a>\u306b\u306a\u3063\u305f\u3093\u3067\u3059\u3063\u3066\u3088\u3002\u307e\u3041\u305b\u3063\u304b\u304f\u5feb\u9069\u306b\u306a\u3063\u305fPC\u306b\u5165\u308c\u308b\u3064\u3082\u308a\u306f\u306a\u3044\u3067\u3059\u304c\u3002\u305d\u308c\u306f\u3055\u3066\u304a\u304d\u3001\u4e45\u3057\u3076\u308a\u306bSideEffects\u793e\u306e\u30b5\u30a4\u30c8\u3092\u30c0\u30e9\u30c0\u30e9\u3068\u8aad\u3093\u3067\u3044\u305f\u3089\u3001\u3053\u3093\u306a\u7d39\u4ecb\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"http:\/\/www.sidefx.com\/index.php?option=com_content&#038;task=view&#038;id=1721&#038;Itemid=66\">cmiVFX presents: PROCEDURAL CITY SKELETIONS<\/a><\/p>\n<figure id=\"attachment_4900\" aria-describedby=\"caption-attachment-4900\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2010\/08\/Houdini-Generating-Regional-Procedural-City-Skeletons.png\" alt=\"\" title=\"Houdini-Generating Regional Procedural City Skeletons\" width=\"610\" height=\"343\" class=\"size-full wp-image-4900\" \/><figcaption id=\"caption-attachment-4900\" class=\"wp-caption-text\">Generating Regional Procedural City Skeletons<\/figcaption><\/figure>\n<p><a href=\"http:\/\/www.openstreetmap.org\/\">OpenStreetMap<\/a>\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u5730\u56f3\u30c7\u30fc\u30bf\u3092Python\u3067\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5\u3001\u306e\u5e83\u544a\u3067\u3059\u306d\u3002\u672c\u6587\u3092\u8aad\u3080\u306b\u306fcmiVFX\u3092\u8cfc\u8aad\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3068\u306f\u3044\u3048\u5225\u306bHoudini\u304c\u306a\u304d\u3083\u904a\u3079\u306a\u3044\u308f\u3051\u3067\u306f\u306a\u3044\u3067\u3059\u3002\u5730\u56f3\u30c7\u30fc\u30bf(osm xml)\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001<!--more--><\/p>\n<figure id=\"attachment_4906\" aria-describedby=\"caption-attachment-4906\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2010\/08\/OpenStreetMap.jpg\" alt=\"\" title=\"OpenStreetMap\" width=\"640\" height=\"584\" class=\"size-full wp-image-4906\" \/><figcaption id=\"caption-attachment-4906\" class=\"wp-caption-text\">\u4f1a\u793e\u306e\u5468\u308a(\u53f3\u4e0b\u306f\u5927\u962a\u57ce)<\/figcaption><\/figure>\n<p>Processing\u3067\u8aad\u3093\u3067\u63cf\u753b\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u30e1\u30eb\u30ab\u30c8\u30eb\u56f3\u6cd5\u3068\u304b\u6295\u5f71\u65b9\u6cd5\u306f\u3044\u308d\u3044\u308d\u3042\u308a\u307e\u3059\u3051\u3069\u3001\u9069\u5f53\u3002<\/p>\n<figure id=\"attachment_4907\" aria-describedby=\"caption-attachment-4907\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/leavebehind.iobb.net\/wordpress\/wp-content\/uploads\/2010\/08\/osmParse.jpg\" alt=\"\" title=\"osmParse\" width=\"640\" height=\"474\" class=\"size-full wp-image-4907\" \/><figcaption id=\"caption-attachment-4907\" class=\"wp-caption-text\">\u8aad\u307f\u8fbc\u3093\u3067\u307f\u305f<\/figcaption><\/figure>\n<p>\u300c\u3075\uff5e\u3093\u300d\u3063\u3066\u611f\u3058\u3067\u3059\u306d\u3002\u307e\u3063\u3001\u305d\u306e\u3046\u3061\u4f55\u304b\u306e\u5f79\u306b\u305f\u3064\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u3002\u5b9f\u5728\/\u67b6\u7a7a\u554f\u308f\u305a\u3001\u753a\u306e\u4fef\u77b0\u3092CG\u3067\u3064\u304f\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u305f\u307e\u306b\u3042\u308b\u3093\u3067\u3059\u3088\u306d\u3002Illustrator\u3067\u4e00\u304b\u3089\u4f5c\u308b\u3068\u306a\u3093\u304b\u5618\u3063\u307d\u304f\u306a\u308b\u3093\u3067\u3059\u304c\u3053\u308c\u306a\u3089\u3044\u3044\u304b\u3082\u3002<\/p>\n<p>\u30bd\u30fc\u30b9\u3067\u3059\u3002\u5730\u56f3\u30c7\u30fc\u30bf\u306f\u5225\u9014\u7528\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>\n\/* \n * osmParse.pde\n * made with Processing 1.2.1\n * Auther: hTaka\n*\/\n\nimport java.util.Hashtable;\n\nXMLElement xml;\nXMLElement bounds;\nint numOfNode = 0;\nint numOfWay = 0;\nfloat minLat,minLon,maxLat,maxLon;\nHashtable nodeTable;\n\nvoid setup() {\n  \/\/size(640, 640);\n  noLoop();\n  smooth();\n  \n  xml = new XMLElement(this, \"map.osm\");\n\n  \/\/get data region\n  bounds = xml.getChild(\"bounds\");\n  minLat = bounds.getFloatAttribute(\"minlat\");\n  minLon = bounds.getFloatAttribute(\"minlon\");\n  maxLat = bounds.getFloatAttribute(\"maxlat\");\n  maxLon = bounds.getFloatAttribute(\"maxlon\");\n  float aspect = (maxLon-minLon)\/(maxLat-minLat)\/2;\n  \n  nodeTable = new Hashtable();\n  size(1024,(int)(1024*aspect));\n  \n  stroke(255);\n}\n\nvoid draw() {\n  background(0,0,128);\n  int num = xml.getChildCount();\n\n  \/\/get nodes\n  for (int i = 0; i < num; i++) {\n    XMLElement node = xml.getChild(i);\n\n    if(node.getName().equals(\"node\")) {\n      PVector location = new PVector(node.getFloatAttribute(\"lon\"),node.getFloatAttribute(\"lat\"));\n      nodeTable.put(node.getIntAttribute(\"id\"),location);\n      strokeWeight(3);\n      point(map(node.getFloatAttribute(\"lon\"),minLon,maxLon,0,width),map(node.getFloatAttribute(\"lat\"),minLat,maxLat,height,0));\n      numOfNode ++;\n    }\n  }\n  \/\/get way and draw\n  for (int i = 0; i < num; i++) {\n    XMLElement way = xml.getChild(i);\n    strokeWeight(1);\n    stroke(128);\n    if(way.getName().equals(\"way\")) {\n      int numOfNdRef = way.getChildCount();\n      noFill();\n      beginShape();\n      for(int j = 0;j < numOfNdRef; j++) {\n        XMLElement ndRef = way.getChild(j);\n        if(ndRef.getName().equals(\"nd\")) {\n          PVector vec = (PVector)nodeTable.get(ndRef.getIntAttribute(\"ref\"));\n          vertex(map(vec.x, minLon, maxLon, 0, width), map(vec.y, minLat, maxLat, height, 0));\n        }\n      }\n      endShape();\n      numOfWay ++;\n    }\n  }\n\n  println(\"Root:\" + xml.getName());\n  println(\"version:\" + xml.getFloatAttribute(\"version\"));\n  println(\"# of node:\" + numOfNode);\n  println(\"# of way:\" + numOfWay);\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u304a\u76c6\u4f11\u307f\u3088\u3053\u3057\u306a\u3055\u30fc\u3044\uff01 Houdini\u304c\u30d0\u30fc\u30b8\u30e7\u30f311\u306b\u306a\u3063\u305f\u3093\u3067\u3059\u3063\u3066\u3088\u3002\u307e\u3041\u305b\u3063\u304b\u304f\u5feb\u9069\u306b\u306a\u3063\u305fPC\u306b\u5165\u308c\u308b\u3064\u3082\u308a\u306f\u306a\u3044\u3067\u3059\u304c\u3002\u305d\u308c\u306f\u3055\u3066\u304a\u304d\u3001\u4e45\u3057\u3076\u308a\u306bSideEffects\u793e\u306e\u30b5\u30a4\u30c8\u3092\u30c0\u30e9\u30c0\u30e9\u3068\u8aad\u3093\u3067\u3044\u305f\u3089\u3001\u3053 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,23,11],"tags":[133,199,226,306],"class_list":["post-4893","post","type-post","status-publish","format-standard","hentry","category-cg","category-interest","category-proce55ing","tag-houdini","tag-open-street-map","tag-processing","tag-xml"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8YSE4-1gV","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/4893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/comments?post=4893"}],"version-history":[{"count":0,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/posts\/4893\/revisions"}],"wp:attachment":[{"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=4893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=4893"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/leavebehind.mydns.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=4893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}