[Geoserver-users] . Installing native JAI on GeoServer 2.2.4

Hi,

I am curious about this. The link from GeoServer goes to jai-1.1.3, which is from 2006, which seems quite old. Is that the correct native jai package?

Thanks

Mark Volz
GIS Specialist

Message: 3
Date: Tue, 29 Jan 2013 11:55:14 +0100
From: Andrea Aime <andrea.aime@anonymised.com>
Subject: Re: [Geoserver-users] Installing native JAI on GeoServer
  2.2.4
To: Paul Meems <bontepaarden@anonymised.com>
Cc: geoserver-users <geoserver-users@lists.sourceforge.net>
Message-ID:
  <CA+nxMTuHEmX9vnKnfKQit0swDeXFfF-
otaZQ6YqGWni9b4=Keg@anonymised.com>
Content-Type: text/plain; charset="iso-8859-1"

On Tue, Jan 29, 2013 at 11:39 AM, Paul Meems <bontepaarden@anonymised.com>
wrote:

> In the release notes of GeoServer 2.2.4 I read *Imageio-ext was
> upgraded to version 1.1.6* Does this mean we don't need to do these
> steps anymore:
>
> http://docs.geoserver.org/2.1.x/en/user/production/java.html#install-n
> ative-jai-and-jai-image-i-o-extensions
>

Nope, it's unrelated. JAI and JAI imageio are the base libraries, Imageio-EXT
builds on top of JAI ImageIO and provides support for reading more formats,
as well BigTIFF support, by binding to more native libraries (e..g, Kakadu for
JPEG200, MrSid, ECW, and so on).

Cheers
Andrea

Looks like it.
There’s a “daily” build of imageio if you navigate around the structure, but even that stopped in 2011. http://download.java.net/media/jai-imageio/builds/

On 30 January 2013 16:53, Mark Volz <MarkVolz@anonymised.com> wrote:

Hi,

I am curious about this. The link from GeoServer goes to jai-1.1.3, which is from 2006, which seems quite old. Is that the correct native jai package?

Thanks

Mark Volz
GIS Specialist

Message: 3
Date: Tue, 29 Jan 2013 11:55:14 +0100
From: Andrea Aime <andrea.aime@anonymised.com>
Subject: Re: [Geoserver-users] Installing native JAI on GeoServer
2.2.4
To: Paul Meems <bontepaarden@anonymised.com>
Cc: geoserver-users <geoserver-users@lists.sourceforge.net>
Message-ID:
<CA+nxMTuHEmX9vnKnfKQit0swDeXFfF-
otaZQ6YqGWni9b4=Keg@anonymised.com>
Content-Type: text/plain; charset=“iso-8859-1”

On Tue, Jan 29, 2013 at 11:39 AM, Paul Meems <bontepaarden@anonymised.com>
wrote:

In the release notes of GeoServer 2.2.4 I read Imageio-ext was
upgraded to version 1.1.6
Does this mean we don’t need to do these
steps anymore:

http://docs.geoserver.org/2.1.x/en/user/production/java.html#install-n
ative-jai-and-jai-image-i-o-extensions

Nope, it’s unrelated. JAI and JAI imageio are the base libraries, Imageio-EXT
builds on top of JAI ImageIO and provides support for reading more formats,
as well BigTIFF support, by binding to more native libraries (e…g, Kakadu for
JPEG200, MrSid, ECW, and so on).

Cheers
Andrea


Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Wed, Jan 30, 2013 at 5:53 PM, Mark Volz <MarkVolz@anonymised.com> wrote:

Hi,

I am curious about this. The link from GeoServer goes to jai-1.1.3, which is from 2006, which seems quite old. Is that the correct native jai package?

Yes, it is. Sun/Oracle stopped developing it, but it’s still the best image processing library for Java.
You can consider it a “done” project, the API allows for user extension, for adding new operations,
and we’re leveraging that on a as-needed basis

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Hi,

I need to do a query for a map layer, and pass mulitple values to parameters. For example,

Select * from VIEW where LocationID in (1, 3, 4, 5, 11)

The values of locationID is dynamic, it mabye one ID, two IDs or many IDs.

Is it doable to set up parameters like this?

Also, is it doable to use a SQL server stored Procedure in GeoServer SQL view? I tried something like “EXEC StoredProcedure_Name” but I got errors.

Thanks,
Meichun

Even though I can’t use SQL Server Stored Procedure in SQL view, I figured out how to use table-valued functions which worked great! Also,I can pass multi-value parameters to a function.

Thanks!
Meichun

From: Meichun Li pcloudy2005@anonymised.com
To:geoserver-users@lists.sourceforge.netgeoserver-users@lists.sourceforge.net
Sent: Wednesday, January 30, 2013 4:18 PM
Subject: Passing multiple values to parameters / SQL Server Stored Procedure

Hi,

I need to do a query for a map layer, and pass mulitple values to parameters. For example,

Select * from VIEW where LocationID in (1, 3, 4, 5, 11)

The values of locationID is dynamic, it mabye one ID, two IDs or many IDs.

Is it doable to set up parameters like this?

Also, is it doable to use a SQL server stored Procedure in GeoServer SQL view? I tried something like “EXEC StoredProcedure_Name” but I got errors.

Thanks,
Meichun

On Thu, Jan 31, 2013 at 6:27 PM, Meichun Li <pcloudy2005@anonymised.com> wrote:

Even though I can’t use SQL Server Stored Procedure in SQL view, I figured out how to use table-valued functions which worked great! Also,I can pass multi-value parameters to a function.

Ah interesting, this is going to be useful for other users, thanks for letting us know.

Could you share the example of the table valued function?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Yes, it would be nice to see this example.

Perhaps these kinds of things could start to be captured in a “SQL Views Tips and Tricks” section in the User Guide?

On Thu, Jan 31, 2013 at 10:24 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Jan 31, 2013 at 6:27 PM, Meichun Li <pcloudy2005@anonymised.com> wrote:

Even though I can’t use SQL Server Stored Procedure in SQL view, I figured out how to use table-valued functions which worked great! Also,I can pass multi-value parameters to a function.

Ah interesting, this is going to be useful for other users, thanks for letting us know.

Could you share the example of the table valued function?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Thu, Jan 31, 2013 at 7:34 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Yes, it would be nice to see this example.

Perhaps these kinds of things could start to be captured in a “SQL Views Tips and Tricks” section in the User Guide?

That would be nice indeed

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Here is an example.

Enviroments:
GeoServer2.2.2
Database: SQL SERVER 2008

Table tblZip stores geography data, and another table tblCountsByZip stores counts by zip code.

tblZip has columns: ID, ZIPCODE, GEOM (data type is GEOMETRY ), etc

tblCountsByZip contains columns: ZIPCODE, CountsByZIP. This table’s data are updated frequently.

I tried to do a description Layer that shows counts by Zip area. I created the layer using GeoServer SQL view. For security issue and easy of maintainance, I don’t want to use straight SQL statement in the SQL view. usally I used Stored Procedure in my applications but stored procedure doesn’t work in GeoServer SQL view. I tried SQL SERVER table-valued functions and that works.

I created a table-valued function fn_CountsByZip in the database.

Example codes:

CREATE FUNCTION [dbo].[ fn_CountsByZip]
(
– Add the parameters for the function here
@ZIPCODE varchar(8000),
)
RETURNS TABLE
AS
RETURN
(
– Add the SELECT statement with parameter references here
SELECT tblZip.ID, tblZip.ZIPCODE, tblZip.GEOM,
tblCountsByZIP .CountsByZip
from tblZip
join tblCountsByZIP tblZIP.ZIPCODE = tblCountsByZIP.ZIPCODE
–Note: fn_Split is a function that split comma delimited String
join fn_Split(@ZIPCODE, ‘,’) z tblZIP.ZIPCODE= z.items
)

GO

Example query to select from the function:
Select * from fn_CountsByZip(‘27514,27516’);

I created a map layer using SQL View following the instructions on http://docs.geoserver.org/stable/en/user/data/database/sqlview.html)

In SQL view, I used the query below and set up a parameter %ZIPCODE%

Select * from fn_CountsByZip(%ZIPCODE%)

You can see that the query is simple in SQL View, since all the logic is handled in the function fn_CountsByZip.

By doing this, we can get a dynamic map layer of counts by zip code which fetches real-time data from the database.

Using WMS, we can limit the results by zipcodes, using viewparams such as &viewparams= ZIPCODE:27514
or &viewparams= ZIPCODE:27514, 27516.

Hope this helps.

Thanks!
Meichun

From: Martin Davis mtnclimb@anonymised.com
To: Andrea Aime andrea.aime@anonymised.com
Cc: Meichun Li pcloudy2005@anonymised.com; “geoserver-users@lists.sourceforge.netgeoserver-users@lists.sourceforge.net
Sent: Thursday, January 31, 2013 1:34 PM
Subject: Re: [Geoserver-users] Passing multiple values to parameters / SQL Server Stored Procedure

Yes, it would be nice to see this example.

Perhaps these kinds of things could start to be captured in a “SQL Views Tips and Tricks” section in the User Guide?

On Thu, Jan 31, 2013 at 10:24 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Jan 31, 2013 at 6:27 PM, Meichun Li <pcloudy2005@anonymised.com> wrote:

Even though I can’t use SQL Server Stored Procedure in SQL view, I figured out how to use table-valued functions which worked great! Also,I can pass multi-value parameters to a function.

Ah interesting, this is going to be useful for other users, thanks for letting us know.

Could you share the example of the table valued function?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Adding to Andrea's:

here is where JAI extensions and replacements go http://jaitools.org/

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Wed, Jan 30, 2013 at 6:51 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

On Wed, Jan 30, 2013 at 5:53 PM, Mark Volz <MarkVolz@anonymised.com> wrote:

Hi,

I am curious about this. The link from GeoServer goes to jai-1.1.3, which
is from 2006, which seems quite old. Is that the correct native jai
package?

Yes, it is. Sun/Oracle stopped developing it, but it's still the best image
processing library for Java.
You can consider it a "done" project, the API allows for user extension, for
adding new operations,
and we're leveraging that on a as-needed basis

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users