[Geoserver-users] Enlightment needed : Adding Shapefile

Dear All ...
I'm trying to install / config GeoServer 1.6.5
My installation is based on the "war" file.

After deployment from tomcat interface .. it looks good.
Preview Map of "demo" work fine.

Next I try to add my frirst shapefile.

I made a subdirectory called "navnet" .. put my files under that new sub-dir.
Take a steps from tutorial ... to point my DataStorage to one of that shp file.

I put 4326 as srs , click "generate" , click "submit"

Click "apply" and "save"

And I see my data storage at http://192.168.4.2:8080/geoserver/mapPreview.do.

Click on "openlayer" ... and it only show a Blank Box with a Zoom bar at the left.

I have no prj file on that directory .... is that the problem ??

Kindly please give me your enlightment

Sincerely
-bino-

Bino Oetomo ha scritto:

Dear All ...
I'm trying to install / config GeoServer 1.6.5
My installation is based on the "war" file.

After deployment from tomcat interface .. it looks good.
Preview Map of "demo" work fine.

Next I try to add my frirst shapefile.

I made a subdirectory called "navnet" .. put my files under that new sub-dir.
Take a steps from tutorial ... to point my DataStorage to one of that shp file.

I put 4326 as srs , click "generate" , click "submit"

Click "apply" and "save"

And I see my data storage at http://192.168.4.2:8080/geoserver/mapPreview.do.

Click on "openlayer" ... and it only show a Blank Box with a Zoom bar at the left.

I have no prj file on that directory .... is that the problem ??

First thing that comes to mind looking at the above steps is that
you did not configure the proper style for your data?
The basic ones are point/line/polygon, choose the right one from
the top drop down list labelled style, submit/apply and see if
now you get anything.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Dear Andre ...
Andrea Aime wrote:

First thing that comes to mind looking at the above steps is that
you did not configure the proper style for your data?
The basic ones are point/line/polygon, choose the right one from
the top drop down list labelled style, submit/apply and see if
now you get anything.

Cheers
Andrea

Thankyou for your enlightment
I did give it "style" .... i put "line" as it's style.
After some try .. I found that some time the map did not displayed promptly ...After a click on my browser's "refresh", it showed up.
That's with Firefox.

I try using Konqueror ... and the problem disapear, just the loading speed is a litle too slow.

My development box is :
- CPU : P4 2Ghz
- RAM : 1.5 GB
- HDD : 40 GB
- ShapeFile :
-rw-r--r-- 1 root root 41M 2008-11-17 18:14 navnet_line.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_marine_line.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_marine_point.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_marine_polygon.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_point.shp
-rw-r--r-- 1 root root 2.9M 2008-11-17 18:14 navnet_poi.shp
-rw-r--r-- 1 root root 66M 2008-11-17 18:14 navnet_polygon.shp

Is it a problem between Engine vs ShapeFile size ?

Sincerely
-bino-

Bino Oetomo ha scritto:

Dear Andre ...
Andrea Aime wrote:

First thing that comes to mind looking at the above steps is that
you did not configure the proper style for your data?
The basic ones are point/line/polygon, choose the right one from
the top drop down list labelled style, submit/apply and see if
now you get anything.

Cheers
Andrea

Thankyou for your enlightment
I did give it "style" .... i put "line" as it's style.
After some try .. I found that some time the map did not displayed promptly ...After a click on my browser's "refresh", it showed up.
That's with Firefox.

I try using Konqueror ... and the problem disapear, just the loading speed is a litle too slow.

My development box is :
- CPU : P4 2Ghz
- RAM : 1.5 GB
- HDD : 40 GB
- ShapeFile :
-rw-r--r-- 1 root root 41M 2008-11-17 18:14 navnet_line.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_marine_line.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_marine_point.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_marine_polygon.shp
-rw-r--r-- 1 root root 100 2008-11-17 18:14 navnet_point.shp
-rw-r--r-- 1 root root 2.9M 2008-11-17 18:14 navnet_poi.shp
-rw-r--r-- 1 root root 66M 2008-11-17 18:14 navnet_polygon.shp

Is it a problem between Engine vs ShapeFile size ?

Well, the machine is not recent and the shapefile are relatively big,
you definitely won't get instant display trying to put 100MB of
shapefile data on screen.
There are a number of things that can be done to speed up things:
- use the most recent JDK you can find
- on that hardware there's no change the VM will switch to server
   mode by itself, you'll have to tweak the JVM settings manually,
   see: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment
- download and install the native portions of JAI and JAI Image I/O
   from jai.dev.java.net and jai-imageio.dev.java.net
- try not to display all that data in a single shot but use
   SLD scale dependency rules to display only parts of your data at
   a time
- if your map is tiled, use a tile cache (e.g. GeoWebCache) to
   cache the tiles and forget about speed issues altogether.
   Of course this assumes your data is not changing fast

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Dear Andrea
Andrea Aime wrote:

Well, the machine is not recent and the shapefile are relatively big,
you definitely won't get instant display trying to put 100MB of
shapefile data on screen.
There are a number of things that can be done to speed up things:
- use the most recent JDK you can find

My Installed JDK is : jdk1.6.0_10

- on that hardware there's no change the VM will switch to server
  mode by itself, you'll have to tweak the JVM settings manually,
  see: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment

Woooppss .... so many variables to set on JVM section ... I don't know how to do it, since I just Install XAMPP, JDK, and Tomcat

- download and install the native portions of JAI and JAI Image I/O

Done
I Think I "feel" some small performance raise

  from jai.dev.java.net and jai-imageio.dev.java.net
- try not to display all that data in a single shot but use
  SLD scale dependency rules to display only parts of your data at
  a time

Hmm .. I need to know more about SLD first

- if your map is tiled, use a tile cache (e.g. GeoWebCache) to
  cache the tiles and forget about speed issues altogether.
  Of course this assumes your data is not changing fast

Onfortunately .. the shapefiles is gathered from converting single *.mp file.

I read about MySQL data store.
Will it help ?
My wishes about this MySQL dataStore solution is :
- The amount of loaded data is "on demand"
- The map will show label of each object. With Shapefile, looks like the label disapear

I use ogr2ogr to inject my Shapefile to MySql.
Looks like generated database/table structure is diferent per http://geoserver.org/display/GEOSDOC/MySQL+DataStore
my Table structure (export from PhPMyAdmin) :
CREATE TABLE IF NOT EXISTS `navnet_line` (
  `OGR_FID` int(11) NOT NULL auto_increment,
  `SHAPE` geometry NOT NULL,
  `type` decimal(5,0) default NULL,
  `label` varchar(80) default NULL,
  `descr` varchar(80) default NULL,
  `label3` varchar(80) default NULL,
  `city` varchar(80) default NULL,
  `region` varchar(80) default NULL,
  `country` varchar(80) default NULL,
  `zip` varchar(80) default NULL,
  `oneway` decimal(1,0) default NULL,
  `toll` decimal(1,0) default NULL,
  `speed` decimal(2,0) default NULL,
  `roadclass` decimal(2,0) default NULL,
  `roadid` decimal(9,0) default NULL,
  `level` decimal(5,0) default NULL,
  `endlevel` decimal(5,0) default NULL,
  UNIQUE KEY `OGR_FID` (`OGR_FID`),
  SPATIAL KEY `SHAPE` (`SHAPE`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=241979 ;

Sincerely
-bino-

Bino Oetomo ha scritto:

Dear Andrea
Andrea Aime wrote:

Well, the machine is not recent and the shapefile are relatively big,
you definitely won't get instant display trying to put 100MB of
shapefile data on screen.
There are a number of things that can be done to speed up things:
- use the most recent JDK you can find

My Installed JDK is : jdk1.6.0_10

- on that hardware there's no change the VM will switch to server
  mode by itself, you'll have to tweak the JVM settings manually,
  see: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment

Woooppss .... so many variables to set on JVM section ... I don't know how to do it, since I just Install XAMPP, JDK, and Tomcat

Go into your Tomcat bin directory, look in catalina.sh, you can add
the parameters to JAVA_OPTS variable (double check, I'm not sure
about the name). The params above will make GeoServer startup and first
image serve slower, but then it should become quite a bit faster.

- download and install the native portions of JAI and JAI Image I/O

Done
I Think I "feel" some small performance raise

  from jai.dev.java.net and jai-imageio.dev.java.net
- try not to display all that data in a single shot but use
  SLD scale dependency rules to display only parts of your data at
  a time

Hmm .. I need to know more about SLD first

There is some sample here:
http://geoserver.org/display/GEOSDOC/SLD+Intro+Tutorial
The full specification is here:
http://portal.opengeospatial.org/files/?artifact_id=1188

- if your map is tiled, use a tile cache (e.g. GeoWebCache) to
  cache the tiles and forget about speed issues altogether.
  Of course this assumes your data is not changing fast

Onfortunately .. the shapefiles is gathered from converting single *.mp file.

No no, I mean the output. Are you using OpenLayers in tiled mode?
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Dear Andrea
Andrea Aime wrote:

Go into your Tomcat bin directory, look in catalina.sh, you can add
the parameters to JAVA_OPTS variable (double check, I'm not sure
about the name). The params above will make GeoServer startup and first
image serve slower, but then it should become quite a bit faster.

Done ... I Add all of it to JAVA_OPTS variable.
Just one option that can not (not yet) succeed .... the one about GarbageCollector

There is some sample here:
http://geoserver.org/display/GEOSDOC/SLD+Intro+Tutorial
The full specification is here:
http://portal.opengeospatial.org/files/?artifact_id=1188

I went to the first url ... learn a litle about it ... and try some experiment
Currently I work on displaying "label"
Not yest succeed .... the "Label" is there in PgSQL table .. but it didn't displayed.
Note : I move the data from shp to pgsql.
This label problem occurs at poi table ... but at Polygon table it work.

I really appreciate your enlightment

-bino-