当前位置: 首页>>代码示例>>Python>>正文


Python wkt.wkt_loads函数代码示例

本文整理汇总了Python中shapely.wkt.wkt_loads函数的典型用法代码示例。如果您正苦于以下问题:Python wkt_loads函数的具体用法?Python wkt_loads怎么用?Python wkt_loads使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wkt_loads函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_offshore_platform_way

    def test_offshore_platform_way(self):
        self.generate_fixtures(dsl.way(346405529, wkt_loads('POLYGON ((-119.906535907426 34.3897671631719, -119.906489105199 34.3899948169202, -119.905999703033 34.38992632070937, -119.906022879567 34.38981349457748, -119.905964219579 34.3898052661218, -119.905994133478 34.38965967421188, -119.906246110915 34.38969496025808, -119.906239822708 34.38972579847117, -119.906535907426 34.3897671631719))'), {u'building': u'industrial', u'source': u'openstreetmap.org', u'way_area': u'1944.96', u'man_made': u'offshore_platform', u'name': u'Platform Holly'}))  # noqa

        self.assert_has_feature(
            13, 1367, 3261, 'pois',
            {'kind': 'offshore_platform', 'min_zoom': 13})

        self.generate_fixtures(dsl.way(446514311, wkt_loads('POLYGON ((57.28399280807089 69.26576040721967, 57.28402739320939 69.2669031049751, 57.2874108078955 69.26689028887759, 57.287376222757 69.26574749503671, 57.28399280807089 69.26576040721967))'), {u'source': u'openstreetmap.org', u'way_area': u'135352', u'man_made': u'offshore_platform', u'name': u'\u041c\u041b\u0421\u041f \xab\u041f\u0440\u0438\u0440\u0430\u0437\u043b\u043e\u043c\u043d\u0430\u044f\xbb'}))  # noqa

        self.assert_has_feature(
            13, 5399, 1881, 'pois',
            {'kind': 'offshore_platform', 'min_zoom': 13, 'id': 446514311})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:12,代码来源:675-man_made-outdoor-landmarks.py

示例2: test_wood

    def test_wood(self):
        self.generate_fixtures(dsl.way(52497271, wkt_loads('POLYGON ((-121.954353215747 37.34413271456221, -121.954112646914 37.34428461761629, -121.953889595229 37.34453921701549, -121.953810004495 37.3445377886903, -121.953726910331 37.3444308784707, -121.953744607142 37.34433389498678, -121.954353215747 37.34413271456221))'), {u'way_area': u'1191.25', u'source': u'openstreetmap.org', u'landuse': u'wood', u'natural': u'wood'}))  # noqa

        self.assert_has_feature(
            16, 10566, 25429, 'landuse',
            {'id': 52497271, 'kind': 'wood'})

        self.generate_fixtures(dsl.way(207859675, wkt_loads('POLYGON ((-117.89005453116 33.91136551127548, -117.890027671533 33.91175720307361, -117.889979432002 33.9118240007339, -117.889933797586 33.91180841958788, -117.889847469487 33.91179552227351, -117.889797074 33.91180402108199, -117.889737964854 33.91183958187699, -117.889576627429 33.91175772493049, -117.889617321111 33.91172156769318, -117.889649480799 33.9116391887757, -117.889606631159 33.91161481056499, -117.889652175744 33.91149455953338, -117.889550306791 33.91082009198559, -117.88888258904 33.91056646635377, -117.889542221954 33.91055297243508, -117.889633400955 33.9104550109947, -117.889421488379 33.91019899860129, -117.889343784107 33.91020347174229, -117.889270840906 33.9101460664147, -117.889118486634 33.90998756786778, -117.889356630016 33.90954725944538, -117.889737515696 33.90960742363259, -117.889998566118 33.90958871086019, -117.889974131942 33.9113676732641, -117.89005453116 33.91136551127548))'), {u'way_area': u'18306.8', u'source': u'openstreetmap.org', u'landuse': u'wood'}))  # noqa

        self.assert_has_feature(
            16, 11306, 26199, 'landuse',
            {'id': 207859675, 'kind': 'wood'})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:12,代码来源:844-normalize-poi-kind.py

示例3: test_landuse_quarry

    def test_landuse_quarry(self):
        self.generate_fixtures(dsl.way(3356570361, wkt_loads('POINT (-122.153005130541 38.21004035449701)'), {u'source': u'openstreetmap.org', u'landuse': u'quarry', u'resource': u'rock'}))  # noqa

        self.assert_has_feature(
            16, 10530, 25230, 'pois',
            {'id': 3356570361})

        # Way:184367568 quarry in POIS
        self.generate_fixtures(dsl.way(184367568, wkt_loads('POLYGON ((-120.977489333016 37.75803770943879, -120.977486997396 37.76081756655368, -120.976233937406 37.76077552360858, -120.975400929643 37.7607743873124, -120.974583372903 37.76077332203479, -120.973504316584 37.76062567440368, -120.97213699089 37.76035516386188, -120.971016971394 37.7601061001177, -120.970661597867 37.7599816034407, -120.97063294161 37.75963545470499, -120.970616682103 37.7594398664594, -120.970625485593 37.75941607482559, -120.970835242212 37.75885182025329, -120.970928667001 37.7585999816441, -120.971144981322 37.75855530967489, -120.971802368447 37.75841951808628, -120.971967209301 37.7582608575149, -120.9720635087 37.75745135660739, -120.971951219289 37.75722600441009, -120.972019042093 37.75718296511631, -120.972093961588 37.75713530936738, -120.972331386317 37.7569844584784, -120.972452838544 37.75689695914001, -120.972641574585 37.75557287981598, -120.972647683129 37.75482471444889, -120.975799062977 37.75418158732738, -120.975874970619 37.75416880285528, -120.976019329885 37.7541445833771, -120.976370571161 37.75533779164638, -120.976515469416 37.75582998445129, -120.976667733857 37.7561338213188, -120.976875693845 37.75641066831778, -120.97701762766 37.7564229552437, -120.977076287648 37.75642806887698, -120.977279396734 37.75644568250009, -120.977288110392 37.75651152048169, -120.977319461596 37.7567493747943, -120.977408125314 37.75742181157429, -120.977429145892 37.7575811841611, -120.977489333016 37.75803770943879))'), {u'attribution': u'Farmland Mapping and Monitoring Program', u'way_area': u'508870', u'source': u'openstreetmap.org', u'FMMP_modified': u'no', u'addr:county': u'San Joaquin', u'landuse': u'quarry', u'FMMP_reviewed': u'no'}))  # noqa

        self.assert_has_feature(
            14, 2686, 6333, 'pois',
            {'id': 184367568, 'min_zoom': 13})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:13,代码来源:1218-poni-whitelist.py

示例4: test_man_made_offshore_platform

    def test_man_made_offshore_platform(self):
        self.generate_fixtures(dsl.way(4239915448, wkt_loads('POINT (-97.05473509633438 26.12074297830959)'), {u'seamark:type': u'platform', u'man_made': u'offshore_platform', u'source': u'openstreetmap.org'}))  # noqa

        self.assert_has_feature(
            15, 7549, 13919, 'pois',
            {'id': 4239915448})

        # originally from 675-man_made-outdoor-landmarks.py
        self.generate_fixtures(dsl.way(350328482, wkt_loads('POLYGON ((-94.63139900237969 29.40923572279329, -94.63116238613378 29.40925700824868, -94.6311144160976 29.4088532881355, -94.6313510323435 29.40883200259559, -94.63139900237969 29.40923572279329))'), {u'source': u'openstreetmap.org', u'way_area': u'1373.41', u'man_made': u'offshore_platform', u'area': u'yes'}))  # noqa

        self.assert_has_feature(
            13, 1942, 3395, 'pois',
            {'id': 350328482})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:13,代码来源:1218-poni-whitelist.py

示例5: test_historic_railway_halt

    def test_historic_railway_halt(self):
        # Historic railway halt
        self.generate_fixtures(dsl.way(708144563, wkt_loads('POINT (14.8139903286339 59.15514209522067)'), {u'historic:railway': u'halt', u'historic': u'yes', u'disused': u'yes', u'name': u'Kvistbro', u'source': u'openstreetmap.org'}))  # noqa

        self.assert_no_matching_feature(
            13, 4433, 2416, 'pois',
            {'id': 708144563})

        self.generate_fixtures(dsl.way(2468597590, wkt_loads('POINT (9.147960458165631 46.24711157299198)'), {u'source': u'openstreetmap.org', u'railway': u'halt', u'historic': u'railway_station', u'name': u'Grono'}))  # noqa

        self.assert_no_matching_feature(
            13, 4304, 2906, 'pois',
            {'id': 2468597590})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:13,代码来源:661-historic-transit-stops.py

示例6: test_proposed_stations

    def test_proposed_stations(self):
        # Antioch Station
        self.generate_fixtures(dsl.way(3353451464, wkt_loads('POINT (-121.785229642994 37.99688077243528)'), {u'name': u'Antioch Station (in construction)', u'source': u'openstreetmap.org', u'state': u'proposed', u'train': u'yes', u'public_transport': u'station', u'operator': u'BART', u'railway': u'station'}))  # noqa

        self.assert_has_feature(
            16, 10597, 25279, 'pois',
            {'id': 3353451464, 'state': 'proposed'})

        # Pittsburg Center
        self.generate_fixtures(dsl.way(3354463416, wkt_loads('POINT (-121.88916373322 38.01684868163071)'), {u'toilets': u'yes', u'name': u'BART - Pittsburg Center Station (In Construction)', u'wheelchair': u'yes', u'source': u'openstreetmap.org', u'state': u'proposed', u'train': u'yes', u'public_transport': u'station', u'operator': u'BART', u'railway': u'station', u'toilets:wheelchair': u'yes'}))  # noqa

        self.assert_has_feature(
            16, 10578, 25275, 'pois',
            {'id': 3354463416, 'state': 'proposed'})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:14,代码来源:484-include-state-pois.py

示例7: test_large_outdoor

    def test_large_outdoor(self):
        # http://www.openstreetmap.org/way/377630800
        # Large Bass Pro building that should appear earlier
        self.generate_fixtures(dsl.way(377630800, wkt_loads('POLYGON ((-104.827294994284 39.02406511310399, -104.826632037605 39.02437706682608, -104.826394792538 39.02407285962249, -104.826073285498 39.0242241608225, -104.82564496877 39.02367478517689, -104.82595291125 39.0235299033882, -104.825856611851 39.0234063767732, -104.826482198615 39.02311200569858, -104.826618562875 39.0232869675069, -104.826799932731 39.0232016850202, -104.827087303791 39.0235703112002, -104.826957137906 39.0236315858692, -104.827294994284 39.02406511310399))'), {u'shop': u'outdoor', u'building': u'retail', u'way_area': u'18864.9', u'name': u'Bass Pro Shop', u'source': u'openstreetmap.org'}))  # noqa

        self.assert_has_feature(
            15, 6842, 12520, 'pois',
            {'kind': 'outdoor', 'id': 377630800})

        # Large REI building that should appear earlier
        self.generate_fixtures(dsl.way(290195878, wkt_loads('POLYGON ((-111.802024167649 40.70123485563938, -111.802023987986 40.7014723988414, -111.8015969289 40.70146919800679, -111.801545365603 40.7014105614151, -111.800970443821 40.70141709929548, -111.800970443821 40.70153416810739, -111.800824467587 40.70153416810739, -111.800807309766 40.70066878023668, -111.801682807841 40.70066878023668, -111.801777220778 40.70074035716837, -111.801785844605 40.70123485563938, -111.802024167649 40.70123485563938))'), {u'shop': u'outdoor', u'building': u'yes', u'name': u'REI', u'addr:postcode': u'84109', u'way_area': u'13133', u'addr:housenumber': u'3285', u'addr:city': u'Salt Lake City', u'source': u'openstreetmap.org', u'opening_hours': u'Mo-Fr 10:00-21:00;Sa 9:00-19:00;Su 11:00-18:00', u'internet_access': u'wlan', u'addr:street': u'3300 S'}))  # noqa

        self.assert_has_feature(
            15, 6207, 12321, 'pois',
            {'kind': 'outdoor', 'id': 290195878})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:15,代码来源:674-outdoor-shops.py

示例8: test_trunk_level_0

    def test_trunk_level_0(self):
        self.generate_fixtures(dsl.way(259492789, wkt_loads('LINESTRING (-74.16702601822249 40.73275266220829, -74.16711180733211 40.73254919807029)'), {u'tunnel': u'yes', u'tiger:name_base': u'McCarter', u'hgv:state_network': u'yes', u'name': u'McCarter Highway', u'tiger:cfcc': u'A35', u'tiger:name_base_1': u'State Route 21', u'hgv': u'designated', u'tiger:zip_left': u'07104', u'tiger:zip_right': u'07104', u'lanes': u'4', u'source': u'openstreetmap.org', u'tiger:county': u'Essex, NJ', u'tiger:name_type': u'Hwy', u'NHS': u'yes', u'ref': u'NJ 21', u'NJDOT_SRI': u'00000021', u'HFCS': u'Urban Principal Arterial', u'source:hgv:state_network': u'NJDOT http://www.state.nj.us/transportation/about/rules/pdf/chapter32truckaccess.pdf', u'highway': u'trunk'}))  # noqa

        self.assert_has_feature(
            16, 19266, 24635, "roads",
            {"kind": "major_road", "kind_detail": "trunk", "id": 259492789,
             "name": "McCarter Hwy.", "is_tunnel": True, "sort_rank": 331})

        self.generate_fixtures(dsl.way(277441866, wkt_loads('LINESTRING (-83.51858074221251 35.74467572285489, -83.5186876417313 35.74474476841309, -83.51881250755579 35.74482300053089, -83.5189321631516 35.74490640915329, -83.51904642885579 35.74499477553549, -83.51915494534208 35.74508795384219, -83.51925717362138 35.74518557950971, -83.5193531136938 35.74528736088479, -83.519442406233 35.74539315213308, -83.51952478174461 35.74550258869337, -83.5196001503969 35.74561537891499, -83.5196680630324 35.74573115823921, -83.51972860948248 35.745849707927, -83.51978143042119 35.7459706634228, -83.519826436017 35.74609380599009, -83.51986353643818 35.74621847944319, -83.51989255202189 35.74634468377489, -83.519913482768 35.746471981529, -83.51992632867659 35.74660000815989, -83.51993082025298 35.74672825330868)'), {u'unsigned_ref': u'SR 71;SR 73', u'lanes': u'2', u'name': u'Gatlinburg Spur Road (north)', u'tunnel': u'yes', u'surface': u'paved', u'source': u'openstreetmap.org', u'official_name': u'Gatlinburg Spur Road (north)', u'NHS': u'yes', u'oneway': u'yes', u'ref': u'US 321;US 441', u'highway': u'trunk'}))  # noqa

        self.assert_has_feature(
            16, 17563, 25792, "roads",
            {"kind": "major_road", "kind_detail": "trunk", "id": 277441866,
             "name": "Gatlinburg Spur Road (north)", "is_tunnel": True,
             "sort_rank": 331})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:15,代码来源:546-road-sort-keys-tunnel.py

示例9: test_building_ranger_station

    def test_building_ranger_station(self):
        # Building with amenity=ranger_station
        self.generate_fixtures(dsl.way(361301773, wkt_loads('POLYGON ((-122.477381030419 37.83698367631209, -122.47725293066 37.83702865560479, -122.47713597001 37.83682106955531, -122.477264069769 37.83677609013608, -122.477381030419 37.83698367631209))'), {u'building': u'yes', u'addr:housenumber': u'T507', u'amenity': u'ranger_station', u'addr:city': u'Sausalito', u'building:levels': u'2', u'way_area': u'499.794', u'addr:state': u'CA', u'source': u'openstreetmap.org', u'addr:country': u'US', u'addr:street': u'McReynolds Road'}))  # noqa

        self.assert_has_feature(
            14, 2617, 6329, 'pois',
            {'kind': 'ranger_station', 'min_zoom': 14})

        # Entrance Yosemite Nationalpark
        # Building with amenity=ranger_station
        self.generate_fixtures(dsl.way(269908344, wkt_loads('POLYGON ((-119.731012377263 37.68609727879108, -119.730953896938 37.68613026461198, -119.730923533881 37.68610751577161, -119.730981565048 37.68607140197321, -119.731012377263 37.68609727879108))'), {u'building': u'yes', u'source': u'openstreetmap.org', u'amenity': u'ranger_station', u'way_area': u'38.727', u'name': u'Entrance Yosemite Nationalpark'}))  # noqa

        self.assert_has_feature(
            14, 2742, 6337, 'pois',
            {'kind': 'ranger_station', 'min_zoom': 14})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:15,代码来源:671-ranger-station.py

示例10: test_unnamed_rock

    def test_unnamed_rock(self):
        # originally from 657-natural-man_made.py
        # unnamed rock
        self.generate_fixtures(dsl.way(4013703516, wkt_loads('POINT (-122.523488499681 38.0215078752183)'), {u'source': u'openstreetmap.org', u'natural': u'rock'}))  # noqa

        self.assert_has_feature(
            16, 10463, 25274, 'pois',
            {'id': 4013703516})

        # another unnamed rock
        self.generate_fixtures(dsl.way(3150154140, wkt_loads('POINT (-122.416442645311 37.93267727336828)'), {u'source': u'openstreetmap.org', u'natural': u'rock'}))  # noqa

        self.assert_has_feature(
            16, 10482, 25294, 'pois',
            {'id': 3150154140})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:15,代码来源:1218-poni-whitelist.py

示例11: test_shop_alcohol

    def test_shop_alcohol(self):
        # Noe Valley Wine Merchants, San Francisco, CA
        self.generate_fixtures(dsl.way(1713269631, wkt_loads('POINT (-122.427979978 37.7515696737989)'), {u'shop': u'alcohol', u'addr:housenumber': u'3821', u'name': u'Noe Valley Wine Merchants', u'addr:city': u'San Francisco', u'source': u'openstreetmap.org', u'addr:street': u'24th Street'}))  # noqa

        self.assert_has_feature(
            16, 10480, 25336, 'pois',
            {'kind': 'alcohol'})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:7,代码来源:448-wine-and-alcohol-shops.py

示例12: test_yard

    def test_yard(self):
        self.generate_fixtures(dsl.way(1344032371, wkt_loads('POINT (-122.401192216227 37.7716789726811)'), {u'source': u'openstreetmap.org', u'railway': u'buffer_stop'}),dsl.way(119709585, wkt_loads('LINESTRING (-122.399873579222 37.772668676103, -122.400049469354 37.77256117129298, -122.400127802447 37.77251331243039, -122.400226886623 37.7724467076115, -122.400287522904 37.7724011919172, -122.401192216227 37.7716789726811)'), {u'service': u'yard', u'electrified': u'no', u'source': u'openstreetmap.org', u'gauge': u'1435', u'railway': u'rail', u'railway:traffic_mode': u'passenger'}))  # noqa

        self.assert_has_feature(
            16, 10485, 25331, "roads",
            {"kind": "rail", "kind_detail": "rail", "service": "yard",
             "id": 119709585, "sort_rank": 359})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:7,代码来源:546-road-sort-keys-railways.py

示例13: test_public_transport_stop_position

    def test_public_transport_stop_position(self):
        # originally from 661-historic-transit-stops.py
        self.generate_fixtures(dsl.way(3721890342, wkt_loads('POINT (-122.15620591773 37.438295280187)'), {u'source': u'openstreetmap.org', u'railway': u'stop', u'network': u'Caltrain', u'public_transport': u'stop_position'}))  # noqa

        self.assert_has_feature(
            16, 10530, 25408, 'pois',
            {'id': 3721890342, 'kind': 'stop', 'min_zoom': 16})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:7,代码来源:1218-poni-whitelist.py

示例14: test_fences_around_enclosures

    def test_fences_around_enclosures(self):
        # barrier=fence around enclosures
        self.generate_fixtures(dsl.way(316623706, wkt_loads('POLYGON ((-117.060170479934 51.29075749793969, -117.05995748938 51.29087490941641, -117.059694013507 51.29098546693429, -117.059412481497 51.29109158617149, -117.059033482278 51.29119309862668, -117.058712334564 51.29129916120679, -117.058380317235 51.2914324132113, -117.05816373342 51.29160841537159, -117.058026560676 51.29169419722047, -117.057813570123 51.29184986249769, -117.057618725537 51.29198991023731, -117.057373305802 51.2921297890213, -117.057124202974 51.29228326196, -117.056741700326 51.29207338814918, -117.056579195091 51.29192440861999, -117.056279696775 51.2916557723649, -117.056041463562 51.29141426804119, -117.055846618977 51.29120219934499, -117.055637221684 51.2909267613749, -117.055427914223 51.29062430015458, -117.055597516148 51.29052497738771, -117.055918843525 51.29042346345539, -117.056175043044 51.2903421734983, -117.056232804717 51.2902180754217, -117.056384260674 51.29010290941009, -117.056730830711 51.28999229358838, -117.057080904177 51.28990426140589, -117.057297487992 51.28982077955029, -117.057640374936 51.28966280404911, -117.057947239437 51.28954319848048, -117.058271980412 51.28939870509998, -117.058517400148 51.28928359321298, -117.058687091905 51.2891933124828, -117.058863880353 51.28907370569137, -117.059109300088 51.28892921083359, -117.059286178368 51.28917977316698, -117.059112983181 51.28933100878368, -117.058867473614 51.28956117585217, -117.058982996959 51.28979151030399, -117.059246472832 51.2898839808345, -117.0595748969 51.29001718076711, -117.059722939259 51.29009616797609, -117.059823999728 51.2901277965288, -117.05995748938 51.29029251183658, -117.060051363327 51.29050020284048, -117.060145237274 51.29068300610069, -117.060170479934 51.29075749793969))'), {u'name': u'Bear Enclosure', u'barrier': u'fence', u'area': u'yes', u'way_area': u'150889', u'zoo': u'enclosure', u'source': u'openstreetmap.org', u'tourism': u'zoo'}))  # noqa

        self.assert_has_feature(
            16, 11458, 21855, 'landuse',
            {'kind': 'fence'})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:7,代码来源:440-zoos-and-other-attractions-barrier.py

示例15: test_rail

    def test_rail(self):
        self.generate_fixtures(dsl.way(8920472, wkt_loads('LINESTRING (-122.39304153216 37.76442237615658, -122.392898520366 37.7639947225477, -122.392802041305 37.76360449179799, -122.392737632099 37.76319735713969)'), {u'tiger:name_base': u'Union Pacific Railroad', u'name': u'Peninsula', u'tiger:cfcc': u'B11', u'source': u'openstreetmap.org', u'electrified': u'no', u'operator': u'TransitAmerica Services', u'owner': u'Peninsula Joint Powers Board Railroad', u'tiger:county': u'San Francisco, CA', u'gauge': u'1435', u'usage': u'main', u'railway': u'rail', u'railway:traffic_mode': u'passenger'}))  # noqa

        self.assert_has_feature(
            16, 10487, 25333, "roads",
            {"kind": "rail", "kind_detail": "rail", "id": 8920472,
             "sort_rank": 382})
开发者ID:tilezen,项目名称:vector-datasource,代码行数:7,代码来源:546-road-sort-keys-railways.py


注:本文中的shapely.wkt.wkt_loads函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。