Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Reading .shp file

  Asked By: Alma    Date: Mar 05    Category: Java    Views: 1497
  

I want to read the contents of .shp file and display in a .jsp page.
can any one tell me how can i do this,please........

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Edna West     Answered On: Mar 05

I don't know what the format of a .shp file  is. Assuming it's a text file:

1) read  your file into a Java variable via a scriptlet
2) Assign this variable to a TEXTAREA tag.
You can do it like this:
<% Scriptlet to read the file into String shpFile; %>
...
<TEXTAREA><%=shpFile %></TEXTAREA>

If the file is NOT a text file, you need the same 2-step process; you
just need more customized coding for step 1. You might also do a search
to see if there are any libraries out there to convert a .shp file into
a String.

 
Answer #2    Answered By: Guilherme Silva     Answered On: Mar 05

ShapeFRAME (Shape file  Rendering and Modeling Engine)
Description:

Java Applet to render and view GIS Data. ShapeFRAME allows panning,
zooming, feature selection, layer hiding/showing, and simple spatial
queries WITHOUT needing to access the server! ShapeFRAME reads the
ArcView ShapeFile format and the associated Dbase (DBF) attribute
file. ShapeFRAME can work as a full "standalone" viewer ( reading
whole ShapeFiles from the web server) or as Client/Server using RMI,
with the server component either reading  shapefiles from the
filesystem or from ESRI's SDE application.

 
Didn't find what you were looking for? Find more on Reading .shp file Or get search suggestion and latest updates.




Tagged: