Thats good way to use raster2pgsql, I have written some import tool for my
project in Java, but there is a problem with tiled raster where there are
no data on the end of raster where the tile is bigger then raster we need
something like this :)
http://postgis.refractions.net/pipermail/postgis-users/2012-August/035137.html


J

2012/8/28 <[email protected]>

> Hi Jakup
>
> Zitat von Jakub Hettler <[email protected]>:
>
>  Thank you very much, it was in mapconfig file.
>>
>> One question, why you use ST_AsTiff instead of ST_AsPNG?
>>
>
> ST_AsTiff is able to handle float pixel values whilst ST_AsPNG is not.
> Look here for the discussion
> http://osgeo-org.1560.n6.**nabble.com/image-mosaic-jdbc-**
> using-Float-32-for-pixel-**value-td4993699.html#a4994432<http://osgeo-org.1560.n6.nabble.com/image-mosaic-jdbc-using-Float-32-for-pixel-value-td4993699.html#a4994432>
>
>
>
>> And second one, what kind of raster data did you expect on import (input)?
>> I tried to load some data from SRTM with 16 BUI and it fails, as expected
>> :) It has to be 8 BUI, RGB or RGBA data?
>>
>
> The idea is to import your data using  "raster2pgsql".
> http://postgis.org/docs/using_**raster.xml.html#RT_Raster_**Loader<http://postgis.org/docs/using_raster.xml.html#RT_Raster_Loader>
>
> The image mosaic jdbc import utility does not support postgis raster.
>
>
>
>> As I expect, it is a bit slower than from BLOB, I expect, that you need to
>> make conversion with ST_AsTIFF now and the server the binary data to
>> GeoServer? Right?
>>
>
> Postgis has its own internal raster format, there is one additional
> conversion. At the moment, st_aspng is used, the next version will use
> st_astiff.
>
>
>> Excelenet work!
>>
> Thanks :-)
> Christian
>
>>
>> Thanks
>>
>> Jakub
>>
>
>
>> 2012/8/28 <[email protected]>
>>
>>  Hi Jakub
>>>
>>> I cannot understand the language of the postgres message but it seems to
>>> be a problem in the sql statement.
>>>
>>> Please look at the mapping file in
>>> http://docs.geotools.org/****latest/userguide/library/**<http://docs.geotools.org/**latest/userguide/library/**>
>>> coverage/pgraster.html<http://**docs.geotools.org/latest/**
>>> userguide/library/coverage/**pgraster.html<http://docs.geotools.org/latest/userguide/library/coverage/pgraster.html>
>>> >
>>>
>>>
>>> You have unneeded xml elements in your mapping file, please remove them
>>> all.
>>>
>>>
>>> Christian
>>>
>>>
>>> Zitat von Jakub Hettler <[email protected]>:
>>>
>>>  Hi Christian,
>>>
>>>> log from last request and my mapconfig file.
>>>>
>>>> I think the problem is in the log on the row 1 Nespecifikována hodnota
>>>> parametru 7 means Unspecified value of parameter 7
>>>>
>>>> Thanks for the tips
>>>>
>>>> Jakub
>>>>
>>>> 2012/8/28 <[email protected]>
>>>>
>>>>  Hi Jakup
>>>>
>>>>>
>>>>>
>>>>> Zitat von Jakub Hettler <[email protected]>:
>>>>>
>>>>>  I tried to make, but now I have nothing in my WMS, maybe this plugin
>>>>> is
>>>>>
>>>>>  not
>>>>>> in GeoServer 2.2 RC 1, is it possible?
>>>>>>
>>>>>>  The plugin is there, can you have a look at the geoserver.log file.
>>>>>> If
>>>>>>
>>>>>>  you find a stack trace, please send it to me.
>>>>>
>>>>> Christian
>>>>>
>>>>>  Thanks
>>>>>
>>>>>>
>>>>>> Jakub
>>>>>>
>>>>>> 2012/8/28 Jakub Hettler <[email protected]>
>>>>>>
>>>>>>  Wow, thats a good information I live in mind that in need to use BLOB
>>>>>> for
>>>>>>
>>>>>>  raster data I thought as it is describe in the GeoServer manual that
>>>>>>> it
>>>>>>> is
>>>>>>> necessary. Because the import tool in GeoServer manual creates only
>>>>>>> BLOB
>>>>>>> column with data, geom column with MBR and filename column. Right?
>>>>>>>
>>>>>>> Ok now, if I have function image mosaic jdbc with BLOB (column data
>>>>>>> [bytea]) and in the same table I have rast column with data, it
>>>>>>> should
>>>>>>> only
>>>>>>> need to switch from postgres to pgraster and change from the data to
>>>>>>> rast
>>>>>>> in the map configuration file and I would be able to see the same WMS
>>>>>>> in
>>>>>>> GeoServer? Right?
>>>>>>>
>>>>>>> I have GeoServer 2.2 RC 1
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Jakub
>>>>>>>
>>>>>>>
>>>>>>> 2012/8/28 <[email protected]>
>>>>>>>
>>>>>>> Hi Jakub
>>>>>>>
>>>>>>>
>>>>>>>  First, please stay on the mailing list, otherwise
>>>>>>>>
>>>>>>>> 1) you will have no chance to get input from others
>>>>>>>> 2) Normally, developers do not answer to individual mails
>>>>>>>>
>>>>>>>> I am not sure that I am understanding your problem. The image mosaic
>>>>>>>> jdbc
>>>>>>>> plugin can use postgis raster columns directly, no need for an
>>>>>>>> additional
>>>>>>>> blob column.
>>>>>>>>
>>>>>>>> http://docs.geotools.org/********latest/userguide/library/**<http://docs.geotools.org/******latest/userguide/library/**>
>>>>>>>> <h**ttp://docs.geotools.org/******latest/userguide/library/**<http://docs.geotools.org/****latest/userguide/library/**>
>>>>>>>> >
>>>>>>>> <ht**tp://docs.geotools.org/******latest/userguide/library/**<http://docs.geotools.org/****latest/userguide/library/**>
>>>>>>>> <**http://docs.geotools.org/****latest/userguide/library/**<http://docs.geotools.org/**latest/userguide/library/**>
>>>>>>>> >
>>>>>>>> >
>>>>>>>> coverage/pgraster.html<http://******docs.geotools.org/latest/****<http://docs.geotools.org/latest/**>
>>>>>>>> userguide/library/coverage/******pgraster.html<http://docs.**
>>>>>>>> geotools.org/latest/userguide/****library/coverage/pgraster.**html<http://geotools.org/latest/userguide/**library/coverage/pgraster.html>
>>>>>>>> <http://docs.geotools.org/**latest/userguide/library/**
>>>>>>>> coverage/pgraster.html<http://docs.geotools.org/latest/userguide/library/coverage/pgraster.html>
>>>>>>>> >
>>>>>>>> **>
>>>>>>>>
>>>>>>>>
>>>>>>>> >
>>>>>>>>
>>>>>>>>
>>>>>>>> I assume the problem is that that this fact is not mentioned in the
>>>>>>>> geoserver user guide.
>>>>>>>>
>>>>>>>> The only problem may be that the module uses st_aspng and will use
>>>>>>>> st_astiff in next versions. If you have problems here, I can
>>>>>>>> prepare a
>>>>>>>> special jar file for you. (Need to know your geoserver version).
>>>>>>>>
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>>
>>>>>>>> Zitat von Jakub Hettler <[email protected]>:
>>>>>>>>
>>>>>>>>  No no, I found the solution Christian, I only wanted to know what
>>>>>>>> kind
>>>>>>>> of
>>>>>>>>
>>>>>>>>  function I can use for creating of BLOB column with raster data for
>>>>>>>>
>>>>>>>>> image
>>>>>>>>> mosaic jdbc plugin with GeoServer. Because if I have rast column in
>>>>>>>>> table
>>>>>>>>> and I need to make BLOB (bytea in Postgre) I need to use functions
>>>>>>>>> as
>>>>>>>>> ST_AsPNG, ST_AsTIFF,etc.
>>>>>>>>>
>>>>>>>>> And I couldnt find any information what kind of formats can I use
>>>>>>>>> with
>>>>>>>>> image mosaic jdbc, but I think I found the answer on your page
>>>>>>>>>
>>>>>>>>> "Data (Blob) : The image data (Encoded in a format readable by JAI,
>>>>>>>>> e.
>>>>>>>>> g.
>>>>>>>>> png,jpeg,...)"
>>>>>>>>>
>>>>>>>>> http://docs.codehaus.org/********display/GEOTDOC/Image+**<http://docs.codehaus.org/******display/GEOTDOC/Image+**>
>>>>>>>>> <http**://docs.codehaus.org/******display/GEOTDOC/Image+**<http://docs.codehaus.org/****display/GEOTDOC/Image+**>
>>>>>>>>> >
>>>>>>>>> <http:**//docs.codehaus.org/****display/**GEOTDOC/Image+**<http://docs.codehaus.org/**display/**GEOTDOC/Image+**>
>>>>>>>>> <htt**p://docs.codehaus.org/****display/GEOTDOC/Image+**<http://docs.codehaus.org/**display/GEOTDOC/Image+**>
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> Mosaicing+Pyramidal+JDBC+********Plugin<http://docs.codehaus.****
>>>>>>>>> org/display/GEOTDOC/Image+******Mosaicing+Pyramidal+JDBC+******
>>>>>>>>> Plugin<
>>>>>>>>>
>>>>>>>>> http://docs.codehaus.**org/**display/GEOTDOC/Image+**
>>>>>>>>> Mosaicing+Pyramidal+JDBC+****Plugin<http://docs.codehaus.**
>>>>>>>>> org/display/GEOTDOC/Image+**Mosaicing+Pyramidal+JDBC+**Plugin<http://docs.codehaus.org/display/GEOTDOC/Image+Mosaicing+Pyramidal+JDBC+Plugin>
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>>
>>>>>>>>> >
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Because I tried to publish QuickBird data with 4 bands in TIFF, but
>>>>>>>>> it
>>>>>>>>> is
>>>>>>>>> impossible, cause of 8 BUI and 16 BUI :) Then I found the way of
>>>>>>>>> using
>>>>>>>>> ST_AsTIFF instead ST_AsPNG, but I get only black rectangle, I think
>>>>>>>>> it
>>>>>>>>> is
>>>>>>>>> because there some no data values or something like this or I have
>>>>>>>>> to
>>>>>>>>> make
>>>>>>>>> histogram stretch in the conversion between postgis raster native
>>>>>>>>> and
>>>>>>>>> BLOB,
>>>>>>>>> because if I open the same raster in native PostGIS format, I get
>>>>>>>>> also
>>>>>>>>> black rectangle and I need to use histogram stretch to get original
>>>>>>>>> picture.
>>>>>>>>>
>>>>>>>>> Do you have some tips? :)
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Jakub
>>>>>>>>>
>>>>>>>>> 2012/8/27 <[email protected]>
>>>>>>>>>
>>>>>>>>>  Not sure about your problem, perhaps it is related to
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  
>>>>>>>>> http://jira.codehaus.org/**********browse/GEOT-4225<http://jira.codehaus.org/********browse/GEOT-4225>
>>>>>>>>>> <http://**jira.codehaus.org/********browse/GEOT-4225<http://jira.codehaus.org/******browse/GEOT-4225>
>>>>>>>>>> >
>>>>>>>>>> <http://jira.**codehaus.org/******browse/GEOT-**4225<http://codehaus.org/****browse/GEOT-**4225>
>>>>>>>>>> <http://**jira.codehaus.org/****browse/**GEOT-4225<http://jira.codehaus.org/****browse/GEOT-4225>
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> <http://jira.**codehaus.org/******browse/GEOT-**4225<http://codehaus.org/****browse/GEOT-**4225>
>>>>>>>>>> <http://**codehaus.org/**browse/GEOT-****4225<http://codehaus.org/**browse/GEOT-**4225>
>>>>>>>>>> >
>>>>>>>>>> <http://**jira.codehaus.org/****browse/**GEOT-4225<http://jira.codehaus.org/**browse/**GEOT-4225>
>>>>>>>>>> <http://**jira.codehaus.org/**browse/**GEOT-4225<http://jira.codehaus.org/**browse/GEOT-4225>
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> <http://jira.**codehaus.org/******browse/GEOT-4225<http://codehaus.org/****browse/GEOT-4225>
>>>>>>>>>> <http://**codehaus.org/**browse/GEOT-**4225<http://codehaus.org/**browse/GEOT-4225>
>>>>>>>>>> >
>>>>>>>>>> <http://**codehaus.org/browse/**GEOT-4225<http://codehaus.org/browse/GEOT-4225>
>>>>>>>>>> <http://codehaus.org/**browse/GEOT-4225<http://codehaus.org/browse/GEOT-4225>
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>> <http://jira.**codehaus.org/****browse/GEOT-4225<http://codehaus.org/**browse/GEOT-4225>
>>>>>>>>>> <http://**codehaus.org/browse/GEOT-4225<http://codehaus.org/browse/GEOT-4225>
>>>>>>>>>> >
>>>>>>>>>> <http://jira.**codehaus.org/**browse/GEOT-4225<http://codehaus.org/browse/GEOT-4225>
>>>>>>>>>> <http://jira.**codehaus.org/browse/GEOT-4225<http://jira.codehaus.org/browse/GEOT-4225>
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>> Zitat von Jakub Hettler <[email protected]>:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  Hi all,
>>>>>>>>>>
>>>>>>>>>>  I have a question. I created a structure in PostGIS that support
>>>>>>>>>>
>>>>>>>>>>  GeoServer
>>>>>>>>>>> and image mosaic JDBC plugin.
>>>>>>>>>>>
>>>>>>>>>>> It is almost same as with the original tool to import
>>>>>>>>>>> image-mosaic
>>>>>>>>>>> tiles
>>>>>>>>>>> as
>>>>>>>>>>> is
>>>>>>>>>>> http://docs.geoserver.org/**********stable/en/user/tutorials/***
>>>>>>>>>>> *<http://docs.geoserver.org/********stable/en/user/tutorials/**>
>>>>>>>>>>> <http://docs.geoserver.org/********stable/en/user/tutorials/****<http://docs.geoserver.org/******stable/en/user/tutorials/**>
>>>>>>>>>>> >
>>>>>>>>>>> <**http://docs.geoserver.org/********stable/en/user/tutorials/**
>>>>>>>>>>> ** <http://docs.geoserver.org/******stable/en/user/tutorials/**>
>>>>>>>>>>> <http://docs.geoserver.org/******stable/en/user/tutorials/**<http://docs.geoserver.org/****stable/en/user/tutorials/**>
>>>>>>>>>>> **>
>>>>>>>>>>> >
>>>>>>>>>>> <ht**tp://docs.geoserver.org/********stable/en/user/tutorials/**
>>>>>>>>>>> ** <http://docs.geoserver.org/******stable/en/user/tutorials/**>
>>>>>>>>>>> <http://docs.geoserver.org/******stable/en/user/tutorials/**<http://docs.geoserver.org/****stable/en/user/tutorials/**>
>>>>>>>>>>> **>
>>>>>>>>>>> **<http://docs.geoserver.org/******stable/en/user/tutorials/**<http://docs.geoserver.org/****stable/en/user/tutorials/**>
>>>>>>>>>>> **<http://docs.geoserver.org/****stable/en/user/tutorials/**<http://docs.geoserver.org/**stable/en/user/tutorials/**>
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> imagemosaic-jdbc/imagemosaic-**********jdbc_tutorial.html<**
>>>>>>>>>>> http:/**
>>>>>>>>>>> /****
>>>>>>>>>>> docs.geoserver.org/stable/en/********user/tutorials/**
>>>>>>>>>>> imagemosaic-****<http://docs.geoserver.org/stable/en/******user/tutorials/imagemosaic-****>
>>>>>>>>>>> <http://docs.**geoserver.org/stable/en/******
>>>>>>>>>>> user/tutorials/imagemosaic-**<http://docs.geoserver.org/stable/en/****user/tutorials/imagemosaic-**>
>>>>>>>>>>> >
>>>>>>>>>>> <http://docs.geoserver.org/****stable/en/**user/tutorials/**<http://docs.geoserver.org/**stable/en/**user/tutorials/**>
>>>>>>>>>>> imagemosaic-**<http://docs.**geoserver.org/stable/en/****
>>>>>>>>>>> user/tutorials/imagemosaic-**<http://docs.geoserver.org/stable/en/**user/tutorials/imagemosaic-**>
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> jdbc/imagemosaic-jdbc_********tutorial.html<http://docs.**
>>>>>>>>>>> geoserver.org/stable/en/user/******tutorials/imagemosaic-jdbc/**
>>>>>>>>>>> **<http://geoserver.org/stable/en/user/****tutorials/imagemosaic-jdbc/**>
>>>>>>>>>>> <http://geoserver.org/**stable/en/user/**tutorials/**
>>>>>>>>>>> imagemosaic-jdbc/**<http://geoserver.org/stable/en/user/**tutorials/imagemosaic-jdbc/**>
>>>>>>>>>>> >
>>>>>>>>>>> imagemosaic-jdbc_tutorial.****html<http://docs.geoserver.**
>>>>>>>>>>> org/stable/en/user/tutorials/****imagemosaic-jdbc/imagemosaic-**
>>>>>>>>>>> **
>>>>>>>>>>>
>>>>>>>>>>> jdbc_tutorial.html<http://**docs.geoserver.org/stable/en/**
>>>>>>>>>>> user/tutorials/imagemosaic-**jdbc/imagemosaic-jdbc_**
>>>>>>>>>>> tutorial.html<http://docs.geoserver.org/stable/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html>
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> **>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> >
>>>>>>>>>>>
>>>>>>>>>>> .
>>>>>>>>>>> But I use to import rasters raster2pgsql and than from rast
>>>>>>>>>>> column
>>>>>>>>>>> I
>>>>>>>>>>> create
>>>>>>>>>>> the polygon and bytea for Image mosaic JDBC plugin (the structure
>>>>>>>>>>> what
>>>>>>>>>>> original import tool create).
>>>>>>>>>>>
>>>>>>>>>>> But the question is. Now I have for example rast created from
>>>>>>>>>>> png,
>>>>>>>>>>> ok
>>>>>>>>>>> than
>>>>>>>>>>> I use ST_asGDALRaster(rast, png) on this column and I have bytea
>>>>>>>>>>> code
>>>>>>>>>>> for
>>>>>>>>>>> bytea column. But if I try to make it as JPEG for
>>>>>>>>>>> example ST_asGDALRaster(rast, JPEG) I get anything in my map
>>>>>>>>>>> window.
>>>>>>>>>>> Image
>>>>>>>>>>> mosaic JDBC plugin consumes only PNG?
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>>
>>>>>>>>>>> Regards
>>>>>>>>>>>
>>>>>>>>>>> Jakub
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>  ------------------------------**********----------------------*
>>>>>>>>>>> *--**
>>>>>>>>>>>
>>>>>>>>>> --**--**
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --**----
>>>>>>>>>>
>>>>>>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>  ------------------------------********------------------------**
>>>>>>>> --**--**
>>>>>>>> --**----
>>>>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>> ------------------------------******--------------------------**
>>>>> --**--**----
>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> ------------------------------****----------------------------**--**----
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>>
>>
>
>
> ------------------------------**------------------------------**----
> This message was sent using IMP, the Internet Messaging Program.
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to