maps4fs 1.4.6__py3-none-any.whl → 1.4.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of maps4fs might be problematic. Click here for more details.
- maps4fs/generator/i3d.py +23 -0
- maps4fs/generator/map.py +1 -1
- maps4fs/generator/texture.py +5 -1
- {maps4fs-1.4.6.dist-info → maps4fs-1.4.8.dist-info}/METADATA +1 -1
- {maps4fs-1.4.6.dist-info → maps4fs-1.4.8.dist-info}/RECORD +8 -8
- {maps4fs-1.4.6.dist-info → maps4fs-1.4.8.dist-info}/LICENSE.md +0 -0
- {maps4fs-1.4.6.dist-info → maps4fs-1.4.8.dist-info}/WHEEL +0 -0
- {maps4fs-1.4.6.dist-info → maps4fs-1.4.8.dist-info}/top_level.txt +0 -0
maps4fs/generator/i3d.py
CHANGED
@@ -184,6 +184,10 @@ class I3d(Component):
|
|
184
184
|
|
185
185
|
if shapes_node is not None and scene_node is not None:
|
186
186
|
node_id = SPLINES_NODE_ID_STARTING_VALUE
|
187
|
+
user_attributes_node = root.find(".//UserAttributes")
|
188
|
+
if user_attributes_node is None:
|
189
|
+
self.logger.warning("UserAttributes node not found in I3D file.")
|
190
|
+
return
|
187
191
|
|
188
192
|
for road_id, road in enumerate(roads_polylines, start=1):
|
189
193
|
# Add to scene node
|
@@ -254,6 +258,25 @@ class I3d(Component):
|
|
254
258
|
|
255
259
|
shapes_node.append(nurbs_curve_node)
|
256
260
|
|
261
|
+
# Add UserAttributes to the shape node.
|
262
|
+
# <UserAttribute nodeId="5000">
|
263
|
+
# <Attribute name="maxSpeedScale" type="integer" value="1"/>
|
264
|
+
# <Attribute name="speedLimit" type="integer" value="100"/>
|
265
|
+
# </UserAttribute>
|
266
|
+
|
267
|
+
user_attribute_node = ET.Element("UserAttribute")
|
268
|
+
user_attribute_node.set("nodeId", str(node_id))
|
269
|
+
|
270
|
+
attributes = [
|
271
|
+
("maxSpeedScale", "integer", "1"),
|
272
|
+
("speedLimit", "integer", "100"),
|
273
|
+
]
|
274
|
+
|
275
|
+
for name, attr_type, value in attributes:
|
276
|
+
user_attribute_node.append(I3d.create_attribute_node(name, attr_type, value))
|
277
|
+
|
278
|
+
user_attributes_node.append(user_attribute_node) # type: ignore
|
279
|
+
|
257
280
|
node_id += 1
|
258
281
|
|
259
282
|
tree.write(splines_i3d_path) # type: ignore
|
maps4fs/generator/map.py
CHANGED
maps4fs/generator/texture.py
CHANGED
@@ -706,7 +706,11 @@ class Texture(Component):
|
|
706
706
|
Generator[np.ndarray, None, None]: Numpy array of polygon points.
|
707
707
|
"""
|
708
708
|
for _, obj in objects_utm.iterrows():
|
709
|
-
|
709
|
+
try:
|
710
|
+
polygon = self._to_polygon(obj, width)
|
711
|
+
except Exception as e: # pylint: disable=W0703
|
712
|
+
self.logger.warning("Error converting object to polygon: %s.", e)
|
713
|
+
continue
|
710
714
|
if polygon is None:
|
711
715
|
continue
|
712
716
|
|
@@ -7,15 +7,15 @@ maps4fs/generator/config.py,sha256=0QmK052B8bxyHVhg3jzCORLfOBMMmqVfhhbqXKf6OMk,4
|
|
7
7
|
maps4fs/generator/dem.py,sha256=MZf3ZjawJ977TxqB1q9nNpvPZUNwfmm2EaJDtVU-eCU,15939
|
8
8
|
maps4fs/generator/game.py,sha256=jjo7CTwHHSkRpeD_QgRXkhR_NxI09C4kMxz-nYOTM4A,7931
|
9
9
|
maps4fs/generator/grle.py,sha256=onhZovvRtireDfw7wEOL0CZmOmoVzRPY-R4TlvbOUMI,17561
|
10
|
-
maps4fs/generator/i3d.py,sha256=
|
11
|
-
maps4fs/generator/map.py,sha256=
|
10
|
+
maps4fs/generator/i3d.py,sha256=qeZYqfuhbhRPlSAuQHXaq6RmIO7314oMN68Ivebp1YQ,24786
|
11
|
+
maps4fs/generator/map.py,sha256=13RazKCPqKk5BDDdjQacoebP2H9orv12Jm_IA_JUmec,11721
|
12
12
|
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
13
|
-
maps4fs/generator/texture.py,sha256
|
13
|
+
maps4fs/generator/texture.py,sha256=-gfqM2ZiqeZ17NA_ZDpBhkgE0mBhUQFKu0paQqoOmXs,30860
|
14
14
|
maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
15
15
|
maps4fs/toolbox/background.py,sha256=9BXWNqs_n3HgqDiPztWylgYk_QM4YgBpe6_ZNQAWtSc,2154
|
16
16
|
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
17
|
-
maps4fs-1.4.
|
18
|
-
maps4fs-1.4.
|
19
|
-
maps4fs-1.4.
|
20
|
-
maps4fs-1.4.
|
21
|
-
maps4fs-1.4.
|
17
|
+
maps4fs-1.4.8.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
18
|
+
maps4fs-1.4.8.dist-info/METADATA,sha256=liNcbsXemVkgnJ92Qwfcf1Ic0BzkVaRDD3CIY2B6lU0,32421
|
19
|
+
maps4fs-1.4.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
20
|
+
maps4fs-1.4.8.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
21
|
+
maps4fs-1.4.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|