Missing countries from natural earth topojson map? - topojson

I am missing South Sudan (and Western Sahara) from my natural earth map (ne_10m_admin_0_countries):
Here is how I am creating my map:
? ogr2ogr -f GeoJSON -where "ADM0_A3 IN ('DJI', 'DZA', 'EGY', 'LBY', 'MAR', 'TUN', 'AGO', 'BDI', 'BEN', 'BFA', 'BWA', 'CAF', 'CIV', 'CMR', 'COD', 'COG', 'COM', 'CPV', 'ERI', 'ETH', 'GAB', 'GHA', 'GIN', 'GMB', 'GNB', 'GNQ', 'KEN', 'LBR', 'LSO', 'MDG', 'MLI', 'MOZ', 'MRT', 'MUS', 'MWI', 'NAM', 'NER', 'NGA', 'RWA', 'SDN', 'SEN', 'SLE', 'SOM', 'SSD', 'STP', 'SWZ', 'SYC', 'TCD', 'TGO', 'TZA', 'UGA', 'ZAF', 'ZMB', 'ZWE', 'ESH')" areas.json ne_110m_admin_0_countries/ne_110m_admin_0_countries.shp
? topojson -o mymmap.json --id-property iso_a3 areas.json
I have 'SSD' (South Sudan) and 'ESH' (Western Sahara) in my list of areas to include.
I've tried the following maps:
ne_110m_admin_0_countries
ne_110m_admin_0_map_units
ne_110m_admin_0_sovereignty
...but I still get these missing shapes. On searching mymap.json, I cannot find either 'SSD' or 'ESH'?
Basically, I don't want two white holes in my map, if I can avoid it.
Thanks.

SSD and ESH don't exist as ADM0_A3 classification in that file. Maybe try ISO_A3 instead?

Related

SDO_BUFFER does not work correct with multipolygons

I have a table with two columns (both are SDO_GEOMETRY type): GEOMETRY, GEOMETRY_BUF. DIMs described here.
GEOMETRY has a multipolygon's data, and GEOMETRY_BUF initially is null.
In this case, multipolygon consists of three polygons. Two of them are rather close each other and the third rather far away of them.
If I make a picture of GEOMETRY, I see this multipolygon.
I want to make a buffer (40 Meters) around source GEOMETRY and store it in GEOMETRY_BUF column.
When I do
UPDATE <table_name> o
SET GEOMETRY_buf =
SDO_GEOM.sdo_buffer (o.geometry,
40,
0.005,
'unit=Meter')
I get this result. Two closest polygons are buffered and the third is not. Why? Is it correct work of SDO_BUFFER? How can I get buffer for all polygons in multipolygon?
For example I exported my multipolygon in WKT:
MULTIPOLYGON (((11517.3061 -9316.7092, 11529.4693 -9333.942, 11555.3268 -9327.1603, 11562.6917 -9326.0185, 11566.605 -9324.4166, 11571.5728 -9322.2463, 11586.1288 -9304.1955, 11586.3399 -9301.5948, 11587.3251 -9298.9264, 11592.4594 -9286.2345, 11593.9652 -9284.8561, 11595.4255 -9284.1372, 11596.5791 -9283.6721, 11599.1906 -9272.413, 11598.7147 -9270.787, 11598.6688 -9269.7593, 11598.9953 -9267.4162, 11599.2833 -9260.5784, 11600.4061 -9254.4651, 11600.8117 -9252.2374, 11601.9351 -9246.7015, 11604.1515 -9232.7613, 11607.0962 -9232.6711, 11615.6972 -9170.744, 11616.4172 -9162.8411, 11616.6891 -9158.0432, 11627.6428 -9094.6279, 11629.6001 -9095.5922, 11629.3366 -9092.1316, 11631.5555 -9082.0765, 11632.8241 -9083.1318, 11634.5937 -9075.8674, 11635.0901 -9073.2819, 11635.9144 -9070.4804, 11636.6806 -9067.7817, 11638.1409 -9061.6117, 11633.7683 -9058.316, 11646.0166 -9040.509, 11641.0401 -9037.0454, 11653.3747 -9021.7212, 11650.196 -9018.1182, 11648.4066 -9018.2336, 11644.782 -9015.2088, 11650.852 -9010.3256, 11654.2871 -9009.2253, 11669.9179 -9010.2253, 11720.1392 -9016.1985, 11731.7194 -9017.3642, 11731.5166 -9019.2802, 11736.6782 -9019.9719, 11736.7853 -9018.7664, 11749.4779 -9021.0705, 11765.8132 -9026.2263, 11857.5513 -9037.9299, 11966.7418 -9051.5303, 11972.4873 -9052.451, 11994.0993 -9055.6882, 11996.1523 -9056.1488, 11999.63 -9053.9715, 12003.9456 -9053.3434, 12014.7974 -9053.8877, 12017.661 -9054.3485, 12022.7308 -9054.8928, 12025.161 -9054.8928, 12031.1944 -9055.2278, 12035.5519 -9057.4889, 12038.6524 -9061.0479, 12043.7444 -9060.8216, 12077.8782 -9062.1275, 12084.4548 -9063.3493, 12113.8626 -9063.9861, 12128.2805 -9064.1125, 12130.3243 -9063.9469, 12150.4336 -9063.2307, 12167.0437 -9062.4302, 12176.091 -9062.2625, 12199.5307 -9059.4819, 12202.6969 -9059.2285, 12231.4571 -9055.896, 12243.5404 -9054.5544, 12245.7198 -9053.4103, 12274.8773 -9048.3674, 12290.6727 -9050.8067, 12294.9517 -9050.0068, 12327.292 -9042.063, 12344.4067 -9037.7978, 12346.242 -9037.4565, 12391.9687 -9023.8071, 12398.1063 -9020.9474, 12408.3162 -9018.1104, 12429.1036 -9011.8187, 12430.8981 -9011.0625, 12449.412 -9003.7979, 12452.021 -9002.1045, 12469.1388 -8995.9601, 12477.3695 -8991.5786, 12485.0655 -8987.2142, 12490.8813 -8986.5569, 12496.5895 -8984.2888, 12500.2345 -8981.4022, 12496.6582 -8979.3404, 12503.9482 -8976.8661, 12505.9427 -8974.873, 12508.5561 -8973.5671, 12526.9668 -8964.5841, 12527.7841 -8964.1724, 12527.0391 -8962.6698, 12525.9945 -8959.9635, 12545.0275 -8949.9202, 12537.6746 -8935.4885, 12522.0017 -8943.8274, 12519.5198 -8939.6064, 12516.6895 -8940.6073, 12515.3832 -8940.4332, 12514.0541 -8941.2897, 12508.3293 -8944.0449, 12495.4599 -8950.4538, 12468.1586 -8962.986, 12444.6639 -8972.5394, 12428.2482 -8978.8925, 12400.9305 -8988.7393, 12394.4426 -8991.1326, 12388.8952 -8994.0223, 12383.4503 -8997.1529, 12378.6102 -8999.4454, 12364.5548 -9003.9435, 12352.9546 -9007.5255, 12338.5855 -9011.7029, 12326.9941 -9014.5796, 12316.5813 -9017.4109, 12306.2679 -9019.8897, 12275.8562 -9026.4099, 12245.4496 -9031.7417, 12244.8164 -9031.1515, 12243.7607 -9028.9633, 12243.4366 -9024.2847, 12242.5967 -9013.3541, 12241.7196 -9002.0434, 12240.8619 -8990.8109, 12240.6915 -8987.5548, 12240.2224 -8985.5038, 12239.1962 -8982.6324, 12236.5281 -8979.1164, 12233.2102 -8975.5594, 12224.3816 -8967.0235, 12219.2801 -8962.2476, 12216.6083 -8958.9244, 12215.4355 -8956.4339, 12214.7318 -8952.6542, 12214.3789 -8946.7751, 12213.9674 -8943.4579, 12205.4844 -8943.3108, 12193.6645 -8942.6623, 12187.8324 -8942.4268, 12179.0549 -8941.8675, 12178.5575 -8952.025, 12173.9688 -8951.9348, 12173.2373 -8956.6863, 12137.179 -8956.148, 12096.9046 -8955.5806, 12072.6849 -8955.0751, 12071.8174 -8959.7383, 12071.0884 -8962.767, 12069.4055 -8966.8211, 12066.5207 -8971.7762, 12055.2777 -8987.8869, 12053.1284 -8993.4112, 12047.2713 -9017.5838, 12044.7177 -9027.5265, 12042.7207 -9032.159, 12041.0314 -9034.3577, 12030.2937 -9033.259, 12025.1998 -9032.5631, 12018.5597 -9031.8282, 12008.7749 -9030.5464, 11993.9822 -9028.8158, 11964.1147 -9025.1168, 11931.9949 -9021.2305, 11903.2389 -9017.5607, 11869.9007 -9013.3788, 11854.2524 -9011.4378, 11849.3783 -9010.7419, 11833.972 -9008.9627, 11820.2536 -9007.0812, 11811.0943 -9006.0119, 11806.4564 -9005.5227, 11799.3724 -9004.726, 11788.9519 -9003.4448, 11779.9774 -9002.3294, 11762.6791 -9000.302, 11745.7853 -8998.3151, 11733.713 -8996.7672, 11720.8818 -8995.3079, 11710.4156 -8993.782, 11704.9489 -8993.0308, 11701.0088 -8992.5708, 11695.6894 -8992.0022, 11695.4709 -8993.2528, 11673.4915 -8989.4577, 11658.8434 -8987.8902, 11651.3959 -8987.6881, 11643.9279 -8988.2379, 11638.6407 -8990.2075, 11633.2176 -8995.5848, 11627.7199 -9005.2128, 11630.2139 -9006.0015, 11633.1601 -9005.7462, 11631.4338 -9009.3567, 11629.8444 -9013.3731, 11628.1059 -9022.7272, 11620.7125 -9065.8639, 11612.6646 -9112.3891, 11606.0407 -9149.0436, 11598.7388 -9190.8477, 11593.518 -9190.0813, 11593.4893 -9190.3618, 11591.7738 -9202.1942, 11589.7359 -9216.182, 11592.211 -9216.5848, 11591.4994 -9221.1432, 11590.0714 -9231.6108, 11588.6906 -9239.0181, 11586.804 -9249.3457, 11584.3679 -9262.3566, 11581.9729 -9275.2702, 11580.8806 -9278.5236, 11579.6367 -9283.8945, 11578.7402 -9287.6448, 11576.8692 -9293.0215, 11576.206 -9294.8746, 11577.4629 -9295.5171, 11576.1189 -9297.1819, 11574.2319 -9299.1565, 11570.3322 -9302.0706, 11566.4074 -9303.6443, 11517.3061 -9316.7092)), ((10538.4742 -8841.2167, 10538.6639 -8841.5457, 10544.9465 -8853.5, 10551.3783 -8872.8042, 10554.5243 -8884.1815, 10555.2509 -8885.8567, 10557.827 -8886.6746, 10559.0489 -8888.9592, 10571.6983 -8902.7622, 10574.545 -8905.3676, 10580.8993 -8903.8126, 10597.1667 -8902.4227, 10616.3734 -8901.9774, 10635.512 -8901.6073, 10637.4876 -8901.9308, 10638.6234 -8903.6374, 10639.3915 -8906.6898, 10642.8334 -8906.4259, 10648.2058 -8905.5424, 10665.7825 -8907.31, 10681.0741 -8909.263, 10681.6512 -8909.2836, 10682.1315 -8909.2608, 10693.8507 -8910.3155, 10731.3851 -8914.7496, 10733.0698 -8915.0904, 10735.9988 -8915.7746, 10750.5638 -8917.5374, 10753.8272 -8917.8934, 10757.1473 -8918.3705, 10787.7923 -8922.1505, 10794.3772 -8923.1417, 10815.6217 -8925.8811, 10816.9768 -8926.095, 10818.1847 -8926.3152, 10850.1503 -8930.1685, 10851.2995 -8930.3241, 10852.1192 -8930.4447, 10868.2313 -8932.2611, 10869.3052 -8932.3788, 10870.1776 -8932.4695, 10905.0859 -8936.5665, 10907.4676 -8936.6715, 10910.3953 -8936.6376, 10939.4131 -8939.2791, 10940.8482 -8939.4525, 10950.2279 -8940.0207, 10952.7124 -8940.8332, 10959.8717 -8942.8604, 10975.9668 -8944.922, 10981.9756 -8945.3701, 11000.7514 -8947.7017, 11009.3897 -8948.7799, 11015.5355 -8949.6099, 11043.6417 -8952.9002, 11044.5144 -8952.9856, 11045.2173 -8953.0615, 11067.3801 -8955.8486, 11088.9024 -8958.4083, 11092.6234 -8958.7459, 11095.6822 -8958.9571, 11135.1145 -8963.8183, 11140.6309 -8964.0983, 11145.0648 -8964.3669, 11162.6926 -8966.6076, 11163.3881 -8966.7434, 11164.0096 -8966.8596, 11180.5324 -8969.1097, 11199.5574 -8971.4323, 11221.0843 -8974.2465, 11239.2522 -8976.8548, 11245.1983 -8978.5082, 11251.235 -8980.8821, 11250.3725 -8978.6263, 11246.1124585523 -8971.80830570151, 11242.56 -8969.44, 11231.7364552193 -8948.84886602689, 11217.0541 -8925.6894, 11213.3112 -8917.3115, 11210.1468 -8918.8818, 11205.3016 -8920.782, 11199.9478 -8922.4514, 11191.2742 -8923.3632, 11183.0279 -8922.6215, 11106.6557 -8912.6317, 11082.6826 -8909.0616, 11075.3835 -8908.3282, 11065.6164 -8907.122, 11051.3778 -8905.5613, 11013.6152 -8900.7517, 10936.1757 -8890.3295, 10931.6433 -8889.8599, 10905.6915 -8886.3948, 10903.3464 -8885.8436, 10875.8391 -8882.2496, 10874.6141 -8894.5925, 10864.2529 -8893.1555, 10845.4027 -8891.1401, 10841.7585 -8890.7481, 10828.2582 -8889.1333, 10807.0956 -8886.6983, 10797.1383 -8885.9752, 10793.1993 -8885.8332, 10786.118 -8885.2747, 10773.3137 -8884.339, 10773.5838 -8873.6785, 10774.3714 -8870.8341, 10772.3193 -8870.678, 10736.8864 -8866.4972, 10720.866 -8864.9853, 10699.0454 -8862.6108, 10676.7543 -8860.422, 10635.4306 -8856.0725, 10621.9695 -8853.8424, 10618.4888 -8853.2852, 10606.0549 -8851.5404, 10565.5093 -8843.3367, 10540.9357 -8838.9567, 10538.4742 -8841.2167)), ((10221.8371 -8957.8509, 10217.1186 -8962.6979, 10219.0379729471 -8964.10190901034, 10220.6004 -8961.6653, 10232.954 -8970.56, 10233.8362905777 -8971.28528018161, 10235.2527 -8969.9665, 10240.0855 -8966.6092, 10244.616 -8964.6875, 10255.769 -8961.7291, 10268.9498 -8959.8529, 10290.5463 -8956.7022, 10301.3344 -8955.6404, 10321.9246 -8952.0537, 10331.5377 -8949.8614, 10345.8532 -8947.2152, 10347.3674 -8947.0233, 10349.2175 -8946.8118, 10358.8055 -8945.0906, 10372.8704 -8942.2893, 10374.694 -8941.9433, 10377.1011 -8941.5033, 10380.9646 -8940.7237, 10380.428 -8938.4085, 10380.6233 -8937.3177, 10382.1165 -8935.5334, 10383.1352 -8934.4308, 10386.9636 -8933.4023, 10423.2803 -8926.4318, 10452.4406 -8920.8922, 10481.5725 -8915.3077, 10487.8745 -8914.5586, 10491.0085 -8913.9281, 10505.4779 -8913.9322, 10501.0623 -8883.1909, 10493.401 -8890.3654, 10491.2496 -8892.2846, 10481.7211 -8898.5785, 10476.3494 -8901.8754, 10468.6564 -8903.8349, 10440.8296 -8909.3713, 10425.5145 -8911.9444, 10397.8383 -8917.0854, 10397.5418 -8915.6779, 10391.6426 -8916.0696, 10385.1585 -8917.1572, 10384.9504 -8915.73, 10379.3754 -8916.7551, 10379.7809 -8918.4479, 10373.2752 -8919.8289, 10366.7923 -8921.4868, 10366.8454 -8922.952, 10360.5463 -8924.1291, 10359.3586 -8915.993, 10356.6492 -8916.5285, 10349.5194 -8917.7408, 10350.0602 -8920.6712, 10348.4466 -8920.9851, 10349.0963 -8925.2217, 10348.7279 -8926.2747, 10304.2728 -8934.49, 10302.8419 -8934.7084, 10300.8211 -8934.5268, 10298.7765 -8932.7239, 10296.5626 -8930.0269, 10287.0894 -8932.3249, 10287.0894 -8936.0426, 10286.2385 -8938.1585, 10284.9042 -8939.4247, 10271.4539 -8942.1365, 10270.3542 -8942.3011, 10261.2789 -8944.0258, 10239.8799 -8947.9821, 10237.935 -8948.5705, 10226.9395 -8953.7191, 10221.8371 -8957.8509)))

SDO_GEOM.RELATE incorrect result

I want to determine the relationship between two polygons. They are almost equal, but oracle determines the relationship as "TOUCH"
select SDO_GEOM.RELATE (
MDSYS.SDO_GEOMETRY(2003,25832,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,197,2003,1),MDSYS.SDO_ORDINATE_ARRAY(374119.43424706,5691944.80315028,374122.56159561,5691942.35776406,374125.07036344,5691939.84899623,374125.6278674,5691939.57024425,374136.1929,5691929.95,374126.74287533,5691918.94259766,374123.7908,5691919.3093,374120.83482781,5691914.30907697,374137.39360515,5691894.33055213,374144.35862375,5691897.41123343,374184.73010996,5691918.44877131,374178.5571,5691928.4882,374193.0645,5691937.4126,374203.6583,5691943.778,374207.76840888,5691947.06665824,374207.8497,5691953.1253,374206.20370687,5691961.70609861,374201.4204,5691986.3921,374197.2671265,5692000.33817609,374196.52293214,5692003.61939276,374190.5211,5692028.0781,374186.8797,5692037.6394,374182.61070422,5692050.1790179,374181.89211667,5692052.69407434,374175.69429903,5692070.47911627,374171.47259715,5692080.89863579,374162.49025274,5692095.98897439,374152.1525154,5692109.0546975,374127.197,5692126.3677,374120.27636327,5692131.38310293,374108.8928,5692139.6328,374097.09878544,5692131.02011759,374090.76457677,5692127.60988405,374086.32383809,5692125.21906354,374074.95934331,5692117.35133638,374068.20495934,5692112.67522439,374059.81117092,5692106.94549012,374054.0060377,5692102.681321,374049.24982463,5692099.01637733,374036.28831379,5692081.88669367,374029.91084926,5692072.3654086,374018.47857381,5692057.2113746,374005.212338585,5692038.71428125,373996.87175187,5692045.21896561,373996.30696508,5692049.163621,373988.90696508,5692054.163621,373972.30696508,5692032.963621,373964.50696508,5692021.763621,373956.30696508,5692010.163621,373944.90696508,5691998.763621,373932.50696508,5691987.163621,373921.30696508,5691975.963621,373900.086080328,5691954.83317774,373892.43,5691960.33,373876.72,5691933.43,373845.50696508,5691919.563621,373828.50696508,5691901.763621,373800.30696508,5691873.563621,373789.10696508,5691861.163621,373801.992436666,5691849.15142511,373756.70696508,5691803.963621,373735.10696508,5691781.163621,373718.70696508,5691764.163621,373704.90696508,5691748.963621,373713.30696508,5691739.563621,373725.61877479,5691729.9487546,373744.1508009,5691750.4148284,373774.01302383,5691782.0868812,373807.60210366,5691813.6839065,373831.81451845,5691837.682647,373853.7996963,5691858.39944878,373902.67941274,5691904.45918063,373922.98478297,5691923.5930868,373961.28732974,5691965.43010412,373986.1373196,5691992.57319366,374027.89090222,5692038.17970046,374043.46520697,5692055.19116608,374064.30270376,5692043.73054285,374068.64153567,5692041.3441853,374111.8750999,5692084.5659021,374118.00007278,5692080.6143047,374123.72989196,5692076.2675461,374130.44761047,5692071.1304726,374133.58868439,5692068.63372068,374138.15322833,5692065.0054922,374140.03229695,5692062.93010266,374144.77215088,5692057.6950393,374152.35208147,5692047.24340754,374155.98479933,5692042.2344132,374158.18891274,5692036.20983738,374161.91219536,5692026.0328663,374152.64292952,5692013.41663374,374138.05718211,5691993.56423284,374126.85729247,5691978.32026263,374119.54566412,5691965.47551012,374118.81594799,5691964.33851056,374111.04836631,5691952.23553446,374119.43424706,5691944.80315028,374145.1616,5691963.034,374157.9885,5691964.1404,374153.0214,5691949.1144,374140.9722,5691953.6877,374145.1616,5691963.034))
, 'determine',
MDSYS.SDO_GEOMETRY(2003,25832,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,203,2003,1),MDSYS.SDO_ORDINATE_ARRAY(374043.465206972,5692055.19116608,374068.641535671,5692041.3441853,374111.8750999,5692084.5659021,374118.00007278,5692080.6143047,374123.72989196,5692076.2675461,374130.44761047,5692071.1304726,374133.588684394,5692068.63372068,374138.15322833,5692065.0054922,374144.77215088,5692057.6950393,374152.352081467,5692047.24340754,374155.98479933,5692042.2344132,374158.188912742,5692036.20983738,374161.91219536,5692026.0328663,374126.857292471,5691978.32026263,374119.545664122,5691965.47551012,374111.04836631,5691952.23553446,374110.6621255,5691951.55287628,374111.475518872,5691951.02636587,374122.561595614,5691942.35776406,374125.070363442,5691939.84899623,374125.627867404,5691939.57024425,374136.1929,5691929.95,374126.742875328,5691918.94259766,374123.7908,5691919.3093,374120.834827807,5691914.30907697,374137.393605153,5691894.33055213,374146.752914089,5691898.47024646,374184.73010996,5691918.44877131,374178.5571,5691928.4882,374193.0645,5691937.4126,374203.6583,5691943.778,374207.768408877,5691947.06665824,374207.8497,5691953.1253,374203.5906,5691975.3286,374202.7846,5691980.152,374201.4204,5691986.3921,374197.2671265,5692000.33817609,374194.449392315,5692012.7618075,374190.5211,5692028.0781,374186.8797,5692037.6394,374182.610704222,5692050.1790179,374181.892116669,5692052.69407434,374175.694299027,5692070.47911627,374171.472597154,5692080.89863579,374165.4544264,5692091.22833186,374162.490252744,5692095.98897439,374152.152515397,5692109.0546975,374127.197,5692126.3677,374108.8928,5692139.6328,374097.098785442,5692131.02011759,374086.323838095,5692125.21906354,374068.204959335,5692112.67522439,374057.4343,5692105.323,374049.249824632,5692099.01637733,374036.288313788,5692081.88669367,374029.910849257,5692072.3654086,374022.2691,5692062.4965,374004.871025728,5692038.81214604,374003.683827056,5692039.8297449,373996.899834639,5692045.34173874,373996.136635492,5692049.24253438,373988.928643549,5692054.24572879,373972.318502371,5692033.04574923,373965.288134667,5692022.85754718,373956.026280328,5692009.98017827,373944.541676103,5691998.51343684,373937.016587809,5691991.34811373,373931.350286264,5691986.07155779,373924.754591345,5691979.50584331,373918.848446349,5691973.53973745,373900.050715829,5691954.83194822,373890.666840785,5691964.06592111,373849.937585098,5691924.40126746,373831.349004547,5691904.97320263,373805.564844428,5691878.82926353,373789.134937747,5691861.32001991,373801.487349339,5691848.96760832,373759.633061517,5691806.87346785,373733.009417114,5691779.53026549,373704.815450301,5691748.92374358,373713.083282479,5691739.59593292,373725.618774786,5691729.9487546,373748.954436917,5691755.50959358,373774.01302383,5691782.0868812,373798.149147215,5691804.49899316,373802.51787652,5691808.5556699,373807.60210366,5691813.6839065,373831.81451845,5691837.682647,373842.458795054,5691847.71283052,373865.216245828,5691869.157351,373888.862942235,5691891.43981446,373922.98478297,5691923.5930868,373935.147043721,5691936.87765288,373966.632992237,5691971.26905201,373979.962420575,5691985.82848921,373990.042422418,5691996.83865034,373998.422113111,5692005.99159954,374007.658279099,5692016.0800576,374016.018029933,5692025.21122693,374031.723718158,5692042.3661998,374043.465206972,5692055.19116608,374145.1616,5691963.034,374157.9885,5691964.1404,374153.0214,5691949.1144,374140.9722,5691953.6877,374145.1616,5691963.034))
, 0.0000005) from dual;
What version of Oracle ?
I tried the test case with Oracle 12.2. I am getting OVERLAPBDYINTERSECT at all tolerances, except at 0.5 where I get COVEREDBY.
I do not get TOUCH with any tolerance. Definitely TOUCH is incorrect. If you do get TOUCH, then that would be a bug that needs looking at - unless you do it on an old no-longer supported version ...
I recommend to use JTS Topology Suite, this is a open-source java based geometry tool. Use SDO_UTIL.TO_WKTGEOMETRY, the result you can copy/paste to JTS:
POLYGON ((374119.43424706 5691944.80315028, 374122.56159561 5691942.35776406, 374125.07036344 5691939.84899623, 374125.6278674 5691939.57024425, 374136.1929 5691929.95, 374126.74287533 5691918.94259766, 374123.7908 5691919.3093, 374120.83482781 5691914.30907697, 374137.39360515 5691894.33055213, 374144.35862375 5691897.41123343, 374184.73010996 5691918.44877131, 374178.5571 5691928.4882, 374193.0645 5691937.4126, 374203.6583 5691943.778, 374207.76840888 5691947.06665824, 374207.8497 5691953.1253, 374206.20370687 5691961.70609861, 374201.4204 5691986.3921, 374197.2671265 5692000.33817609, 374196.52293214 5692003.61939276, 374190.5211 5692028.0781, 374186.8797 5692037.6394, 374182.61070422 5692050.1790179, 374181.89211667 5692052.69407434, 374175.69429903 5692070.47911627, 374171.47259715 5692080.89863579, 374162.49025274 5692095.98897439, 374152.1525154 5692109.0546975, 374127.197 5692126.3677, 374120.27636327 5692131.38310293, 374108.8928 5692139.6328, 374097.09878544 5692131.02011759, 374090.76457677 5692127.60988405, 374086.32383809 5692125.21906354, 374074.95934331 5692117.35133638, 374068.20495934 5692112.67522439, 374059.81117092 5692106.94549012, 374054.0060377 5692102.681321, 374049.24982463 5692099.01637733, 374036.28831379 5692081.88669367, 374029.91084926 5692072.3654086, 374018.47857381 5692057.2113746, 374005.212338585 5692038.71428125, 373996.87175187 5692045.21896561, 373996.30696508 5692049.163621, 373988.90696508 5692054.163621, 373972.30696508 5692032.963621, 373964.50696508 5692021.763621, 373956.30696508 5692010.163621, 373944.90696508 5691998.763621, 373932.50696508 5691987.163621, 373921.30696508 5691975.963621, 373900.086080328 5691954.83317774, 373892.43 5691960.33, 373876.72 5691933.43, 373845.50696508 5691919.563621, 373828.50696508 5691901.763621, 373800.30696508 5691873.563621, 373789.10696508 5691861.163621, 373801.992436666 5691849.15142511, 373756.70696508 5691803.963621, 373735.10696508 5691781.163621, 373718.70696508 5691764.163621, 373704.90696508 5691748.963621, 373713.30696508 5691739.563621, 373725.61877479 5691729.9487546, 373744.1508009 5691750.4148284, 373774.01302383 5691782.0868812, 373807.60210366 5691813.6839065, 373831.81451845 5691837.682647, 373853.7996963 5691858.39944878, 373902.67941274 5691904.45918063, 373922.98478297 5691923.5930868, 373961.28732974 5691965.43010412, 373986.1373196 5691992.57319366, 374027.89090222 5692038.17970046, 374043.46520697 5692055.19116608, 374064.30270376 5692043.73054285, 374068.64153567 5692041.3441853, 374111.8750999 5692084.5659021, 374118.00007278 5692080.6143047, 374123.72989196 5692076.2675461, 374130.44761047 5692071.1304726, 374133.58868439 5692068.63372068, 374138.15322833 5692065.0054922, 374140.03229695 5692062.93010266, 374144.77215088 5692057.6950393, 374152.35208147 5692047.24340754, 374155.98479933 5692042.2344132, 374158.18891274 5692036.20983738, 374161.91219536 5692026.0328663, 374152.64292952 5692013.41663374, 374138.05718211 5691993.56423284, 374126.85729247 5691978.32026263, 374119.54566412 5691965.47551012, 374118.81594799 5691964.33851056, 374111.04836631 5691952.23553446, 374119.43424706 5691944.80315028), (374145.1616 5691963.034, 374157.9885 5691964.1404, 374153.0214 5691949.1144, 374140.9722 5691953.6877, 374145.1616 5691963.034))
POLYGON ((374043.465206972 5692055.19116608, 374068.641535671 5692041.3441853, 374111.8750999 5692084.5659021, 374118.00007278 5692080.6143047, 374123.72989196 5692076.2675461, 374130.44761047 5692071.1304726, 374133.588684394 5692068.63372068, 374138.15322833 5692065.0054922, 374144.77215088 5692057.6950393, 374152.352081467 5692047.24340754, 374155.98479933 5692042.2344132, 374158.188912742 5692036.20983738, 374161.91219536 5692026.0328663, 374126.857292471 5691978.32026263, 374119.545664122 5691965.47551012, 374111.04836631 5691952.23553446, 374110.6621255 5691951.55287628, 374111.475518872 5691951.02636587, 374122.561595614 5691942.35776406, 374125.070363442 5691939.84899623, 374125.627867404 5691939.57024425, 374136.1929 5691929.95, 374126.742875328 5691918.94259766, 374123.7908 5691919.3093, 374120.834827807 5691914.30907697, 374137.393605153 5691894.33055213, 374146.752914089 5691898.47024646, 374184.73010996 5691918.44877131, 374178.5571 5691928.4882, 374193.0645 5691937.4126, 374203.6583 5691943.778, 374207.768408877 5691947.06665824, 374207.8497 5691953.1253, 374203.5906 5691975.3286, 374202.7846 5691980.152, 374201.4204 5691986.3921, 374197.2671265 5692000.33817609, 374194.449392315 5692012.7618075, 374190.5211 5692028.0781, 374186.8797 5692037.6394, 374182.610704222 5692050.1790179, 374181.892116669 5692052.69407434, 374175.694299027 5692070.47911627, 374171.472597154 5692080.89863579, 374165.4544264 5692091.22833186, 374162.490252744 5692095.98897439, 374152.152515397 5692109.0546975, 374127.197 5692126.3677, 374108.8928 5692139.6328, 374097.098785442 5692131.02011759, 374086.323838095 5692125.21906354, 374068.204959335 5692112.67522439, 374057.4343 5692105.323, 374049.249824632 5692099.01637733, 374036.288313788 5692081.88669367, 374029.910849257 5692072.3654086, 374022.2691 5692062.4965, 374004.871025728 5692038.81214604, 374003.683827056 5692039.8297449, 373996.899834639 5692045.34173874, 373996.136635492 5692049.24253438, 373988.928643549 5692054.24572879, 373972.318502371 5692033.04574923, 373965.288134667 5692022.85754718, 373956.026280328 5692009.98017827, 373944.541676103 5691998.51343684, 373937.016587809 5691991.34811373, 373931.350286264 5691986.07155779, 373924.754591345 5691979.50584331, 373918.848446349 5691973.53973745, 373900.050715829 5691954.83194822, 373890.666840785 5691964.06592111, 373849.937585098 5691924.40126746, 373831.349004547 5691904.97320263, 373805.564844428 5691878.82926353, 373789.134937747 5691861.32001991, 373801.487349339 5691848.96760832, 373759.633061517 5691806.87346785, 373733.009417114 5691779.53026549, 373704.815450301 5691748.92374358, 373713.083282479 5691739.59593292, 373725.618774786 5691729.9487546, 373748.954436917 5691755.50959358, 373774.01302383 5691782.0868812, 373798.149147215 5691804.49899316, 373802.51787652 5691808.5556699, 373807.60210366 5691813.6839065, 373831.81451845 5691837.682647, 373842.458795054 5691847.71283052, 373865.216245828 5691869.157351, 373888.862942235 5691891.43981446, 373922.98478297 5691923.5930868, 373935.147043721 5691936.87765288, 373966.632992237 5691971.26905201, 373979.962420575 5691985.82848921, 373990.042422418 5691996.83865034, 373998.422113111 5692005.99159954, 374007.658279099 5692016.0800576, 374016.018029933 5692025.21122693, 374031.723718158 5692042.3661998, 374043.465206972 5692055.19116608), (374145.1616 5691963.034, 374157.9885 5691964.1404, 374153.0214 5691949.1144, 374140.9722 5691953.6877, 374145.1616 5691963.034))
I am not an expert, TOUCHES means "none of the points common to both geometries intersect the interiors of both geometries." When you check the picture you see one point interiors the other polygon (marked by red circle)
I assume it is a bug of Oracle 12.1.0.2.0, but I found a workaround:
alter session set spatial_vector_acceleration=TRUE;

SPSS: Syntax for Calculating FSCORE from rotated factors

I found the proper syntax to import my centriod factor extraction into SPSS and rotate it. (The semi-bumbling tale is here.
The next issue is this: because of limitations in SPSS on what subcommands can be used when reading a matrix in (only /ROTATE and /EXTRACTION are permitted), I can't get the factor scores. SPSS displays this error:
"Factor scores cannot be computed with matrix input."
I still need to find a way to get the FSCORE of the newly rotated factors of each factor for all cases by running a regression using the newly rotated factors and saving the regression values as a new variable (/SAVE REG(ALL).
Ideas are welcome. Thank you for your expertise!
Assets: Dataset A of 36 cases and 74 variables (the basis of the centriod factor extraction); centriod factor extraction matrix
Here's the SPSS syntax that almost does what I need - except it uses PCA extraction instead of centroid.
FACTOR
/VARIABLES VAR00001 VAR00002 VAR00003 VAR00004 VAR00005 VAR00006 VAR00007 VAR00008 VAR00009 VAR00010 VAR00011 VAR00012 VAR00013 VAR00014 VAR00015 VAR00016 VAR00017 VAR00018 VAR00019 VAR00020 VAR00021 VAR00022 VAR00023 VAR00024 VAR00025 VAR00026 VAR00027 VAR00028 VAR00029 VAR00030 VAR00031 VAR00032 VAR00033 VAR00034 VAR00035 VAR00036 VAR00037 VAR00038 VAR00039 VAR00040 VAR00041 VAR00042 VAR00043 VAR00044 VAR00045 VAR00046 VAR00047 VAR00048 VAR00049 VAR00050 VAR00051 VAR00052 VAR00053 VAR00054 VAR00055 VAR00056 VAR00057 VAR00058 VAR00059 VAR00060 VAR00061 VAR00062 VAR00063 VAR00064 VAR00065 VAR00066 VAR00067 VAR00068 VAR00069 VAR00070 VAR00071 VAR00072 VAR00073 VAR00074
/MISSING LISTWISE
/ANALYSIS VAR00001 VAR00002 VAR00003 VAR00004 VAR00005 VAR00006 VAR00007 VAR00008 VAR00009 VAR00010 VAR00011 VAR00012 VAR00013 VAR00014 VAR00015 VAR00016 VAR00017 VAR00018 VAR00019 VAR00020 VAR00021 VAR00022 VAR00023 VAR00024 VAR00025 VAR00026 VAR00027 VAR00028 VAR00029 VAR00030 VAR00031 VAR00032 VAR00033 VAR00034 VAR00035 VAR00036 VAR00037 VAR00038 VAR00039 VAR00040 VAR00041 VAR00042 VAR00043 VAR00044 VAR00045 VAR00046 VAR00047 VAR00048 VAR00049 VAR00050 VAR00051 VAR00052 VAR00053 VAR00054 VAR00055 VAR00056 VAR00057 VAR00058 VAR00059 VAR00060 VAR00061 VAR00062 VAR00063 VAR00064 VAR00065 VAR00066 VAR00067 VAR00068 VAR00069 VAR00070 VAR00071 VAR00072 VAR00073 VAR00074
/PRINT INITIAL CORRELATION SIG DET INV REPR AIC EXTRACTION ROTATION FSCORE
/FORMAT BLANK(.544)
/CRITERIA FACTORS(6) ITERATE(80)
/EXTRACTION PC <---Here's the rub.
/CRITERIA ITERATE(80) DELTA(0)
/ROTATION OBLIMIN
/SAVE REG(ALL)
/METHOD=CORRELATION.
I referred to the MATRIX command in my reply to your other post (Rotations). You will need to research the appropriate equations for performing this calculation and set up the matrix algebra within a MATRIX END - MATRIX code block. Easy once you have the math right. I'm too busy/lazy to research and write it but this should provide a fertile lead.

Plot 3d scattered data using gnuplot

Hi I just got some 3d scattered data (the data name is just data.txt) which look like the following:
0 0 0
-1.08051e-16 -1.73991e-16 -1.79157e-16
-1.02169e-15 -1.19283e-15 5.92632e-16
3.41114e-16 -1.02211e-15 3.19436e-15
-4.51742e-15 -5.18861e-15 -4.60754e-15
-2.00685e-15 -4.67813e-15 -4.86101e-15
-9.82727e-16 -2.24413e-15 -5.87927e-16
-7.74439e-16 -9.73515e-16 -1.69707e-15
4.32668e-16 2.15869e-15 -2.25004e-15
-3.74495e-15 -2.20596e-15 -7.33201e-16
-4.97941e-16 -5.45749e-16 -2.93136e-15
-2.40174e-15 -4.31022e-15 7.13531e-15
-4.58812e-15 -4.38568e-15 -9.99635e-16
-7.00716e-15 7.53852e-15 -8.484e-15
4.50028e-15 2.2255e-15 2.32808e-15
-8.57887e-15 3.09127e-15 -3.49207e-15
-2.0608e-16 -6.06078e-15 -6.07822e-16
-7.76829e-15 -1.47001e-14 -1.08924e-14
1.04016e-15 6.33122e-16 -2.11985e-15
2.33557e-15 -7.92667e-15 2.52748e-15
6.94335e-15 3.70286e-15 -1.44815e-15
.........
the 1st,2nd and 3rd column represent x,y and z axis, respectively.
I'd like to use splot command to plot these data. Can anyone kindly give some suggestions? Thanks.
Since your data is nicely formatted, you could start with
splot 'data.txt'
If you want to get fancy, you can add some options to change how it is plotted:
splot 'data.txt' with points pointtype 7
What kind of suggestions are you looking for?

How Can I Use (Ruby) RGeo to Transform (Unproject) Coordinates

I started with How can I transform the coordinates of a Shapefile? .
The response there started me on [what I think is] the right track, but I still haven't been able to solve my problem.
One issue is that I haven't found the correct projection yet: https://gis.stackexchange.com/questions/13330/how-can-i-correctly-transform-unproject-from-lcc
EDIT: That question on the gis site has been answered, and I was able to reproduce a correct transformation using the PROJ command line tool cs2cs. It looks like this:
larry$ cs2cs -f "%.8f" +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs +to +proj=lonlat +datum=WGS84 +ellps=WGS84
6011287.4999795845 2100857.2499904726
-122.40375492 37.74919006 0.00000000
Now, that I had the correct transformation, I was able to try the same thing in a simple form using RGeo:
ruby-1.9.2-p180 :001 > projection_str = ' +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs'
=> " +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"
ruby-1.9.2-p180 :002 > projection = RGeo::CoordSys::Proj4.new(projection_str)
=> #<RGeo::CoordSys::Proj4:0x805cba18 " +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs +towgs84=0,0,0">
ruby-1.9.2-p180 :003 > desired_str = '+proj=lonlat +datum=WGS84 +ellps=WGS84'
=> "+proj=lonlat +datum=WGS84 +ellps=WGS84"
ruby-1.9.2-p180 :004 > desired = RGeo::CoordSys::Proj4.new(desired_str)
=> #<RGeo::CoordSys::Proj4:0x805271ac " +proj=lonlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0">
ruby-1.9.2-p180 :005 > RGeo::CoordSys::Proj4::transform_coords(projection, desired, 6011287.4999795845, 2100857.2499904726 )
=> [-140.92282523143973, 30.16981659183029]
Why are the results different between RGeo and cs2cs?
Once I can make RGeo perform the correct translation, is there a way I can create the proper factory to transform a complete Geometry instead of a point?
Is there a command-line tool I can use as a workaround to transform all of the points in my shapefile so that I can move on with my life?
In general: Would someone please instruct me on how to properly use this library?
Thank you so much for looking.
As a wild stab in the dark, because I don't know RGeo or even Ruby, try substituting your coordinates in feet with their metres equivalent: 1832244.0944819663048746863094224, 640342.57048223700783128534419392 (you probably won't need that number of decimal places though...) Another possibility is to swap the coordinates around - maybe RGeo makes some unconventional assumptions.
If you are able to call executables from Ruby, you could simply use ogr2ogr to convert your shapefiles.

Resources