Skip to content

Commit

Permalink
Fix for handling OSM data that doesn't include map level size informa…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
lkruel committed Sep 18, 2018
1 parent 14e7ff2 commit d222ad8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion otls/sop_osm_import.hda/INDEX__SECTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Inputs: 0 to 0
Subnet: true
Python: false
Empty: false
Modified: Fri Aug 17 12:17:01 2018
Modified: Tue Sep 18 17:58:04 2018

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sop/split C:/PROGRA~1/SIDEEF~1/HOUDIN~1.496/houdini/otls/OPlibSop.hda
Sop/split C:/PROGRA~1/SIDEEF~1/HOUDIN~1.595/houdini/otls/OPlibSop.hda
Sop/split otls/OPlibSop.hda
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Content-Type: text/plain

sopflags sopflags =
comment ""
position -2.55844 0.93461
position -2.27647 1.945
connectornextid 0
flags = lock off model off template on footprint off xray off bypass off display on render on highlight off unload off savedata off compress on colordefault on exposed on
outputsNamed3
Expand All @@ -46,9 +46,9 @@ inputs
}
stat
{
create 1534500114
modify 1534501020
author Paul_Ambrosiussen@LAPTOP-P8R7FBPF
create 1537307525
modify 1537307574
author MAINGEAR@DESKTOP-P98C1VA
access 0777
}
color UT_Color RGB 0.8 0.8 0.8
Expand Down Expand Up @@ -82,7 +82,7 @@ sopflags sopflags =
comment ""
position -2.68731 8.21972
connectornextid 1
flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
flags = lock off model off template on footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on
outputsNamed3
{
0 "output1"
Expand All @@ -96,7 +96,7 @@ inputs
stat
{
create 1500592402
modify 1534500908
modify 1537307882
author Luiz@Luiz-PC
access 0777
}
Expand Down Expand Up @@ -195,14 +195,14 @@ class OSMParser(object):
def __init__(self, osm_file):
self.osm_file = osm_file

self.min_lat = 0
self.max_lat = 0
self.min_lat = -1
self.max_lat = 1

self.min_lon = 0
self.max_lon = 0
self.min_lon = -1
self.max_lon = 1

self.length = 0
self.height = 0
self.length = 500
self.height = 500

self.ways = []
self.nodes = {}
Expand All @@ -214,6 +214,8 @@ class OSMParser(object):
self.height = latlong_distance([self.min_lat, self.min_lon], [self.min_lat, self.max_lon])

def get_relative_coordinates(self, lat_long):


rel_lat = (lat_long[0] - self.min_lat) / (self.max_lat - self.min_lat) * self.length
rel_lon = (lat_long[1] - self.min_lon) / (self.max_lon - self.min_lon) * self.height

Expand Down Expand Up @@ -374,7 +376,7 @@ Content-Type: text/plain
{
"___Version___":{
"type":"string",
"value":"16.5.496"
"value":"16.5.595"
}
}

Expand Down Expand Up @@ -437,7 +439,7 @@ Content-Type: text/plain
{
"___Version___":{
"type":"string",
"value":"16.5.496"
"value":"16.5.595"
}
}

Expand Down Expand Up @@ -511,7 +513,7 @@ Content-Type: text/plain
{
"___Version___":{
"type":"string",
"value":"16.5.496"
"value":"16.5.595"
}
}

Expand Down Expand Up @@ -574,7 +576,7 @@ Content-Type: text/plain
{
"___Version___":{
"type":"string",
"value":"16.5.496"
"value":"16.5.595"
}
}

Expand Down Expand Up @@ -702,7 +704,7 @@ Content-Type: text/plain
{
"___Version___":{
"type":"string",
"value":"16.5.496"
"value":"16.5.595"
}
}

Expand Down Expand Up @@ -763,7 +765,7 @@ Content-Type: text/plain
{
"___Version___":{
"type":"string",
"value":"16.5.496"
"value":"16.5.595"
}
}

Expand Down Expand Up @@ -814,7 +816,7 @@ inputs
stat
{
create 1522783210
modify 1534500910
modify 1537307882
author MAINGEAR@DESKTOP-P98C1VA
access 0777
}
Expand All @@ -839,7 +841,7 @@ Content-Type: text/plain
{
"___Version___":{
"type":"string",
"value":"16.5.496"
"value":"16.5.595"
}
}

Expand Down

0 comments on commit d222ad8

Please sign in to comment.