[postgis-users] Shapes to PG

Neil.Young Neil.Young at Freenet.de
Mon Jan 26 14:00:20 PST 2009


Many thanks. How did you do the "valid check on this"?
BTW: Your suggestion did work like a charm.
Regards


Paragon Corporation schrieb:
> Neil,
>
> Doing as is valid check on this.  The notice gives this
>
> NOTICE:  Ring Self-intersection at or near point 3.48522e+006 5.91314e+006
>
> As far as transforming goes  -- you should add a new geometry column with
> addgeometrycolumn
> http://postgis.refractions.net/documentation/manual-svn/AddGeometryColumn.html
>
>
> UPDATE onb SET the_geom_4326 = ST_Transform(the_geom, 4326);
>
> Then you can drop the old with dropgeometrycolumn
> http://postgis.refractions.net/documentation/manual-svn/DropGeometryColumn.h
> tml
>
>
> Leo
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
> Neil.Young
> Sent: Monday, January 26, 2009 3:25 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Shapes to PG
>
> OK, it turns out, that just one the_geom is treated to be invalid (for
> unknown reasons). It also seems, that all of my shape records have been
> imported well, even if some of them are "invisible".
>
> The record in question is
>
> INSERT INTO "onb" ("vorwahl","name","kennung",the_geom) VALUES
> ('04793','Hambergen',NULL,'SRID=31467;010600000001000000010300000001000000F0
> 000000000000F0CE944A410000003CAC8D5641000000083B954A4100000098C98D5641000000
> C46D954A41000000DCCE8D564100000050F2954A410000001CDA8D5641000000AC23964A4100
> 00008C458E56410000004038964A41000000B85A8E5641000000A09B964A41000000B0568E56
> 410000009CAB964A4100000098778E564100000054C9964A41000000108A8E56414E8417E80F
> 974A411F08B0188E8E5641A6E24BEB0F974A41EC4A64D58D8E5641000000F410974A41000000
> 288E8E56414E8417E80F974A411F08B0188E8E564194D0E4780F974A4167C6D837978E564182
> BE7D060F974A4142222751A98E5641E01BDE000B974A410769B139C18E56410646D85A4B974A
> 41ECCD168EC08E5641D91B89F57C974A413216EC53E88E56419FE2F6DF81974A41EACD4F8AE6
> 8E564186CAD5F08D974A4101668D77ED8E564100000038AB974A4100000064D28E5641000000
> 70C2974A4100000074D98E56410000000CCC974A4100000080CB8E564100000094E4974A4100
> 00003CBF8E56410000005876984A41000000F8838E56410000007400994A4100000060B28E56
> 410000002051994A4100000084D88E5641000000B4859A4A410000000CB68E564100000080CE
> 9B4A4100000070A58E5641000000F8759C4A410000000CB88E5641000000AC399E4A41000000
> 103C8E56410000004C099F4A41000000A0FD8D5641000000FC859F4A41000000D4848D564100
> 000010AF9F4A41000000088B8D5641000000E0BF9F4A41000000F0878D5641000000840DA04A
> 4100000024988D5641000000AC6EA04A41000000D4B08D564100000010C1A04A4100000034C1
> 8D5641000000FCF1A04A4100000034CC8D56410000000413A14A4100000018DB8D5641000000
> 4828A14A41000000D4EE8D56410000000C3AA14A41000000FC038E56410000001C63A14A4100
> 00000C0A8E5641000000007FA14A41000000B0068E5641000000A497A14A41000000E80A8E56
> 410000003CB0A14A41000000D8118E564100000080C0A14A4100000068088E5641000000BCFB
> A14A4100000090048E5641000000C83EA24A41000000D4088E5641000000CC77A24A41000000
> A8048E564100000050A6A24A41000000D0058E564100000050E8A24A410000000C118E564100
> 0000F01BA34A41000000980E8E5641000000784DA34A41000000C8028E5641000000A872A34A
> 410000006CF68D5641000000C097A34A4100000000F28D5641000000B0CEA34A4100000064FC
> 8D56410000000410A44A41000000000A8E5641000000A44DA44A4100000068118E5641000000
> 2C7EA44A410000008C098E56410000001CB7A44A41000000EC0A8E56410000004CDCA44A4100
> 000040188E5641000000DCEBA44A41000000D02B8E56410000006004A54A410000003C398E56
> 41000000A023A54A410000003C3F8E5641000000644DA54A41000000E43F8E5641000000646E
> A54A41000000303A8E56410000009093A54A41000000782E8E5641000000208AA54A41000000
> FCF98D564100000038F7A54A4100000064888D564100000010B6A54A410000000C868D564100
> 000050BCA54A41000000D8738D564100000084D0A54A41000000085F8D564100000074EDA54A
> 4100000038548D56410000003012A64A41000000D0528D5641000000F833A64A410000004C59
> 8D5641000000FC37A64A410000005C488D5641000000506AA64A4100000008308D5641000000
> C014A74A41000000F0DA8C5641000000AC87A74A4100000014D98C564100000014A0A74A4100
> 0000F4ED8C564100000080BAA74A4100000060FB8C5641000000C0E5A74A4100000058038D56
> 410000003017A84A41000000F8FE8C5641000000E03EA84A4100000004F58C56410000000060
> A84A4100000050E58C5641000000045DA84A4100000034D78C5641000000404FA84A41000000
> 78CA8C5641000000CC60A84A4100000018C08C5641000000AC5AA84A410000002CB18C564100
> 00006863A84A4100000000A28C56410000003863A84A41000000B0978C5641000000F447A84A
> 41000000C4838C564100000054D9A74A4100000004788C5641000000C4FFA74A41000000980C
> 8C564100000050FEA74A4100000034EA8B5641000000E0BBA74A4100000028E88B5641000000
> 7CA0A74A41000000BCDD8B56410000002C99A74A4100000050C88B5641000000C06DA74A4100
> 00001C6B8B5641000000083CA74A41000000946D8B5641000000F435A74A41000000D85A8B56
> 410000005062A74A410000009C568B5641000000806CA74A41000000FC398B5641000000D06B
> A74A4100000060258B56410000004851A74A4100000080A98A56410000004C48A74A41000000
> 949A8A56410000003433A74A41000000C4918A564100000030C5A74A41000000702B8A564100
> 00006C26A84A41000000740D8A5641000000CC91A84A410000000CEF89564100000030E9A84A
> 4100000040D38956410000008043A94A4100000030B389564100000030A4A94A41000000A88F
> 8956410000007860AA4A41000000B049895641000000F046AA4A410000004CF5885641000000
> E4EBA94A41000000944488564100000058E0A74A41000000ACF4885641000000C0B9A74A4100
> 00007C0B8956410000005485A74A4100000008F2885641000000986EA44A41000000F0668756
> 410000003C24A44A41000000AC4E875641000000DC01A44A41000000F04487564100000050F6
> A34A41000000A81E87564100000008D7A34A410000001CFB865641000000E8D4A34A41000000
> 54D9865641000000889BA34A41000000A8AA8656410000000885A34A41000000648C86564100
> 0000C876A34A41000000F87B865641000000443DA34A410000006462865641000000BCFFA24A
> 41000000E043865641000000D4D6A24A41000000A425865641000000F4AEA24A410000005003
> 8656410000009C92A24A4100000020DC855641000000446EA24A410000008CD5855641000000
> F85BA24A41000000F0DE855641000000804DA24A4100000024D98556410000003826A24A4100
> 000084D685564100000064FBA14A410000003CD685564100000090BAA14A4100000000E98556
> 41000000149AA14A4100000068FD8556410000000883A14A410000009C06865641000000403F
> A14A4100000084F2855641000000D408A14A4100000058EB855641000000F491A04A41000000
> D0208656410000006459A04A41000000A033865641000000C8309E4A410000005C3E86564100
> 000020EC9D4A41000000D84586564100000048D19D4A41000000941B86564100000040099D4A
> 41000000601B8656410000006CFD9C4A41000000C8058656410000003C899C4A410000006420
> 86564100000020699C4A4100000088EA85564100000050EB9B4A4100000050F1855641000000
> A8FB9A4A410000000C6086564100000084B89A4A41000000305186564100000068319A4A4100
> 00002843865641000000F0AE994A41000000C43F8656410000008844994A4100000030458656
> 41000000E010994A41000000FC1D8656410000004C91984A410000008CDE85564100000074AC
> 974A410000001C11865641000000506C974A41000000C8D7855641000000584D974A41000000
> E0E6855641000000841B974A410000008CC885564100000050DE964A410000007CC185564100
> 00001C73964A41000000BCB6855641000000784A964A41000000E4D385564100000034EA954A
> 4100000028F7855641000000C020964A41000000401A8656410000009C3F964A41000000E04D
> 8656410000006C8D964A41000000BCA486564100000084C4964A4100000014ED865641000000
> 38E9964A410000000432875641000000DC4B974A41000000B4088856410000002819974A4100
> 0000403A885641000000345E974A41000000104A885641000000E052974A410000005C5D8856
> 41000000A83C974A410000001C7A88564100000084EB964A4100000098E1885641000000C45C
> 964A4100000010F38856410000001C2E954A41000000BCF98856410000005427954A41000000
> A4E78856410000009C28954A4100000010C98856410000003C12954A41000000CC9B88564100
> 000038FA944A410000006491885641000000A0CA944A41000000248F885641000000B073944A
> 41000000EC88885641000000D443944A41000000F4808856410000003807944A41000000A47E
> 8856410000001CEA934A41000000B49188564100000064D9934A41000000ECA5885641000000
> FCC4934A4100000048CA88564100000034B6934A4100000030F88856410000006CA1934A4100
> 000018068956410000000080934A41000000A0108956410000008858934A41000000F4188956
> 41000000F028934A410000006C12895641000000C8F1924A410000001C0E895641000000C8BE
> 924A41000000C40D895641000000209E924A41000000FC0A895641000000507E924A41000000
> 4001895641000000A863924A4100000058FD885641000000EC3F924A41000000980089564100
> 00000833924A410000004807895641000000F025924A41000000F014895641000000B80F924A
> 4100000028288956410000000484914A41000000987C8956410000003429914A410000003498
> 8956410000000843914A410000000CBA895641000000C860914A410000008CB8895641000000
> 1882914A410000006CE9895641000000E8EC914A4100000078C38956410000002CB6924A4100
> 0000BC278A564100000040E2924A41000000442B8A5641000000BC0C934A41000000A82E8A56
> 41000000242D934A41000000DC358A5641000000403B934A41000000D0428A5641000000103D
> 934A4100000004528A56410000007021934A41000000AC638A5641000000D4F8924A41000000
> 14748A5641000000FCB0934A41000000F8198B564100000070CE934A41000000341A8B564100
> 00003815944A410000008C668B5641000000D012944A41000000446F8B5641000000C851944A
> 41000000D8AD8B56410000005C41944A410000000CB18B5641000000E046944A4100000010BA
> 8B56410000005CF4934A41000000F0D98B5641000000A021944A41000000CC308C5641000000
> FCF6934A4100000080388C5641000000B813944A4100000050748C5641000000104B944A4100
> 00006C6F8C5641000000C447944A41000000F07B8C5641000000D438944A41000000FC8E8C56
> 41000000CC0B944A410000000CA08C5641000000E0C1924A41000000C0FB8C56410000000026
> 944A410000004C768D5641000000F06D944A41000000788F8D5641000000F0CE944A41000000
> 3CAC8D5641');
>
> So, my next question will be: How to re-project this database? I need SRID
> 4326 data...
>
> Regards
>
>
>
> Nicolas Ribot schrieb:
>   
>>> The first returns 0 of 5204 records.
>>>     
>>>       
>> Meaning you don't have null geometries in your table.
>>
>>   
>>     
>>> The output of the latter I don't understand (see screenshot)
>>>
>>>     
>>>       
>> the result of st_isvalid is a boolean value: t for true, f for false.
>> meaning some geometries are invalid.
>>
>> select <some attributes> from onb where not st_isvalid(the_geom); will 
>> allow you to identify invalid objects.
>>
>> Nico
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>   
>>     
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   




More information about the postgis-users mailing list