-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HINT: "SR" <-- parse error at position 2 within geometry #1466
Comments
temp sloved: |
Hi, thanks for the report. Can you provide me the value of GEOMETRY_EXPORT_TYPE in your ora2Pg.conf? |
There is no such parameter in my ora2Pg.conf |
Sorry, this is GEOMETRY_EXTRACT_TYPE |
|
Can you post the configuration with the usual anonymization? |
data.conf: PG_VERSION 12 export command: ora2pg -p -c data.conf -t COPY -a 'TABLE[SDETABLE]' -o sdetable.sql |
The problem is probably because you are using an ST_GEOMETRY data type and the method to retrieve the SRID is not compatible and commit ec400ad is of no help in this case. For SDO_GEOMETRY Ora2Pg use the following query:
@jieguolove do you know the query that should be used for ST_GEOMETRY? |
Hi @darold I'm actually encountering the same issue converting from SDE to postgis, with the following spatial configuration. GEOMETRY_EXTRACT_TYPE to INTERNAL, WKB... WKT works however. But I thought I'd share the feedback anyway. Let me know if you need further info. logs: conf: CONVERT_SRID 0 DEFAULT_SRID 4326 GEOMETRY_EXTRACT_TYPE INTERNAL ST_GEOMETRYTYPE_FUNCTION sde.st_geometrytype |
Bonjour @darold , J'ai l'impression d'avoir le même problème. J'ai une table Oracle avec des colonnes SDO_GEOMETRY CREATE TABLE XXX.ICSP
(
GEOM_L2E MDSYS.SDO_GEOMETRY,
GEOM_WGS84 MDSYS.SDO_GEOMETRY,
GEOM_L93 MDSYS.SDO_GEOMETRY
) J'ai mis à jour la table sdo_coord_ref_sys pour que les conversions des srid => EPSG se fasse correctement La génération des scripts SQL de création des tables est ok CREATE TABLE icsp (
...
geom_l2e geometry(POINT,27572),
geom_wgs84 geometry(POINT,4326),
geom_l93 geometry(POINT,2154)
) ; Cependant le SQL produit par la commande: ora2pg -c config/ora2pg.conf -t COPY -a ICSP -b ./data -o icsp_table.sql -d Me fournit ce genre de résultat (en gros, j'ai un SRID=; en trop partout...) COPY icsp (code_icsp,origine_code,nom_icsp,x_icsp,y_icsp,projection_icsp,precision_icsp,date_mise_en_service,date_mise_hors_service,commentaires_icsp,commune_icsp,secteur_activite_principal,code_ape_etablissement,nomutil,x_lamb_93,y_lamb_93,gid,xouvl2e,youvl2e,longitude,latitude,num_departement,agence,region,district,geom_l2e,geom_wgs84,geom_l93,code_naf_2008) FROM STDIN;
SRID=;RHA69_00086 SRID=;GENMOLOSSE SRID=;SOCIETE DU DEPOT DE ST PRIEST SRID=;800930 SRID=;2079910 SRID=;5 SRID=;3 \N \N SRID=;Siret : 399087220 SRID=;69290 SRID=;4 SRID=;51.5A SRID=;DRIRERHA SRID=;849132 SRID=;6511842 SRID=;1641 SRID=;800930 SRID=;2079910 SRID=;4.91632963296735 SRID=;45.6898639249745 SRID=;69 SRID=;AGO5 SRID=;REG82 SRID=;D SRID=27572;POINT (800929.987299754 2079909.99961538) SRID=4326;POINT (4.91632963296735 45.6898639249745) \N \N
SRID=;RHA69_00087 SRID=;GENMOLOSSE SRID=;KODAK SRID=;790050 SRID=;2070290 SRID=;5 SRID=;3 \N \N SRID=;Siret : inconnu SRID=;69096 SRID=;5 SRID=;74.8A SRID=;DRIRERHA SRID=;838180 SRID=;6502324 SRID=;1642 SRID=;790050 SRID=;2070290 SRID=;4.77290480645298 SRID=;45.6064832261955 SRID=;69 SRID=;AGO5 SRID=;REG82 SRID=;D SRID=27572;POINT (790049.987283841 2070289.99963591) SRID=4326;POINT (4.77290480645298 45.6064832261955) \N \N
SRID=;RHA69_00089 SRID=;GENMOLOSSE SRID=;SOCIETE TEXTILE INDUSTRIELLE DU RHONE - STIR SRID=;798210 SRID=;2086890 SRID=;5 SRID=;3 \N \N SRID=;Siret : inconnu SRID=;69383 SRID=;6 SRID=;17.3Z SRID=;DRIRERHA SRID=;846474 SRID=;6518839 SRID=;1643 SRID=;798210 SRID=;2086890 SRID=;4.88433476257371 SRID=;45.7534250160617 SRID=;69 SRID=;AGO5 SRID=;REG82 \N SRID=27572;POINT (798209.987314235 2086889.99962165) SRID=4326;POINT (4.88433476257371 45.7534250160617) \N \N
SRID=;RHA69_00092 SRID=;GENMOLOSSE SRID=;STATION SERVICE ELF - Tassin SRID=;789440 SRID=;2086820 SRID=;5 SRID=;3 \N \N SRID=;Siret : inconnu SRID=;69244 SRID=;14 SRID=;50.5Z SRID=;DRIRERHA SRID=;837712 SRID=;6518844 SRID=;1644 SRID=;789440 SRID=;2086820 SRID=;4.77165119444173 SRID=;45.7552955085604 SRID=;69 SRID=;AGO5 SRID=;REG82 SRID=;D SRID=27572;POINT (789439.987316611 2086819.99963918) SRID=4326;POINT (4.77165119444173 45.7552955085604) \N \N Je vais probablement utiliser la solution suivante temporairement sed -i 's/SRID=;//g' *.sql Une idée? Merci |
The table structure of the Oracle database is as follows:
Oracle spatial data exported with the latest version of ora2pg is in the following format and cannot be imported into the postgresql database:
The table structure of the postgresql database is as follows:
HOW TO FIX ora2pg? thanks!
The text was updated successfully, but these errors were encountered: