Selon Piotr Pachó <[email protected]>: > Hello list, > I have problem with importing gml file (with polygons) to postgis using > standard ogr2ogr command which look like: > > ogr2ogr -a_srs EPSG:2180 -f "PostgreSQL" PG:"host=localhost > user=postgres dbname=test password=postgres port=5432" > d:\test\BDOT10k\OT_ADJA_A.xml > > I tried to import two GML files (with xsd schema necessary): > - OT_ADJA_A.xml - is orginal valid xml file - after import to Postgis a > table is created but geometry column is empty, > - OT_ADJA_A_changed.xml - is changed and not valid xml file - but after > import to Postgis a table is created and some records have geometry, the > other not. > > All files are accessible here: > https://drive.google.com/folderview?id=0B54CPoAEcivYOTZhNDlpU3hkTlk&usp=sharing > > > So I have the following questions: > 1. In file OT_ADJA_A.xml Why aplication not recognize <ot:geometria> > element which is "gml:PolygonType" type ? (there is definition in > OT_BDOT10k_BDOO.xsd file)
Because the OGR GML driver has limited support to parse .xsd files. The .xsd should be just near the .xml file, and with the same basename. But even if it was the case, it is just not smart enough to realize that <ot:geometria> must be a "gml:PolygonType" > 2. In file OT_ADJA_A_changed.xml I replace <ot:geometria> with > <gml:Polygon>. Why in that case some of records are imported with > geometry and the other not ? I don't see that problem. In the sample you've provided, there are 6 features with geometries and the 6 are imported into PostGIS with their geometries > 3. Is there any constraints of Postgis or ogr2ogr in quantity of > vertices which can have a Polygon ? No, you're only limited by the size of virtual memory (and possibly a PostgreSQL limit on the size of records or fields) > > I will appreciate any help. > Regards, > Piotr > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
