4

I have a KML that I would like to import into Geoserver. The KML originates from a Geoserver WFS getFeature Request itself and looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
    <Document>
        <Schema name="plz5_1" id="plz5_1">
            <SimpleField type="string" name="PL_ID"/>
            <SimpleField type="string" name="PLB"/>
            <SimpleField type="string" name="DummyPLZ"/>
            <SimpleField type="double" name="PL_EWA_A_G"/>
            <SimpleField type="double" name="PL_MBA_A_H"/>
        </Schema>
        <Folder>
            <name>plz5</name>
            <Placemark id="plz5.1">
                <ExtendedData>
                    <SchemaData schemaUrl="#plz5_1">
                        <SimpleData name="PL_ID">01067</SimpleData>
                        <SimpleData name="PLB">0100</SimpleData>
                        <SimpleData name="DummyPLZ"></SimpleData>
                        <SimpleData name="PL_EWA_A_G">12196.0</SimpleData>
                        <SimpleData name="PL_MBA_A_H">7225.0</SimpleData>
                    </SchemaData>
                </ExtendedData>
                <Polygon>
                    <outerBoundaryIs>
                        <LinearRing>
                            <tessellate>1</tessellate>
                            <coordinates>13.736871,51.046691 13.736251,51.046722 13.734591,51.046542 13.734291,51.046429 13.733812,51.046253 13.733682,51.046911 13.733642,51.04713 13.732132,51.047099 13.730072,51.046703 13.728922,51.04642 13.728513,51.046261 13.728002,51.046062 13.726963,51.045699 13.726033,51.0451 13.725373,51.04473 13.724173,51.043971 13.723424,51.043417 13.723363,51.043372 13.722313,51.04436 13.721133,51.045272 13.720773,51.045804 13.720693,51.045921 13.719924,51.047221 13.719584,51.049059 13.719596,51.049223 13.719644,51.049689 13.719644,51.051039 13.719813,51.051588 13.719631,51.051685 13.719102,51.053068 13.717161,51.053639 13.715122,51.054365 13.71328,51.054797 13.710406,51.054967 13.710332,51.052713 13.709325,51.052592 13.708175,51.052321 13.707015,51.052038 13.705846,51.05168 13.705066,51.051321 13.704856,51.051798 13.703406,51.052561 13.701796,51.052859 13.700556,51.053061 13.698957,51.053431 13.696597,51.053839 13.694487,51.054232 13.693137,51.054589 13.692187,51.055261 13.691877,51.055989 13.691278,51.057748 13.690628,51.058889 13.690348,51.06001 13.690538,51.060788 13.690668,51.061083 13.690875,51.061558 13.691017,51.061891 13.692087,51.062558 13.693517,51.06307 13.694667,51.063267 13.696987,51.063896 13.698406,51.064247 13.700616,51.065037 13.701136,51.065258 13.699536,51.067139 13.700126,51.06807 13.700666,51.069878 13.701756,51.072216 13.702323,51.072933 13.703035,51.073836 13.704638,51.074657 13.705805,51.075248 13.706571,51.075587 13.707635,51.076057 13.709694,51.076457 13.712224,51.076606 13.715473,51.076327 13.716948,51.075825 13.718283,51.075366 13.719783,51.073807 13.72018,51.07325 13.721013,51.072086 13.723722,51.069927 13.725632,51.068829 13.727292,51.067589 13.729252,51.06561 13.731361,51.06244 13.731876,51.061582 13.731972,51.061422 13.732671,51.060258 13.734151,51.05845 13.736601,51.056231 13.739031,51.05535 13.739477,51.05522 13.73965,51.05517 13.74163,51.054781 13.743819,51.054771 13.74415,51.05477 13.746289,51.05485 13.746609,51.054129 13.746879,51.05292 13.746939,51.05229 13.7462,51.05097 13.74564,51.050349 13.74504,51.049342 13.74395,51.048351 13.74337,51.04758 13.742966,51.047133 13.74281,51.046962 13.74151,51.046451 13.74085,51.046161 13.740381,51.046493 13.739781,51.046832 13.739271,51.046771 13.738141,51.046809 13.736871,51.046691</coordinates>
                        </LinearRing>
                    </outerBoundaryIs>
                </Polygon>
            </Placemark>
            <Placemark id="plz5.2">
                <ExtendedData>
                    <SchemaData schemaUrl="#plz5_1">
                        <SimpleData name="PL_ID">01069</SimpleData>
                        <SimpleData name="PLB">0100</SimpleData>
                        <SimpleData name="DummyPLZ"></SimpleData>
                        <SimpleData name="PL_EWA_A_G">26248.0</SimpleData>
                        <SimpleData name="PL_MBA_A_H">13375.0</SimpleData>
                    </SchemaData>
                </ExtendedData>
                <Polygon>
                    <outerBoundaryIs>
                        <LinearRing>
                            <tessellate>1</tessellate>
                            <coordinates>13.728899,51.023279 13.729403,51.023713 13.730113,51.024644 13.730375,51.024863 13.727817,51.025396 13.723541,51.026228 13.722751,51.029738 13.726133,51.030732 13.727417,51.031359 13.727147,51.032087 13.726647,51.032512 13.725823,51.032891 13.724733,51.033402 13.724383,51.033734 13.723452,51.034188 13.722823,51.0345 13.721094,51.034962 13.719764,51.035561 13.71877,51.036067 13.718084,51.036423 13.716692,51.037076 13.715544,51.037621 13.713535,51.039043 13.712205,51.039722 13.713855,51.041251 13.715785,51.042517 13.716264,51.042831 13.717744,51.043891 13.718784,51.04433 13.719934,51.044441 13.721543,51.044231 13.722317,51.043866 13.723363,51.043372 13.723424,51.043417 13.724173,51.043971 13.725373,51.04473 13.726033,51.0451 13.726963,51.045699 13.728002,51.046062 13.728513,51.046261 13.728922,51.04642 13.730072,51.046703 13.732132,51.047099 13.733642,51.04713 13.733682,51.046911 13.733812,51.046253 13.734291,51.046429 13.734591,51.046542 13.736251,51.046722 13.736871,51.046691 13.738141,51.046809 13.739271,51.046771 13.739781,51.046832 13.740381,51.046493 13.74085,51.046161 13.74151,51.046451 13.74281,51.046962 13.742966,51.047133 13.74337,51.04758 13.74395,51.048351 13.74504,51.049342 13.74564,51.050349 13.7462,51.05097 13.746939,51.05229 13.746879,51.05292 13.746609,51.054129 13.746289,51.05485 13.747305,51.055067 13.748219,51.055262 13.751009,51.05594 13.751049,51.055948 13.754688,51.057169 13.755048,51.05699 13.755618,51.056341 13.756308,51.055601 13.757028,51.055182 13.757115,51.055119 13.758208,51.054339 13.758426,51.053868 13.758641,51.053403 13.757911,51.051501 13.75779,51.0515 13.757376,51.050583 13.75717,51.04973 13.757329,51.049707 13.757068,51.048866 13.756227,51.047021 13.755257,51.046023 13.755048,51.04581 13.753879,51.044021 13.751799,51.041881 13.749209,51.039673 13.747088,51.038132 13.748696,51.037337 13.748966,51.036936 13.749138,51.036604 13.749175,51.036496 13.749224,51.036288 13.7488,51.035834 13.74861,51.035801 13.748629,51.035558 13.748702,51.035531 13.749374,51.034762 13.74939,51.034741 13.74938,51.034592 13.748174,51.033887 13.749114,51.032894 13.748304,51.032531 13.74596,51.033079 13.743444,51.032407 13.741914,51.032375 13.741011,51.032502 13.741091,51.031952 13.741481,51.030744 13.741281,51.029962 13.74139,51.028809 13.741418,51.028702 13.741129,51.028714 13.739791,51.028791 13.737754,51.028884 13.737484,51.026923 13.737386,51.026228 13.731863,51.026475 13.731961,51.025294 13.731742,51.024503 13.731589,51.022863 13.731502,51.021895 13.731193,51.021273 13.730377,51.020252 13.730263,51.019984 13.72961,51.019927 13.726013,51.019732 13.726334,51.02156 13.72753,51.022344 13.728899,51.023279</coordinates>
                        </LinearRing>
                    </outerBoundaryIs>
                </Polygon>
            </Placemark>
               ...

            <Placemark id="plz5.50">
                <ExtendedData>
                    <SchemaData schemaUrl="#plz5_1">
                        <SimpleData name="PL_ID">01683</SimpleData>
                        <SimpleData name="PLB">0165</SimpleData>
                        <SimpleData name="DummyPLZ"></SimpleData>
                        <SimpleData name="PL_EWA_A_G">8765.0</SimpleData>
                        <SimpleData name="PL_MBA_A_H">4474.0</SimpleData>
                    </SchemaData>
                </ExtendedData>
                <Polygon>
                    <outerBoundaryIs>
                        <LinearRing>
                            <tessellate>1</tessellate>
                            <coordinates>13.290647,51.103041 13.32912,51.1038 13.334423,51.104494 13.33852,51.10531 13.342342,51.106109 13.345704,51.106807 13.35027,51.10954 13.35143,51.10858 13.35311,51.10826 13.35412,51.10762 13.35369,51.10662 13.35361,51.10529 13.3531,51.10388 13.35281,51.10205 13.35354,51.10118 13.35455,51.10031 13.35564,51.09958 13.3568,51.09894 13.35842,51.09875 13.36181,51.09834 13.366219,51.09869 13.36697,51.09875 13.36935,51.0987 13.37124,51.09921 13.3711,51.09998 13.37125,51.1008 13.3719,51.10176 13.37393,51.10309 13.37633,51.10377 13.37757,51.10459 13.37989,51.10441 13.38127,51.10381 13.38461,51.10162 13.38584,51.10065 13.38708,51.10006 13.387127,51.100042 13.38874,51.09942 13.39041,51.0991 13.39179,51.0985 13.39258,51.09833 13.39695,51.09758 13.39811,51.09708 13.39912,51.0953 13.39984,51.09443 13.401235,51.093939 13.4018,51.09374 13.40282,51.09278 13.4026,51.09192 13.40235,51.09035 13.4023,51.08976 13.402432,51.089511 13.40295,51.08853 13.40579,51.08845 13.40796,51.08839 13.40851,51.08722 13.40929,51.08715 13.40921,51.08616 13.40845,51.08476 13.40577,51.0835 13.40396,51.08383 13.4012,51.08415 13.40092,51.08382 13.39866,51.08114 13.398036,51.080299 13.39676,51.07858 13.41172,51.06069 13.416227,51.057357 13.42099,51.055041 13.4265,51.05286 13.42607,51.05172 13.42621,51.05035 13.4273,51.04889 13.42584,51.04691 13.4266,51.04629 13.42619,51.04585 13.42608,51.04576 13.42658,51.04441 13.4273,51.04139 13.42571,51.04016 13.42411,51.03856 13.42056,51.03824 13.42266,51.03591 13.42617,51.03486 13.42599,51.03395 13.424665,51.032633 13.42421,51.03218 13.42126,51.03305 13.42197,51.03375 13.42104,51.03446 13.42125,51.03467 13.41995,51.03504 13.4193,51.03534 13.41821,51.03639 13.41797,51.03674 13.418,51.03687 13.41825,51.03696 13.41825,51.03706 13.41796,51.0371 13.41422,51.03672 13.41144,51.03626 13.41125,51.03644 13.41148,51.03675 13.41145,51.03692 13.41221,51.03711 13.41304,51.0375 13.4134,51.03791 13.41394,51.03824 13.41399,51.03838 13.41386,51.03846 13.41139,51.03854 13.4091,51.03839 13.40687,51.03873 13.4065,51.03878 13.40652,51.03894 13.40476,51.03935 13.40429,51.03959 13.4036,51.04006 13.40123,51.04089 13.39991,51.04174 13.40024,51.0423 13.40022,51.04345 13.39994,51.04405 13.39895,51.04463 13.39812,51.04487 13.39691,51.04501 13.39662,51.04534 13.39569,51.04542 13.39511,51.04641 13.39468,51.04681 13.39416,51.04714 13.39391,51.04719 13.39297,51.04772 13.39217,51.04887 13.39106,51.04939 13.38916,51.04909 13.38893,51.04916 13.38881,51.04933 13.38871,51.04999 13.38874,51.05079 13.38831,51.05119 13.38722,51.05198 13.38642,51.05274 13.385325,51.052667 13.38267,51.05249 13.37216,51.05236 13.36563,51.05252 13.36462,51.05261 13.36247,51.05168 13.35916,51.05056 13.35764,51.05025 13.35574,51.04999 13.34483,51.04831 13.342094,51.047624 13.34156,51.04749 13.34068,51.04716 13.33894,51.04634 13.3369,51.045 13.33257,51.04155 13.3313,51.04069 13.32868,51.03945 13.32651,51.03872 13.32335,51.03799 13.321316,51.037758 13.31985,51.03759 13.31597,51.03722 13.31567,51.0372 13.31315,51.03694 13.30378,51.03606 13.30206,51.03587 13.29584,51.03521 13.29005,51.03403 13.2884,51.03374 13.28555,51.03348 13.27977,51.03339 13.2767,51.03287 13.27459,51.03226 13.27258,51.03146 13.27106,51.03066 13.26961,51.02974 13.26541,51.0262 13.26341,51.02495 13.24265,51.01278 13.23543,51.00878 13.23462,51.00834 13.23449,51.00844 13.230615,51.011078 13.22904,51.01215 13.22874,51.01251 13.22935,51.01247 13.23092,51.0129 13.23369,51.01414 13.23484,51.0146 13.23554,51.01488 13.2393,51.01666 13.24014,51.0173 13.2404,51.01764 13.2405,51.01806 13.24052,51.01884 13.240463,51.019287 13.24036,51.0201 13.24014,51.02111 13.23975,51.02163 13.23964,51.02201 13.23998,51.02316 13.24017,51.02417 13.24035,51.0246 13.24163,51.02605 13.24211,51.02642 13.24236,51.0269 13.23917,51.02876 13.23962,51.02965 13.24107,51.0283 13.24221,51.02751 13.2427,51.02805 13.24503,51.02978 13.24985,51.03279 13.25046,51.03334 13.25063,51.03371 13.25162,51.03508 13.2521,51.03558 13.25501,51.03708 13.25791,51.03799 13.25842,51.038182 13.26086,51.0391 13.26049,51.0399 13.26033,51.04006 13.25724,51.04147 13.2578,51.04198 13.25835,51.04302 13.25861,51.04333 13.25861,51.04358 13.25845,51.04411 13.25812,51.04457 13.25718,51.04533 13.25644,51.04551 13.25999,51.04794 13.26099,51.04865 13.26134,51.04853 13.26653,51.04931 13.26642,51.05135 13.26535,51.05103 13.2654,51.0515 13.26141,51.05147 13.26151,51.05199 13.25696,51.05221 13.25722,51.05252 13.25562,51.05281 13.25604,51.05367 13.25315,51.05289 13.25087,51.05269 13.24887,51.05285 13.24678,51.05275 13.24644,51.05403 13.24649,51.05466 13.24715,51.05634 13.24707,51.05705 13.2468,51.05781 13.24628,51.05841 13.2448,51.0589 13.24354,51.05917 13.24308,51.05953 13.24302,51.05965 13.24337,51.06025 13.2435,51.06106 13.24282,51.06246 13.24231,51.06293 13.2412,51.06332 13.24062,51.0635 13.24052,51.06391 13.24057,51.06424 13.24248,51.06412 13.24367,51.06429 13.24578,51.06505 13.24655,51.06515 13.24783,51.06511 13.24937,51.06443 13.25093,51.06396 13.25269,51.06376 13.25413,51.06369 13.25569,51.06351 13.25645,51.06373 13.25673,51.06391 13.25755,51.06529 13.25757,51.06555 13.25774,51.06617 13.257779,51.066804 13.25778,51.06682 13.25804,51.06716 13.25922,51.06764 13.26038,51.06849 13.26024,51.06859 13.25892,51.06959 13.25882,51.07012 13.25836,51.07123 13.25837,51.07172 13.258,51.07259 13.25465,51.07677 13.25449,51.07739 13.25453,51.07808 13.2549,51.08019 13.255002,51.080522 13.25574,51.08293 13.25591,51.08537 13.25586,51.08763 13.25576,51.08824 13.25575,51.08836 13.255735,51.088579 13.25572,51.08881 13.25822,51.08905 13.2583,51.08993 13.2586,51.09346 13.25794,51.09391 13.25694,51.09473 13.2558,51.09537 13.25517,51.09598 13.26569,51.09994 13.273736,51.101963 13.28147,51.10286 13.290647,51.103041</coordinates>
                        </LinearRing>
                    </outerBoundaryIs>
                </Polygon>
            </Placemark>
        </Folder>
    </Document>
</kml>

When I use the Importer's Interface to import the KML, I can create a new upload task that presents my data ready to import. But when I actually click "import", I get the following error message:

2015-08-18 16:53:50,909 INFO [geoserver.filters] - 10.20.81.19 "GET /geoserver/web/resources/org.geoserver.importer.web.ImportPage/indicator.gif" took 15ms
2015-08-18 16:53:51,144 WARN [geotools.jdbc] - No mapping for com.vividsolutions.jts.geom.Geometry
2015-08-18 16:53:51,144 WARN [geotools.jdbc] - No mapping for com.vividsolutions.jts.geom.Point
2015-08-18 16:53:51,144 WARN [geotools.jdbc] - No mapping for com.vividsolutions.jts.geom.LinearRing
2015-08-18 16:53:51,144 ERROR [geoserver.importer] - Error occured during import
java.io.IOException: Error occurred creating table
    at org.geotools.jdbc.JDBCDataStore.createSchema(JDBCDataStore.java:757)
    at org.geotools.jdbc.JDBCDataStore.createSchema(JDBCDataStore.java:144)
    at org.geoserver.importer.Importer.loadIntoDataStore(Importer.java:1084)
    at org.geoserver.importer.Importer.doIndirectImport(Importer.java:885)
    at org.geoserver.importer.Importer.run(Importer.java:756)
    at org.geoserver.importer.Importer.run(Importer.java:706)
    at org.geoserver.importer.Importer$4.call(Importer.java:782)
    at org.geoserver.importer.Importer$4.call(Importer.java:779)
    at org.geoserver.importer.job.Job.call(Job.java:16)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Unable to map visibility( java.lang.Boolean)
    at org.geotools.jdbc.JDBCDataStore.createTableSQL(JDBCDataStore.java:2104)
    at org.geotools.jdbc.JDBCDataStore.createSchema(JDBCDataStore.java:743)
    ... 12 more

Even with a simple KML File like this

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Placemark>
    <name>My office</name>
    <description>This is the location of my office.</description>
    <Point>
      <coordinates>-122.087461,37.422069</coordinates>
    </Point>
  </Placemark>
</kml>

I get the exact same message.

What is going wrong here? I use Geoserver 2.7.2. and the matching importer version. The Datastore that I am trying to import to is a SQL Server Database (using the Extension that the Importer should support).

  • 1
    I'd like to import KML as well to my Geoserver 2.7.2 instance. Fingers-crossed for a knowledgable reply. – James T Snell Sep 23 '15 at 20:41
  • Over a year later, but did you ever find an answer to this? I'm getting errors trying to import KML to GeoServer as well – amallard Mar 9 '17 at 21:59
  • Actually, no, I haven't looked further into this. – hnrch Mar 11 '17 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.