Coordonnées GPS /départements

  • Auteur de la discussion Auteur de la discussion BnK
  • Date de début Date de début
Nouveau WRInaute
Bonjour tout le monde,

Je viens vers vous pour une petite question, comme à mon habitude ! Bref, cette fois-ci, cela concerne les coordonnées géographique d'un ou plusieurs départements.

En effet, j'aimerais trouver ces coordonnées afin de ne cibler la publicité sur Adwords que pour une département et non pour une ville (avec rayon variable). Je veux exactement épouser un département dans ses propres limites officielles.

Problème, sur le net je trouve très régulièrement des coordonnées de point (exemple : une ville) mais aucun coordonnées de plusieurs points représentant les "frontières départementales".

Avez-vous une petite idée pour m'aider à ce sujet ?

Merci d'avance, et bonne fin de week-end
 
WRInaute passionné
Si les coordonnées existent, pas à ma connaissance coté département.

Tu peux peux être faire un rayon et prendre tout ce qui est à tant de lat / lon du point de chute et exclure ce qui n'est pas du même département que le centre du cercle.

Disons que je ferais comme ça ! :idea:
 
WRInaute passionné
Bonjour,
Les coordonnées d'un secteur géographique sont un non sens en terme de GPS
Ce que je fais, c'est de prendre une valeur moyenne correspondant par exemple à une position type barycentre du département.
 
Nouveau WRInaute
Jeroen, j'avais fait la même recherche mais il semble que les coordonnées sur Google Earth ne soit pas écrit de la même manière que sur Adwords (impossible de lire le fichier KMZ sauf sur G. earth)

Le problème, c'est que je n'ai pas G. Earth et qu'il ne veut pas s'installer (problème depuis la MAJ paraît-il). Je suis donc assez étonné de ne pas trouver une méthode concrète puisque quelqu'un a déjà bien du avoir une problématique similaire.

Ben
 
WRInaute accro
Tu peux quand même éplucher le fichier en l'éditant.
C'est quoi ton point d'entrée ?
 
Membre Honoré
Bienvenue BnK sur le forum de WebRankInfo.

jeroen a dit:
T'as testé ça ?
https://www.google.fr/search?q=departement+kmz (premier lien, bas de page)
groups.google.fr/group/Google-Maps-fr-how-do-I/browse_thread/thread/1b30d78cadc3fb88
Intéressante information, merci Jeroen. :)

Les membres (qui le souhaitent) se présentent.

N’hésitez pas BnK à participer sur le forum, pour partager vos connaissances, donnez votre avis sur d'autres topics,
vous aurez alors un rôle constructif dans notre communauté et chacun pourra ainsi évoluer dans le référencement.

Source : https://www.webrankinfo.com/forum/t/sur-wri-on-dit-merci.98269/
 
Nouveau WRInaute
OTP > Editer le fichier avec quel logiciel ? Je n'ai pas de Google Earth et en mode texte, aucun résultat intéressant. Une idée ?

Jeroen > Merci encore

Madrileño > Merci
 
WRInaute passionné
Oui, un KMZ est un KML Zippé, et un KML est un fichier texte.

Donc tu le dézippe, tu fais un petit script en php pour récupérer les coordonnées de la frontière pour chaque département.

Ensuite il te faudra, connaissant les coordonnées d'un point, savoir dans quel polygone il est, et là c'est pas hyper simple. Si tu veux un coup de main dis moi :wink:
 
Nouveau WRInaute
Oui, en effet, je viens de voir ça je t'ai répondu un peu vite. Autant pour moi.

J'ai donc accès au fichier, celui-ci me donne quelque chose de la sorte :

Code:
 <Folder>
        <name>14 - Calvados</name>
        <Placemark>
          <name>Limites administratives</name>
          <styleUrl>#khStyle2676</styleUrl>
          <MultiGeometry>
            <extrude>1</extrude>
            <LineString>
              <extrude>1</extrude>
              <coordinates>
-1.12862021,48.81709367000001,0 -1.13121952,48.81990577000001,0 -1.15431005,48.82311672,0 -1.1592932,48.82852122,0 -1.15692762,48.83487028,0 -1.15709682,48.83634973,0 -1.14702904,48.83561039,0 -1.13497022,48.84642472000001,0 -1.12621309,48.84898382000001,0 -1.12117199,48.84820381000001,0 -1.1203701,48.85641361,0 -1.10201092,48.8663463,0 -1.0947528,48.87740478,0 -1.09129994,48.87984316,0 -1.07930928,48.86988757,0 -1.06968393,48.8711619,0 -1.06411199,48.87664666,0 -1.05918701,48.87724601,0 -1.05793962,48.87985524000001,0 -1.05276485,48.8872522,0 -1.05068867,48.89056766,0 -1.04920917,48.89401993,0 -1.02190733,48.90511863,0 -1.01359044,48.92167007000001,0 -1.02123358,48.92626736,0 -1.05209479,48.92352196,0 -1.06664706,48.9193841,0 -1.07114094,48.92026226,0 -1.07552668,48.92136104000002,0 -1.07564797,48.92464989000001,0 -1.06554333,48.93189216,0 -1.06420371,48.94160929,0 -1.07107196,48.9451282,0 -1.0550303,48.94977644000001,0 -1.05830865,48.95561182,0 -1.05655234,48.95861309,0 -1.05207194,48.95757023,0 -1.04495529,48.96155822000002,0 -1.03119162,48.96078912000001,0 -1.027073,48.96236252000001,0 -1.02084516,48.95333533,0 -1.0109406,48.95435135000001,0 -1.00199395,48.95180387,0 -0.99755169,48.95026502,0 -0.9940793600000001,48.95084778,0 -0.9904851,48.95083118000002,0 -0.98611053,48.95286904,0 -0.95477485,48.96589867,0 -0.94427133,48.96697955,0 -0.94170614,48.96982935,0 -0.9151029000000001,48.98953525,0 -0.9094932,48.99857411,0 -0.90512981,49.01138318000001,0 -0.9017588000000002,49.01257102000001,0 -0.89511677,49.01108802000001,0 -0.88554015,49.02239122,0 -0.86746115,49.02701472,0 -0.86258159,49.02639906,0 -0.86296422,49.03301708000001,0 -0.87027071,49.0379025,0 -0.8851268900000001,49.04010191,0 -0.8914196000000001,49.04557104,0 -0.88052564,49.05297874,0 -0.87607033,49.05482535,0 -0.8757281500000002,49.05834198,0 -0.87080784,49.06460761000001,0 -0.8697201100000001,49.06890862,0 -0.86910213,49.07129943,0 -0.8703661,49.0735768,0 -0.87083839,49.07699056,0 -0.8800738500000001,49.0890083,0 -0.87818571,49.09230561,0 -0.8779490300000001,49.10278985,0 -0.87711119,49.10560920000001,0 -0.8773048000000001,49.10851775,0 -0.8784709600000001,49.1170927,0 -0.88334213,49.11631422000001,0 -0.89319469,49.11724473000001,0 -0.92481189,49.10137645,0 -0.92292428,49.10466639,0 -0.91437788,49.11358549,0 -0.90440279,49.11573658,0 -0.8886980500000002,49.12508200000001,0 -0.8906541100000002,49.13073978,0 -0.8955041,49.13222762,0 -0.9006711,49.13201603000001,0 -0.9056977900000002,49.13284221,0 -0.90377198,49.13599783,0 -0.90724408,49.13846587,0 -0.9376274,49.15005798,0 -0.9313495400000001,49.15785549,0 -0.9360758300000003,49.15822102000001,0 -0.95879231,49.16137508,0 -0.9569676700000001,49.16459979,0 -0.9479711100000001,49.16609688,0 -0.9391179100000002,49.16269724000001,0 -0.92931436,49.16446679000001,0 -0.9103422200000001,49.18437079,0 -0.91341852,49.19072605,0 -0.8873556200000001,49.20176231,0 -0.90159985,49.20481249,0 -0.9209547200000001,49.22157228,0 -0.92437945,49.22816945,0 -0.92072591,49.2307506,0 -0.9253107900000002,49.23159715,0 -0.9310520300000001,49.22662998000001,0 -0.93257145,49.2177221,0 -0.9374231,49.21651961,0 -0.9593016600000001,49.19890613,0 -0.97224707,49.19343253000001,0 -0.98732979,49.19432806,0 -0.98876632,49.19766052,0 -1.00801007,49.20322218,0 -1.02358191,49.20335318,0 -1.02410733,49.20383306,0 -1.03686912,49.22138848,0 -1.04704015,49.22156141000001,0 -1.05380926,49.22636036000001,0 -1.05840086,49.22519626,0 -1.06212886,49.22740183,0 -1.07457068,49.23257922,0 -1.08769634,49.24553273000001,0 -1.0926339,49.24397978,0 -1.09529146,49.24654771,0 -1.09529822,49.25261683000001,0 -1.104864,49.25288329,0 -1.11299813,49.26149874000001,0 -1.1333751,49.27148693,0 -1.12892229,49.27656167000001,0 -1.12116544,49.27873592000001,0 -1.12717857,49.28372532,0 -1.13156658,49.28478568,0 -1.13684943,49.29297826,0 -1.13947247,49.30959281,0 -1.1167757,49.32405992,0 -1.11333341,49.32667668,0 -1.11891406,49.3523511,0 -1.11963943,49.35555843,0 -1.11541678,49.35149751,0 -1.11691547,49.3611039,0 -1.09343695,49.37872564,0 -1.08985048,49.38111177,0 -1.07386415,49.38944367000001,0 -1.05844438,49.39059821,0 -1.04878981,49.38832568,0 -1.02443283,49.39224549000002,0 -1.01947177,49.39326512000002,0 -0.9898490800000002,49.39719867,0 -0.9850358400000001,49.39583911,0 -0.96630366,49.39673237000001,0 -0.96156003,49.39642192,0 -0.9305231100000001,49.39318677,0 -0.92536913,49.39250034,0 -0.9164837800000001,49.38642843,0 -0.9128040600000001,49.38484658000001,0 -0.88637482,49.37322127,0 -0.88167344,49.37158586,0 -0.86515452,49.36656035000001,0 -0.8610023100000002,49.36532131000001,0 -0.8322737,49.35866444000001,0 -0.82731412,49.35792385,0 -0.79378649,49.35411731,0 -0.7889993,49.35347766,0 -0.7508205,49.34933958000001,0 -0.7457438600000002,49.34915519,0 -0.72454874,49.34700863,0 -0.7191668800000001,49.34698373000001,0 -0.67277389,49.34590649,0 -0.66757414,49.34595564,0 -0.64935864,49.34647239,0 -0.6451615000000001,49.34528201,0 -0.63041499,49.34153847,0 -0.62517481,49.34061587,0 -0.61144563,49.34016226,0 -0.59351666,49.34084336,0 -0.5726668700000001,49.34339944,0 -0.55823639,49.34587835,0 -0.55326737,49.34608780000001,0 -0.51109096,49.34448731000001,0 -0.5058946,49.34384529,0 -0.47160775,49.33803589,0 -0.46662112,49.33743314,0 -0.4384171200000001,49.33504923000001,0 -0.43364311,49.33503351000001,0 -0.4026414900000001,49.33377542,0 -0.3975266900000001,49.33306488,0 -0.3800940400000001,49.32854318,0 -0.37585725,49.32722760000001,0 -0.36356021,49.32353139000001,0 -0.35954167,49.3221654,0 -0.34303538,49.31572995,0 -0.3397265300000001,49.31344859000001,0 -0.3136695,49.30250236000001,0 -0.30924545,49.30070321,0 -0.2919696500000001,49.29561723,0 -0.28751546,49.29454606,0 -0.27916771,49.29279554000001,0 -0.25386214,49.28998311,0 -0.23036823,49.28321475000001,0 -0.2257091,49.28181402000001,0 -0.20627885,49.28621721,0 -0.17489783,49.28600574000001,0 -0.16967408,49.28624163,0 -0.14425474,49.28882694,0 -0.13924867,49.2895954,0 -0.09255130000000002,49.29823402000001,0 -0.08717562,49.29790219,0 -0.08268444,49.30175878,0 -0.07110713000000002,49.30606301,0 -0.06616247,49.30702486,0 -0.04498194000000001,49.31269559,0 -0.04090904,49.31407051,0 -0.01807716,49.31985888,0 -0.01351258,49.32106272,0 0.01062456,49.33061793000001,0 0.01429098,49.33255914,0 0.02807239,49.33986182,0 0.03141156,49.34176832,0 0.04980788000000001,49.35085533000001,0 0.053283,49.35286262,0 0.05828604,49.35606709,0 0.07196195,49.3679098,0 0.07539701,49.36584449,0 0.10163399,49.38743607,0 0.10538275,49.38986916000001,0 0.12785995,49.4021192,0 0.13232814,49.40356707000001,0 0.1447315,49.40623788000001,0 0.14877243,49.40738977,0 0.1798804,49.41365742,0 0.1846712,49.41535169,0 0.22280177,49.4272427,0 0.27025273,49.42849571,0 0.27553505,49.428659,0 0.28057383,49.42878107,0 0.28559281,49.42901941000002,0 0.29721474,49.42985475,0 0.29780039,49.40925102000001,0 0.30835631,49.39028006,0 0.30905391,49.38687708000001,0 0.30658043,49.38398676,0 0.30170299,49.37130565,0 0.30345743,49.36801037,0 0.30803337,49.35807681,0 0.3236516300000001,49.34010665000002,0 0.30704215,49.31878872,0 0.30423204,49.3171955,0 0.29814437,49.31440533,0 0.30262715,49.31367158,0 0.31601122,49.31130112000001,0 0.3224263,49.29632892,0 0.30998325,49.28637773,0 0.3089832,49.28320640000001,0 0.3222633,49.27875665000001,0 0.34217193,49.29350403,0 0.36106926,49.29660225,0 0.36564715,49.29511376,0 0.38010928,49.28774739000001,0 0.3835495700000001,49.2857553,0 0.3812663,49.28293941,0 0.38276895,49.26401135,0 0.37772037,49.26388323,0 0.341479,49.25367095,0 0.32651705,49.25288204000002,0 0.32150132,49.25198008000001,0 0.33749373,49.23116330000001,0 0.34200088,49.22927908,0 0.36705096,49.2165894,0 0.3828075600000001,49.21602031000001,0 0.38766954,49.2151917,0 0.3883952100000001,49.21193208,0 0.39363983,49.20673257,0 0.38969555,49.19315136,0 0.38810822,49.18980015,0 0.38956244,49.18107881000001,0 0.3919072000000001,49.17852844,0 0.3876228500000001,49.15697801,0 0.3858153700000001,49.1540455,0 0.38735574,49.15317179,0 0.40133271,49.14951569000001,0 0.40655494,49.14950110000001,0 0.41313888,49.14633545,0 0.4266892400000001,49.14673209000001,0 0.42751066,49.14338373,0 0.43234959,49.14219349,0 0.4299647400000001,49.13926144,0 0.42270296,49.13081464,0 0.40826859,49.12856878,0 0.40968613,49.12215614000002,0 0.4093913,49.12084812000001,0 0.4079427,49.11787668000001,0 0.39976564,49.10080182000001,0 0.40094428,49.09784576,0 0.4100950300000001,49.09765192,0 0.41140209,49.09490457,0 0.40217247,49.08845483,0 0.41644555,49.08737252,0 0.41787313,49.0839439,0 0.4172684,49.07334583,0 0.41338927,49.07537781000001,0 0.3898998500000001,49.07639992,0 0.3788692,49.07070085,0 0.3791569000000001,49.06744359000002,0 0.38037691,49.06124162,0 0.3669558800000001,49.05234711,0 0.37081356,49.05016432,0 0.3750619900000001,49.05208581,0 0.38494539,49.03700264,0 0.40953272,49.03282643,0 0.4145901400000001,49.03280902000001,0 0.42454539,49.03202494,0 0.44604705,49.01900084,0 0.44417111,49.01312839000001,0 0.4350761200000001,49.00627819,0 0.43372281,49.00332623,0 0.4327622,48.99713548,0 0.4267498,48.98571411,0 0.4255929500000001,48.98264738,0 0.43243419,48.97822619,0 0.43219048,48.97190291,0 0.43148583,48.96875442000002,0 0.4127994700000001,48.9506197,0 0.40014931,48.95274326,0 0.40436234,48.96273588,0 0.37743693,48.97255366000001,0 0.3749412200000001,48.96959111,0 0.35661733,48.94961938,0 0.3332151,48.94277399,0 0.32950408,48.94521073000001,0 0.31983854,48.9470344,0 0.30870654,48.95421722,0 0.30438052,48.95314574,0 0.28269526,48.9488997,0 0.2781703200000001,48.95010723,0 0.27621106,48.96537399,0 0.27138466,48.96485904000002,0 0.25699643,48.96344133000001,0 0.24438793,48.95854527,0 0.24123002,48.9455084,0 0.23471662,48.94051221000001,0 0.22461499,48.94027979,0 0.22214123,48.94304085,0 0.21497165,48.9464457,0 0.18729688,48.94106941,0 0.1846769,48.93846895,0 0.1791391,48.92989108,0 0.17077366,48.92698837,0 0.16574499,48.92587201,0 0.15084624,48.9271641,0 0.14601101,48.94050694,0 0.14460699,48.94336702,0 0.13628425,48.95039699,0 0.12759206,48.95221418,0 0.12530142,48.94991607,0 0.12123206,48.94804159000001,0 0.09981756,48.93473970000002,0 0.08070821,48.9379768,0 0.07814966000000001,48.93531212000001,0 0.06575213000000002,48.92613096,0 0.06372092000000001,48.91676888000001,0 0.06175292,48.9137464,0 0.05799080000000002,48.90779454,0 0.05808371,48.9050631,0 0.05011529,48.89927318,0 0.02380199,48.89515990000001,0 -0.009869070000000001,48.88379296,0 -0.008975460000000001,48.88088841,0 -0.00619649,48.87222156,0 -0.006664330000000001,48.87198757000001,0 -0.00949553,48.87461124000001,0 -0.02258566,48.87683425,0 -0.03108602,48.87372537000001,0 -0.03082162,48.86972856,0 -0.03409984,48.86690386,0 -0.05902174,48.85348414,0 -0.06058564,48.85020667,0 -0.06961017,48.84265136,0 -0.07503406,48.84064431,0 -0.07920428,48.84246599000001,0 -0.08835208,48.84406931,0 -0.10675145,48.83961068,0 -0.11485171,48.84065799,0 -0.12478989,48.84741261,0 -0.12776808,48.8378375,0 -0.14225537,48.83542346,0 -0.14485125,48.83245592000001,0 -0.12618535,48.81655908,0 -0.13085263,48.81735258000001,0 -0.14840583,48.82249937,0 -0.15178342,48.82023557,0 -0.17413801,48.82772309,0 -0.18048106,48.83634748,0 -0.1989631,48.84102672000002,0 -0.204695,48.8465156,0 -0.20801375,48.84445741,0 -0.21495529,48.84072177,0 -0.2276397,48.84325383,0 -0.23144832,48.84475435000001,0 -0.24225894,48.84926855000001,0 -0.25372984,48.84950504,0 -0.25899518,48.8498939,0 -0.26804367,48.85316731,0 -0.28333405,48.85238211000001,0 -0.28747831,48.85271347,0 -0.29856782,48.84915023000001,0 -0.3011214,48.85220509,0 -0.30745342,48.85770292,0 -0.32854277,48.85759233000001,0 -0.33024941,48.85473942000001,0 -0.33576984,48.84630638000001,0 -0.33373145,48.84350144,0 -0.32966946,48.83551704,0 -0.33400625,48.83349533,0 -0.34543089,48.82182639000001,0 -0.34716845,48.82250663,0 -0.36973303,48.83551184000001,0 -0.36890313,48.84179875,0 -0.35928549,48.84365372,0 -0.36339861,48.84911803,0 -0.36582969,48.84870314000001,0 -0.38379347,48.84697194000001,0 -0.3887833900000001,48.84806373000001,0 -0.40129358,48.8589269,0 -0.40456743,48.86155842000002,0 -0.4063927700000001,48.86826011,0 -0.4108728800000001,48.86994639,0 -0.42524543,48.86644927,0 -0.42495821,48.86975633000001,0 -0.4326802000000001,48.87267953,0 -0.46477662,48.87097458,0 -0.46938828,48.86802507000001,0 -0.47762793,48.85937614000001,0 -0.4970432400000001,48.85575982,0 -0.4955852900000001,48.84903156,0 -0.50999903,48.84596269000001,0 -0.51213876,48.84847461,0 -0.52402647,48.85029393,0 -0.54965324,48.84625857000001,0 -0.56088099,48.83430206,0 -0.56983675,48.83050411000001,0 -0.57473318,48.8310949,0 -0.58029806,48.83654373,0 -0.59987905,48.83491087,0 -0.60319527,48.8345052,0 -0.60642847,48.83388564,0 -0.61080175,48.83196960000001,0 -0.6245069,48.82696228,0 -0.64542919,48.82720234,0 -0.64306702,48.83040137,0 -0.64345558,48.84093177000001,0 -0.65293073,48.83844648,0 -0.6830077100000001,48.842292,0 -0.69126359,48.84622854,0 -0.70552174,48.83677169,0 -0.70249633,48.83420378,0 -0.69083219,48.82437447,0 -0.6821837800000001,48.82182402000001,0 -0.68664271,48.82003782000001,0 -0.70847885,48.80569221,0 -0.71154702,48.80275333000001,0 -0.7146990600000001,48.79985716000001,0 -0.72003376,48.79935135,0 -0.7439639700000001,48.79191566,0 -0.78063565,48.78664204,0 -0.7814514600000001,48.78345439000001,0 -0.7849210700000001,48.78116852,0 -0.7894827,48.7796184,0 -0.80823974,48.76009765,0 -0.81283364,48.75844764000001,0 -0.82532704,48.75247561000001,0 -0.84095533,48.75221146,0 -0.8376359700000001,48.75488193,0 -0.82039998,48.77056143,0 -0.8220119000000001,48.77222770000001,0 -0.8252223,48.76952467000001,0 -0.8332158,48.76515582,0 -0.8538875500000001,48.76386485,0 -0.85753952,48.76151783000001,0 -0.8697835,48.75642031,0 -0.8846965,48.7571053,0 -0.89229158,48.76547199,0 -0.9223401600000002,48.77134439,0 -0.9403504,48.77855757,0 -0.94225428,48.78176243,0 -0.95370897,48.78830966000001,0 -0.96236302,48.78459737000001,0 -0.9670715600000001,48.78606874,0 -0.9751011300000002,48.77450946,0 -0.99425635,48.77713167000001,0 -0.9993280800000001,48.77683646,0 -1.01703703,48.77283935000001,0 -1.03740539,48.78278746,0 -1.04203453,48.78281788,0 -1.05876038,48.77333579,0 -1.08257947,48.77851847,0 -1.09406351,48.78503384,0 -1.0988689,48.79080573000001,0 -1.09194539,48.79562982,0 -1.09496674,48.80159633,0 -1.09729485,48.80465176,0 -1.10231659,48.81424970000001,0 -1.10552887,48.81544324000001,0 -1.11271699,48.81496596,0 -1.12666131,48.81733966,0 -1.12862021,48.81709367000001,0 
              </coordinates>
            </LineString>
          </MultiGeometry>
        </Placemark>
      </Folder>

Le problème, c'est que pour Adwords rubrique "Selection d'une zone géographique puis Personnalisée puis Zone personnalisée" il lui est impossible de lire ça.

J'ai aussi essayé la version légère.

Code:
 <Placemark>
        <name>03 - Allier</name>
        <styleUrl>#khStyle2927</styleUrl>
        <Point>
          <coordinates>3.141843438148506,46.36741828918459,0</coordinates>
        </Point>
      </Placemark>

Et j'ai aussi testé sans les balises <>

Une idée ?

Merci de ton soutien

PS : Jeroen, pourquoi devrais-je passer par PHP ? Je vais directement sur Google Adwords pour faire mes campagnes publicitaires ciblées.
 
Nouveau WRInaute
WRInaute passionné
Dans l'aide, ils ne disent pas ce qui est attendu ?

A mon avis il faut colle une suite de points lat,lon,lat,lon

le fichier kml c'est lat,lon,alt,lat,lon,alt

vire donc les altitudes (0). Les deux premiers points ressembleraient à ça :

-1.12862021,48.81709367000001,-1.13121952,48.81990577000001,
 
Nouveau WRInaute
J'ai fait l'essai sans succès. Si j'enlève les 0 sur quelques lignes, il va se mettre ailleurs que en France et si je les enlève au code "long" je remplace chaque 0, par des , et là, il me dit "erreur ligne 1".
Qui plus est, si je fais simplement l'essai sur un seul point avec la même méthode il me met quand même erreur ligne 1

Autre idée ? :)
 
WRInaute passionné
Pour php j'avais pas lu ce que tu voulait faire. Oublie.

Pour ton problème, as tu lu l'aide ? ça m'étonnerai qu'il n'y ait pas un exemple...
 
WRInaute passionné
J'ai lu ça
Forme personnalisée : Pour définir une zone publicitaire personnalisée de forme non circulaire, cliquez sur le lien Forme personnalisée. Vous pouvez alors définir votre zone en cliquant sur une série de points dans la carte interactive. La zone cible ne doit pas dépasser 400 kilomètres.
ça ne te convient pas ?
tu ne peux pas cliquer sur la carte pour déterminer ton département ?
Sinon tu dois avoir accès au formatage des données par ce biais. Non ?
 
Nouveau WRInaute
Et bien non cela ne me convient pas car j'aimerais avoir une délimitation précise du département. Si tu veux j'ai X campagnes publicitaires qui se déroule dans les départements et j'ai besoin que mes campagnes n'apparaissent que dans tel ou tel département. De ce fait, je fais une campagne par département que j'active ou désactive en fonction de mes besoins. C'est long à préparer mais après, c'est plus rapide.

Sauf que mon problème c'est que j'ai besoin des coordonnées exacts. J'ai tenté une mise en forme du type

Code:
 2.91214414,46.20252971000001 
 2.915816280000001,46.21278583 
 2.923872110000001,46.21709903 
 2.93274196,46.21868123000001 
 2.93635804,46.22090247 
 2.93912319,46.22374893000001
 2.93228017,46.23231447 
 2.94598622,46.24167975 
 2.94125766,46.24208205 
 2.92590548,46.24938855000001 
 2.90571884,46.24872598000001 
 2.886322980000001,46.2531322 
 2.86601825,46.25107846 
 2.85976804,46.25659574000001 
 2.85530571,46.25518568 
 2.819168900000001,46.24179544 
 2.819100750000001,46.23848478 
 2.81768315,46.23211183 
 2.82331824,46.21995962 
 2.81900122,46.21841167

Google semble l'apprécier mais il me marque "Les lignes délimitant la zone ciblée ne doivent pas se croiser." j'ai du me planter en enlevant un 0 ou en sautant une ligne sauf qu'il y en a 500 ! (à la base présenté de la manière précisé dans un post précédent)
 
Membre Honoré
jeroen a dit:
Google a dit:
Forme personnalisée : Pour définir une zone publicitaire personnalisée de forme non circulaire, cliquez sur le lien Forme personnalisée. Vous pouvez alors définir votre zone en cliquant sur une série de points dans la carte interactive. La zone cible ne doit pas dépasser 400 kilomètres.
Compléments :
https://adwords.google.fr/support/bin/answer.py?answer=35436 .
https://adwords.google.fr/support/bin/answer.py?answer=35438&topic=7065 .
https://adwords.google.fr/support/bin/answer.py?answer=13847&topic=14691 .
 
WRInaute accro
jeroen a dit:
Dans l'aide, ils ne disent pas ce qui est attendu ?

A mon avis il faut colle une suite de points lat,lon,lat,lon

le fichier kml c'est lat,lon,alt,lat,lon,alt

vire donc les altitudes (0). Les deux premiers points ressembleraient à ça :

-1.12862021,48.81709367000001,-1.13121952,48.81990577000001,

Longitude en premier, pas latitude.
 
Nouveau WRInaute
Hello tout le monde,

j'ai finalement trouvé une solution. Déjà, j'ai constaté qu'entre google earth & adwords les coordonnées n'étaient pas indiqués de la même manière. Sur Adwords il faut présenter de la manière suivante :

Code:
46.22719224, 3.77334923
46.22044738, 3.78504663
46.20769509,3.793573530000001
46.19803992,3.78865075,
46.18748797,3.78979534,
46.16864814000001,3.803437390000001
46.16310508000001,3.80973786

Remarquez que j'ai changé l'ordre puisque sinon on tombe en Afrique ... il faut donc placer les 46.x avant les 3 ou 2.x

Mon problème, c'est que je ne suis pas motivé à faire les 100 départements comme ça. Jeroen, es-tu capable en PHP d'utiliser une regex pour déplacer le deuxième élément devant le premier, sauter une ligne après chaque ,0 supprimer ce fameux ,0 ? pour que la mise en forme soit comme celle présentée ci dessus ?

Au départ on part de ça :

Code:
2.75216075,50.04031299,0 2.74885054,50.04290955000001,0 2.74231188,50.04799438,0 2.745842080000001,50.0501191,0 2.7637194,50.0605886,0 2.76201402,50.06341233,0

A la fin on doit avoir

Code:
50.04031299,2.75216075
50.04290955000001, 2.74885054
50.04799438,2.74231188

Merci d'avance :)
 
WRInaute passionné
Code:
<?php
$chaine='colle_ta_chaine_ici';
$chaine=explode(" ",trim($chaine));
foreach ($chaine as $coord)
{
$pts=explode(",",$coord);
echo trim($pts[1]).','.$trim($pts[0]).'<br />';
}
?>

un truc comme ça devrait le faire
tu colle ta chaine, et tu envoie.
 
Nouveau WRInaute
Cela n'a pas l'air de fonctionner. l'echo ne donne rien chez moi. Voici un exemple de coordonnées

Code:
<?php
$chaine='4.92452011,45.80404,0 4.91857895,45.8093526,0 4.91976994,45.82948887,0 4.92110773,45.83274463000001,0 4.91878601,45.83564970000001,0 4.91594671,45.84541953,0 4.90057008,45.85760827,0 4.90123757,45.86059058,0 4.90900867,45.87411362000001,0 4.90437619,45.8745345,0 4.88383022,45.87999739000001,0 4.88321627,45.88343187,0 4.88069532,45.89717125,0 4.87730947,45.89668963,0 4.87208448,45.8935399,0 4.87201383,45.89678204000001,0 4.87068264,45.90313109,0 4.85310205,45.90717106,0 4.84911941,45.91286792,0 4.844443340000001,45.91156795000001,0 4.80517522,45.89633246,0 4.80409295,45.89806643,0 4.81067934,45.90975857,0 4.80977543,45.91831168000001,0 4.80775976,45.92080428,0 4.78898828,45.92355587,0 4.78692629,45.92648025,0 4.77800333,45.93784454000001,0 4.7691615,45.93832386,0 4.7611192,45.93500480000001,0 4.75678098,45.93462913,0 4.7444553,45.9374325,0 4.73989514,45.93788092,0 4.73189528,45.94080564000001,0 4.7302764,45.95041717,0 4.74499001,45.95988783000001,0 4.748456820000001,45.96241501,0 4.75016171,45.96449378,0 4.75226704,45.96745506,0 4.75460125,45.97381382,0 4.74956445,45.99637062,0 4.7484908,46.00278441,0 4.74898602,46.00376395000001,0 4.74889045,46.00719543,0 4.74395279,46.02031658,0 4.74638964,46.02695242,0 4.74676538,46.03255212,0 4.745655110000001,46.03525007,0 4.73961559,46.04749348,0 4.75632768,46.05854998000001,0 4.75908135,46.06120029,0 4.76175147,46.06744383000001,0 4.761057750000001,46.07046514,0 4.75627415,46.07897488,0 4.74960978,46.08242091000001,0 4.74802511,46.09136594,0 4.75714153,46.09828193000001,0 4.7601835,46.10064705,0 4.76259703,46.10254942,0 4.76710888,46.10653002,0 4.77158663,46.11466889,0 4.77206794,46.11762804,0 4.78425993,46.12830216,0 4.78748294,46.13088683,0 4.79316761,46.13638118,0 4.79594729,46.13916518000001,0 4.80255394,46.15643899,0 4.7999974,46.15949127,0 4.79173658,46.16360539000001,0 4.78428129,46.16837566,0 4.78231576,46.17164065,0 4.78020921,46.17668191,0 4.780204,46.18003952,0 4.78110567,46.19004752,0 4.792328430000001,46.20096534,0 4.79273968,46.20751032,0 4.79428453,46.21705425,0 4.79551425,46.22014203,0 4.797851460000001,46.22454784,0 4.80074105,46.2296599,0 4.80817992,46.23811216000001,0 4.81079889,46.25123309000001,0 4.81081985,46.25455416,0 4.81094402,46.25757593,0 4.81649088,46.26540295,0 4.8247519,46.27293614,0 4.82632857,46.27590891000001,0 4.83165616,46.29612526,0 4.8329234,46.29943603,0 4.84121973,46.31181113,0 4.8514263,46.3260787,0 4.85315824,46.32925296,0 4.85265355,46.34279442,0 4.85239387,46.34617486000001,0 4.85090935,46.35286892,0 4.85852792,46.36802959,0 4.86312728,46.37326528,0 4.8656884,46.37576472,0 4.8677594,46.37806799000001,0 4.873921960000001,46.38498864,0 4.8875018,46.40273189,0 4.889057680000001,46.41425419,0 4.88993438,46.41712493000001,0 4.89105412,46.42405717,0 4.89153114,46.42753099000001,0 4.891517880000001,46.4302948,0 4.89180108,46.43856008000001,0 4.89288856,46.44257828,0 4.89445278,46.44537862000001,0 4.912499100000001,46.45932896000001,0 4.914457330000001,46.46216514,0 4.915023740000001,46.47711319,0 4.914528130000001,46.48012200000001,0 4.914522820000001,46.48138236000001,0 4.92768649,46.49917687000001,0 4.92884502,46.50159897000001,0 4.929615550000001,46.50408391,0 4.93173999,46.50979752000001,0 4.933601220000001,46.51245471000001,0 4.93475135,46.51332864000001,0 4.94725813,46.51446478,0 4.94737243,46.50843994000001,0 4.95280079,46.50448051,0 4.96265289,46.5065581,0 4.970033120000001,46.51410222,0 4.98021847,46.51520743,0 5.006366140000001,46.50970907,0 5.01059281,46.51107719,0 5.01244901,46.50297671,0 5.01424122,46.50045988000001,0 5.05090592,46.48625806,0 5.0547548,46.4842847,0 5.06721345,46.48577781,0 5.07144999,46.48582009,0 5.09526702,46.49798349,0 5.112817620000001,46.49296539,0 5.12907756,46.50092187,0 5.13403268,46.50144836,0 5.14116304,46.50849294,0 5.16428765,46.50461677000001,0 5.16584219,46.51767706,0 5.18167492,46.50998120000001,0 5.20122467,46.50782531,0 5.203568530000001,46.50480435000001,0 5.2003606,46.50257139,0 5.20949401,46.49211390000001,0 5.20669045,46.48617973,0 5.21302697,46.48154524,0 5.21528429,46.47176498000001,0 5.21506512,46.46836832,0 5.22460058,46.46808066000001,0 5.23331086,46.46038663000001,0 5.23625985,46.45779062,0 5.243867830000001,46.46046833000001,0 5.24800454,46.45938115,0 5.25626499,46.45188582000001,0 5.26964433,46.45022788,0 5.273672,46.44859245,0 5.3105635,46.44677892,0 5.321725150000001,46.42896483,0 5.30968775,46.42361728,0 5.31233315,46.41603021,0 5.30824117,46.41502090000001,0 5.299786,46.4151337,0 5.30915241,46.41026129,0 5.3340837,46.39972936000001,0 5.34812173,46.39942103,0 5.36352228,46.39039517,0 5.36710999,46.38869684,0 5.370292530000001,46.38603681000001,0 5.37787882,46.38233144000001,0 5.37515698,46.37972122,0 5.365069340000001,46.37308407,0 5.36346984,46.37003038000001,0 5.37647654,46.36166863,0 5.37576291,46.35843921,0 5.37464024,46.35533509,0 5.37346633,46.35224224,0 5.4027247,46.33612195,0 5.40169269,46.33280043000001,0 5.40435694,46.31918666000001,0 5.404042100000001,46.31567468,0 5.40405633,46.31477391,0 5.40657658,46.30992377,0 5.41023258,46.30911432,0 5.4169382,46.34287697,0 5.42353251,46.34773992,0 5.43594668,46.31847177000001,0 5.4371471,46.3151345,0 5.45447867,46.31800879,0 5.4608936,46.32247833000002,0 5.46517892,46.32354874000001,0 5.47148028,46.3165406,0 5.47530077,46.31539044,0 5.47408983,46.31219147000001,0 5.46652992,46.29324866000001,0 5.45899664,46.29053911,0 5.45766693,46.27685352,0 5.47130579,46.26722079000001,0 5.47537155,46.26522725,0 5.499590090000001,46.2682085,0 5.50260115,46.2702224,0 5.50750665,46.26549392,0 5.511374870000001,46.26436719,0 5.53929544,46.26891103000001,0 5.55946701,46.28352157000001,0 5.56157057,46.28658540000001,0 5.56467842,46.29278301,0 5.58260605,46.2932435,0 5.58725213,46.29251694,0 5.59788865,46.29790147,0 5.60463638,46.30944032000001,0 5.60743471,46.31126863,0 5.60566711,46.31364374,0 5.61274748,46.32656746000001,0 5.635100780000001,46.33336657,0 5.6374588,46.33644969000001,0 5.64608862,46.34281776,0 5.649212930000001,46.33730469,0 5.649802590000001,46.33419877000001,0 5.64527873,46.32479459000001,0 5.66847767,46.32389925,0 5.68023174,46.31843839,0 5.68332235,46.31587981,0 5.684577790000001,46.31093495,0 5.714549630000001,46.30808276,0 5.71898211,46.29429855000001,0 5.715961630000001,46.28037641,0 5.72154352,46.26318973,0 5.725179680000002,46.2606946,0 5.72965793,46.26192936,0 5.733680900000001,46.26377195000001,0 5.7615631,46.26715592,0 5.766039310000001,46.26833531,0 5.8135769,46.26360898,0 5.81828198,46.26286827000001,0 5.82218813,46.26200155,0 5.82625909,46.26172311,0 5.85065585,46.26170731,0 5.86085144,46.26877548000001,0 5.867698190000001,46.26822003,0 5.86918965,46.26498538000001,0 5.89197324,46.28359891000002,0 5.89462537,46.28661469,0 5.909195170000001,46.28394973,0 5.91592224,46.29281579000001,0 5.91892961,46.30930141,0 5.9259046,46.31377309,0 5.93732476,46.30977235000001,0 5.94152708,46.30926953,0 5.94401041,46.31220679,0 5.97513797,46.35030159000001,0 5.984121710000001,46.36265843,0 6.01338356,46.37599880000001,0 6.031020600000001,46.38810776,0 6.052803630000001,46.41141842,0 6.06057745,46.41751374,0 6.0640057,46.41623036,0 6.09777972,46.40858757000001,0 6.10641588,46.39999558,0 6.120313610000002,46.39598439,0 6.14694534,46.37974397,0 6.16104391,46.3764603,0 6.166806830000001,46.37069922000001,0 6.16695992,46.36419054,0 6.1492577,46.34314251000001,0 6.140405880000001,46.33987185,0 6.137698920000001,46.33312592000001,0 6.12437156,46.31726933000001,0 6.11979814,46.31113397,0 6.11909273,46.30771669000001,0 6.11946409,46.2952921,0 6.105296800000001,46.2873603,0 6.1023691,46.28485453,0 6.1129879,46.26805454,0 6.116044310000001,46.26566291000001,0 6.12012326,46.26363697000001,0 6.122447590000001,46.25335299,0 6.11589528,46.24443747,0 6.10349982,46.23865443,0 6.08813682,46.24704592,0 6.083379770000001,46.2464018,0 6.070480760000001,46.24174789,0 6.061960520000001,46.24489283,0 6.04695338,46.23194716,0 6.042398630000001,46.23310515,0 6.03861686,46.23532752,0 6.0299345,46.23591736,0 6.016678700000001,46.23182762,0 6.01259863,46.23002463,0 6.00293552,46.22258229,0 5.99382553,46.22044523000001,0 5.99271098,46.21717577,0 5.974411970000001,46.21475727000001,0 5.97138516,46.20228131,0 5.964203370000001,46.19803554,0 5.96367872,46.19697248,0 5.99324167,46.18482448,0 5.9902667,46.17488626000001,0 5.982167120000001,46.1722214,0 5.97334533,46.15617649000001,0 5.96470097,46.14467367,0 5.963780110000002,46.13568766,0 5.95606694,46.13209821,0 5.9527267,46.13036783,0 5.936953730000002,46.12865595,0 5.927932330000001,46.1279974,0 5.920410960000001,46.1310471,0 5.90679878,46.12254291,0 5.896825650000001,46.11977752,0 5.89302853,46.11892445,0 5.886233930000001,46.10962766000001,0 5.89323624,46.09724904,0 5.88999087,46.08715623000001,0 5.86626504,46.08554088,0 5.855983660000001,46.08667238000001,0 5.852742560000001,46.08920497,0 5.83820835,46.1025621,0 5.829655270000001,46.10567282000001,0 5.820728700000001,46.1029406,0 5.82169647,46.08989734000001,0 5.81152954,46.07760263,0 5.81070963,46.07425072,0 5.80807428,46.06086822,0 5.81098796,46.05887835,0 5.81360777,46.05430378,0 5.80699347,46.04383563,0 5.808013210000001,46.04115567000002,0 5.80934197,46.03295559000001,0 5.81049238,46.02989514,0 5.81230227,46.02380554,0 5.805470610000001,46.01573965,0 5.806795,46.01297917000001,0 5.810548570000001,46.0081536,0 5.80953643,46.00525792,0 5.81019239,45.99339521000002,0 5.81228425,45.98665749,0 5.83402351,45.97203493000001,0 5.8339191,45.96857904,0 5.832783680000001,45.96171583,0 5.83483005,45.95230518,0 5.82879557,45.94049676000001,0 5.82523557,45.93849076,0 5.829631310000002,45.93758900000002,0 5.82341854,45.93245016000001,0 5.82257622,45.92590207,0 5.829354550000001,45.91359724,0 5.82631173,45.90369528,0 5.82487602,45.90038967000001,0 5.81515035,45.87720401,0 5.80752599,45.86064411,0 5.8054057,45.8578908,0 5.80111254,45.84580264,0 5.80025081,45.84256018,0 5.79585066,45.8297998,0 5.78693698,45.82322878,0 5.785323290000001,45.82007329,0 5.78459661,45.79723173000001,0 5.784131490000001,45.79392212,0 5.78138105,45.78084966,0 5.780058720000001,45.77802651,0 5.783043620000001,45.77246957000001,0 5.78261666,45.76894267,0 5.779518630000001,45.75871761000001,0 5.78358654,45.7452108,0 5.78042061,45.7429216,0 5.7766441,45.74258718000001,0 5.76967859,45.74081936,0 5.77122402,45.73755719,0 5.77481672,45.72466866,0 5.76330941,45.71847401,0 5.753457410000001,45.70680675000001,0 5.74418287,45.70626951,0 5.73132544,45.71015344,0 5.727736360000001,45.70927148,0 5.723285730000001,45.7081723,0 5.70059335,45.70995393,0 5.699892930000001,45.70690518000001,0 5.70372748,45.69815352,0 5.70627803,45.69510438,0 5.70967378,45.6884476,0 5.70719138,45.68168757,0 5.68564161,45.66701644,0 5.68416132,45.66019907,0 5.68784661,45.65365051,0 5.68945116,45.65047785,0 5.68789973,45.64396884,0 5.684702720000001,45.64142697,0 5.676334490000001,45.63806504,0 5.65281222,45.63668393,0 5.64832699,45.62740694,0 5.646461760000002,45.62476975,0 5.63841365,45.62302637,0 5.63637042,45.61740481,0 5.63546372,45.61404587000001,0 5.62739205,45.61101483,0 5.62374194,45.61327412,0 5.62170665,45.61636833,0 5.61490541,45.62541804000001,0 5.60442862,45.63617917,0 5.60193791,45.65261264000001,0 5.581816630000001,45.66194941,0 5.57884209,45.66464674000001,0 5.57938189,45.66792667,0 5.567329650000001,45.67308302,0 5.56313863,45.67411227000002,0 5.55527269,45.67160209000001,0 5.55174902,45.67350406,0 5.550309750000001,45.68185613,0 5.54724334,45.6845642,0 5.547430110000001,45.69790295,0 5.55658484,45.69668508,0 5.5657633,45.68492364,0 5.57424504,45.68759636000001,0 5.57355713,45.69425235,0 5.553231940000001,45.70307613000001,0 5.55264236,45.70970209000001,0 5.5493778,45.71190264,0 5.54554492,45.7135971,0 5.52727224,45.71546902000001,0 5.524546370000001,45.71833778,0 5.517512340000001,45.73118813,0 5.514245100000001,45.73338766,0 5.49814944,45.74438599,0 5.49459919,45.74661089,0 5.48399811,45.75328346,0 5.4604028,45.77830695,0 5.45048312,45.78423684000001,0 5.44708061,45.78619402000001,0 5.444403080000001,45.78914124,0 5.43915139,45.79505784,0 5.43574548,45.79742981,0 5.4225172,45.80713171,0 5.42272651,45.82371888,0 5.4361303,45.82639329000001,0 5.435637180000001,45.82977429,0 5.43365602,45.83230494000001,0 5.43026377,45.83496443,0 5.41792207,45.84112881,0 5.41631178,45.84804276,0 5.414552990000001,45.85089017000001,0 5.40437257,45.85687761000001,0 5.381003680000001,45.86718251,0 5.3780219,45.86965723,0 5.37481923,45.8723377,0 5.35492585,45.88278606,0 5.34091734,45.88051400000001,0 5.33877093,45.87850952000001,0 5.33553613,45.87404009,0 5.33450842,45.87079926,0 5.33049419,45.8647839,0 5.3141093,45.85826923,0 5.30249308,45.84813246000001,0 5.29100205,45.81773337000001,0 5.29061825,45.81418723,0 5.28880061,45.81102989,0 5.27833054,45.803994,0 5.26689389,45.7893749,0 5.26310921,45.78770899,0 5.25562071,45.78431168,0 5.2516494,45.78270427,0 5.24019906,45.777375,0 5.23625018,45.77519841,0 5.22433744,45.76884332000001,0 5.20019757,45.77142415000001,0 5.19553954,45.77115573,0 5.18810953,45.77451358,0 5.18731623,45.78102463,0 5.18489366,45.78418300000001,0 5.17708289,45.79339242,0 5.17272303,45.79497,0 5.15784567,45.80322184000001,0 5.14419349,45.80457209000002,0 5.13958103,45.80600162000001,0 5.1212528,45.81162472,0 5.11251804,45.80945520000001,0 5.11342734,45.79965616000001,0 5.10895708,45.79857825000001,0 5.10106573,45.81338347000001,0 5.09680546,45.81263297000001,0 5.09255591,45.81183704,0 5.08753338,45.81179806,0 5.05815436,45.80992979,0 5.054271250000001,45.81158113,0 5.04528504,45.8118251,0 5.03780242,45.80835127,0 5.02071342,45.80713949,0 5.01668616,45.80561526,0 5.0122926,45.80523386,0 5.00120298,45.81012438,0 4.996959160000001,45.80914469,0 4.99291668,45.80780002000001,0 4.980338380000001,45.80584619,0 4.97037128,45.80738551,0 4.96692373,45.80904157,0 4.951514780000001,45.80877107,0 4.94683539,45.80941096,0 4.92452011,45.80404,0';

$chaine=explode(" ",trim($chaine));
foreach ($chaine as $coord)
{
$pts=explode(",",$coord);
echo trim($pts[1]).','.$trim($pts[0]).'<br />';
}
 
Nouveau WRInaute
Bonne nouvelle !

Cela fonctionne, non pas à la perfection m'enfin en bataillant avec quelques points qui se croisent, c'est désormais possible de choisir un département.

Merci à vous, principalement OTP & Jeroen !

A bientôt et encore merci
 
Nouveau WRInaute
Rahhh merci à toi aussi bien entendu Madrileno ... j'avais marqué "merci à vous", sous entendu vous tous :)

je viens de terminer ce soir même l'enregistrement séparé de l'ensemble des départements français. j'ai fait quelques impasses sur trois départements qui plantés.

Je vais pouvoir tester mes publicités sur chaque département.
 
Discussions similaires
Haut