Å°Æ®¸® ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Sean Gillies
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://plone.org/products/pleiadesgeocoder
Å°Æ®¸® ű×
Å°Æ®¸® ¼³¸í
ElementTree API¸¦À§ÇÑ KML À¯Æ¿¸®Æ¼ KeyTree´Â ElementTree API¸¦ »ç¿ëÇÏ¿© KMLÀ» Á¶ÀÛÇϱâÀ§ÇÑ ¿©·¯ ±â´ÉÀ» Á¦°øÇÏ´Â Python ¸ðµâÀÔ´Ï´Ù. ¿ä¼Ò´Â Python Geo ÀÎÅÍÆäÀ̽º¿¡ Àû¿ëÇÑ ´ÙÀ½ ¸Å²öÇÏ°Ô ÆÐÅ°Áö¿Í ÇÔ²² »ç¿ëµÉ ¼ö ÀÖ½À´Ï´Ù. >>> data = "" " xml version ="10 "ÀÎÄÚµù ="utf-8 "?> ...> ... ... ... ... point ... <¼³¸í> Æ÷ÀÎÆ® Å×½ºÆ® ... ... ... -122.364383,37.824664,0 ... ... ... ... . .. ... "" "xml.etree °¡Á® ¿À±â elementtree >>> Æ®¸® = ElementTree.FromString (µ¥ÀÌÅÍ) >>> kmlns = tree.tag.split ( '}) >>> PlaceMarks = Tree.FindAll ( '* / {% s} placemark'% KMLNS) >>> P0 = PlaceMarks >>> °¡Á® ¿À±â Keytree >>> F = KeyTree.Feature (P0) >>> sapely.geometry °¡Á® ¿À±â asshape >>> ¸ð¾ç = asshape (f.geometry) >>> shape.Buffer (1.5) .exerior.Length9.4209934708642571 ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã
Å°Æ®¸® °ü·Ã ¼ÒÇÁÆ®¿þ¾î