Skip to content

Commit 4e4e78f

Browse files
committed
Update example.rst
1 parent b34d568 commit 4e4e78f

File tree

1 file changed

+0
-99
lines changed

1 file changed

+0
-99
lines changed

docs/source/example/example.rst

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -326,102 +326,3 @@ light. Given coordinates and height of the point light:
326326

327327
.. figure:: https://github.com/ni1o1/pybdshadow/raw/main/image/README/1649405838683.png
328328
:alt: 1649405838683.png
329-
330-
331-
Advertisment billboard analyze
332-
==============================
333-
334-
Billboard visual area analyze
335-
-----------------------------
336-
337-
To analyze billboard visual area, the parameter ``ad_params`` for the
338-
billboard should be defined. It has two forms:
339-
340-
::
341-
342-
#ad_params for the billboard should be defined. It has two forms
343-
#1. Given the coordinates of brandCenter, orientation and height
344-
ad_params = {'orientation': 1.2806657381630058,
345-
'height': 10,
346-
'brandCenter': [139.71259, 35.552842999999996]}
347-
348-
#2. Given the coordinates of the two border points and height
349-
ad_params = {'point1': [139.711861, 35.552040],
350-
'point2': [139.713319, 35.553646],#1861,3646
351-
'height': 50,
352-
}
353-
354-
We can calculate the visual area of the billboard using
355-
``ad_visualArea``.
356-
357-
::
358-
359-
#calculate the visual area
360-
visualArea,shadows = pybdshadow.ad_visualArea(ad_params,buildings)
361-
362-
Then, visualize the billboard and the visual area.
363-
364-
::
365-
366-
367-
368-
#Generate a GeoDataFrame from ad_params for visualization
369-
billboard_gdf = pybdshadow.ad_to_gdf(ad_params,billboard_height = 100)
370-
371-
#Visualize buildings, shadows, billboard and visual area
372-
pybdshadow.show_bdshadow(buildings=buildings,
373-
shadows=shadows,
374-
ad=billboard_gdf,
375-
ad_visualArea=visualArea)
376-
377-
378-
.. figure:: https://github.com/ni1o1/pybdshadow/raw/main/image/README/1649406044109.png
379-
:alt: 1649406044109.png
380-
381-
382-
Optimize billboard parameters
383-
-----------------------------
384-
385-
Optimize advertisment parameters using Genetic Algorithm
386-
387-
::
388-
389-
#Define area boundaries
390-
bounds = [139.707846,35.543637,139.718567,35.553909]
391-
392-
#Optimize billboard parameters
393-
ad_params = pybdshadow.ad_optimize(bounds,
394-
buildings,
395-
height_range=[100,200],
396-
printlog=True,
397-
size_pop=10,
398-
max_iter=10,
399-
prob_mut=0.001,
400-
precision=1e-7)
401-
ad_params
402-
403-
.. figure:: https://github.com/ni1o1/pybdshadow/blob/main/docs/source/example/output_ga.png?raw=true
404-
:alt: output_ga.png
405-
406-
::
407-
408-
{'orientation': 4.504880430224753,
409-
'height': 109.41611234294162,
410-
'brandCenter': [139.70883048898688, 35.550840354517774]}
411-
412-
::
413-
414-
#calculate the visual area
415-
visualArea,shadows = pybdshadow.ad_visualArea(ad_params,buildings)
416-
417-
#Generate a GeoDataFrame from ad_params for visualization
418-
billboard_gdf = pybdshadow.ad_to_gdf(ad_params,billboard_height = 100)
419-
420-
#Visualize buildings, shadows, billboard and visual area
421-
pybdshadow.show_bdshadow(buildings=buildings,
422-
shadows=shadows,
423-
ad=billboard_gdf,
424-
ad_visualArea=visualArea)
425-
426-
.. figure:: https://github.com/ni1o1/pybdshadow/blob/main/image/README/QQ20220413-100625.png?raw=true
427-
:alt: QQ20220413-100625.png

0 commit comments

Comments
 (0)