OSMnx Limit on using "street network from bounding box": TypeError: graph_from_bbox() takes at most 15 arguments (77 given) - osmnx

I am trying to get the drivable street network within some lat-long bounding box using the example 2a sample code from - https://geoffboeing.com/2016/11/osmnx-python-street-networks/ - but I am getting this error; TypeError: graph_from_bbox() takes at most 15 arguments (77 given).
Below is what I have already tried out:
G = ox.graph_from_bbox(29.94510876, 29.93205121, 29.93678994, 29.94840128, 29.94297549, 29.96456162, 29.96164721, 29.96828055, 29.91873862,
29.94221035, 29.95584061, 30.04064237, 29.93609316, 30.032814, 29.96624232, 30.00497466, 30.00427683, 29.94665333,
29.957519, 29.943813, 29.93076, 29.927549, 29.967799, 29.969906, 29.951438, 29.975021, 29.95932, 30.00816, 29.95056,
30.007622, 29.951881, 30.016095, 30.031229, 30.05131, 30.044959, 29.9382, 29.919781, 30.030601, -90.04488594,
-90.07180566, -90.0849317, -90.12952617, -90.02696213, -90.03235984, -90.06925941, -90.09060393, -90.08716583,
-90.11185615, -90.12122927, -89.91899769, -90.0844343, -89.97297866, -90.01417363, -90.10830816, -90.03988187,
-90.07825592, -90.076855, -90.083341, -90.03282, -90.101536, -90.066648, -90.030283, -90.121145, -90.08682,
-90.15624, -90.0648, -90.20634, -90.106042, -90.102726, -90.019069, -89.978768, -89.955024, -89.903415, -90.0685,
-89.99601, -90.066334, network_type='drive')
G_projected = ox.project_graph(G)
ox.plot_graph(G_projected)
G = ox.graph_from_bbox(29.94510876, 29.93205121, 29.93678994, 29.94840128, 29.94297549, 29.96456162, 29.96164721, 29.96828055, 29.91873862,
29.94221035, 29.95584061, 30.04064237, 29.93609316, 30.032814, 29.96624232, 30.00497466, 30.00427683, 29.94665333,
29.957519, 29.943813, 29.93076, 29.927549, 29.967799, 29.969906, 29.951438, 29.975021, 29.95932, 30.00816, 29.95056,
30.007622, 29.951881, 30.016095, 30.031229, 30.05131, 30.044959, 29.9382, 29.919781, 30.030601, -90.04488594,
-90.07180566, -90.0849317, -90.12952617, -90.02696213, -90.03235984, -90.06925941, -90.09060393, -90.08716583,
-90.11185615, -90.12122927, -89.91899769, -90.0844343, -89.97297866, -90.01417363, -90.10830816, -90.03988187,
-90.07825592, -90.076855, -90.083341, -90.03282, -90.101536, -90.066648, -90.030283, -90.121145, -90.08682,
-90.15624, -90.0648, -90.20634, -90.106042, -90.102726, -90.019069, -89.978768, -89.955024, -89.903415, -90.0685,
-89.99601, -90.066334, network_type='drive')
G_projected = ox.project_graph(G)
ox.plot_graph(G_projected)
I am expecting to get the drivable street network within those listed lat-long bounding box.

So the function is limited to taking only 4 arguments which define the coordinates (bounding box) and should be in the following order as mentioned in the docs (OSMNX).
osmnx.core.graph_from_bbox(north, south, east, west)
This means that one can only specify a rectangle as opposed to a generalised polygon, which I think you are trying to specify here. Hence the above error was thrown.
import osmnx as ox
G = ox.graph_from_bbox( -37.7860, -37.8359, 144.9903, 144.9269, network_type='drive', simplify=True, retain_all=False)

Related

get the index of string element in np1 while it has a substring in np2

my code is as below:
import numpy as np
keywordlist = ['cpp-4.8.5', 'CUnit-2.1.3', 'CUnit-devel', 'doxygen-1.8.5', 'e2fsprogs-1.42.9', 'e2fsprogs-libs', 'epel-release', 'fuse3-devel', 'fuse3-libs', 'gcc-4.8.5', 'gcc-c++', 'gcc-gfortran', 'ghc-array', 'ghc-base', 'ghc-bytestring', 'ghc-containers', 'ghc-deepseq', 'ghc-directory', 'ghc-filepath', 'ghc-json', 'ghc-mtl', 'ghc-old', 'ghc-parsec', 'ghc-pretty', 'ghc-regex', 'ghc-regex', 'ghc-ShellCheck', 'ghc-syb', 'ghc-text', 'ghc-time', 'ghc-transformers', 'ghc-unix', 'git-1.8.3.1', 'graphviz-2.30.1', 'help2man-1.41.1', 'ibacm-22.4', 'keyutils-libs', 'krb5-devel', 'krb5-libs', 'krb5-workstation', 'lcov-1.13', 'libaio-devel', 'libblkid-2.23.2', 'libcom_err-1.42.9', 'libcom_err-devel', 'libgcc-4.8.5', 'libgfortran-4.8.5', 'libgomp-4.8.5', 'libibumad-22.4', 'libibverbs-22.4', 'libiscsi-devel', 'libkadm5-1.15.1', 'libmount-2.23.2', 'libpmem-1.5.1', 'libpmemblk-1.5.1', 'libpmemblk-devel', 'libpmem-devel', 'libquadmath-4.8.5', 'libquadmath-devel', 'librdmacm-22.4', 'libselinux-2.5', 'libselinux-devel', 'libselinux-python', 'libselinux-utils', 'libsepol-devel', 'libsmartcols-2.23.2', 'libss-1.42.9', 'libstdc++-4.8.5', 'libstdc++-devel', 'libunwind-1.2', 'libunwind-devel', 'libuuid-2.23.2', 'libuuid-devel', 'libverto-devel', 'libXaw-1.0.13', 'libXScrnSaver-1.2.2', 'make-3.82', 'nasm-2.10.07', 'numactl-devel', 'numactl-libs', 'openssl-1.0.2k', 'openssl-devel', 'openssl-libs', 'pcre-devel', 'perl-Digest', 'perl-Digest', 'perl-GD', 'perl-Git', 'python-2.7.5', 'python2-pycodestyle', 'python-libs', 'rdma-core', 'rdma-core', 'sg3_utils-1.37', 'sg3_utils-libs', 'ShellCheck-0.3.8', 'util-linux', 'zlib-devel']
np1 = np.array(keywordlist)
# ['cpp-4.8.5' 'CUnit-2.1.3' 'CUnit-devel' 'doxygen-1.8.5' ... 'ShellCheck-0.3.8' 'util-linux' 'zlib-devel']
result = ['epel-release-7-12.noarch', 'rdma-core-22.4-5.el7.x86_64', 'cpp-4.8.5-44.el7.x86_64', 'doxygen-1.8.5-4.el7.x86_64', 'ghc-base-4.6.0.1-26.4.el7.x86_64', 'libuuid-2.23.2-65.el7.x86_64', 'python-libs-2.7.5-89.el7.x86_64', 'libkadm5-1.15.1-50.el7.x86_64', 'libmount-2.23.2-65.el7.x86_64', 'libquadmath-4.8.5-44.el7.x86_64', 'util-linux-2.23.2-65.el7.x86_64', 'libss-1.42.9-19.el7.x86_64', 'keyutils-libs-1.5.8-3.el7.x86_64', 'e2fsprogs-libs-1.42.9-19.el7.x86_64', 'ghc-pretty-1.1.1.0-26.4.el7.x86_64', 'libXaw-1.0.13-4.el7.x86_64', 'libselinux-2.5-15.el7.x86_64', 'libibverbs-22.4-5.el7.x86_64', 'libselinux-utils-2.5-15.el7.x86_64', 'libgomp-4.8.5-44.el7.x86_64', 'libblkid-2.23.2-65.el7.x86_64', 'gcc-c++-4.8.5-44.el7.x86_64', 'e2fsprogs-1.42.9-19.el7.x86_64', 'CUnit-devel-2.1.3-8.el7.x86_64', 'make-3.82-24.el7.x86_64', 'numactl-libs-2.0.12-5.el7.x86_64', 'perl-Git-1.8.3.1-23.el7_8.noarch', 'openssl-libs-1.0.2k-19.el7.x86_64', 'gcc-4.8.5-44.el7.x86_64', 'CUnit-2.1.3-8.el7.x86_64', 'ghc-syb-0.4.0-35.el7.x86_64', 'gcc-gfortran-4.8.5-44.el7.x86_64', 'libselinux-python-2.5-15.el7.x86_64', 'sg3_utils-libs-1.37-19.el7.x86_64', 'fuse3-libs-3.6.1-4.el7.x86_64', 'libquadmath-devel-4.8.5-44.el7.x86_64', 'libgfortran-4.8.5-44.el7.x86_64', 'krb5-workstation-1.15.1-50.el7.x86_64', 'librdmacm-22.4-5.el7.x86_64', 'sg3_utils-1.37-19.el7.x86_64', 'libsmartcols-2.23.2-65.el7.x86_64', 'fuse3-devel-3.6.1-4.el7.x86_64', 'python-2.7.5-89.el7.x86_64', 'openssl-1.0.2k-19.el7.x86_64', 'libgcc-4.8.5-44.el7.x86_64', 'libaio-devel-0.3.109-13.el7.x86_64', 'ghc-old-locale-1.0.0.5-26.4.el7.x86_64', 'libcom_err-1.42.9-19.el7.x86_64', 'git-1.8.3.1-23.el7_8.x86_64', 'krb5-libs-1.15.1-50.el7.x86_64']
np2 = np.array(result)
# ['epel-release-7-12.noarch' 'rdma-core-22.4-5.el7.x86_64' ... 'krb5-libs-1.15.1-50.el7.x86_64']
expectation = ['cpp-4.8.5-39.el7.x86_64', 'CUnit-2.1.3-8.el7.x86_64', 'CUnit-devel-2.1.3-8.el7.x86_64', 'doxygen-1.8.5-4.el7.x86_64', 'e2fsprogs-1.42.9-17.el7.x86_64', 'e2fsprogs-libs-1.42.9-17.el7.x86_64', 'epel-release-latest-7.noarch', 'fuse3-devel-3.6.1-4.el7.x86_64', 'fuse3-libs-3.6.1-4.el7.x86_64', 'gcc-4.8.5-39.el7.x86_64', 'gcc-c++-4.8.5-39.el7.x86_64', 'gcc-gfortran-4.8.5-39.el7.x86_64', 'ghc-array-0.4.0.1-26.4.el7.x86_64', 'ghc-base-4.6.0.1-26.4.el7.x86_64', 'ghc-bytestring-0.10.0.2-26.4.el7.x86_64', 'ghc-containers-0.5.0.0-26.4.el7.x86_64', 'ghc-deepseq-1.3.0.1-26.4.el7.x86_64', 'ghc-directory-1.2.0.1-26.4.el7.x86_64', 'ghc-filepath-1.3.0.1-26.4.el7.x86_64', 'ghc-json-0.7-4.el7.x86_64', 'ghc-mtl-2.1.2-27.el7.x86_64', 'ghc-old-locale-1.0.0.5-26.4.el7.x86_64', 'ghc-parsec-3.1.3-31.el7.x86_64', 'ghc-pretty-1.1.1.0-26.4.el7.x86_64', 'ghc-regex-base-0.93.2-29.el7.x86_64', 'ghc-regex-tdfa-1.1.8-11.el7.x86_64', 'ghc-ShellCheck-0.3.8-1.el7.x86_64', 'ghc-syb-0.4.0-35.el7.x86_64', 'ghc-text-0.11.3.1-2.el7.x86_64', 'ghc-time-1.4.0.1-26.4.el7.x86_64', 'ghc-transformers-0.3.0.0-34.el7.x86_64', 'ghc-unix-2.6.0.1-26.4.el7.x86_64', 'git-1.8.3.1-23.el7_8.x86_64', 'graphviz-2.30.1-21.el7.x86_64', 'help2man-1.41.1-3.el7.noarch', 'ibacm-22.4-2.el7_8.x86_64', 'keyutils-libs-devel-1.5.8-3.el7.x86_64', 'krb5-devel-1.15.1-46.el7.x86_64', 'krb5-libs-1.15.1-46.el7.x86_64', 'krb5-workstation-1.15.1-46.el7.x86_64', 'lcov-1.13-1.el7.noarch', 'libaio-devel-0.3.109-13.el7.x86_64', 'libblkid-2.23.2-63.el7.x86_64', 'libcom_err-1.42.9-17.el7.x86_64', 'libcom_err-devel-1.42.9-17.el7.x86_64', 'libgcc-4.8.5-39.el7.x86_64', 'libgfortran-4.8.5-39.el7.x86_64', 'libgomp-4.8.5-39.el7.x86_64', 'libibumad-22.4-2.el7_8.x86_64', 'libibverbs-22.4-2.el7_8.x86_64', 'libiscsi-devel-1.9.0-7.el7.x86_64', 'libkadm5-1.15.1-46.el7.x86_64', 'libmount-2.23.2-63.el7.x86_64', 'libpmem-1.5.1-2.1.el7.x86_64', 'libpmemblk-1.5.1-2.1.el7.x86_64', 'libpmemblk-devel-1.5.1-2.1.el7.x86_64', 'libpmem-devel-1.5.1-2.1.el7.x86_64', 'libquadmath-4.8.5-39.el7.x86_64', 'libquadmath-devel-4.8.5-39.el7.x86_64', 'librdmacm-22.4-2.el7_8.x86_64', 'libselinux-2.5-15.el7.x86_64', 'libselinux-devel-2.5-15.el7.x86_64', 'libselinux-python-2.5-15.el7.x86_64', 'libselinux-utils-2.5-15.el7.x86_64', 'libsepol-devel-2.5-10.el7.x86_64', 'libsmartcols-2.23.2-63.el7.x86_64', 'libss-1.42.9-17.el7.x86_64', 'libstdc++-4.8.5-39.el7.x86_64', 'libstdc++-devel-4.8.5-39.el7.x86_64', 'libunwind-1.2-2.el7.x86_64', 'libunwind-devel-1.2-2.el7.x86_64', 'libuuid-2.23.2-63.el7.x86_64', 'libuuid-devel-2.23.2-63.el7.x86_64', 'libverto-devel-0.2.5-4.el7.x86_64', 'libXaw-1.0.13-4.el7.x86_64', 'libXScrnSaver-1.2.2-6.1.el7.x86_64', 'make-3.82-24.el7.x86_64', 'nasm-2.10.07-7.el7.x86_64', 'numactl-devel-2.0.12-5.el7.x86_64', 'numactl-libs-2.0.12-5.el7.x86_64', 'openssl-1.0.2k-19.el7.x86_64', 'openssl-devel-1.0.2k-19.el7.x86_64', 'openssl-libs-1.0.2k-19.el7.x86_64', 'pcre-devel-8.32-17.el7.x86_64', 'perl-Digest-1.17-245.el7.noarch', 'perl-Digest-MD5-2.52-3.el7.x86_64', 'perl-GD-2.49-3.el7.x86_64', 'perl-Git-1.8.3.1-23.el7_8.noarch', 'python-2.7.5-88.el7.x86_64', 'python2-pycodestyle-2.5.0-1.el7.noarch', 'python-libs-2.7.5-88.el7.x86_64', 'rdma-core-22.4-2.el7_8.x86_64', 'rdma-core-devel-22.4-2.el7_8.x86_64', 'sg3_utils-1.37-19.el7.x86_64', 'sg3_utils-libs-1.37-19.el7.x86_64', 'ShellCheck-0.3.8-1.el7.x86_64', 'util-linux-2.23.2-63.el7.x86_64', 'zlib-devel-1.2.7-18.el7.x86_64']
np3 = np.array(expectation)
# ['cpp-4.8.5-39.el7.x86_64' 'CUnit-2.1.3-8.el7.x86_64' ... 'util-linux-2.23.2-63.el7.x86_64' 'zlib-devel-1.2.7-18.el7.x86_64']
ready = []
for i in keywordlist:
for j in result:
x = np.char.startswith(j, i)
if x:
ready.append(np3[np.where(np.char.startswith(np3, i))])
np4 = np.array(ready)
# [array(['cpp-4.8.5-39.el7.x86_64'], dtype='<U39') array(['CUnit-2.1.3-8.el7.x86_64'], dtype='<U39') ... array(['util-linux-2.23.2-63.el7.x86_64'], dtype='<U39')]
notready = [i for i in np3 if i not in np4]
print(f"not ready: {notready}")
The purpose is to use string format keyword in keyword list to examine its existence in all np2 elements.
If any element in np2 starts with any keyword, or keyword is the substring of any element in np2, get the index of element in expectation which also start with that keyword and form into np4.
Finally, get not ready which is made up of elements that are in np3 but not in np4.
To make my explanation more vividly, I have a bunch of rpm files to be installed, the list of expectation.
The keyword list catches the former two keywords of each rpm file name.
Result is the standard output of already installed rpm files.
Taking cpp-4.8.5 as an example, I can see cpp-4.8.5-44.el7.x86_64 in result, which means currently cpp-4.8.5-44.el7.x86_64 has been installed. So, cpp-4.8.5-39.el7.x86_64 in expectation can be removed, since cpp-4.8.5-*.rpm has been successfully installed. Next step, deal with the other left items in expectation.
My question is: there any easier or more efficient way to get the result equivalent to notready? maybe with any other numpy built-in methods, but not with for loop.

acutality of building tags fetched by osmnx

Can one say something to the actuality of buildings and its tags?
E.g. I fetch https://www.openstreetmap.org/way/557584181 via OSMNX and it says building=construction but on OSM it says building=office. I see it was edited about 1 month ago.
Unfortunately I am using OMSNX v. 0.9 due to I am working with other packages that limit me to pandas=0.23.
Any ideas?
EDIT:
I guess it was cached somewhere.
import osmnx as ox
from shapely import geometry
type(given_geo_area)
shapely.geometry.polygon.Polygon
print(given_geo_area)
POLYGON ((9.444757321553571 47.6640820372137, 9.44469147049122 47.6642370363376, 9.442746638836271 47.6675223477341, 9.44273323863089 47.6675486765942, 9.44272335456083 47.6675846924473, 9.44272337322715 47.6675856076278, 9.44272365679015 47.667586502615, 9.442724194246059 47.6675873426787, 9.442724964738851 47.6675880952201, 9.442725938369239 47.6675887310364, 9.442771524985689 47.6676085195463, 9.442809078141879 47.6676199425426, 9.443599054706221 47.6678292167847, 9.44364298889086 47.6678391758214, 9.44369319196211 47.6678454078942, 9.443694609235431 47.6678454056071, 9.44369600193242 47.6678452280573, 9.443697323077419 47.6678448812336, 9.443698528108349 47.6678443768344, 9.443744598701199 47.6678160313241, 9.443795360184319 47.6677784822092, 9.443991191770809 47.6676599114601, 9.44421793991903 47.667570002951, 9.44446657647225 47.667512336406, 9.44472720190474 47.6674892078198, 9.444989439424219 47.6675015380556, 9.445052589744799 47.6675088406224, 9.445117064489731 47.6675174206873, 9.445183601261711 47.6675274468952, 9.44523747329856 47.6675300193568, 9.445238809309229 47.6675299032106, 9.4452400852424 47.6675296113077, 9.445241251079061 47.667529155091, 9.445242261116221 47.6675285524453, 9.445243075758549 47.6675278269953, 9.44524366307046 47.6675270071801, 9.445257172339209 47.6674916444378, 9.44526138400154 47.6674643786881, 9.44526635876986 47.6674027181877, 9.44527842375639 47.6673216144847, 9.44528702520314 47.6672820624034, 9.445343690252869 47.6671237851091, 9.44544200701166 47.6669751340207, 9.445578690330031 47.6668410756375, 9.445606929899901 47.666818179473, 9.445637520256669 47.6667867600046, 9.445694232828229 47.6667392820943, 9.445718033000571 47.6667110812337, 9.445816550854619 47.6665782840333, 9.445885789521761 47.6664961432372, 9.44592142419992 47.6664586450851, 9.44609642847751 47.6663115101204, 9.446313359526091 47.6661926345661, 9.44656247099808 47.6661073591621, 9.4468325709589 47.6660595150674, 9.447111524661491 47.6660512517601, 9.44717730910928 47.6660540322315, 9.447316189895529 47.6660649297759, 9.44753610831893 47.6660902456686, 9.44758112940486 47.6660938580278, 9.44767071891042 47.6660918313842, 9.447684852061499 47.6660900296329, 9.44774691292624 47.6660795923001, 9.4479881800759 47.6660547725018, 9.448232085468209 47.6660604809193, 9.448470258112661 47.6660965216365, 9.448560914386359 47.6661163562617, 9.44857404167368 47.6661182063231, 9.448691583060739 47.6661430580836, 9.44873711713312 47.6661476818212, 9.44936429835351 47.6661892570172, 9.44940607834077 47.66619064719, 9.44946122599818 47.6661870380657, 9.449463401923399 47.6661858503929, 9.449498075077059 47.6661578721339, 9.449520006942709 47.6661337837734, 9.45042894326825 47.6650175089795, 9.45044714891934 47.6649921250378, 9.450463499380801 47.6649559172176, 9.450463614247271 47.6649550512483, 9.450463463599689 47.664954187754, 9.450463053866351 47.6649533635807, 9.45046240253088 47.6649526138965, 9.450461537386341 47.6649519706911, 9.450460495349169 47.6649514614106, 9.45040935260457 47.6649360626301, 9.45036907619812 47.664928709451, 9.447377834868041 47.6644933952575, 9.447343269935271 47.6644880343118, 9.44730847614896 47.6644823034133, 9.44727413690042 47.6644763151236, 9.444928887305879 47.6640444576946, 9.444886220360861 47.6640381906818, 9.444829205115131 47.6640359557828, 9.4448279422305 47.6640360849357, 9.44482674602855 47.6640363876611, 9.44482566804831 47.6640368509158, 9.444757321553571 47.6640820372137))
buildings = ox.footprints_from_polygon(given_geo_area)
buildings.loc[buildings.index == 557584181]['building']
557584181 construction
Name: building, dtype: object
Edit2:
Now I tried to provide a reproducible code like:
import osmnx as ox
from shapely import geometry
area = [
geometry.Point(9.444757321553571, 47.6640820372137),
geometry.Point(9.44469147049122, 47.6642370363376),
geometry.Point(9.442746638836271, 47.6675223477341),
geometry.Point(9.44273323863089, 47.6675486765942),
geometry.Point(9.44272335456083, 47.6675846924473),
geometry.Point(9.44272337322715, 47.6675856076278),
geometry.Point(9.44272365679015, 47.667586502615),
geometry.Point(9.442724194246059, 47.6675873426787),
geometry.Point(9.442724964738851, 47.6675880952201),
geometry.Point(9.442725938369239, 47.6675887310364),
geometry.Point(9.442771524985689, 47.6676085195463),
geometry.Point(9.442809078141879, 47.6676199425426),
geometry.Point(9.443599054706221, 47.6678292167847),
geometry.Point(9.44364298889086, 47.6678391758214),
geometry.Point(9.44369319196211, 47.6678454078942),
geometry.Point(9.443694609235431, 47.6678454056071),
geometry.Point(9.44369600193242, 47.6678452280573),
geometry.Point(9.443697323077419, 47.6678448812336),
geometry.Point(9.443698528108349, 47.6678443768344),
geometry.Point(9.443744598701199, 47.6678160313241),
geometry.Point(9.443795360184319, 47.6677784822092),
geometry.Point(9.443991191770809, 47.6676599114601),
geometry.Point(9.44421793991903, 47.667570002951),
geometry.Point(9.44446657647225, 47.667512336406),
geometry.Point(9.44472720190474, 47.6674892078198),
geometry.Point(9.444989439424219, 47.6675015380556),
geometry.Point(9.445052589744799, 47.6675088406224),
geometry.Point(9.445117064489731, 47.6675174206873),
geometry.Point(9.445183601261711, 47.6675274468952),
geometry.Point(9.44523747329856, 47.6675300193568),
geometry.Point(9.445238809309229, 47.6675299032106),
geometry.Point(9.4452400852424, 47.6675296113077),
geometry.Point(9.445241251079061, 47.667529155091),
geometry.Point(9.445242261116221, 47.6675285524453),
geometry.Point(9.445243075758549, 47.6675278269953),
geometry.Point(9.44524366307046, 47.6675270071801),
geometry.Point(9.445257172339209, 47.6674916444378),
geometry.Point(9.44526138400154, 47.6674643786881),
geometry.Point(9.44526635876986, 47.6674027181877),
geometry.Point(9.44527842375639, 47.6673216144847),
geometry.Point(9.44528702520314, 47.6672820624034),
geometry.Point(9.445343690252869, 47.6671237851091),
geometry.Point(9.44544200701166, 47.6669751340207),
geometry.Point(9.445578690330031, 47.6668410756375),
geometry.Point(9.445606929899901, 47.666818179473),
geometry.Point(9.445637520256669, 47.6667867600046),
geometry.Point(9.445694232828229, 47.6667392820943),
geometry.Point(9.445718033000571, 47.6667110812337),
geometry.Point(9.445816550854619, 47.6665782840333),
geometry.Point(9.445885789521761, 47.6664961432372),
geometry.Point(9.44592142419992, 47.6664586450851),
geometry.Point(9.44609642847751, 47.6663115101204),
geometry.Point(9.446313359526091, 47.6661926345661),
geometry.Point(9.44656247099808, 47.6661073591621),
geometry.Point(9.4468325709589, 47.6660595150674),
geometry.Point(9.447111524661491, 47.6660512517601),
geometry.Point(9.44717730910928, 47.6660540322315),
geometry.Point(9.447316189895529, 47.6660649297759),
geometry.Point(9.44753610831893, 47.6660902456686),
geometry.Point(9.44758112940486, 47.6660938580278),
geometry.Point(9.44767071891042, 47.6660918313842),
geometry.Point(9.447684852061499, 47.6660900296329),
geometry.Point(9.44774691292624, 47.6660795923001),
geometry.Point(9.4479881800759, 47.6660547725018),
geometry.Point(9.448232085468209, 47.6660604809193),
geometry.Point(9.448470258112661, 47.6660965216365),
geometry.Point(9.448560914386359, 47.6661163562617),
geometry.Point(9.44857404167368, 47.6661182063231),
geometry.Point(9.448691583060739, 47.6661430580836),
geometry.Point(9.44873711713312, 47.6661476818212),
geometry.Point(9.44936429835351, 47.6661892570172),
geometry.Point(9.44940607834077, 47.66619064719),
geometry.Point(9.44946122599818, 47.6661870380657),
geometry.Point(9.449463401923399, 47.6661858503929),
geometry.Point(9.449498075077059, 47.6661578721339),
geometry.Point(9.449520006942709, 47.6661337837734),
geometry.Point(9.45042894326825, 47.6650175089795),
geometry.Point(9.45044714891934, 47.6649921250378),
geometry.Point(9.450463499380801, 47.6649559172176),
geometry.Point(9.450463614247271, 47.6649550512483),
geometry.Point(9.450463463599689, 47.664954187754),
geometry.Point(9.450463053866351, 47.6649533635807),
geometry.Point(9.45046240253088, 47.6649526138965),
geometry.Point(9.450461537386341, 47.6649519706911),
geometry.Point(9.450460495349169, 47.6649514614106),
geometry.Point(9.45040935260457, 47.6649360626301),
geometry.Point(9.45036907619812, 47.664928709451),
geometry.Point(9.447377834868041, 47.6644933952575),
geometry.Point(9.447343269935271, 47.6644880343118),
geometry.Point(9.44730847614896, 47.6644823034133),
geometry.Point(9.44727413690042, 47.6644763151236),
geometry.Point(9.444928887305879, 47.6640444576946),
geometry.Point(9.444886220360861, 47.6640381906818),
geometry.Point(9.444829205115131, 47.6640359557828),
geometry.Point(9.4448279422305, 47.6640360849357),
geometry.Point(9.44482674602855, 47.6640363876611),
geometry.Point(9.44482566804831, 47.6640368509158),
geometry.Point(9.444757321553571, 47.6640820372137)
]
area_p = geometry.Polygon(area)
buildings = ox.footprints_from_polygon(area_p)
buildings.loc[buildings.index == 557584181]['building']
557584181 office
Name: building, dtype: object
print(area_p)
POLYGON ((9.444757321553571 47.6640820372137, 9.44469147049122 47.6642370363376, 9.442746638836271 47.6675223477341, 9.44273323863089 47.6675486765942, 9.44272335456083 47.6675846924473, 9.44272337322715 47.6675856076278, 9.44272365679015 47.667586502615, 9.442724194246059 47.6675873426787, 9.442724964738851 47.6675880952201, 9.442725938369239 47.6675887310364, 9.442771524985689 47.6676085195463, 9.442809078141879 47.6676199425426, 9.443599054706221 47.6678292167847, 9.44364298889086 47.6678391758214, 9.44369319196211 47.6678454078942, 9.443694609235431 47.6678454056071, 9.44369600193242 47.6678452280573, 9.443697323077419 47.6678448812336, 9.443698528108349 47.6678443768344, 9.443744598701199 47.6678160313241, 9.443795360184319 47.6677784822092, 9.443991191770809 47.6676599114601, 9.44421793991903 47.667570002951, 9.44446657647225 47.667512336406, 9.44472720190474 47.6674892078198, 9.444989439424219 47.6675015380556, 9.445052589744799 47.6675088406224, 9.445117064489731 47.6675174206873, 9.445183601261711 47.6675274468952, 9.44523747329856 47.6675300193568, 9.445238809309229 47.6675299032106, 9.4452400852424 47.6675296113077, 9.445241251079061 47.667529155091, 9.445242261116221 47.6675285524453, 9.445243075758549 47.6675278269953, 9.44524366307046 47.6675270071801, 9.445257172339209 47.6674916444378, 9.44526138400154 47.6674643786881, 9.44526635876986 47.6674027181877, 9.44527842375639 47.6673216144847, 9.44528702520314 47.6672820624034, 9.445343690252869 47.6671237851091, 9.44544200701166 47.6669751340207, 9.445578690330031 47.6668410756375, 9.445606929899901 47.666818179473, 9.445637520256669 47.6667867600046, 9.445694232828229 47.6667392820943, 9.445718033000571 47.6667110812337, 9.445816550854619 47.6665782840333, 9.445885789521761 47.6664961432372, 9.44592142419992 47.6664586450851, 9.44609642847751 47.6663115101204, 9.446313359526091 47.6661926345661, 9.44656247099808 47.6661073591621, 9.4468325709589 47.6660595150674, 9.447111524661491 47.6660512517601, 9.44717730910928 47.6660540322315, 9.447316189895529 47.6660649297759, 9.44753610831893 47.6660902456686, 9.44758112940486 47.6660938580278, 9.44767071891042 47.6660918313842, 9.447684852061499 47.6660900296329, 9.44774691292624 47.6660795923001, 9.4479881800759 47.6660547725018, 9.448232085468209 47.6660604809193, 9.448470258112661 47.6660965216365, 9.448560914386359 47.6661163562617, 9.44857404167368 47.6661182063231, 9.448691583060739 47.6661430580836, 9.44873711713312 47.6661476818212, 9.44936429835351 47.6661892570172, 9.44940607834077 47.66619064719, 9.44946122599818 47.6661870380657, 9.449463401923399 47.6661858503929, 9.449498075077059 47.6661578721339, 9.449520006942709 47.6661337837734, 9.45042894326825 47.6650175089795, 9.45044714891934 47.6649921250378, 9.450463499380801 47.6649559172176, 9.450463614247271 47.6649550512483, 9.450463463599689 47.664954187754, 9.450463053866351 47.6649533635807, 9.45046240253088 47.6649526138965, 9.450461537386341 47.6649519706911, 9.450460495349169 47.6649514614106, 9.45040935260457 47.6649360626301, 9.45036907619812 47.664928709451, 9.447377834868041 47.6644933952575, 9.447343269935271 47.6644880343118, 9.44730847614896 47.6644823034133, 9.44727413690042 47.6644763151236, 9.444928887305879 47.6640444576946, 9.444886220360861 47.6640381906818, 9.444829205115131 47.6640359557828, 9.4448279422305 47.6640360849357, 9.44482674602855 47.6640363876611, 9.44482566804831 47.6640368509158, 9.444757321553571 47.6640820372137))
If you are using cached response data, they will reflect whatever was on OSM at the time that you cached them. You can turn caching off with the config function. Here's a minimal reproducible code example.
import osmnx as ox
ox.config(use_cache=False)
point = (47.6654265, 9.4464618)
gdf = ox.geometries_from_point(point, tags={'building':True}, dist=500)
gdf.shape #(137, 38)
gdf.loc[gdf['osmid']==557584181, 'building'] #office
Everything works fine. Note that v0.9 is several years old at this point and this code example uses v1.0.

How to use e.findAt for similar geometrical models?

I used Abaqus macro recording when defining a set: by edge (20 deg). My end goal is to run the script for different .STEP models/geometries which are identical in every aspect except for a few parametric values. For each model I am using the same procedure for selecting the highlighted edges: create a set from edge-by-angle-20.
However, when I run it for other geometric models, it selects an entirely different e.getSequenceFromMask or as I should say entirely different sets for e.findAt after running the commands for the similar edge.
session.journalOptions.replayGeometry
session.journalOptions.setValues(replayGeometry=INDEX)
I am aware that the program has restrictions over findAt :
findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any edge that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point.
Edge to be selected in all models which are similar with a few variations in dimensions
I would appreciate it if anyone can suggest how to ensure the same edges are selected for different geometries when using the e.findAt command.
My code:
#Sample for the same edges selected from different dimensioned CAD models
#CAD Model_1
edges = e.getSequenceFromMask(mask=(
'[#63002104 #88110 #10000480 #20402 #480c802 #10420070 #c4411',
' #70104842 #10022000 #1e2002 #30 #80820010 #20003 #18144186',
' #b000 ]',), )
p.Set(edges=edges, name='Set-2')
#Set 2:
mdb.models['Model-1'].parts['Circular_knit - 2, 3, 10'].edges.findAt(((2.808153, 3.86272, -0.231317),),((3.959929, 2.669325, -0.231317),),((3.581888, 1.932068, -0.134932),),((1.501975, 3.782442, -0.134931),),((2.094736, 4.291667, -0.231317),),((2.135971, 3.464163, -0.134931),),((2.705066, 3.040627, -0.134931),),((3.436245, 3.316406, -0.231317),),((3.19197, 2.524704, -0.134932),),((4.363292, 1.941137, -0.231317),),((3.862971, 1.280728, -0.134932),),((-0.318814, 3.68708, 0.0),),((1.317672, 4.590214, -0.231317),),((4.764061, 0.331739, -0.231318),),((4.74929, -0.500571, -0.231318),),((4.590214, -1.317672, -0.231317),),((4.634078, 1.15397, -0.231318),),((-0.590217, 4.023581, -0.132766),),((-0.331245, 4.765369, -0.229231),),((0.822343, 3.985795, -0.134932),),((0.500571, 4.74929, -0.231318),),((4.02668, 0.590473, -0.134933),),((4.068041, -0.117724, -0.134933),),((4.291667, -2.094736, -0.231317),),((3.464163, -2.135971, -0.134931),),((3.86272, -2.808153, -0.231317),),((1.932068, -3.581888, -0.134932),),((1.280728, -3.862971, -0.134932),),((1.15397, -4.634078, -0.231318),),((0.590473, -4.02668, -0.134933),),((-0.117724, -4.068041, -0.134933),),((3.985795, -0.822343, -0.134932),),((0.117724, 4.068041, -0.134933),),((-1.15397, 4.634078, -0.231318),),((-1.280728, 3.862971, -0.134932),),((-2.524704, 3.19197, -0.134932),),((-2.669325, 3.959929, -0.231317),),((-1.941137, 4.363292, -0.231317),),((-1.932068, 3.581888, -0.134932),),((3.782442, -1.501975, -0.134931),),((3.040627, -2.705066, -0.134931),),((3.316406, -3.436245, -0.231317),),((2.524704, -3.19197, -0.134932),),((2.669325, -3.959929, -0.231317),),((1.941137, -4.363292, -0.231317),),((0.331739, -4.764061, -0.231318),),((-0.500571, -4.74929, -0.231318),),((-3.464163, 2.135971, -0.134931),),((-4.291667, 2.094736, -0.231317),),((-3.316406, 3.436245, -0.231317),),((-3.040627, 2.705066, -0.134931),),((-3.86272, 2.808153, -0.231317),),((-1.317672, -4.590214, -0.231317),),((-0.822343, -3.985795, -0.134932),),((-4.764061, -0.331739, -0.231318),),((-3.959929, -2.669325, -0.231317),),((-3.862971, -1.280728, -0.134932),),((-3.782442, 1.501975, -0.134931),),((-4.590214, 1.317672, -0.231317),),((-3.985795, 0.822343, -0.134932),),((-2.135971, -3.464163, -0.134931),),((-4.74929, 0.500571, -0.231318),),((-4.068041, 0.117724, -0.134933),),((-4.02668, -0.590473, -0.134933),),((-4.634078, -1.15397, -0.231318),),((-4.363292, -1.941137, -0.231317),),((-3.581888, -1.932068, -0.134932),),((-3.19197, -2.524704, -0.134932),),((-3.436245, -3.316406, -0.231317),),((-2.705066, -3.040627, -0.134931),),((-2.094736, -4.291667, -0.231317),),((-1.501975, -3.782442, -0.134931),),((-2.808153, -3.86272, -0.231317),),)
#CAD Model_2
edges = e.getSequenceFromMask(mask=('[#ffffffff:12 #3fffff ]', ), )
p.Set(edges=edges, name='Set-2')
#Set_2:
mdb.models['Model-1'].parts['Circular_knit - 2, 3, 9'].edges.findAt(((3.609683, 0.972388, 1e-06),),((3.573439, 0.962676, 0.012491),),((3.76173, 1.266747, -0.034239),),((4.345677, 1.895909, -0.106922),),((3.369331, 1.576662, 0.046191),),((3.59632, 1.879201, -0.101049),),((4.017677, 2.705061, -0.092682),),((3.044359, 2.137787, 0.046191),),((3.950435, 2.621725, -0.106922),),((4.319341, 2.493773, 0.001066),),((3.51041, 1.897727, -0.09198),),((4.38626, 1.924207, -0.137251),),((3.786618, 1.25932, -0.091981),),((4.653757, 1.133308, -0.137251),),((3.94777, 0.582649, -0.091981),),((4.779853, 0.307975, -0.137252),),((4.987546, 0.0, 0.001066),),((3.968123, -0.096234, -0.034239),),((3.706257, -0.319236, 0.046191),),((4.054105, -0.170725, -0.101049),),((4.831941, 0.333813, -0.092682),),((3.705386, 0.329198, 0.046191),),((3.686317, 0.32753, 0.012491),),((3.591928, 0.967631, 0.046191),),((4.608877, 1.112487, -0.106922),),((3.924549, 0.594285, -0.034239),),((4.732039, 0.295263, -0.106922),),((4.68676, 1.705841, 0.001066),),((3.351983, 1.568572, 0.012491),),((3.38599, 1.58443, 1e-06),),((4.426368, 1.966302, -0.092682),),((3.868004, 1.226157, -0.101049),),((4.700566, 1.167799, -0.092682),),((4.02216, 0.535857, -0.101049),),((3.723697, 0.3308, 1e-06),),((4.332897, 2.501599, 0.037363),),((3.215364, 2.475146, -0.101049),),((3.059416, 2.14833, 1e-06),),((3.028679, 2.126808, 0.012491),),((3.101617, 2.476941, -0.034239),),((3.435161, 3.267881, -0.106922),),((2.613351, 2.620422, 0.012491),),((2.649644, 2.983909, -0.091979),),((2.83651, 3.859543, -0.137251),),((2.134748, 3.057453, 1e-06),),((2.14551, 3.072822, 2e-06),),((2.850196, 3.916052, -0.092682),),((3.215994, 3.832672, 0.037363),),((3.205932, 3.820682, 0.001066),),((2.815512, 3.814744, -0.106922),),((2.129595, 3.050095, 0.046191),),((2.174904, 3.425595, -0.101049),),((2.501599, 4.332897, 0.037363),),((2.493773, 4.319341, 0.001066),),((2.067403, 3.388378, -0.034239),),((3.484612, 1.90072, -0.034239),),((3.985488, 2.656641, -0.137251),),((4.701469, 1.711195, 0.037363),),((4.927189, 0.868796, 0.037363),),((5.003198, 0.0, 0.037363),),((4.711421, -0.530933, -0.106922),),((3.891127, -0.78383, -0.034239),),((4.547648, -1.340996, -0.106922),),((3.695902, -1.447609, -0.034239),),((3.356209, -1.559509, 0.012491),),((3.710189, -1.469294, -0.091979),),((4.68676, -1.705841, 0.001066),),((4.816498, -0.510316, -0.092682),),((3.724569, -0.320838, 1e-06),),((3.687189, -0.317568, 0.012491),),((4.911774, 0.866078, 0.001066),),((3.48691, 3.361627, -0.092682),),((2.626886, 2.633957, 0.046191),),((3.127541, 2.478471, -0.091979),),((3.463619, 3.308353, -0.137251),),((2.639883, 2.646954, 1e-06),),((3.820682, 3.205932, 0.001066),),((3.832672, 3.215994, 0.037363),),((2.62438, 2.9779, -0.034239),),((2.118616, 3.034415, 0.012491),),((2.091239, 3.398682, -0.091979),),((2.736711, 2.995885, -0.101049),),((2.12688, 4.35149, -0.092682),),((1.547014, 3.751221, -0.101049),),((1.711195, 4.701469, 0.037363),),((1.469294, 3.710189, -0.091979),),((2.123214, 4.293462, -0.137251),),((2.110314, 4.245698, -0.106922),),((3.988971, -0.111726, -0.091981),),((4.911774, -0.866078, 0.001066),),((4.760715, -0.526717, -0.137252),),((3.594516, -0.957971, 0.046191),),((3.576027, -0.953017, 0.012491),),((3.908966, -0.802706, -0.09198),),((4.927189, -0.868796, 0.037363),),((3.373557, -1.567599, 0.046191),),((4.245698, -2.110314, -0.106922),),((4.319341, -2.493773, 0.001066),),((4.332897, -2.501599, 0.037363),),((4.35149, -2.12688, -0.092682),),((4.293462, -2.123214, -0.137251),),((3.390216, -1.575367, 1e-06),),((4.596926, -1.345405, -0.137251),),((3.612271, -0.962729, 1e-06),),((4.65471, -1.338939, -0.092682),),((3.751221, -1.547014, -0.101049),),((3.962868, -0.872119, -0.101049),),((1.567599, 3.373557, 0.046191),),((1.338939, 4.65471, -0.092682),),((0.872119, 3.962868, -0.101049),),((0.510316, 4.816498, -0.092682),),((0.321655, 3.733897, 2e-06),),((0.320019, 3.715207, 1e-06),),((0.111726, 3.988971, -0.091981),),((0.0, 4.987546, 0.001066),),((0.096234, 3.968123, -0.034239),),((0.530933, 4.711421, -0.106922),),((0.866078, 4.911774, 0.001066),),((0.526717, 4.760715, -0.137252),),((1.705841, 4.68676, 0.001066),),((1.345405, 4.596926, -0.137251),),((0.802706, 3.908966, -0.09198),),((1.571395, 3.381699, 1e-06),),((1.579324, 3.398703, 2e-06),),((1.447609, 3.695902, -0.034239),),((1.559509, 3.356209, 0.012491),),((3.388378, -2.067403, -0.034239),),((3.050095, -2.129595, 0.046191),),((3.065152, -2.140139, 1e-06),),((3.034415, -2.118616, 0.012491),),((3.398682, -2.091239, -0.091979),),((3.425595, -2.174904, -0.101049),),((4.701469, -1.711195, 0.037363),),((0.965152, 3.621316, 2e-06),),((0.957971, 3.594516, 0.046191),),((0.953017, 3.576027, 0.012491),),((0.868796, 4.927189, 0.037363),),((0.319236, 3.706257, 0.046191),),((0.170725, 4.054105, -0.101049),),((0.0, 5.003198, 0.037363),),((-0.3073, 4.782091, -0.136321),),((-0.320838, 3.724565, 1e-05),),((-0.323171, 3.73689, 1.3e-05),),((-0.324216, 3.705803, 0.046199),),((-0.593805, 3.921017, -0.033079),),((-0.866078, 4.911774, 0.001066),),((-1.133308, 4.653757, -0.137251),),((-0.972388, 3.609683, 1e-06),),((-0.967631, 3.591928, 0.046191),),((-1.112487, 4.608877, -0.106922),),((0.317568, 3.687189, 0.012491),),((-0.294772, 4.734331, -0.106051),),((0.78383, 3.891127, -0.034239),),((1.340996, 4.547648, -0.106922),),((0.960296, 3.603193, 1e-06),),((3.814744, -2.815512, -0.106922),),((3.820682, -3.205932, 0.001066),),((3.832672, -3.215994, 0.037363),),((3.916052, -2.850196, -0.092682),),((3.859543, -2.83651, -0.137251),),((-0.332828, 4.834011, -0.091687),),((-0.318814, 3.68708, 0.0),),((-0.325817, 3.724111, 1e-05),),((-0.536001, 4.018603, -0.099875),),((-0.868796, 4.927189, 0.037363),),((-0.319237, 3.706259, 0.046191),),((-0.322549, 3.68675, 0.0125),),((-0.31881, 3.687067, 0.05),),((-0.317568, 3.687186, 0.012495),),((-0.582378, 3.944173, -0.090789),),((-0.962676, 3.573439, 0.012491),),((-1.25932, 3.786618, -0.091981),),((-1.711195, 4.701469, 0.037363),),((-1.226157, 3.868004, -0.101049),),((-1.167799, 4.700566, -0.092682),),((2.9779, -2.62438, -0.034239),),((3.267881, -3.435161, -0.106922),),((2.476941, -3.101617, -0.034239),),((2.137787, -3.044359, 0.046191),),((2.475146, -3.215364, -0.101049),),((3.361627, -3.48691, -0.092682),),((2.633957, -2.626886, 0.046191),),((2.620422, -2.613351, 0.012491),),((2.983909, -2.649644, -0.091979),),((2.995885, -2.736711, -0.101049),),((2.646954, -2.639883, 1e-06),),((-1.266747, 3.76173, -0.034239),),((-1.705841, 4.68676, 0.001066),),((-1.924207, 4.38626, -0.137251),),((-1.58443, 3.38599, 1e-06),),((-1.966302, 4.426368, -0.092682),),((3.205932, -3.820682, 0.001066),),((2.478471, -3.127541, -0.091979),),((2.656641, -3.985488, -0.137251),),((2.493773, -4.319341, 0.001066),),((1.90072, -3.484612, -0.034239),),((1.576662, -3.369331, 0.046191),),((1.879201, -3.59632, -0.101049),),((2.705061, -4.017677, -0.092682),),((2.126808, -3.028679, 0.012491),),((2.14833, -3.059416, 1e-06),),((3.215994, -3.832672, 0.037363),),((3.308353, -3.463619, -0.137251),),((-1.895909, 4.345677, -0.106922),),((-1.568572, 3.351983, 0.012491),),((-1.897727, 3.51041, -0.09198),),((-2.501599, 4.332897, 0.037363),),((-2.705061, 4.017677, -0.092682),),((-2.137787, 3.044359, 0.046191),),((-2.621725, 3.950435, -0.106922),),((-2.493773, 4.319341, 0.001066),),((-2.656641, 3.985488, -0.137251),),((-2.14833, 3.059416, 1e-06),),((-1.576662, 3.369331, 0.046191),),((2.501599, -4.332897, 0.037363),),((2.621725, -3.950435, -0.106922),),((1.895909, -4.345677, -0.106922),),((1.705841, -4.68676, 0.001066),),((1.924207, -4.38626, -0.137251),),((1.58443, -3.38599, 1e-06),),((1.966302, -4.426368, -0.092682),),((-1.90072, 3.484612, -0.034239),),((-1.879201, 3.59632, -0.101049),),((-2.475146, 3.215364, -0.101049),),((-2.476941, 3.101617, -0.034239),),((-2.126808, 3.028679, 0.012491),),((-2.478471, 3.127541, -0.091979),),((-3.308353, 3.463619, -0.137251),),((-2.646954, 2.639883, 1e-06),),((-3.361627, 3.48691, -0.092682),),((-3.215994, 3.832672, 0.037363),),((1.897727, -3.51041, -0.09198),),((1.568572, -3.351983, 0.012491),),((1.266747, -3.76173, -0.034239),),((0.967631, -3.591928, 0.046191),),((0.972388, -3.609683, 1e-06),),((0.962676, -3.573439, 0.012491),),((1.112487, -4.608877, -0.106922),),((0.594285, -3.924549, -0.034239),),((0.329198, -3.705386, 0.046191),),((0.535857, -4.02216, -0.101049),),((1.167799, -4.700566, -0.092682),),((1.226157, -3.868004, -0.101049),),((1.711195, -4.701469, 0.037363),),((1.25932, -3.786618, -0.091981),),((-3.267881, 3.435161, -0.106922),),((-3.205932, 3.820682, 0.001066),),((-2.620422, 2.613351, 0.012491),),((-2.983909, 2.649644, -0.091979),),((-3.859543, 2.83651, -0.137251),),((-3.065152, 2.140139, 1e-06),),((-3.050095, 2.129595, 0.046191),),((-3.034415, 2.118616, 0.012491),),((-3.398682, 2.091239, -0.091979),),)+mdb.models['Model-1'].parts['Circular_knit - 2, 3, 9'].edges.findAt(((-4.319341, 2.493773, 0.001066),),((-4.245698, 2.110314, -0.106922),),((-3.695902, 1.447609, -0.034239),),((-4.547648, 1.340996, -0.106922),),((-3.576027, 0.953017, 0.012491),),((-3.908966, 0.802706, -0.09198),),((-4.760715, 0.526717, -0.137252),),((-3.724569, 0.320838, 1e-06),),((-4.816498, 0.510316, -0.092682),),((-3.962868, 0.872119, -0.101049),),((-3.612271, 0.962729, 1e-06),),((-2.633957, 2.626886, 0.046191),),((0.866078, -4.911774, 0.001066),),((1.133308, -4.653757, -0.137251),),((0.295263, -4.732039, -0.106922),),((-0.096234, -3.968123, -0.034239),),((-0.530933, -4.711421, -0.106922),),((-0.78383, -3.891127, -0.034239),),((-0.957971, -3.594516, 0.046191),),((-0.872119, -3.962868, -0.101049),),((-0.868796, -4.927189, 0.037363),),((-0.802706, -3.908966, -0.09198),),((-1.345405, -4.596926, -0.137251),),((-1.711195, -4.701469, 0.037363),),((-1.338939, -4.65471, -0.092682),),((0.3308, -3.723697, 1e-06),),((0.333813, -4.831941, -0.092682),),((0.0, -5.003198, 0.037363),),((0.0, -4.987546, 0.001066),),((0.868796, -4.927189, 0.037363),),((-2.9779, 2.62438, -0.034239),),((-3.820682, 3.205932, 0.001066),),((-3.832672, 3.215994, 0.037363),),((-3.916052, 2.850196, -0.092682),),((-3.425595, 2.174904, -0.101049),),((-3.388378, 2.067403, -0.034239),),((-3.814744, 2.815512, -0.106922),),((-4.293462, 2.123214, -0.137251),),((-3.390216, 1.575367, 1e-06),),((-4.35149, 2.12688, -0.092682),),((-4.332897, 2.501599, 0.037363),),((-3.373557, 1.567599, 0.046191),),((-3.356209, 1.559509, 0.012491),),((-3.710189, 1.469294, -0.091979),),((-4.701469, 1.711195, 0.037363),),((-4.65471, 1.338939, -0.092682),),((-3.594516, 0.957971, 0.046191),),((-4.68676, 1.705841, 0.001066),),((-4.596926, 1.345405, -0.137251),),((-3.891127, 0.78383, -0.034239),),((-4.927189, 0.868796, 0.037363),),((-3.687189, 0.317568, 0.012491),),((-3.988971, 0.111726, -0.091981),),((-4.779853, -0.307975, -0.137252),),((-3.723697, -0.3308, 1e-06),),((-4.831941, -0.333813, -0.092682),),((-4.054105, 0.170725, -0.101049),),((-3.706257, 0.319236, 0.046191),),((-4.711421, 0.530933, -0.106922),),((-4.911774, 0.866078, 0.001066),),((-2.995885, 2.736711, -0.101049),),((0.32753, -3.686317, 0.012491),),((0.582649, -3.94777, -0.091981),),((-0.319236, -3.706257, 0.046191),),((-0.317568, -3.687189, 0.012491),),((-0.111726, -3.988971, -0.091981),),((0.307975, -4.779853, -0.137252),),((-0.866078, -4.911774, 0.001066),),((-0.526717, -4.760715, -0.137252),),((-0.320838, -3.724569, 1e-06),),((-0.510316, -4.816498, -0.092682),),((-0.953017, -3.576027, 0.012491),),((-0.962729, -3.612271, 1e-06),),((-1.705841, -4.68676, 0.001066),),((-1.469294, -3.710189, -0.091979),),((-2.123214, -4.293462, -0.137251),),((-2.091239, -3.398682, -0.091979),),((-2.83651, -3.859543, -0.137251),),((-2.649644, -2.983909, -0.091979),),((-3.463619, -3.308353, -0.137251),),((-3.820682, -3.205932, 0.001066),),((-3.101617, -2.476941, -0.034239),),((-3.044359, -2.137787, 0.046191),),((-3.215364, -2.475146, -0.101049),),((-3.832672, -3.215994, 0.037363),),((-3.127541, -2.478471, -0.091979),),((-3.985488, -2.656641, -0.137251),),((-4.332897, -2.501599, 0.037363),),((-3.59632, -1.879201, -0.101049),),((-3.38599, -1.58443, 1e-06),),((-3.351983, -1.568572, 0.012491),),((-3.484612, -1.90072, -0.034239),),((-4.319341, -2.493773, 0.001066),),((-1.547014, -3.751221, -0.101049),),((-1.575367, -3.390216, 1e-06),),((-1.559509, -3.356209, 0.012491),),((-1.567599, -3.373557, 0.046191),),((-0.170725, -4.054105, -0.101049),),((-3.751221, 1.547014, -0.101049),),((-3.968123, 0.096234, -0.034239),),((-5.003198, 0.0, 0.037363),),((-3.686317, -0.32753, 0.012491),),((-3.94777, -0.582649, -0.091981),),((-4.653757, -1.133308, -0.137251),),((-3.609683, -0.972388, 1e-06),),((-3.591928, -0.967631, 0.046191),),((-4.608877, -1.112487, -0.106922),),((-4.911774, -0.866078, 0.001066),),((-3.705386, -0.329198, 0.046191),),((-4.732039, -0.295263, -0.106922),),((-1.340996, -4.547648, -0.106922),),((-1.447609, -3.695902, -0.034239),),((-2.501599, -4.332897, 0.037363),),((-2.174904, -3.425595, -0.101049),),((-2.850196, -3.916052, -0.092682),),((-2.736711, -2.995885, -0.101049),),((-2.639883, -2.646954, 1e-06),),((-2.613351, -2.620422, 0.012491),),((-3.435161, -3.267881, -0.106922),),((-2.140139, -3.065152, 1e-06),),((-2.129595, -3.050095, 0.046191),),((-2.815512, -3.814744, -0.106922),),((-3.205932, -3.820682, 0.001066),),((-3.215994, -3.832672, 0.037363),),((-3.950435, -2.621725, -0.106922),),((-3.059416, -2.14833, 1e-06),),((-4.017677, -2.705061, -0.092682),),((-3.48691, -3.361627, -0.092682),),((-2.626886, -2.633957, 0.046191),),((-3.51041, -1.897727, -0.09198),),((-4.426368, -1.966302, -0.092682),),((-3.369331, -1.576662, 0.046191),),((-4.345677, -1.895909, -0.106922),),((-4.68676, -1.705841, 0.001066),),((-3.786618, -1.25932, -0.091981),),((-2.12688, -4.35149, -0.092682),),((-2.110314, -4.245698, -0.106922),),((-2.493773, -4.319341, 0.001066),),((-4.987546, 0.0, 0.001066),),((-4.927189, -0.868796, 0.037363),),((-4.700566, -1.167799, -0.092682),),((-3.573439, -0.962676, 0.012491),),((-3.868004, -1.226157, -0.101049),),((-3.76173, -1.266747, -0.034239),),((-3.924549, -0.594285, -0.034239),),((-4.02216, -0.535857, -0.101049),),((-2.62438, -2.9779, -0.034239),),((-2.118616, -3.034415, 0.012491),),((-2.067403, -3.388378, -0.034239),),((-3.028679, -2.126808, 0.012491),),((-4.38626, -1.924207, -0.137251),),((-4.701469, -1.711195, 0.037363),),)
Do not use getSequenceFromMask
This method seems very appealing, however, Abaqus documentation does not cover how masks are formed, so it is not possible to artificially generate a mask for a set of objects.
Use coordinates (findAt()) or indeces instead
Most of the time if your geometry is complex and is generated without control over vertices/edges/etc numbering then the findAt() method is your only option (along with methods getByBoundingBox(...), getByBoundingCylinder(...) and getByBoundingSphere(...)).
If searching edge-by-edge is not very efficient and getByBounding... methods do not allow you to select the right array of edges then you can try: 1) to find the first edge of your sequence; 2) then use (as you already tried) the getEdgesByEdgeAngle(...) method to find all adjacent edges.
If you know for sure the numbering of your geometrical entities (vertices/edges/etc.) then you can access them by their index. So, using notations from your example, if edges of interest of your geometry have indexes from n to m then:
part = mdb.models['Model-1'].parts['Circular_knit - 2, 3, 10']
set2 = part.Set(name='Set-2', edges=part.edges[n:m+1])

Random Forest Analysis Giving NaNs

I have a df that is all numeric values. Columns 1:1028 are the predictors and columns 1029:1033 are the responses. Here is a subset of this:
PhHAL9G636300 PhHAL9G639600 PhHAL9G640000 PhHAL9G642000 PhHAL9G643800 PhHAL9G645300 PhHAL9G646100 PhHAL9G646600 PhHALJ003900 Biomass Growth WaterLoss
PENW3 5.365778 2.98025485 5.495861 4.405202465 2.9113147 2.5418600 2.09767062 2.52296664 1.9087030 0.46125981 -13.4226665 -0.37320470
PENW1 3.490321 4.64568874 3.717329 3.604487984 2.1293068 2.2661013 -1.47617955 -0.83020824 -1.4564567 4.61259811 -14.4985291 -1.41470618
CERD2 4.602228 1.83881344 4.474194 2.395140203 3.7523682 -0.2886215 -0.73070022 2.79344405 -0.7981627 -0.76634289 5.5581189 15.96563076
COCW2 4.614825 1.59769640 5.498260 0.006269791 1.9118368 4.2591423 3.73962184 2.53800230 2.5671915 -0.13178852 -25.7182390 -0.07377302
PENW2 2.874244 3.33668026 2.686314 3.640362110 3.3344128 1.5625493 -1.92483779 0.85800308 -1.8455277 -0.09584619 -15.5743917 -0.99376599
NIGD3 2.534445 1.86024236 3.028953 3.531425944 4.2376438 2.0732650 -0.46514048 0.79555084 -0.5451820 1.05436439 12.0221867 21.04783002
PEND2 5.362056 2.64328649 4.464727 3.452061385 3.8409665 -0.5227258 -0.06950176 2.05314895 -1.5741809 0.68405104 4.6766551 11.99731270
CERD3 6.379754 3.02126477 5.958883 2.617817128 3.2571087 0.6389388 -1.54158346 2.70402517 -1.5102857 -0.98235901 4.4562891 15.74806130
PEND3 5.530008 3.49150186 4.664897 4.122665811 3.4805644 1.6611925 1.00556471 2.13871970 -0.5366320 0.42174575 3.2075488 12.88432662
NIGW3 4.183288 5.26329612 5.928775 8.194201254 1.4188970 3.3488663 -0.24100014 1.17649150 -0.3305682 0.29951936 1.1783257 1.30187685
SORW2 6.893395 3.84929409 7.853042 0.700629044 1.2822700 3.7429352 2.73703304 3.38057924 2.5338634 0.02995194 -12.5004986 -5.77946530
BISD3 7.044496 2.75794859 3.816874 2.703812532 2.6916801 2.3260304 3.37232732 2.31685090 1.7024061 -1.02864818 -0.6121276 14.66858209
COCD2 5.393332 3.05175638 5.822644 2.200587922 2.2212163 2.4246024 3.13408898 2.07709126 2.1863062 -0.10286482 -2.4485105 7.86349310
BISW2 2.174211 2.62450842 5.128353 4.037738498 1.3183220 0.9764650 0.53499762 1.02802526 0.4124477 1.55750066 -25.8719336 -13.89189391
SORD3 6.154951 2.22626768 4.676438 0.489662530 1.1602737 1.6238320 3.90773303 3.34912476 3.7395865 0.11315130 0.2693362 17.67178436
COCW3 4.341137 4.05631371 5.292476 2.505723413 0.4784145 0.1552958 2.35139206 2.34302308 1.9836908 -1.03034659 -25.2571550 -1.06753902
CERW1 4.980878 0.91666130 2.190792 1.724122567 3.0002243 -0.9078029 -1.30732267 1.90047369 -1.3084019 -0.11381736 -10.3487734 -0.48603403
NIGW1 4.310666 5.24869379 6.482000 6.341412520 2.6579484 3.7324397 -0.69538644 1.39456781 -0.7667490 -0.07787503 1.9467990 -2.35639710
SORD2 3.439050 1.01743984 3.608031 1.984325521 0.9697594 1.9438491 2.75019240 3.59450372 3.0152745 -0.14915399 1.8118978 19.30355526
BISW3 4.995399 3.02559441 5.391413 0.707718031 -0.0867396 2.1041361 3.57258520 2.88651590 2.2532781 1.48561601 -26.3330176 -12.63775254
SORD1 4.867184 3.58269882 5.082423 0.847579020 1.1842905 3.2943452 3.54584508 2.26684212 3.2791237 -1.80013432 -3.0361530 18.53648347
NIGD2 3.433412 1.38880580 5.344590 6.113465129 1.3389915 0.9967764 0.55527371 1.04742251 0.4318620 1.16237244 10.5530804 20.06039943
SORW3 6.832991 3.48434777 7.954499 -0.373941722 0.9673997 3.8959556 2.87342668 3.53076025 2.5194703 1.12619278 -7.8896590 -6.45557334
PEND1 4.536131 1.98241616 2.469180 2.938093546 4.6266296 -0.3003059 -1.62573524 1.53755316 -1.5869045 0.49889437 3.3544594 12.90013295
CERW3 3.947328 1.97539246 4.499408 1.135578151 2.1385166 -0.2011640 -0.65101772 -0.06185877 -0.7272633 -0.04193271 -7.1211857 -1.98319240
NIGD1 1.517705 -0.02588437 2.040182 4.303738855 3.0117854 -0.9594330 -1.35627738 0.18988023 -1.3514038 0.88463744 8.0555996 20.38861318
COCW1 4.705918 2.51742179 4.476741 0.975394641 1.2854224 3.7611179 3.28623937 2.48855442 3.5451750 0.60502910 -26.9477962 0.97206804
BISD2 4.838736 3.99032517 7.239421 2.461942761 2.4587895 2.0971745 3.19578030 2.09829508 1.4836582 -1.10579679 -0.9059489 14.44078502
I am following the IPMRF package manual (pg 7):
#IMP based on CIT-RF (party package)
library(randomForestSRC)
library(party)
mtcars.new <- mtcars
ntree<-500
da<-mtcars.new[,3:10]
mc.cf <- cforest(carb+ mpg+ cyl ~., data = mtcars.new,
control = cforest_unbiased(mtry = 8, ntree = 500))
#IPM case-wise computing with OOB with party
pupf<-ipmparty(mc.cf ,da,ntree)
#global IPM
pua<-apply(pupf,2,mean)
pua
But I am switching mtcars for my dataset. However, when I run mine, I get all NaNs in the output and I can not figure out what is wrong with my code. So far I've checked if everything is numeric, if it's a limit in predictors (tried 10 rather than 1028), changed mtcars to have negative values to check that since mine has negative values, but none of these seem to be the problem. Granted, please double check me just in case. Here is my code that I am running with my dataset:
phallii.cf = cforest(Biomass + Growth + WaterLoss ~., data= RFTrainData, control=cforest_unbiased(mtry=33, ntree=1000)) #mtry = p/3
da = RFTrainData[,1:1028] #predictor variables only
ntree=1000
phallii.ipm = ipmparty(phallii.cf, da, ntree)
If anyone has any ideas I would greatly appreciate it!

difference between getPath() and getPaths() google maps

I'm trying to compute the area of a polygon. I don't think the results I'm getting are correct. When I drag the points of the polygon, the area doesn't change. From what the API says, getPath() "Retrieves the first path.", while getPaths() "Retrieves the paths for this polygon"
when I use:
google.maps.event.addListener(drawingManager, 'polygoncomplete', function (polygon) {
var coordinates = (polygon.getPaths().getArray());
console.log(coordinates);
area=google.maps.geometry.spherical.computeArea(coordinates);
console.log('Polygon Area is: ' + area);
});
I get a numerical result that I don't think is correct (sometimes, it doesn't change when I move the handles around. However, if I use:
var coordinates = (polygon.getPaths().getArray());
console.log(coordinates);
area=google.maps.geometry.spherical.computeArea(coordinates);
console.log('Polygon Area is: ' + area);
it complains that "coords: [object Object]
localhost/:182
NEW Polygon Area is: 0"
How do I use getPaths() correctly??