Stefano Passiatore
2013-04-25 07:40:59 UTC
Hi to all, I've this filed in my document:
{"geometry" : { "type" : "Polygon", "coordinates" :[[[7.282782, 44.61294],
[7.283935, 44.61293], [7.286837, 44.611853], [7.287715, 44.611461],
[7.288526, 44.610983], [7.295425, 44.606333], [7.300007, 44.603012],
[7.300558, 44.602718], [7.302949, 44.601647], [7.304067, 44.601344],
[7.3086, 44.600466], [7.310826, 44.60021], [7.311634, 44.600195],
[7.312773, 44.600203], [7.31373, 44.600258], [7.314291, 44.600316],
[7.315784, 44.60086], [7.321178, 44.60314], [7.321289, 44.603223],
[7.32139, 44.603319], [7.32165, 44.603651], [7.322174, 44.604339],
[7.326342, 44.603108], [7.326698, 44.602888], [7.328, 44.60225], [7.328368,
44.602076], [7.32888, 44.601885], [7.339799, 44.598299], [7.341376,
44.598174], [7.342134, 44.598117], [7.342739, 44.598126], [7.348733,
44.598306], [7.351195, 44.592361], [7.351943, 44.591413], [7.353902,
44.589155], [7.354039, 44.589058], [7.355697, 44.587907], [7.357086,
44.586982], [7.359394, 44.585768], [7.376656, 44.580595], [7.383961,
44.578615], [7.38535, 44.578423], [7.383638, 44.577953], [7.383327,
44.577841], [7.382396, 44.577341], [7.381946, 44.575868], [7.381501,
44.573746], [7.380966, 44.569408], [7.381147, 44.568781], [7.38128,
44.567612], [7.381304, 44.567198], [7.38127, 44.567081], [7.3809,
44.565878], [7.380793, 44.565679], [7.380759, 44.565629], [7.380648,
44.565461], [7.380296, 44.564952], [7.374248, 44.55788], [7.372901,
44.557861], [7.37255, 44.55782], [7.372336, 44.55779], [7.372077,
44.557624], [7.371188, 44.556999], [7.371028, 44.556844], [7.366489,
44.549433], [7.366203, 44.548871], [7.366075, 44.548491], [7.366018,
44.548256], [7.365865, 44.53778], [7.366244, 44.536601], [7.36549,
44.536775], [7.365408, 44.536796], [7.361493, 44.540386], [7.361232,
44.540706], [7.36116, 44.541038], [7.361304, 44.541743], [7.361403,
44.542257], [7.360399, 44.545938], [7.354438, 44.549539], [7.345313,
44.553926], [7.342703, 44.554933], [7.343596, 44.557867], [7.34742,
44.558791], [7.347775, 44.558891], [7.348122, 44.559031], [7.350721,
44.560482], [7.351205, 44.560808], [7.351473, 44.561492], [7.35163,
44.561985], [7.351155, 44.562437], [7.350743, 44.56271], [7.343885,
44.566819], [7.329611, 44.574551], [7.32569, 44.57624], [7.32096,
44.57771], [7.313023, 44.579704], [7.310811, 44.580113], [7.310414,
44.58017], [7.308875, 44.580215], [7.307107, 44.579635], [7.306834,
44.579617], [7.306584, 44.579605], [7.30631, 44.579623], [7.305864,
44.579724], [7.303958, 44.580187], [7.301737, 44.580892], [7.30132,
44.581286], [7.294473, 44.582476], [7.285745, 44.587211], [7.279721,
44.591032], [7.279485, 44.591172], [7.279152, 44.591343], [7.278986,
44.591408], [7.276883, 44.591565], [7.271547, 44.591728], [7.268992,
44.59168], [7.266041, 44.591361], [7.265591, 44.591358], [7.265026,
44.591422], [7.263705, 44.591586], [7.260174, 44.592383], [7.25983,
44.592504], [7.259575, 44.592595], [7.259229, 44.592774], [7.259351,
44.593046], [7.259576, 44.593418], [7.267426, 44.599461], [7.267864,
44.599805], [7.268139, 44.600098], [7.273074, 44.610057], [7.273391,
44.610782], [7.274251, 44.612811], [7.274412, 44.613394], [7.274326,
44.615935], [7.282782, 44.61294]]]}
but when I try to create index with:
db.cities.ensureIndex({ "geometry.coordinates" : "2d"})
I got this error:
"err" : "geo values have to be numbers :: caused by :: { NOME_COM:
\"Brossasco\", COD_REG: 1, COD_PRO: 4, geometry: { type: \"Polygon\",
coordinates: [ [ [ 7.282782, 44.61294 ], [ 7.283935, 44.61293 ], [
7.286837, 44.611853 ], [ 7.287715, 44.611461 ], [ 7.288526, 44.610983 ], [
7.295425, 44.606333 ], [ 7.300007, 44.603012 ], [ 7.300558, 44.602718 ], [
7.302949, 44.601647 ], [ 7.304067, 44.601344 ], [ 7.3086, 44.600466 ], [
7.310826, 44.60021 ], [ 7.311634, 44.600195 ], [ 7.312773, 44.600203 ], [
7.31373, 44.600258 ], [ 7.314291, 44.600316 ], [ 7.315784, 44.60086 ], [
7.321178, 44.60314 ], [ 7.321289, 44.603223 ], [ 7.32139, 44.603319 ], [
7.32165, 44.603651 ], [ 7.322174, 44.604339 ], [ 7.326342, 44.603108 ], [
7.326698, 44.602888 ], [ 7.328, 44.60225 ], [ 7.328368, 44.602076 ], [
7.32888, 44.601885 ], [ 7.339799, 44.598299 ], [ 7.341376, 44.598174 ], [
7.342134, 44.598117 ], [ 7.342739, 44.598126 ], [ 7.348733, 44.598306 ], [
7.351195, 44.592361 ], [ 7.351943, 44.591413 ], [ 7.353902, 44.589155 ], [
7.354039, 44.589058 ], [ 7.355697, 44.587907 ], [ 7.357086, 44.586982 ], [
7.359394, 44.585768 ], [ 7.376656, 44.580595 ], [ 7.383961, 44.578615 ], [
7.38535, 44.578423 ], [ 7.383638, 44.577953 ], [ 7.383327, 44.577841 ], [
7.382396, 44.577341 ], [ 7.381946, 44.575868 ], [ 7.381501, 44.573746 ], [
7.380966, 44.569408 ], [ 7.381147, 44.568781 ], [ 7.38128, 44.567612 ], [
7.381304, 44.567198 ], [ 7.38127, 44.567081 ], [ 7.3809, 44.565878 ], [
7.380793, 44.565679 ], [ 7.380759, 44.565629 ], [ 7.380648, 44.565461 ], [
7.380296, 44.564952 ], [ 7.374248, 44.55788 ], [ 7.372901, 44.557861 ], [
7.37255, 44.55782 ], [ 7.372336, 44.55779 ], [ 7.372077, 44.557624 ], [
7.371188, 44.556999 ], [ 7.371028, 44.556844 ], [ 7.366489, 44.549433 ], [
7.366203, 44.548871 ], [ 7.366075, 44.548491 ], [ 7.366018, 44.548256 ], [
7.365865, 44.53778 ], [ 7.366244, 44.536601 ], [ 7.36549, 44.536775 ], [
7.365408, 44.536796 ], [ 7.361493, 44.540386 ], [ 7.361232, 44.540706 ], [
7.36116, 44.541038 ], [ 7.361304, 44.541743 ], [ 7.361403, 44.542257 ], [
7.360399, 44.545938 ], [ 7.354438, 44.549539 ], [ 7.345313, 44.553926 ], [
7.342703, 44.554933 ], [ 7.343596, 44.557867 ], [ 7.34742, 44.558791 ], [
7.347775, 44.558891 ], [ 7.348122, 44.559031 ], [ 7.350721, 44.560482 ], [
7.351205, 44.560808 ], [ 7.351473, 44.561492 ], [ 7.35163, 44.561985 ], [
7.351155, 44.562437 ], [ 7.350743, 44.56271 ], [ 7.343885, 44.566819 ], [
7.329611, 44.574551 ], [ 7.32569, 44.57624 ], [ 7.32096, 44.57771 ], [
7.313023, 44.579704 ], [ 7.310811, 44.580113 ], [ 7.310414, 44.58017 ], [
7.308875, 44.580215 ], [ 7.307107, 44.579635 ], [ 7.306834, 44.579617 ], [
7.306584, 44.579605 ], [ 7.30631, 44.579623 ], [ 7.305864, 44.579724 ], [
7.303958, 44.580187 ], [ 7.301737, 44.580892 ], [ 7.30132, 44.581286 ], [
7.294473, 44.582476 ], [ 7.285745, 44.587211 ], [ 7.279721, 44.591032 ], [
7.279485, 44.591172 ], [ 7.279152, 44.591343 ], [ 7.278986, 44.591408 ], [
7.276883, 44.591565 ], [ 7.271547, 44.591728 ], [ 7.268992, 44.59168 ], [
7.266041, 44.591361 ], [ 7.265591, 44.591358 ], [ 7.265026, 44.591422 ], [
7.263705, 44.591586 ], [ 7.260174, 44.592383 ], [ 7.25983, 44.592504 ], [
7.259575, 44.592595 ], [ 7.259229, 44.592774 ], [ 7.259351, 44.593046 ], [
7.259576, 44.593418 ], [ 7.267426, 44.599461 ], [ 7.267864, 44.599805 ], [
7.268139, 44.600098 ], [ 7.273074, 44.610057 ], [ 7.273391, 44.610782 ], [
7.274251, 44.612811 ], [ 7.274412, 44.613394 ], [ 7.274326, 44.615935 ], [
7.282782, 44.61294 ] ] ] }, _id: ObjectId('5178dda27cad6ae806000001') }",
"code" : 13026,
"n" : 0,
"connectionId" : 1,
"ok" : 1
Where is the problem???
thanks a lot
Stefano
--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user-/***@public.gmane.org
To unsubscribe from this group, send email to
mongodb-user+unsubscribe-/***@public.gmane.org
See also the IRC channel -- freenode.net#mongodb
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
{"geometry" : { "type" : "Polygon", "coordinates" :[[[7.282782, 44.61294],
[7.283935, 44.61293], [7.286837, 44.611853], [7.287715, 44.611461],
[7.288526, 44.610983], [7.295425, 44.606333], [7.300007, 44.603012],
[7.300558, 44.602718], [7.302949, 44.601647], [7.304067, 44.601344],
[7.3086, 44.600466], [7.310826, 44.60021], [7.311634, 44.600195],
[7.312773, 44.600203], [7.31373, 44.600258], [7.314291, 44.600316],
[7.315784, 44.60086], [7.321178, 44.60314], [7.321289, 44.603223],
[7.32139, 44.603319], [7.32165, 44.603651], [7.322174, 44.604339],
[7.326342, 44.603108], [7.326698, 44.602888], [7.328, 44.60225], [7.328368,
44.602076], [7.32888, 44.601885], [7.339799, 44.598299], [7.341376,
44.598174], [7.342134, 44.598117], [7.342739, 44.598126], [7.348733,
44.598306], [7.351195, 44.592361], [7.351943, 44.591413], [7.353902,
44.589155], [7.354039, 44.589058], [7.355697, 44.587907], [7.357086,
44.586982], [7.359394, 44.585768], [7.376656, 44.580595], [7.383961,
44.578615], [7.38535, 44.578423], [7.383638, 44.577953], [7.383327,
44.577841], [7.382396, 44.577341], [7.381946, 44.575868], [7.381501,
44.573746], [7.380966, 44.569408], [7.381147, 44.568781], [7.38128,
44.567612], [7.381304, 44.567198], [7.38127, 44.567081], [7.3809,
44.565878], [7.380793, 44.565679], [7.380759, 44.565629], [7.380648,
44.565461], [7.380296, 44.564952], [7.374248, 44.55788], [7.372901,
44.557861], [7.37255, 44.55782], [7.372336, 44.55779], [7.372077,
44.557624], [7.371188, 44.556999], [7.371028, 44.556844], [7.366489,
44.549433], [7.366203, 44.548871], [7.366075, 44.548491], [7.366018,
44.548256], [7.365865, 44.53778], [7.366244, 44.536601], [7.36549,
44.536775], [7.365408, 44.536796], [7.361493, 44.540386], [7.361232,
44.540706], [7.36116, 44.541038], [7.361304, 44.541743], [7.361403,
44.542257], [7.360399, 44.545938], [7.354438, 44.549539], [7.345313,
44.553926], [7.342703, 44.554933], [7.343596, 44.557867], [7.34742,
44.558791], [7.347775, 44.558891], [7.348122, 44.559031], [7.350721,
44.560482], [7.351205, 44.560808], [7.351473, 44.561492], [7.35163,
44.561985], [7.351155, 44.562437], [7.350743, 44.56271], [7.343885,
44.566819], [7.329611, 44.574551], [7.32569, 44.57624], [7.32096,
44.57771], [7.313023, 44.579704], [7.310811, 44.580113], [7.310414,
44.58017], [7.308875, 44.580215], [7.307107, 44.579635], [7.306834,
44.579617], [7.306584, 44.579605], [7.30631, 44.579623], [7.305864,
44.579724], [7.303958, 44.580187], [7.301737, 44.580892], [7.30132,
44.581286], [7.294473, 44.582476], [7.285745, 44.587211], [7.279721,
44.591032], [7.279485, 44.591172], [7.279152, 44.591343], [7.278986,
44.591408], [7.276883, 44.591565], [7.271547, 44.591728], [7.268992,
44.59168], [7.266041, 44.591361], [7.265591, 44.591358], [7.265026,
44.591422], [7.263705, 44.591586], [7.260174, 44.592383], [7.25983,
44.592504], [7.259575, 44.592595], [7.259229, 44.592774], [7.259351,
44.593046], [7.259576, 44.593418], [7.267426, 44.599461], [7.267864,
44.599805], [7.268139, 44.600098], [7.273074, 44.610057], [7.273391,
44.610782], [7.274251, 44.612811], [7.274412, 44.613394], [7.274326,
44.615935], [7.282782, 44.61294]]]}
but when I try to create index with:
db.cities.ensureIndex({ "geometry.coordinates" : "2d"})
I got this error:
"err" : "geo values have to be numbers :: caused by :: { NOME_COM:
\"Brossasco\", COD_REG: 1, COD_PRO: 4, geometry: { type: \"Polygon\",
coordinates: [ [ [ 7.282782, 44.61294 ], [ 7.283935, 44.61293 ], [
7.286837, 44.611853 ], [ 7.287715, 44.611461 ], [ 7.288526, 44.610983 ], [
7.295425, 44.606333 ], [ 7.300007, 44.603012 ], [ 7.300558, 44.602718 ], [
7.302949, 44.601647 ], [ 7.304067, 44.601344 ], [ 7.3086, 44.600466 ], [
7.310826, 44.60021 ], [ 7.311634, 44.600195 ], [ 7.312773, 44.600203 ], [
7.31373, 44.600258 ], [ 7.314291, 44.600316 ], [ 7.315784, 44.60086 ], [
7.321178, 44.60314 ], [ 7.321289, 44.603223 ], [ 7.32139, 44.603319 ], [
7.32165, 44.603651 ], [ 7.322174, 44.604339 ], [ 7.326342, 44.603108 ], [
7.326698, 44.602888 ], [ 7.328, 44.60225 ], [ 7.328368, 44.602076 ], [
7.32888, 44.601885 ], [ 7.339799, 44.598299 ], [ 7.341376, 44.598174 ], [
7.342134, 44.598117 ], [ 7.342739, 44.598126 ], [ 7.348733, 44.598306 ], [
7.351195, 44.592361 ], [ 7.351943, 44.591413 ], [ 7.353902, 44.589155 ], [
7.354039, 44.589058 ], [ 7.355697, 44.587907 ], [ 7.357086, 44.586982 ], [
7.359394, 44.585768 ], [ 7.376656, 44.580595 ], [ 7.383961, 44.578615 ], [
7.38535, 44.578423 ], [ 7.383638, 44.577953 ], [ 7.383327, 44.577841 ], [
7.382396, 44.577341 ], [ 7.381946, 44.575868 ], [ 7.381501, 44.573746 ], [
7.380966, 44.569408 ], [ 7.381147, 44.568781 ], [ 7.38128, 44.567612 ], [
7.381304, 44.567198 ], [ 7.38127, 44.567081 ], [ 7.3809, 44.565878 ], [
7.380793, 44.565679 ], [ 7.380759, 44.565629 ], [ 7.380648, 44.565461 ], [
7.380296, 44.564952 ], [ 7.374248, 44.55788 ], [ 7.372901, 44.557861 ], [
7.37255, 44.55782 ], [ 7.372336, 44.55779 ], [ 7.372077, 44.557624 ], [
7.371188, 44.556999 ], [ 7.371028, 44.556844 ], [ 7.366489, 44.549433 ], [
7.366203, 44.548871 ], [ 7.366075, 44.548491 ], [ 7.366018, 44.548256 ], [
7.365865, 44.53778 ], [ 7.366244, 44.536601 ], [ 7.36549, 44.536775 ], [
7.365408, 44.536796 ], [ 7.361493, 44.540386 ], [ 7.361232, 44.540706 ], [
7.36116, 44.541038 ], [ 7.361304, 44.541743 ], [ 7.361403, 44.542257 ], [
7.360399, 44.545938 ], [ 7.354438, 44.549539 ], [ 7.345313, 44.553926 ], [
7.342703, 44.554933 ], [ 7.343596, 44.557867 ], [ 7.34742, 44.558791 ], [
7.347775, 44.558891 ], [ 7.348122, 44.559031 ], [ 7.350721, 44.560482 ], [
7.351205, 44.560808 ], [ 7.351473, 44.561492 ], [ 7.35163, 44.561985 ], [
7.351155, 44.562437 ], [ 7.350743, 44.56271 ], [ 7.343885, 44.566819 ], [
7.329611, 44.574551 ], [ 7.32569, 44.57624 ], [ 7.32096, 44.57771 ], [
7.313023, 44.579704 ], [ 7.310811, 44.580113 ], [ 7.310414, 44.58017 ], [
7.308875, 44.580215 ], [ 7.307107, 44.579635 ], [ 7.306834, 44.579617 ], [
7.306584, 44.579605 ], [ 7.30631, 44.579623 ], [ 7.305864, 44.579724 ], [
7.303958, 44.580187 ], [ 7.301737, 44.580892 ], [ 7.30132, 44.581286 ], [
7.294473, 44.582476 ], [ 7.285745, 44.587211 ], [ 7.279721, 44.591032 ], [
7.279485, 44.591172 ], [ 7.279152, 44.591343 ], [ 7.278986, 44.591408 ], [
7.276883, 44.591565 ], [ 7.271547, 44.591728 ], [ 7.268992, 44.59168 ], [
7.266041, 44.591361 ], [ 7.265591, 44.591358 ], [ 7.265026, 44.591422 ], [
7.263705, 44.591586 ], [ 7.260174, 44.592383 ], [ 7.25983, 44.592504 ], [
7.259575, 44.592595 ], [ 7.259229, 44.592774 ], [ 7.259351, 44.593046 ], [
7.259576, 44.593418 ], [ 7.267426, 44.599461 ], [ 7.267864, 44.599805 ], [
7.268139, 44.600098 ], [ 7.273074, 44.610057 ], [ 7.273391, 44.610782 ], [
7.274251, 44.612811 ], [ 7.274412, 44.613394 ], [ 7.274326, 44.615935 ], [
7.282782, 44.61294 ] ] ] }, _id: ObjectId('5178dda27cad6ae806000001') }",
"code" : 13026,
"n" : 0,
"connectionId" : 1,
"ok" : 1
Where is the problem???
thanks a lot
Stefano
--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user-/***@public.gmane.org
To unsubscribe from this group, send email to
mongodb-user+unsubscribe-/***@public.gmane.org
See also the IRC channel -- freenode.net#mongodb
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.