Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am wondering if there is a possibility of programming new functions for PostGIS using Java, so that you can refer them same way as classic PostGIS functions are. Something like this:

CREATE OR REPLACE FUNCTION public.st_line_interpolate_point(geometry, double precision)
  RETURNS geometry AS
'$libdir/postgis-2.0', 'LWGEOM_line_interpolate_point'
  LANGUAGE c IMMUTABLE STRICT
  COST 1;

I know that most of PostGIS functions are written in C however I am not very familiar with that language.

share|improve this question
1  
Note that PostGIS 1.5 and earlier had PL/Java support for PostGIS geometries, but it was dropped for the 2.0 release since it was always pre-Alpha quality, and not maintained since 2006. However, this shouldn't prevent you from using PL/Java for general purpose PostgreSQL functions. –  Mike T Apr 2 '12 at 21:35

1 Answer 1

up vote 4 down vote accepted

Yes, it is possible to add PL/Java:

http://www.postgresql.org/docs/current/static/external-pl.html

Be sure to read up on the security issues involved in adding a new procedural language to PostgreSQL.

share|improve this answer
    
Thank you very much, I will make sure to check those security issues. –  Jan Caha Apr 2 '12 at 17:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.