Author Topic: using JPCT for cartography!  (Read 17861 times)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
using JPCT for cartography!
« on: July 10, 2007, 02:30:47 am »
Hi, I  must do an own "google maps" system from 0, no maps, no tools, no nothing.  >:( >:( >:(

I was thinking on using jpct for loading the maps but I am worried about the memory becausse they would be huge (a city map) but I could use many of their advantages like getting names from the objects, rendering, the interact2D methods, being able to mark points, java based and trace a route. I guess I might use jpct for this but I am afraid becausse I must do it fast and well, but I got too many requirement and 0 resources for that. I have been looking for GIS tools but I have had not luck with it.

If anyone knows how can I do a mini google maps for tracking vehicles, tracing routes, showing address info, etc etc etc, please tell me becausse I really really need it!  :'( :'( :'(
Nada por ahora

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: using JPCT for cartography!
« Reply #1 on: July 10, 2007, 04:13:45 am »
There is no way you can pull that out of thin air:P

You'll have trouble with coordinates, scale, and all sorts :D
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline hytparadisee

  • int
  • **
  • Posts: 86
    • View Profile
    • http://peterhi.com
Re: using JPCT for cartography!
« Reply #2 on: July 10, 2007, 04:53:56 am »
Just on the news section yesterday from www.java.net

This one might be what you are looking for.

java world wind SDK from NASA

http://worldwind.arc.nasa.gov/java/
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: using JPCT for cartography!
« Reply #3 on: July 10, 2007, 04:20:14 pm »
There is no way you can pull that out of thin air:P

You'll have trouble with coordinates, scale, and all sorts :D

Why? Once I have a good map, I just need to define 3 point of reference then I could reach any other position!
Nada por ahora

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: using JPCT for cartography!
« Reply #4 on: July 10, 2007, 04:27:50 pm »
I have seen world wind but its just satellite view as google earth o google maps on the satellital view, but I need to get the street names and draw a route over the streets. Any idea about that?
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: using JPCT for cartography!
« Reply #5 on: July 10, 2007, 05:58:12 pm »
How huge would that city map be?

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: using JPCT for cartography!
« Reply #6 on: July 10, 2007, 06:02:37 pm »
Sorry for sounding defeatist there:).

It is possible, but what I meant was that it will take time to make something like that.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: using JPCT for cartography!
« Reply #7 on: July 10, 2007, 06:11:59 pm »
How huge would that city map be?

thinking it well, it wount be so huge. The project is to track vehicles on Columbia! (All th country), especially on Bogota, Cali, and the main cities. A street is not heavy, just a beveled polygon, so the map wont be that heavy thinking well. I guess jpct is a very good technology for use in cartography! Now I am trying to buy a dwf map of Bogota to test it, but the problem is that the map seller is on Columbia and me in Ecuador! Is any one has a dwf or dwg map of the streets of any city please  :-[ give it to me for testing.
Nada por ahora

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: using JPCT for cartography!
« Reply #8 on: July 11, 2007, 05:58:31 am »
Well, I tried first to create the 3ds file using 3d studio max, but my PC died trying to work with the map. I guess is on real scale, more than a million of square relative units.
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: using JPCT for cartography!
« Reply #9 on: July 11, 2007, 02:45:50 pm »
Sounds huge...with enough RAM, it should be loadable. Processing it will take some time, but after building it and creating an octree, you may serialize it, which is much faster to load. If only a small section is being rendered, it might work...
However, this is all guessing. I've never tried how jPCT behaves with such huge objects.

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: using JPCT for cartography!
« Reply #10 on: July 11, 2007, 04:12:09 pm »
Is it possible to load it into something like Blender, and use its "Simplify" tool?

It will merge similar polygons, reducing the polycount, but not affecting the quality too much - depending on the zoom level you are intending to use.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: using JPCT for cartography!
« Reply #11 on: July 11, 2007, 05:07:24 pm »
well, the map is on dwf format (1.9MB), but after the convertion to DWG or DXF it went to 9 MB, I guess they have many stuff that make it big. Once I got an autocad model of 3.2 MB and after deleting things like tress and gardens it went to 300 KB. I wante to do that firstly but my PC werent able to do it!
Nada por ahora

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: using JPCT for cartography!
« Reply #12 on: July 13, 2007, 06:05:23 pm »
so, what about this:

1.- getting a jpg or bmp of the city at a good resolution!; maybe 3000x3000

2.- draw lines in Autocad over the main streets

   2.1.- Defining one set of roads for each way (north, south, east, west)

3.- each line may have a different name for example: "n|Amazonas" for Amazonas avenue going to north

4.- Use a plane of the same dimmensions of the image map

5.- merge the lines drawed with the plane making it fit.

6.- export it as 3ds and pass it to jpct.

Any suggestions? This would only work for the main streets becausse I will be helped by an architect friend. So I cant expect him to draw thousands of streets and putting names to them.
Nada por ahora

Offline halcor

  • byte
  • *
  • Posts: 28
    • View Profile
Re: using JPCT for cartography!
« Reply #13 on: July 16, 2007, 01:56:59 pm »
I think using jpct for drawing 2d raster map and some vector data over it (if I understand correctly your needs) is overkill. Basicly, at any moment, you have position, rotation and scale of the map, right? So, assuming you stick to the standard Java MVC pattern you need to design and implement:
1. MODEL - a way to load and represent vector data (doesn't matter if it comes from AutoCad or from some other source) over raster data
2. VIEW - a way to display data in it's current state (position, rotation, scale)
3. CONTROLLER - a way to interact with the user and let him change position, scale, rotation

A site with many java GIS projects with source for inspiration:
http://opensourcegis.org/

On the other hand jpct can display textured planes (scaled and rotated raster data) and wireframe meshes (scaled and rotated vector data)... out of ideas here, but hope I helped a little :)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: using JPCT for cartography!
« Reply #14 on: July 16, 2007, 07:49:02 pm »
In fact, no. But thanks a lot anyway. I am running out of ideas. I will try to make a basic thing with jpct and will post the results.
Nada por ahora