[postgis-users] Problem with ST_Multi and schemas in Postgresql

Jean Marchal jean.d.marchal at gmail.com
Wed Aug 28 04:40:55 PDT 2013


I think you are missing the "convert to geometry" part ("::geometry") ...
which gives you something like

SELECT
ST_AsGeoJson(ST_Multi('0103000020E610000001000000210000004CC6D989CA885EC06D8792E62FB842407858A47BCC885EC003B2621E13B84240340535E9D1885EC02AABA47EF7B742405CC81E9DDA885EC0DC001817DEB742406C4EBF41E6885EC065BEA4E1C7B74240CE108A64F4885EC003B1C1B8B5B742408A756F7A04895EC0E220104FA8B74240E29934E515895EC0D8677F28A0B74240D94287F927895EC0A6C03B959DB74240194492053A895EC01F0A9AAEA0B7424017CBD1574B895EC0B0B51E56A9B742400C8EE4455B895EC0D46DA936B7B7424047FC163369895EC0F4F9B9C7C9B742409436689674895EC0B44CAE52E0B74240C4B0CDFF7C895EC00C4AC6F9F9B7424079BA811C82895EC0D267A8C015B84240778532BA83895EC06180139632B842408E3BF2C881895EC0A4955E5E4FB84240DBEAD45B7C895EC0124E5FFE6AB842408B0736A873895EC061F44B6684B84240007FAC0368895EC068E02D9C9AB84240C957C1E059895EC0026C7DC5ACB84240671A89CA49895EC09FCA882FBAB8424063464B5F38895EC051F65256C2B8424055766C4A26895EC067F5A6E9C4B84240D52CD73D14895EC0146C2DD0C1B84240CB4924EB02895EC0F20E6628B9B84240FEA6C6FCF2885EC0CC5A7B47ABB842403E3B7D0FE5885EC01A25FCB598B84240C5654CACD9885EC025549B2A82B842403EC43943D1885EC05188298368B84240346AFE26CC885EC0DFF70DBC4CB842404CC6D989CA885EC06D8792E62FB84240'
::geometry))

Jean


2013/8/28 Ekaitz HERNANDEZ <ekaitz.hernandez at gmail.com>

>
> Hi Al!
>
> I have the next problem, I have now different schemas, all it was working
> perfect until I execute  ST_Multi, I haven't other problems with other
> functions in postgis it seems that ST_Mult can't figure out what schema to
> choose.
>
> This is the query that is not working:
>
>  SELECT
> ST_AsGeoJson(ST_Multi('0103000020E610000001000000210000004CC6D989CA885EC06D8792E62FB842407858A47BCC885EC003B2621E13B84240340535E9D1885EC02AABA47EF7B742405CC81E9DDA885EC0DC001817DEB742406C4EBF41E6885EC065BEA4E1C7B74240CE108A64F4885EC003B1C1B8B5B742408A756F7A04895EC0E220104FA8B74240E29934E515895EC0D8677F28A0B74240D94287F927895EC0A6C03B959DB74240194492053A895EC01F0A9AAEA0B7424017CBD1574B895EC0B0B51E56A9B742400C8EE4455B895EC0D46DA936B7B7424047FC163369895EC0F4F9B9C7C9B742409436689674895EC0B44CAE52E0B74240C4B0CDFF7C895EC00C4AC6F9F9B7424079BA811C82895EC0D267A8C015B84240778532BA83895EC06180139632B842408E3BF2C881895EC0A4955E5E4FB84240DBEAD45B7C895EC0124E5FFE6AB842408B0736A873895EC061F44B6684B84240007FAC0368895EC068E02D9C9AB84240C957C1E059895EC0026C7DC5ACB84240671A89CA49895EC09FCA882FBAB8424063464B5F38895EC051F65256C2B8424055766C4A26895EC067F5A6E9C4B84240D52CD73D14895EC0146C2DD0C1B84240CB4924EB02895EC0F20E6628B9B84240FEA6C6FCF2885EC0CC5A7B47ABB842403E3B7D0FE5885EC01A25FCB598B84240C5654CACD9885EC025549B2A82B842403EC43943D1885EC05188298368B84240346AFE26CC885EC0DFF70DBC4CB842404CC6D989CA885EC06D8792E62FB84240'))
>
> *LINE 1:  SELECT ST_AsGeoJson(ST_Multi('0103000020E610000001000000210...*
> *                             ^*
> *HINT:  Could not choose a best candidate function. You might need to add
> explicit type casts.*
> *
> *
> *
> *
> If I  set explicitly the schema in ST_multi  it works perfect, however I
> don't need to put the schema in ST_AsGeoJson.
>
>  SELECT
> ST_AsGeoJson(dev02.ST_Multi('0103000020E610000001000000210000004CC6D989CA885EC06D8792E62FB842407858A47BCC885EC003B2621E13B84240340535E9D1885EC02AABA47EF7B742405CC81E9DDA885EC0DC001817DEB742406C4EBF41E6885EC065BEA4E1C7B74240CE108A64F4885EC003B1C1B8B5B742408A756F7A04895EC0E220104FA8B74240E29934E515895EC0D8677F28A0B74240D94287F927895EC0A6C03B959DB74240194492053A895EC01F0A9AAEA0B7424017CBD1574B895EC0B0B51E56A9B742400C8EE4455B895EC0D46DA936B7B7424047FC163369895EC0F4F9B9C7C9B742409436689674895EC0B44CAE52E0B74240C4B0CDFF7C895EC00C4AC6F9F9B7424079BA811C82895EC0D267A8C015B84240778532BA83895EC06180139632B842408E3BF2C881895EC0A4955E5E4FB84240DBEAD45B7C895EC0124E5FFE6AB842408B0736A873895EC061F44B6684B84240007FAC0368895EC068E02D9C9AB84240C957C1E059895EC0026C7DC5ACB84240671A89CA49895EC09FCA882FBAB8424063464B5F38895EC051F65256C2B8424055766C4A26895EC067F5A6E9C4B84240D52CD73D14895EC0146C2DD0C1B84240CB4924EB02895EC0F20E6628B9B84240FEA6C6FCF2885EC0CC5A7B47ABB842403E3B7D0FE5885EC01A25FCB598B84240C5654CACD9885EC025549B2A82B842403EC43943D1885EC05188298368B84240346AFE26CC885EC0DFF70DBC4CB842404CC6D989CA885EC06D8792E62FB84240'))
>
> search_path:"dev02, shared"
>
> Post_gis version:
> "POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.7.1, 23
> September 2009" LIBXML="2.7.6" LIBJSON="UNKNOWN""
>
> Sorry I wrote in the wrong mail list I don't know if this is a Postgres
> problem or Postgis problem.
>
> Thank you
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
Jean Marchal

Etudiant au doctorat / PHD student
Université Laval - Pavillon Abitibi-Price
Faculté de foresterie, de géographie et de géomatique
2405, rue de la Terrasse
Québec (Québec) G1V 0A6
Tél: 418-656-2131 poste 2620
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130828/3608daac/attachment.html>


More information about the postgis-users mailing list